Currently, GeckoPreferences always returns "false" for isGeckoActivityOpened(), which means that when we're e.g. opening a new settings screen, GeckoApplication's onActivityPause() code assumes that Firefox is being backgrounded for real, calling GeckoThread.onPause(). This is then immediately followed by a call to onActivityResume() which unpauses Gecko again.
To avoid this, GeckoPreferences needs to properly implement support for GeckoActivityStatus and check the target of outgoing intents along the lines of the implementation in GeckoActivity.
Since checkIfGeckoActivity() is now used outside GeckoActivity as well, we refactor it into our IntentUtils.
MozReview-Commit-ID: UfPNAic5os
Currently, GeckoPreferences always returns "false" for isGeckoActivityOpened(), which means that when we're e.g. opening a new settings screen, GeckoApplication's onActivityPause() code assumes that Firefox is being backgrounded for real, calling GeckoThread.onPause(). This is then immediately followed by a call to onActivityResume() which unpauses Gecko again.
To avoid this, GeckoPreferences needs to properly implement support for GeckoActivityStatus and check the target of outgoing intents along the lines of the implementation in GeckoActivity.
Since checkIfGeckoActivity() is now used outside GeckoActivity as well, we refactor it into our IntentUtils.
MozReview-Commit-ID: UfPNAic5os
* GeckoActivity, LocaleAwareAppCompatActivity, LocaleAwareFragmentActivity, LocaleAwareActivity:
Those activities are never instantiated directly. Make them abstract.
* CrashReporter: This activity is only registered if MOZ_CRASHREPORTER is set. Supress warning.
Unfortunately I had to downgrade this lint check from "error" to "warning" because the current
gradle plugin doesn't recognize the SupressLint annotation for the "Registered" check:
https://code.google.com/p/android/issues/detail?id=204846
MozReview-Commit-ID: Hy56pZB8ZdB
We're using the Theme.AppCompat styles so we have to extend AppCompatActivity.
It is a subclass of the previous class GeckoApp extended so we shouldn't run
into an ClassCastExceptions.
I tested the home panels, tabs tray, hyperlink long-press context menus,
door hangers, the 3-dot menu, and browser search to make sure there was no
change in UI appearance.
MozReview-Commit-ID: FvaOFTMFOMa