Closed Bug 1353868 Opened 7 years ago Closed 7 years ago

Move Java-side Web App manifest parsing into a separate class

Categories

(Firefox for Android Graveyard :: Web Apps (PWAs), defect, P2)

All
Android
defect

Tracking

(firefox57 fixed)

RESOLVED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: JanH, Assigned: snorp)

References

Details

Attachments

(1 file)

Code outside of the WebAppActivity itself might want to read manifests, so this should be split out.
Priority: -- → P2
No longer blocks: 1285858
Comment on attachment 8901520 [details]
Bug 1353868 - Split out web app manifest handling and fix scope handling

https://reviewboard.mozilla.org/r/172970/#review178756

::: mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java:188
(Diff revision 3)
>              window.setStatusBarColor(ColorUtil.darken(themeColor, 0.25));
>          }
>      }
>  
> -    private void updateScreenOrientation(JSONObject manifest) {
> -        String orientString = manifest.optString("orientation", null);
> +    private void updateScreenOrientation() {
> +        String orientString = mManifest.getOrientation();

Can be final.

::: mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java:201
(Diff revision 3)
>  
>          setRequestedOrientation(activityOrientation);
>      }
>  
> -    private void updateDisplayMode(JSONObject manifest) {
> -        String displayMode = manifest.optString("display");
> +    private void updateDisplayMode() {
> +        String displayMode = mManifest.getDisplayMode();

Can be final.

::: mobile/android/base/java/org/mozilla/gecko/webapps/WebAppManifest.java:42
(Diff revision 3)
> +    private Uri mScope;
> +    private Uri mStartUri;
> +    private String mDisplayMode;
> +    private String mOrientation;
> +
> +    public static WebAppManifest fromFile(String url, String path) {

Can be final (holds for the rest of the method arguments in the class).
Attachment #8901520 - Flags: review?(esawin) → review+
Pushed by jwillcox@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a4cb65beefec
Split out web app manifest handling and fix scope handling r=esawin
https://hg.mozilla.org/mozilla-central/rev/a4cb65beefec
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Depends on: 1395569
Depends on: 1459513
Assignee: nobody → snorp
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: