When doCreateShortcut was first created, it also handled webapp intents. This required additional
work, meaning doCreateShortcut had to be run on the background thread. We now only
create an Android Intent, with no additional work, hence we can run directly on the UI thread.
MozReview-Commit-ID: BFrAuNfDiFj
See
https://android-developers.blogspot.com/2013/08/some-securerandom-thoughts.html
for a thorough discussion.
It's very expensive (at least 200ms on modern devices) to do this in
Application.onCreate, so we'll do this just before generating DSA keys.
In exchange, we accept some risk that we'll introduce the same issue
again. As we lint more aggressively in automation, this risk will
decrease.
Google licenses the fixes file very permissively. I have added some
serialization IDs to prevent certain compile warnings.
This patch adds 2 workarounds for the fact that getProfileCreationDate
returns -1 when it can't find a creation date. Returning -1 turned
out to be not particularly robust but I did it this way to avoid
adding too many additional versions of methods in order to have
optional parameters such as profileCreationDate. The workarounds
are added as TODOs w/ bug #'s in the code and mentioned in the
comments of bug 1246816 itself.
A future implementation should probably add a Builder to pass a
single Object as the argument to TelemetryPingGenerator.createCorePing
to prevent the argument list from growing unreasonably large and
to properly operate on optional parameters. I didn't do this in
this patch in order to simplify the uplifted code.
Retrieving the profile creation date from the filesystem is not strictly
necessary to upload this data and returns -1 until it is implemented. If the
decision is r+'d here, it will be implemented in bug 1246816.
Opt-in by adding --enable-gradle-mobile-android-builds.
Gradle dependencies (including the Android-Gradle plugin) are assumed
to be present. Local developers will fetch them from the jcentral
repository.
Android-specific Maven dependencies are shipped as "extras" with the
Android SDK, and should be found automatically by the Android-Gradle
plugin.
MozReview-Commit-ID: 966XgddWgEu
This fixes a crash, since Bug 1242213 removed the .App
<activity-alias> that browser_intent_class references.
I debated just updating the strings, and decided that it was best to
remove a pattern that is used only once in our codebase, even though
it moves more functionality to code.
MozReview-Commit-ID: 4Wgw0oITgue
toolbox.js was using Cu.import(gDevTools) without second argument
and ended up injecting gDevTools into all next modules being loaded.
Hopefully, fonts.js seems to be the only one relying on this!
Because the add-ons manager hasn't startup up yet we can replace the certificate
database in xpcshell tests with one that claims add-ons are signed by valid
certificates even when they aren't. This allows us to run tests even in builds
where signing cannot be disabled during for the normal application.
This adds an override for all tests except those that are explicitely testing
signing.
On a CLOSED TREE because this is Android only.
When we switched to fine-grained Google Play Services bundling (Bug
1115004), we stopped shipping com.google.android.gms.analytics. That
silently breaks Adjust, which queries the Google Ad ID using
reflection: now the package isn't present! This patch restores the
Play Services libraries that Adjust relies on. (Sadly, this bloats
our APK tremendously.)
There is some hijinkery, however: the Play Services libraries
reference a library (org.apache.http) that is deprecated in Android
23! However, the library is still present on Android 23 devices,
which buys Google time to replace the offending code. This compiles
just fine, breaks the Proguard global optimization pass. To give
Proguard the information, we add the library as a Proguard "library
JAR". This is equivalent to the Google-provided Gradle `useLibrary`
directive.
jetpack-addon-harness.js runs in a browser window scope so it already has the
setTimeout functions available to it. Loading Timer.jsm overrides the DOM
timer functions with those from Timer.jsm. Any other code that used setTimeout
previously will have timer IDs from the DOM functions which don't match those
in Timer.jsm. If this other code attempts to clear a timer it can then end up
clearing an unrelated timer. In the intermittent failure here the
browser-thumbnails code manages to clear the timer that is waiting to resolve
the promise that makes tests continue.
I've also added an additional timer that throws an exception and so ends tests
if the add-on uninstall doesn't actually complete in a reasonable time as well
as removing the add-on listener.
const declarations are no longer accessible from outside the script that makes
them so in order for bootstrap.js to be able to access the loaderSandbox
declaration we must use var.