gecko-dev/mobile
Petru Lingurar 9d1cf91350 Bug 1454686 - Respond to changes in the new preference state state; r=mcomella
Because Mma cannot work if Health Report is disabled by the user (Settings - Privacy)
we will treat toggling Health Report on/off the same as we treat toggling the new preference from Settings - Notifications.
Toggling Health Report on will inform about the need to start LeanPlum (useful if the user did not explicitly stopped LP notifications but only Health Report which in turn disabled LeanPlum also) but there are other checks made afterwards (BrowserAp() is informed about this which calls GeckoPreferences.isMmaAvailable(..)) to decide if LP can and should be enabled.

Toggling any of these preferences will trigger an event caught by BrowserApp which can either
    - immediately initialize LeanPlum (if the toggle was off LP is not running) as it would normally do when the app first starts
    - stop LeanPlum reporting to servers, flush the per-session available messages
      and resets the LP started status so that it can be restarted in the same app session (like if the user toggles the feature again)

MozReview-Commit-ID: 1SmhN0NucWW
***

--HG--
extra : rebase_source : b461677fd8a07d7c0c463e55c33bae1a3a973a1f
2018-05-16 15:54:13 +03:00
..
android Bug 1454686 - Respond to changes in the new preference state state; r=mcomella 2018-05-16 15:54:13 +03:00
locales Bug 1461345 - Move browser.search.order to list.json. r=adw 2018-05-21 14:27:06 -05:00