Closed Bug 1295675 Opened 5 years ago Closed 5 years ago

Allow for the setting of application level preferences from a distribution

Categories

(Firefox for Android Graveyard :: Android partner distribution, defect)

defect
Not set
normal

Tracking

(firefox51 affected, firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox51 --- affected
firefox55 --- fixed

People

(Reporter: mkaply, Assigned: mkaply)

References

Details

Attachments

(1 file, 2 obsolete files)

Currently the distribution mechanism can only be used to set profile level preferences.

We should allow app level preferences to be set as well (for instance, session restore).
Blocks: 1314038
Comment on attachment 8850272 [details]
Bug 1295675 - Allow app level preferences.

https://reviewboard.mozilla.org/r/122908/#review125314

Nice!

Please update our wiki page:
https://wiki.mozilla.org/Mobile/Distribution_Files
Attachment #8850272 - Flags: review?(s.kaspari) → review+
Pushed by ihsiao@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/565c6c66205d
Allow app level preferences. r=sebastian
Keywords: checkin-needed
Attached file patch.txt (obsolete) —
Sorry I've added the hook to check for style before I push for review so this won't happen aggain.
Flags: needinfo?(cnevinchen) → needinfo?(ihsiao)
Please reopen the reviewboard, get review+, and then ask for checkin.
Flags: needinfo?(ihsiao)
Comment on attachment 8850272 [details]
Bug 1295675 - Allow app level preferences.

Hi Sebastian.
I've added two spaces for check style.
Please help review it.. thank you! (per comment 6)


Best regards,
Nevin
Flags: needinfo?(s.kaspari)
Comment on attachment 8850857 [details]
patch.txt

I've resent the review-request so this patch is not needed.
Attachment #8850857 - Attachment is obsolete: true
Flags: needinfo?(s.kaspari)
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f62c008a7b9f
Allow app level preferences. r=sebastian
Keywords: checkin-needed
Comment on attachment 8850272 [details]
Bug 1295675 - Allow app level preferences.

https://reviewboard.mozilla.org/r/122908/#review126480

::: mobile/android/base/java/org/mozilla/gecko/preferences/DistroSharedPrefsImport.java:34
(Diff revision 2)
> +        if (appPref.length() != 0) {
> +            applyPreferences(appPref, GeckoSharedPrefs.forApp(context).edit());
> +        }
>  
> -        final JSONObject preferences = distribution.getAndroidPreferences();
> -        if (preferences.length() == 0) {
> +        final JSONObject profilePref = distribution.getPreferences(Distribution.PREF_KEY_PROFILE_PREFERENCES);
> +        if (appPref.length() != 0) {

This should be profilePref
Attachment #8850272 - Flags: review-
Test failure was caused by a typo in the patch.

I've added the issue to the review request.
Flags: needinfo?(mozilla)
This was backed out, so you'll need to submit a complete patch again.
Sorry I don't understand.
Do you mean I should combine the two patch in this bug and submit a complete patch again?
Thank you!
Flags: needinfo?(mozilla)
Yes, to make it easier for someone else to check in the code, it's better to have one complete patch.
Flags: needinfo?(mozilla)
Attachment #8851936 - Attachment is obsolete: true
Attachment #8851936 - Flags: review?(mozilla)
How about it now? Thanks!
Flags: needinfo?(mozilla)
Awesome, thanks. I'll review and check in.
Flags: needinfo?(mozilla)
Comment on attachment 8850272 [details]
Bug 1295675 - Allow app level preferences.

https://reviewboard.mozilla.org/r/122908/#review127312
Attachment #8850272 - Flags: review?(mozilla) → review+
Nevin:

Can you reopen the review request?

https://reviewboard.mozilla.org/r/122906/

Then we can resubmit to autoland.

I've already done successful try runs.
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/9c6514e9b04b
Allow app level preferences. r=mkaply,sebastian
https://hg.mozilla.org/mozilla-central/rev/9c6514e9b04b
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.