gecko-dev/mobile
Tad 99aa60a088 Bug 1419581 - Part 1: Simplify MMA GCM sender IDs logic. r=nechen
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 : 4184f40d82bcd44c2bb380d1a8ab534967818af5
2018-01-12 15:03:37 -08:00
..
android Bug 1419581 - Part 1: Simplify MMA GCM sender IDs logic. r=nechen 2018-01-12 15:03:37 -08:00
locales Bug 1428188 - Add Yandex for Russian users of English Firefox. r=flod 2018-01-04 16:19:54 -06:00