Pass --appname org.mozilla.geckoview.test to 'mach mochitest' or
'mach reftest'. This runs the tests without e10s currently.
MozReview-Commit-ID: 7TIvA3zRCw2
This eliminates a race where the JS side thinks it has a listener, and
expects a reply, but will never get one because it was unregistered
while the message was in-flight. GeckoSessionHandler dispatches
on the Android UI thread, which is where listeners are set/unset, so
we do not need any synchronization.
MozReview-Commit-ID: 5W3hsQ1cmb7
It may be nice to also log failed state transitions, but we seem to have too
many of those for it to be very useful right now.
MozReview-Commit-ID: 7z4UMyWQp2F
This adds a new geckoview_test module, which contains a
test runner Activity. We can then use JUnit4 + Espresso to
exercise the GeckoView APIs (such as GeckoSession).
MozReview-Commit-ID: FEMAZhpasLW
This allows apps to decide which GeckoSession should handle a load that
will be in a new window (e.g., window.open()).
MozReview-Commit-ID: BkJM93489Ga
This was oversight when landing Bug 1419581, coupled with dedicated
testing by Grisha. We don't expose all CONFIG values as DEFINES by
default, and I forgot to add the relevant value to the exposure list.
MozReview-Commit-ID: GUYNWampBAJ
--HG--
extra : rebase_source : f946f2630f2e9120d03b05a4677815e73ab6851a
Use the current principal to get the origin, so things work under e10s.
Also reorganize some of the code in checkIdentity.
MozReview-Commit-ID: 2heqVMQ7vam
--HG--
extra : rebase_source : 7e67d223aaf366115ac2b3e35bfcb56fba9766f2
Theoretical ability to setup synchronizers other than server->local never really
manifested itself in anything actually useful, and I don't foresee that design choice
as currently expressed being useful in the near future. So, let's take a moment to clear
up the layers a little bit.
MozReview-Commit-ID: 5fIZc6zYeit
--HG--
extra : rebase_source : 301a7552fe090e29e013d9e73ca9ca34976ee100
The Proguard dependency is now managed by Gradle.
MozReview-Commit-ID: EOvKSE5z28P
--HG--
extra : rebase_source : 760b117f500cc639cc8c24e9c02933990f358dd7
My word, that's a great deal of configuration! The key technical
change here is subtle: we hard-code the GENERATED_FILES in the
Makefile.in rather than fishing it from the preprocessed files of the
constants.jar. Again, the final goal here is to use GENERATED_FILES
for the APK itself, which will allow us to capture the dependencies in
the moz.build file directly, and then this hard-coding can be
removed. One step at a time.
MozReview-Commit-ID: FpgKV1IVu05
--HG--
extra : rebase_source : 4cf645880ea1a640ec021fa831c750a7d3461f3b
The moz.build Java JAR definitions are, of course, broken, but they
will be removed soon enough.
MozReview-Commit-ID: KIxqLDwd9I7
--HG--
extra : rebase_source : 8312b3f125793f73d3e835d1c0a5c7cabd4ebc0c
I choose to clean a bunch of ANDROID_* moz.build cruft here, too,
since it's just passing dependencies between moz.build and
Makefile.in. The replacement for all of this is to just use
GENERATED_FILES in moz.build, but it'll still take some work to get to
that. (Why does this stuff exist? GENERATED_FILES didn't exist and
was resisted when I built this stuff.)
MozReview-Commit-ID: D3GJqJNL0Ih
--HG--
extra : rebase_source : 07351f9d3702cfc42c58bd317885d07882c45c3a
This is the easy stuff -- everything but mobile/android/base/Makefile.in.
MozReview-Commit-ID: 5x2z97AHUrR
--HG--
extra : rebase_source : 531fd41d367cad071b209b85ca5b5602fd7cbf7b
I had forgotten that m/a/base/Makefile.in can't be killed before m/a/tests/browser/robocop/Makefile.in.
MozReview-Commit-ID: KbtRN5ZCTSJ
--HG--
extra : rebase_source : ea16c04cf018d7b5c53db6d0c4e8218703bdd7e0
Add methods to pass callbacks to custom delegates either during the test
or during the next wait.
MozReview-Commit-ID: KZWlACElII4
--HG--
extra : rebase_source : 5ecc78762e013af24f5b715ccf30117f106337de
In the next commit, we will send telemetry events in the sync ping.
The "event" JSON object doesn't have "uid"/"deviceID" fields (actually,
the "sync" objects shouldn't have them either!).
Let's do the right thing and send deviceID and UID as part of the top-level
"payload" object.
MozReview-Commit-ID: 3D3X3PcJAsW
--HG--
extra : rebase_source : 2ed71c7e6ce269cc43878f0e166dd9b149f3ccbc
In the next commit, we will send telemetry events in the sync ping.
The "event" JSON object doesn't have "uid"/"deviceID" fields (actually,
the "sync" objects shouldn't have them either!).
Let's do the right thing and send deviceID and UID as part of the top-level
"payload" object.
MozReview-Commit-ID: 3D3X3PcJAsW
--HG--
extra : rebase_source : 2ed71c7e6ce269cc43878f0e166dd9b149f3ccbc
closeConnection is a new API introduced in N. We don't really support it
at the moment but we also don't want the default behavior, so we
implement a dummy.
MozReview-Commit-ID: JY1Tl30X2s7
--HG--
extra : rebase_source : a64371a05aed9db957df2a97da5b23c90760cdb1
Getting the selection offsets in onCreateInputConnection can fail
because of us being on a wrong thread. The solution is to cache the last
selection offsets and use those in onCreateInputConnection.
MozReview-Commit-ID: AOlZsuOvzHm
--HG--
extra : rebase_source : 42f35bc60219707fc29db7cc2803f64313806244
We're currently determining whether a node is a media element by checking if the node's classname is HTMLMediaElement; but that's an abstract class and thus the condition is never satisfied. This checks against the concrete HTMLVideoElement and HTMLAudioElement classes instead.
Function queryExists added to StringUtils to check
if a given URL allows for arguments.
Tests for said function added to TestStringUtils.
Function loadUrlOrKeywordSearch in BrowserApp.java updated to also pass
the entire entered string along regardless of whether or not the first
words are keyword bookmarks iff there is additional text after the
keyword bookmark, and the keyword bookmark does not accept any input arguments
MozReview-Commit-ID: 2eyi5Botd3F
--HG--
extra : rebase_source : a08dd11a1595051a2dc727cc361cebecc14fa8c8
Display a message on startup when the APK is corrupt. Right now the
"wrong SDK" message is displayed. I think we can potentially reuse that
message for Beta, but we need a different message for Nightly.
MozReview-Commit-ID: 9NEw252Ytkc
On the second pass after failing the first time to load libraries,
enable CRC verification and detect if the APK is corrupt. In that case,
instead of crashing, we send out an event to the application.
MozReview-Commit-ID: 4b97Z8EUHZe
To reliably detect corrupt APK, this patch adds a GeckoLoader.verifyCRC
call to enable verification of CRC before extracting libs.
MozReview-Commit-ID: 5EpIfwREGIv
We had some issues with tabs closed shortly before backgrounding Firefox re-
appearing during session restore, however in hindsight bug 1282830 (closing a
zombie tab didn't trigger a session store file write) seems a more likely cause
for that than my initial theory from bug 1256277 comment 6 (tab events
dispatched *just* before backgrounding might be processed only after our
application-background handling), because as far as I can tell the latter theory
actually requires really split-second timing.
With that in mind, the differing, smaller minimum file write interval while in
background can be removed again.
MozReview-Commit-ID: GSQZYKeYME6
--HG--
extra : rebase_source : 598f49df98b7a09d63cd7e0aad6ad079916fad99
Add ACCESS_COARSE_LOCATION to the Fennec and GeckoView list of
permissions. For completeness, also add ACCESS_COARSE_LOCATION to JS
modules that handle runtime permissions.
MozReview-Commit-ID: 8UHaiJcRnq
--HG--
extra : rebase_source : 5a74d4138d6d7b4bf6cf70724f695ff06201c38c
This removes the need for the content process to have permissions to create new
files on macOS, allowing more aggressive sandboxing.
MozReview-Commit-ID: 8agL5jwxDSL
--HG--
extra : rebase_source : 17ebcef3e9d24f3d4e7515e3fae95e65cef76a79
We currently initialize PushService on delayed startup, which only
happens when Fennec is launched. This patch makes us also initialize
PushService if needed by web content from custom tabs / PWA, by
listening for the push initialization event in GeckoApplication.
MozReview-Commit-ID: 9CTOEZmOqls
--HG--
extra : rebase_source : ccd7d8e61e1de5de8ded1f6793234eb885c92672
Right now we create FormAssistPopup in WebAppActivity based on whether
the manifest is successfully loaded. We should always create it because
we always try to destroy it in onDestroy().
MozReview-Commit-ID: KskEZmYrDS1
--HG--
extra : rebase_source : bef84833438aa425a154bdf89cfa61dda7d8651d
Apparently a toolbar element can be zero-sized when we try to draw it to
the bitmap. We should just skip drawing in that case.
MozReview-Commit-ID: LlFQX5uN20h
--HG--
extra : rebase_source : cc3ba0cce8157274ef758530888629d4d372d0c0
Guard against OOM errors when getting toolbar pixels, and send a failure
message back to compositor when OOM happens.
MozReview-Commit-ID: FooZlE979DD
--HG--
extra : rebase_source : 98104304d20c26f4764c14e07c1edbb1e52b649f
Add a unit test for GeckoBundle, which tests GeckoBundle more thoroughly
than testEventDispatcher. This also lets us remove the Parcelable test
from testEventDispatcher.
MozReview-Commit-ID: Gn48Zw4Rvx5
Run unit tests under geckoview/ when running 'mach android test'. This
also lets us run those tests on Taskcluster.
The test report parser for 'mach android test' had a bug where the input
directory was wrong. As a result, we weren't producing test output at
all. This patch fixes the input directory, and outputs an error if no
reports are found at all to avoid this bug in the future.
MozReview-Commit-ID: IiswQaSPCr0
These tests involve GeckoView classes, so move them to under geckoview/.
We use a custom test runner for Fennec unit tests, but I didn't notice
any problems when using standard test runners (e.g. MockitoJUnitRunner),
so I changed these tests to use standard runners.
MozReview-Commit-ID: 7JMhqJqahTC
--HG--
rename : mobile/android/app/src/test/java/org/mozilla/gecko/permissions/TestPermissions.java => mobile/android/geckoview/src/test/java/org/mozilla/gecko/permissions/TestPermissions.java
rename : mobile/android/app/src/test/java/org/mozilla/gecko/util/NetworkUtilsTest.java => mobile/android/geckoview/src/test/java/org/mozilla/gecko/util/NetworkUtilsTest.java
rename : mobile/android/app/src/test/java/org/mozilla/gecko/util/TestContextUtils.java => mobile/android/geckoview/src/test/java/org/mozilla/gecko/util/TestContextUtils.java
rename : mobile/android/app/src/test/java/org/mozilla/gecko/util/TestDateUtil.java => mobile/android/geckoview/src/test/java/org/mozilla/gecko/util/TestDateUtil.java
rename : mobile/android/app/src/test/java/org/mozilla/gecko/util/TestFileUtils.java => mobile/android/geckoview/src/test/java/org/mozilla/gecko/util/TestFileUtils.java
rename : mobile/android/app/src/test/java/org/mozilla/gecko/util/TestFloatUtils.java => mobile/android/geckoview/src/test/java/org/mozilla/gecko/util/TestFloatUtils.java
rename : mobile/android/app/src/test/java/org/mozilla/gecko/util/TestIntentUtils.java => mobile/android/geckoview/src/test/java/org/mozilla/gecko/util/TestIntentUtils.java
rename : mobile/android/app/src/test/java/org/mozilla/gecko/util/TestStringUtils.java => mobile/android/geckoview/src/test/java/org/mozilla/gecko/util/TestStringUtils.java
rename : mobile/android/app/src/test/java/org/mozilla/gecko/util/TestUUIDUtil.java => mobile/android/geckoview/src/test/java/org/mozilla/gecko/util/TestUUIDUtil.java
The publicsuffix utils are not used in GeckoView and more importantly,
their accompanying asset is only included in Fennec and not GeckoView.
Therefore, it makes sense to move the utils to Fennec.
MozReview-Commit-ID: A5jhiqURUdB
--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/publicsuffix/PublicSuffix.java => mobile/android/base/java/org/mozilla/gecko/util/publicsuffix/PublicSuffix.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/publicsuffix/PublicSuffixPatterns.java => mobile/android/base/java/org/mozilla/gecko/util/publicsuffix/PublicSuffixPatterns.java
Removed FHR client id migration code on the Android side.
MozReview-Commit-ID: X9QKtbh6r3
--HG--
extra : rebase_source : f5587789f6980aecc4309dc329eb051650ad4c6f
This patch was autogenerated by my decomponents.py
It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.
It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.
It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)
MozReview-Commit-ID: DeSHcClQ7cG
--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
The same situation applies when restoring recently closed tabs. In this case, we
can also display a nicer title for those lazily-loaded tabs by making use of the
session store data.
MozReview-Commit-ID: AJiEkTEVAUz
--HG--
extra : rebase_source : a36e0bb0cd4e3e8d62368f1ee5f51ad0c080027c
Processing the contents of the tab queue will open a potentially large number of
tabs. To avoid overloading the device we should therefore only load the new
foreground tab and leave the rest to be loaded on demand, when the user selects
one of them.
MozReview-Commit-ID: 9cjoLPRscRl
--HG--
extra : rebase_source : b32f46507156cf38460cd89a8cde09a8f7a51505
We'd like to install the NDK through the Android SDK manager. But we
can't pin versions of the NDK with the SDK manager, and so Google
can silently upgrade the NDK on us. Since that is undesirable, this is
the next best thing.
With the toolchain task in hand, we can make all the relevant tasks
depend on the toolchain task and remove the download of the NDK from
tooltool as well.
Longer term, the MenuItemInfo handling needs to be moved out of BrowserApp in
order to solve bug 1414084 [1], but the easier short term solution is to just
save the cached menu data via the savedInstanceState. This means that
MenuItemInfo and friends have to be made parcelable.
[1] Because of GeckoView, add-ons may load (and attempt to add menu items) while
BrowserApp isn't even alive.
MozReview-Commit-ID: HzPe7ZKbJOj
--HG--
extra : rebase_source : a38d3119c863ca48fdbd068b634c76681a3bfd34
Since custom tabs and PWAs were moved to GeckoView, we're down to one
GeckoApp-based activity again.
MozReview-Commit-ID: 1zO6JTDptpp
--HG--
extra : rebase_source : 1e65963fddeb53a3522422a902bdfbb3408a251a
The advantage of doing this per-variant is that we can really separate
the 'local' behaviour (re-generate via re-entrant |mach build|
invocations) from the 'official' behaviour (never re-generate via
re-entrance).
This also uses new Android-Gradle plugin 3.0+ APIs to integrate the
generated resources and Java code.
MozReview-Commit-ID: 4pd2iw1nJSb
--HG--
extra : rebase_source : 205080d3822f59bcdd5d3b44de2898ff775f5746
extra : source : 730a70767743b74a7e3a1fcf4018540edfdf30a3
There were a few API changes, mostly around explicitly creating
Services/Activities/ContentProvider instances, but they were pretty
easy to address.
Sadly, Robolectric doesn't really work with the new aapt2 processing
in Android-Gradle plugin 3.0+ -- see in particular
https://github.com/robolectric/robolectric/issues/3333#issuecomment-324300418
-- so we have to opt-out of the new implementation for now. Hopefully
plugin 3.1+ will address these issues, which are widespread.
MozReview-Commit-ID: dlbd32kMs6
--HG--
extra : rebase_source : fe30729161e5dc91ea9173f9b7aaa9135d096791
extra : source : 690e265c684ce70ecb89355314fd1574bb421f0b
New Android-Gradle plugins pin the build-tools version, and we want to
be consistent between Gradle and moz.build.
MozReview-Commit-ID: ApWS4rHzPuH
--HG--
extra : rebase_source : 22008e9333b15c594ce26c2a52f67396d6e3ab84
extra : source : f918500d9cf5112b70bc8e0a120df435b02252b7
This sketches the flavor dimensions. The important ones are
`audience` and `geckoBinaries`, which I think simplify the situation
greatly. Coupled with Bug 1417232 centralizing most everything in
`mobile/android/gradle.configure`, the Gradle configuration shouldn't
be so hard to evolve.
MozReview-Commit-ID: DILjVrnLA3F
--HG--
extra : rebase_source : a4ea96a49308f457a406716662d9b64d4ba749fe
extra : source : cec2b8828cc8800fa269d290ce38ea82c454b445
This was added for the Remote Tabs panel in Bug 785199. That code has
now morphed into the combined history panel, which uses a
RecyclerView.
MozReview-Commit-ID: J6KsVCn8mzh
--HG--
extra : rebase_source : 2d8a43b6697367f9fec1db760dd1e36ca12e31d0
extra : source : 2b37201606f5a921d91339e2c8a2ec86885b68e8
Newer versions of Robolectric seem to have different semantics about
clearing disk caches, so this is necessary. But for older versions,
it shouldn't hurt, and is slightly more clear than relying on an
implicit clear.
MozReview-Commit-ID: LRcaEPasXj8
--HG--
extra : rebase_source : 4d6bb4916cde61f198004661bed58025e91ffa9c
extra : source : 373c9a71d9451498462594b302b4fe2648431fef
No idea what is going on with this hierarchy, but this isn't used and
isn't helping anything.
MozReview-Commit-ID: Ir3LxLYHR6M
--HG--
extra : rebase_source : f1726d37fa285de1042fed76a722f941380cbf63
extra : source : 3dc3beab95f83b2f08ff9ff305fdd4b85cc05d9d
This is just wrong.
MozReview-Commit-ID: EBtKTD07aNu
--HG--
rename : mobile/android/base/resources/values-v17/themes.xml => mobile/android/app/src/main/res/values-v17/themes.xml
extra : rebase_source : c6e58c6be966dd8ace6aa796b5a5e6000ee9c65e
extra : source : 22a861db1573364916ab2c5b6d0c6321ba08ff55
The skin used on Firefox for Android doesn't style directory listing, hence we
fall back to using the default icon from gre/res/html. As of bug 863246, this
location is no longer accessible from content as a resource://, hence the file
needs moving into the special content-accessible directory.
MozReview-Commit-ID: obtefafqul
--HG--
extra : rebase_source : 0227487abb4914a11f5749c493d215a1fec45e46
This modifies mediaCaptureWindowState() to say whether a camera or microphone is
actively captured or not. Note that this is not the same as the device being
on or off. If we disallow a device from being off while disabled, we still
notify chrome that we're not actively capturing.
MozReview-Commit-ID: B1taormqc3j
--HG--
extra : rebase_source : 292d323c4b9711cc242170f5c5c139bb87658c44
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
Right now, we only expect classes.dex, and even --with-gradle we copy
it out of $topobjdir/mobile/android/base. This commit changes that
for --with-gradle: we only take classes.dex from the given .ap_ file,
and we also handle multiple classesN.dex files (for future multi-dex
support). The moz.build system stays the same.
This avoids an issue with newer Android-Gradle plugins, where the
classes.dex produced could be either in dex/ or in dexMerger/,
depending on whether any external libraries needed merging. By
extracting classes.dex from the .ap_ file, we don't need to know what
Gradle build steps actually occur.
The classes.dex in the package-manifest.in has been irrelevant since
Bug 1260241.
MozReview-Commit-ID: FozKwjTcMzU
--HG--
extra : rebase_source : 62b18c7ffe596be73cec4c9565333eac222b018e
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
This listens for "DOMWindowFocus" and calls onFocusRequest in the GeckoSession ContentListener whenever it is received, and implements onFocusRequest for custom tabs and PWAs.
It was only used in the 55 Nightly and never meant to stay around.
MozReview-Commit-ID: JDJr9WC4V5M
--HG--
extra : rebase_source : af52eb24c4d599651a4cbde7b00049272448c9e6
Historically, we used MOZ_NATIVE_DEVICES to proxy for Google Play
Services. (MOZ_NATIVE_DEVICES was the first GPS-consuming feature in
Fennec.) With Python moz.configure, we can easily add the real
top-level flag that distributions like F-Droid actually want, which is
to build without (non-free) Google Play Services entirely.
MozReview-Commit-ID: 7YJKw3G1lQA
--HG--
extra : rebase_source : 17a25d2a15868f3661248a06b9048741e5a1dca5
extra : intermediate-source : d4d42899e5cd4255df3bfb4332532936e42ebf43
extra : source : be888fa125dc1948fc073ed69aa8116f47e22877
Besides adding a new ping builder for 'crash' type pings this patch modifies
part of the Java telemetry to accomodate for it: a new store has been added
for holding crash pings and the URL used to submit has been updated to pass
the 'v' parameter (crash pings are in the telemetry version 4 format).
MozReview-Commit-ID: CZzw7xv6YoS
--HG--
extra : source : 1089cb510d173dee2fe6d0e1a172af46808d52fa
Vary the 'Share [...]' label depending on the actual use of the <video> tag, as
is done for the 'Save [...]' label.
MozReview-Commit-ID: Ga6RqV5dCby
--HG--
extra : rebase_source : 8a146d032d4fc9185fd197bb2ad737e62a17cb5b
If we have to forward a download that we cannot handle ourselves to the Android
download manager, then the speculative download started by Firefox needs to be
aborted no matter whether forwarding succeeded or not.
MozReview-Commit-ID: B6zCk28ci1P
--HG--
extra : rebase_source : 1a051afa7eab3426d397e362bc5d26a6a7886917
This also verifies that we have Google Play Services (via
MOZ_NATIVE_DEVICES=1) if we ask to build with GCM. This was just an
oversight earlier.
MozReview-Commit-ID: BvJi7Sfo4pu
--HG--
extra : rebase_source : c02766104281a895ab57e58079a1f651e1b9f832
extra : intermediate-source : 78828bf781d737b03c249de3dd41dc9edec788fc
extra : source : 44bcb609e721598135a19bf41ba7ff94f3051553
Right now, the MMA glue is built into constants.jar. constants.jar is
the home of preprocessed Java code; it's built very early in the build
process and intended to be a tiny kernel of shared definitions. The
fact that the MMA glue has to live there is just a sad consequence of
the non-Gradle build system, which makes dependency injection
difficult. Unfortunately, another consequence is that it's not
possible to move reference org.mozilla.gecko.{gcm,push} in the MMA
glue, because those packages are built after constants.jar.
Instead, this patch lifts some of the logic into AppConstants, which
is part of constants.jar. We had grown a twisty maze of indirection
around the GCM sender IDs and it just wasn't necessary; this just
lifts the static pieces up a level and removes a bunch of interface
indirection.
What surprises me is that asking Google's InstanceId.getToken for a
GCM token with a "comma,separated,list" of GCM sender IDs works -- and
indeed, has worked since we added the second MMA sender ID. I didn't
expect that and can't explain it, but this doesn't change that logic
and local testing (both of the existing APKs, and APKs with this
modification) looks good.
MozReview-Commit-ID: 3hObfAwNlPH
***
a0c07e53 o draft Bug 1419581 - Part 1: Move MMA setGcmSenderID from MmaDelegate to MmaLeanplumImp. r=nechen
MozReview-Commit-ID: A4hrk6pVqGW
--HG--
extra : rebase_source : ce7c1585529e61491a0133633b976b27083c2372
extra : intermediate-source : f8b3e95f18e4082ab8404187508d09eadba8612e
extra : source : 8f1655752d43af33356d497d559888a967bbf6a0
Dispose the native call queue when disposing a window object, so we
don't end up with stale calls in the queue that can cause crashes.
MozReview-Commit-ID: J1HNOXKAX6E
--HG--
extra : rebase_source : 9a3ec940c19513d29c692d4e550fa3fd046d73f9
Historically, we used MOZ_NATIVE_DEVICES to proxy for Google Play
Services. (MOZ_NATIVE_DEVICES was the first GPS-consuming feature in
Fennec.) With Python moz.configure, we can easily add the real
top-level flag that distributions like F-Droid actually want, which is
to build without (non-free) Google Play Services entirely.
MozReview-Commit-ID: 7YJKw3G1lQA
--HG--
extra : rebase_source : f599de01c63b873a95252d6b01128a6f069ff105
extra : intermediate-source : 060290b66b370137cfd3dbbac7c442ef107aaa68
extra : source : be888fa125dc1948fc073ed69aa8116f47e22877
This also verifies that we have Google Play Services (via
MOZ_NATIVE_DEVICES=1) if we ask to build with GCM. This was just an
oversight earlier.
MozReview-Commit-ID: BvJi7Sfo4pu
--HG--
extra : rebase_source : 77470c2043598175c427a137b54f56263f6dc499
extra : intermediate-source : df53850e90878d703a2bd867dfbc13295aec998d
extra : source : 44bcb609e721598135a19bf41ba7ff94f3051553
Right now, the MMA glue is built into constants.jar. constants.jar is
the home of preprocessed Java code; it's built very early in the build
process and intended to be a tiny kernel of shared definitions. The
fact that the MMA glue has to live there is just a sad consequence of
the non-Gradle build system, which makes dependency injection
difficult. Unfortunately, another consequence is that it's not
possible to move reference org.mozilla.gecko.{gcm,push} in the MMA
glue, because those packages are built after constants.jar.
Instead, this patch lifts some of the logic into AppConstants, which
is part of constants.jar. We had grown a twisty maze of indirection
around the GCM sender IDs and it just wasn't necessary; this just
lifts the static pieces up a level and removes a bunch of interface
indirection.
What surprises me is that asking Google's InstanceId.getToken for a
GCM token with a "comma,separated,list" of GCM sender IDs works -- and
indeed, has worked since we added the second MMA sender ID. I didn't
expect that and can't explain it, but this doesn't change that logic
and local testing (both of the existing APKs, and APKs with this
modification) looks good.
MozReview-Commit-ID: 3hObfAwNlPH
***
a0c07e53 o draft Bug 1419581 - Part 1: Move MMA setGcmSenderID from MmaDelegate to MmaLeanplumImp. r=nechen
MozReview-Commit-ID: A4hrk6pVqGW
--HG--
extra : rebase_source : 9de77b6278bae76df3597bc2580bcedbf6d33075
extra : intermediate-source : c6e6fe49ecd2dd422878d80f57f1c89bf69eebff
extra : source : 8f1655752d43af33356d497d559888a967bbf6a0