Replace old flags in WrapForJNI usages with new flags. The calledFrom
and dispatchTo flags are set based on whether the method is native or
non-native, and how the method is used.
Also fix testEventDipatcher to respect NativeJSObject's calledFrom =
"gekco" flag, by moving a test to Gecko thread.
WrapForJNI has some flags that are obsolete or confusing. Clean it up so
that there are fewer but more meaningful flags. Add a "calledFrom" flag
to indicate the intended calling thread and add a "dispatchTo" flag to
indicate where a method call may be automatically dispatched.
The "Tabs from last time" section of the "Recently closed" folder is only read from sessionstore.bak when the adapter is created and subsequently never updated.
To prevent those tabs from lingering around after clearing history, the history panel initially directly called the RecentTabsAdapter. To handle this in a more generic manner, we now have the RecentTabsAdapter listen for "Sanitize:Finished" notifications instead.
MozReview-Commit-ID: AADXHd5iDo2
We can't register both GeckoEventListeners and NativeEventListeners for the same event - since GeckoEventListeners are deprecated anyway, we should simply convert GeckoPreferences's "Sanitize:Finished" listener to a NativeEventListener, so as not to cause conflicts with the RecentTabsAdapter.
MozReview-Commit-ID: Dh3iXPQIJPC
Add a native method in ZoomedView to request zoomed view data. The
native method is implemented in the ThumbnailHelper class on the C++
side because it shares a lot of code with the thumbnailing code.
This is the first step only. It moves Experiments out of util (just
for convenience) -- I would have liked to have moved WhatsNewReceiver
out of notifications as well, but it's referenced in
AndroidManifest.xml.in and I don't want to break that.
The set of files in GeckoView is slightly larger than what we really
want, but it's close to correct. Future tickets will get things
compiling and trim the set of files down to size. Hopefully we can
move notifications/, permissions/, and restrictions/ back to Fennec.
This is not technically required, but it's best to bulk move the files
up front and patch later, rather than jump through hoops to
distinguish the set of files in Gradle (and moz.build).
MozReview-Commit-ID: EWaAeswFoeG
Moved notification classes to notification folder. Refactored uses which added
imports to some Gecko classes as well as the Notification classes. Added getter
to GeckoAppShell for access to static NotificationClient. Changed paths in
AndroidManifest.xml.in to reflect changes.
MozReview-Commit-ID: 2CUJa0YsV1V
When reading the previous session file, the RecentTabsAdapter waits for GeckoApp (initialisation runs on the main thread) to have actually moved the previous session file to its correct location (happens from the background thread). Hence we can't do the wait from either of those two threads, because we risk a deadlock otherwise if the RecentTabsAdapter happens to be initialised *before* GeckoApp.
MozReview-Commit-ID: 3GBeReP2iQW
I expect the crashes occurred because one of the following:
* the store already existed as a file
* the store was a directory that did not have the appropriate permissions
In the telemetry code, none of the cases above should happen so I assert that
they never do.
If the crashes did occur for these reasons, the user will unfortunately
continue to crash but at least we'll know where our assumptions are going wrong.
I originally intended to write a regression test for listFiles returning null
but it requires the application code to be modified in non-trivial ways (e.g.
accessor methods we might forget to use) so I decided against it.
MozReview-Commit-ID: 9V9H84ehbdO
This is to help keep the terminology more clear: this container will allow displaying any of our
home screen implementations, and not just the HomePager.
MozReview-Commit-ID: 4kqNipgvQ5I