Commit Graph
6 Commits
Author SHA1 Message Date
Jan Henning a1f57e39b4 Bug 1336734 - Part 1 - Have GeckoPreferences properly support GeckoActivityStatus. r=sebastian
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
2017-02-05 15:35:00 +01:00
Wes Kocher 2c09640198 Backed out 3 changesets (bug 1336734) for android build bustage a=backout
Backed out changeset a7f9815aeec1 (bug 1336734)
Backed out changeset fa9cca3e321c (bug 1336734)
Backed out changeset a2b69382c9ad (bug 1336734)

MozReview-Commit-ID: FMKZ88jlEZ0
2017-02-10 12:52:33 -08:00
Jan Henning d9f19756bc Bug 1336734 - Part 1 - Have GeckoPreferences properly support GeckoActivityStatus. r=sebastian
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
2017-02-05 15:35:00 +01:00
Sebastian Kaspari 0f0c3137b6 Bug 1263390 - Post: Fix new "Registered" lint errors. r=mcomella
* 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
2016-04-20 10:18:33 +02:00
Michael Comella 8e6a0e0d93 Bug 1220309 - Have GeckoApp extend AppCompatActivity. r=sebastian
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
2015-10-30 12:14:00 -07:00
Nick Alexander c682759005 Bug 1107811 - Part 1: Move Java code. r=mfinkle
#!/bin/bash
set -x
pushd mobile/android/base
# Can't be present in glob below.
rm -rf java/org/mozilla/gecko
for i in */ ; do
# But is necessary to copy into.
mkdir -p java/org/mozilla/gecko
hg mv $i java/org/mozilla/gecko ;
done
hg mv *.java java/org/mozilla/gecko
# Move back stuff we didn't want to move.
hg mv java/org/mozilla/gecko/crashreporter crashreporter
hg mv java/org/mozilla/gecko/docs docs
hg mv java/org/mozilla/gecko/locales locales
hg mv java/org/mozilla/gecko/resources resources
popd
2015-12-04 11:51:34 -08:00