Reusing sessions doesn't actually save that much time and avoids a lot of
hard-to-debug intermittents.
Differential Revision: https://phabricator.services.mozilla.com/D32578
--HG--
extra : moz-landing-system : lando
Sometime the geolocation test fails because the position is not retrieved
quickly enough, this is OK as we're just trying to make sure that the
permission is correct.
Differential Revision: https://phabricator.services.mozilla.com/D32576
--HG--
extra : moz-landing-system : lando
See https://stackoverflow.com/a/24026735.
Adding the `docs` package requirement is not ideal, but it's not worth
the effort to install it only in automation (or in the relevant task),
and it's not *that* large: 1.0G on my macOS installation.
Differential Revision: https://phabricator.services.mozilla.com/D35834
--HG--
extra : moz-landing-system : lando
If the theme is persisted as an xpi we'll use GeckoJarReader to read get the
image from inside the archive otherwise read it directly.
Differential Revision: https://phabricator.services.mozilla.com/D35808
--HG--
extra : moz-landing-system : lando
According to the documentation -
https://developer.android.com/reference/android/app/Service.html
"The Intent supplied to Context.startService(Intent) may be null if the service
is being restarted after its process has gone away, and it had previously
returned anything except START_STICKY_COMPATIBILITY."
We will ignore the case when the system restarts our Service as we only expect
it to be properly started by us, in the event of a crash.
Differential Revision: https://phabricator.services.mozilla.com/D35790
--HG--
extra : moz-landing-system : lando
Classic deadlock situation possible because getDatabaseHelperForProfile(..)
would lock on [PerProfileDatabase] and then try to on [GeckoProfile] while at
the same time it would be possible for another thread which already had the
[GeckoProfile] lock to call this method and so try to acquire the
[PerProfileDatabase] lock.
The simplest solution to resolve this and the one I went with is to ensure that
one of those threads will not need both locks and it turns out that the
getDatabaseHelperForProfile method can easily be refactored to use only the
GeckoProfile lock, change which would not significantly increase the block of
code synchronized with the same key.
Differential Revision: https://phabricator.services.mozilla.com/D35646
--HG--
extra : moz-landing-system : lando
Fixed an issue where we were trying to set some attributes on a null object due to the fact that
the view had not finished rendering.
Differential Revision: https://phabricator.services.mozilla.com/D35515
--HG--
extra : moz-landing-system : lando
Our Restarter Service would have issues on Android Q:
It would run on a separate process that allowed it to kill the app's process
but when trying to restart the app it would fail because it would've been a
background Service and as such it would've been restricted from starting other
Android Application components.
To make it work on Android Q we would need to migrate it to a foreground
service or piggy-back the SYSTEM_ALERT_WINDOW permission given by the user for
the Tab Queue functionality.
The chosen solution is simpler and not affected by any of those limitations.
Depends on D35402
Differential Revision: https://phabricator.services.mozilla.com/D35403
--HG--
extra : moz-landing-system : lando
Fix for the following scenario:
- "Don't keep activities" checked
- Change system language
Upon detecting a locale change in BrowserApp's onCreate() we would call
finish() and then return before calling super.onCreate().
This patch introdues the call to super.onCreate() before returning and ensures
that the app will die cleanly so that upon restarting Gecko can reinit add-ons
that touch the UI.
Differential Revision: https://phabricator.services.mozilla.com/D35402
--HG--
extra : moz-landing-system : lando
Updated existing "suggestedsites_*" drawables to better match current websites
favicons.
Added new "suggestedsites_*" drawables that are to be used by the localized
Top Sites.
All images are added in density qualified drawable folders which based on my
testing need to range between 90x90px for mdpi to 360x360px for xxxhdpi.
Depends on D34680
Differential Revision: https://phabricator.services.mozilla.com/D34681
--HG--
extra : moz-landing-system : lando
Our Restarter Service would have issues on Android Q:
It would run on a separate process that allowed it to kill the app's process
but when trying to restart the app it would fail because it would've been a
background Service and as such it would've been restricted from starting other
Android Application components.
To make it work on Android Q we would need to migrate it to a foreground
service or piggy-back the SYSTEM_ALERT_WINDOW permission given by the user for
the Tab Queue functionality.
The chosen solution is simpler and not affected by any of those limitations.
Depends on D35402
Differential Revision: https://phabricator.services.mozilla.com/D35403
--HG--
extra : moz-landing-system : lando
Fix for the following scenario:
- "Don't keep activities" checked
- Change system language
Upon detecting a locale change in BrowserApp's onCreate() we would call
finish() and then return before calling super.onCreate().
This patch introdues the call to super.onCreate() before returning and ensures
that the app will die cleanly so that upon restarting Gecko can reinit add-ons
that touch the UI.
Differential Revision: https://phabricator.services.mozilla.com/D35402
--HG--
extra : moz-landing-system : lando
A lot of failures occurs in `org.mozilla.geckoview.test.TextInputDelegateTest.inputConnection` when getting composition string. This tests doesn't wait for `compositionupdate`, so we should listen this event to wait for updating composition string.
Differential Revision: https://phabricator.services.mozilla.com/D34812
--HG--
extra : moz-landing-system : lando
This is just a small step on the path towards support for more
vehicles via the configuration files introduced by Bug 1552519. It's
enough to invoke GeckoView example.
Differential Revision: https://phabricator.services.mozilla.com/D34952
--HG--
extra : moz-landing-system : lando
With this changes we must now support 3 Onboarding versions.
With this changes we must now support 3 Onboarding versions.
Latest Onboarding UX will use a new title for the "Sync screen", new subtext,
new image and new text for the signin button.
This will be presented only if all this new Strings are localized.
Refactored the existing OnboardingStringUtil to serve as a central point of
getting the right resources to be used and querying the Onboarding UX version
the app should offer.
Added to SyncPanel the missing logic to hide the space otherwise occupied by
the Onboarding screen message, when there is no message.
(now behaving the same as the other Onboarding screens.)
Applied a lossless compression for the new sync image which resulted in a 26.5%
size reduction.
Removed the lint suppression initially necessary for when first added the
updated Sync Strings which were not used at the moment.
Differential Revision: https://phabricator.services.mozilla.com/D35012
--HG--
rename : mobile/android/base/java/org/mozilla/gecko/util/OnboardingStringUtil.java => mobile/android/base/java/org/mozilla/gecko/util/OnboardingResources.java
extra : moz-landing-system : lando
add a webcompat intervention for TinyMCE 3.0 thru 3.4.4 to overwrite tiny_mce.js and tiny_mce_src.js such that isGecko=false
Differential Revision: https://phabricator.services.mozilla.com/D34776
--HG--
extra : moz-landing-system : lando
With this changes we must now support 3 Onboarding versions.
Latest Onboarding UX will use a new title for the "Sync screen", new subtext,
new image and new text for the signin button.
This will be presented only if all this new Strings are localized.
Refactored the existing OnboardingStringUtil to serve as a central point of
getting the right Strings to be used and querying the Onboarding UX version the
app should offer.
Applied a lossless compression for the new sync image which resulted in a 26.5%
size reduction.
Removed the lint suppression initially necessary for when first added the
updated Sync Strings which were not used at the moment.
Differential Revision: https://phabricator.services.mozilla.com/D35012
--HG--
rename : mobile/android/base/java/org/mozilla/gecko/util/OnboardingStringUtil.java => mobile/android/base/java/org/mozilla/gecko/util/OnboardingStringsUtil.java
extra : moz-landing-system : lando
Default app behavior for when a crash occurs involves starting an Activity that
lets users submit a crash report and maybe provide additional info.
In the event of a crash we want to restore for the user all previous tabs, this
Activity being the component that saves the CRASHED status that will trigger
the restore process.
On Android Q, when a crash notification is posted but ignored by the user, upon
starting the app would not know it crashed and it would not try restoring tabs.
Executing the "save CRASHED status" logic whenever a crash occurs, irrespective
of if we'll show the Activity or just post a notification ensures users will
always have their previous tabs restored.
Differential Revision: https://phabricator.services.mozilla.com/D34826
--HG--
extra : moz-landing-system : lando
Created an exception in the key event suppression mechanism for the back button KEYCODE.
Differential Revision: https://phabricator.services.mozilla.com/D33950
--HG--
extra : moz-landing-system : lando
WebExtension pages introduce a case that was previously not possible: a script
with full WebExtension privileges that runs on a page with a GeckoSession
associated to it.
This breaks the assumption that all messages from a privileged context don't
have a GeckoSession associated to it. We fix this by checking if we can find an
eventDispatcher for the given window.
This also fixes the test which had the same wrong assumption.
Differential Revision: https://phabricator.services.mozilla.com/D32512
--HG--
extra : moz-landing-system : lando
With Beta4 AndroidQ now ships with final APIs so the previous check we used,
VERSION.CODENAME now returns REL instead of Q.
But final APIs means AndroidQ will not share API level 28 with AndroidP anymore
so we can finally check for Build.VERSION.SDK_INT.
Differential Revision: https://phabricator.services.mozilla.com/D33906
--HG--
extra : moz-landing-system : lando
This changes the registration code so that categories are
still registered in the manifest (and thus not registered
in GeckoView), but the component is still always shipped.
Differential Revision: https://phabricator.services.mozilla.com/D33478
--HG--
extra : moz-landing-system : lando
The Java ExoPlayer that we use for HLS support on Android does an accurate
seek, that is, it seeks to the frame at the seek target. This may not be a
keyframe, which we can start decoding at. So change the HLS seek to seek 2
seconds behind the seek target, and drop all frames up to the next keyframe.
This means that after a seek the HLSDemuxer will output a keyframe, and
hopefully (but we can't guarantee of course) it will lie behind the actual seek
target.
We also need to purge the GeckoHlsVideoRenderer's queue of frames which it
is holding onto in order to determine their durations, otherwise after a seek,
we'll get output from this queue of frames. That is, after a seek we would still
get a few frames from the old playback position.
This seek case is particularly problematic as we aggressively shutdown decoders
when the media is paused, including right after the load reaches
loadedmetadata, and we need to seek in order to recover from going dormant.
Differential Revision: https://phabricator.services.mozilla.com/D33254
--HG--
extra : moz-landing-system : lando
`mozilla.widget.*` was used by old Fennec (Maemo/GTK2). But Android widget doesn't reference this.
### `mozilla.widget.disable-native-theme`
This preference is unused on Android widget. This is for GTK and Windows. Reftests on Android are disabled by `layout/reftests/reftest.list`.
### `mozilla.widget.force-24bpp`
This is unused on Android. This is GTK only.
### `mozilla.widget.use-buffer-pixmap`
No one uses this preference.
Differential Revision: https://phabricator.services.mozilla.com/D33609
--HG--
extra : moz-landing-system : lando
This gives the ability to open multiple tabs in GeckoViewExample and switch between them. It was decided to use a single `GeckoView` and use a session manager to hold the open sessions and switch the session attached to the `GeckoView` when switching between tabs. This was a more lightweight solution than trying to maintain several `GeckoView`s each with their own session.
1. Create concept of `TabSession` that tracks `GeckoSession`s and ties them with a specific URL and title.
2. Create `TabSessionManager` that takes responsibility for opening, closing and tracking sessions.
3. Update `GeckoViewActivity` to use the session manager to set the current session on the displaying `GeckoView`.
4. Add menu items for opening and closing new tabs.
5. Create new toolbar layout to include a tabs button for displaying open sessions and allowing the user to switch between them.
Possible follow up bug: add long press menu to links on web pages to allow them to be opened in new tabs.
Differential Revision: https://phabricator.services.mozilla.com/D33148
--HG--
extra : moz-landing-system : lando
Right now there's some duplicated code with the focus manager and the
DOMWindowFocus event.
Android didn't handle the new framefocusrequested event, so the test-cases in
bug 416771 still didn't work there.
I think using the focus manager codepath everywhere is preferable. I confirmed
manually that the stuff that sent DOMWindowFocus events still works as expected
with this patch (i.e., switching to the right tab when you click on a
notification, etc.).
This fixes it so that it works in Fennec, and it sends the focus events right in
GeckoView Example (i.e., we get here[1] properly).
The snippet that Snorp provided on IRC to implement the "bring activity to
front" stuff (`startActivity(getIntent())`) didn't actually work for me, but I
confirmed that the right message is sent when the focus is requested, and that
we get there.
[1]: https://searchfox.org/mozilla-central/rev/952521e6164ddffa3f34bc8cfa5a81afc5b859c4/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java#503
Depends on D32353
Differential Revision: https://phabricator.services.mozilla.com/D32354
--HG--
extra : moz-landing-system : lando
Fixed report site issue: added marfeel and mobify support, fixed labels being passed to the server
Differential Revision: https://phabricator.services.mozilla.com/D33018
--HG--
rename : browser/extensions/report-site-issue/test/browser/fastclick2.html => browser/extensions/report-site-issue/test/browser/fastclick.html
rename : browser/extensions/report-site-issue/test/browser/fastclick1.html => browser/extensions/report-site-issue/test/browser/frameworks.html
extra : moz-landing-system : lando
The 3-tier PGO builds used a separate mozconfig called 'profile-use' for
the final tier. This created a problem when it rode to beta, since the
same mozconfig was used for all trees, which meant we ended up with
nightly branding on beta builds.
With the PGO-enabling logic in common mozconfigs, we can enable it by
setting the MOZ_PGO_PROFILE_USE environment variable from the task
definition. All of the final-tier PGO builds now use the nightly, beta,
etc mozconfigs like before, so branding should be intact.
Differential Revision: https://phabricator.services.mozilla.com/D33172
--HG--
extra : moz-landing-system : lando
Bug 1303806 moved `GeckoJavaSampler` to be Fennec-only as part of a general push
to slim GeckoView down. But there is no reason to restrict to Fennec and it is useful
for other non-Fennec GeckoView vehicles.
This patch moves the `GeckoJavaSampler` inside `geckoview` and changes profiler
code to make Java sampling work in both GeckoView and Fennec.
Depends on D33522
Differential Revision: https://phabricator.services.mozilla.com/D33502
--HG--
rename : mobile/android/base/java/org/mozilla/gecko/GeckoJavaSampler.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoJavaSampler.java
extra : moz-landing-system : lando
Currently it won't match scrollbar elements in HTML documents where the
root element has been switched out for something other than <html>, or
in shadow trees.
Also, move the rule into content.css now that we no longer switch
between apz and non-apz versions of this file.
Differential Revision: https://phabricator.services.mozilla.com/D33115
--HG--
extra : moz-landing-system : lando
This follows the model set down for EME artifacts:
- a new tier is added that uses a new Python build action to fetch and
artifacts
- the action unpacks the fetched artifacts and moves specific inputs
into places expected by the build and packager
- in automation, MOZ_ARTIFACT_TASK* is used to ensure the artifacts
come from the correct tasks
In this case, the artifact fetching is done entirely in a new Python
build action that internally uses `mach artifact install --job ...`.
The action also verifies that the fetched artifacts are compatible and
that we're not assembling a fat AAR that is nonsensical. The specific
inputs are not used in the Fennec APK that is produced; they're only
used in the GeckoView AAR that is produced.
The artifact fetching itself required tweaking to fetch only
`target.maven.zip` artifacts and to not unpack them.
The specific inputs used are the native libraries (libs/$ARCH/*.so)
and the architecture-specific preference files ($ARCH/greprefs.js and
defaults/pref/$ARCH/geckoview-prefs.js). None of these inputs are
impacted by l10n.
Differential Revision: https://phabricator.services.mozilla.com/D31572
--HG--
extra : moz-landing-system : lando
This is because in some circumstances, when navigating away from a page, the dispatcher is no longer present when trying to send the `GeckoView:MediaRecordingStatusChanged` causing the message not to be sent. Fetching the dispatcher earlier ensures that it is present at the point of message sending.
Differential Revision: https://phabricator.services.mozilla.com/D32830
--HG--
extra : moz-landing-system : lando
Because the news strings are unused we need to add them in lint.xml as UnusedResources.
The suppress will be removed it in a future patch.
Differential Revision: https://phabricator.services.mozilla.com/D32979
--HG--
extra : moz-landing-system : lando
Added the missing data to the UpdateBlockedPopups event fired from PopupBlockingChild component.
Differential Revision: https://phabricator.services.mozilla.com/D31228
--HG--
extra : moz-landing-system : lando
This scope now controls add-ons bundled in omni.ja as well as those in the app
directory, so we need to enable it on Fennec in order for the default theme to
work.
Differential Revision: https://phabricator.services.mozilla.com/D32223
--HG--
extra : rebase_source : 3dd7ddec5b73e41dc385e60f2e8f8ce36db5be1b
Summary:
- Added the `LAST_PRIVACY` case for when the user is already signed into Firefox;
- Use the new default onboarding strings and images. If they are localized.
Differential Revision: https://phabricator.services.mozilla.com/D29347
--HG--
extra : rebase_source : a16820dd1da8885e4479a81f200f29ce994aeb3e
extra : source : 45002329fc202fd4783b5dd834235009be31970c
This is to allow us to detect the enabling and disabling of recording so that we can notify the embedding application of the change in status.
Differential Revision: https://phabricator.services.mozilla.com/D31072
--HG--
extra : moz-landing-system : lando
e10s profiling or IR-based PGO instrumentation will both produce
multiple `.profraw` files that need to be handled in some way. Since
clang's `-fprofile-generate` option takes a directory, it seems fitting
to make `--with-pgo-profile-path` mirror that by taking a directory, and
letting `merge_profdata.py` deal with whatever files it might find in
said directory.
Differential Revision: https://phabricator.services.mozilla.com/D32389
--HG--
extra : moz-landing-system : lando
Bug 1533425 makes Gecko try to load from $ARCH/greprefs.js, etc on
Android. This patch teaches the packager to put certain preferences
into those architecture-specific locations for that code to find.
Differential Revision: https://phabricator.services.mozilla.com/D24984
--HG--
extra : moz-landing-system : lando
When restoreState is called early in a GeckoSession's life, the scroll position restore code can catch the pageshow event for the initial about:blank load rather than for the page being restored, resulting in a failure to restore scroll position.
Differential Revision: https://phabricator.services.mozilla.com/D32163
--HG--
extra : moz-landing-system : lando
Whenever we switch processes in GeckoView we didn't inject frameScripts.
This change adds a new method `loadInitFrameScript` that is called whenever a
module's new browser is attached to a window so that the frame script is loaded
correctly into the new browser.
This fixes a bug in WebExtension pages where the WebExtension Process Script
would never be notified of a new WebExtension page window, breaking privileged
APIs.
Differential Revision: https://phabricator.services.mozilla.com/D32148
--HG--
extra : moz-landing-system : lando
WebExtension can always open their respective WebExtension pages even when the
WebExtension page is not content accessible.
However, this is not true for `tabs.update`, which couldn't link to
WebExtension pages at all.
Similarly, a user should be able to open a WebExtension page directly by typing
the URL.
To fix the above problems we pass the correct `triggeringPrincipal` when
loading such URIs. This change also makes URI typed by the user not use the
`systemPrincipal` anymore but a more restrictive codebase principal local to
the page that's being typed to avoid unintended side-effects. This also makes
the triggering URI always the page for these privileged pages, so we need to
adjust some tests to account for that by loading unprivileged `http` pages
instead.
Differential Revision: https://phabricator.services.mozilla.com/D32149
--HG--
extra : moz-landing-system : lando
We no longer use small cache on mobile, so such small max_entry_size is inadequate.
Differential Revision: https://phabricator.services.mozilla.com/D32104
--HG--
extra : moz-landing-system : lando
add a site patch to fix PDK video player versions that are broken on Fennec
Differential Revision: https://phabricator.services.mozilla.com/D31122
--HG--
extra : moz-landing-system : lando
A Proguard update in Bug 1550596 optimized away the WebAuthn methods, but
there's a convenient ReflectionTarget defined to say 'hey, don't do that.'
Differential Revision: https://phabricator.services.mozilla.com/D31693
--HG--
extra : moz-landing-system : lando
`mach run` as it is doesn't really parallel `mach run` on Desktop;
this makes it a little closer more fully featured. The underlying
functionality is all there in layers of mozharness; let's make it
easier to get to.
Differential Revision: https://phabricator.services.mozilla.com/D18292
--HG--
extra : moz-landing-system : lando
This just separates out the Android definitions into
mobile/android/mach_commands.py. There was vestigial support for
running on Android with debuggers, but it was for wiring up JimDB,
which is no longer supported and in fact hasn't worked on actual
devices for a very long time. (The new flow for running on Android
under a debugger goes through the Android Studio hybrid debugger.)
Differential Revision: https://phabricator.services.mozilla.com/D18291
--HG--
extra : moz-landing-system : lando
This fixes a crash in `browser.tabs.update` when used with WebExtension pages.
Differential Revision: https://phabricator.services.mozilla.com/D31453
--HG--
extra : moz-landing-system : lando
This fixes a crash in `browser.tabs.update` when used with WebExtension pages.
Differential Revision: https://phabricator.services.mozilla.com/D31453
--HG--
extra : moz-landing-system : lando
The mozilla::java::WebAuthnTokenManager asserts its return-to-C++ callbacks as
being run on the main Android UI thread, but since these methods are called
directly from the Fido2PendingIntent listeners, there's no guarantee of that.
We don't actually care what thread was tasked with returning us data, just that
it gets done, so let's not assert the thread here.
Differential Revision: https://phabricator.services.mozilla.com/D31497
--HG--
extra : moz-landing-system : lando
Some minor refactor to make it possible to remove android.speech dependencies using Proguard
Differential Revision: https://phabricator.services.mozilla.com/D27612
--HG--
extra : moz-landing-system : lando
Some minor refactor to make it possible to remove android.speech dependencies using Proguard
Differential Revision: https://phabricator.services.mozilla.com/D27612
--HG--
extra : moz-landing-system : lando
Now checking for private mode in order to ignore any permissions that had been set in previous sessions.
Differential Revision: https://phabricator.services.mozilla.com/D26702
--HG--
extra : moz-landing-system : lando
Requesting reviewers based on `hg blame` output and general knowledge of who is working on the project. I hope that's okay.
Differential Revision: https://phabricator.services.mozilla.com/D30580
--HG--
extra : moz-landing-system : lando