To avoid having to mess around with the HomePanel configuration machinery, we simply
override the class being loaded for top_sites in HomeAdapter: this is hacky, but
provides a simple temporary solution for showing ActivityStream as a homepanel.
MozReview-Commit-ID: Ga9qUTP3xxA
--HG--
extra : rebase_source : 004e5648ccf74d70f56e66c3ae228bb8071e9756
extra : source : e2d2895a0e678b58336f66fdae01efcd6264954e
This will allow us to more easily switch ActivityStream from being a HomePanel to being a complete
HomePager replacement - this could potentially be extended to read from a preference, but hardcoding
is probably sufficient for now.
MozReview-Commit-ID: HxQg5bOTmdh
--HG--
extra : rebase_source : 99048a0477214c2030cd9072a3e50bb041a18fff
extra : source : 41e5922460ccb2ded3d4e00975eb45f15c1ac4a0
We can keep the general ActivityStream code in the ActivityStream class/widget, allowing
reuse inside a HomePanel (for use in the HomePager). ActivityStreamHomeScreen then
wraps this for use as a HomePager replacement (which is the long-term goal for AS).
MozReview-Commit-ID: 1aWBh1YyARY
--HG--
extra : rebase_source : 8101f445b2aa106a2e06afc097247e849338b95e
extra : source : 155d6001460854ebff20bd1287fcb11c055cea66
Use application context for delayed callbacks to prevent leaking the
BrowserApp instance. Also, use application context for accessing
Distribution, to prevent leaking old BrowserApp instances, and to avoid
using a destroyed Context. Finally, attach AudioFocusAgent to the
application context instead of the BrowserApp context to avoid leaking
BrowserApp.
Unregister certain events in BrowserApp and GeckoApp to prevent
BrowserApp from leaking. Also, properly unregister event listeners in
PageActionLayout to prevent BrowserApp leaks, because
PageActionLayout.onDestroy never got called before.
Move registration of AccessibilityManager listeners to GeckoApplication,
and change all Context references to the application context, so that
GeckoAccessibility doesn't leak old BrowserApp instances as new
BrowserApp instances are created.
The patches in bug 1075476 refactored our notificaiton code to use broadcasts instead of
bringing the app to the front. However notification actions created via Notifications.jsm
still used activity intents (without any activity listening).
MozReview-Commit-ID: 7ZFMkgBitqw
--HG--
extra : rebase_source : 624538827df97f05657aaf99bc935c9fa7c5d785
- Introduce a new BatchingUploader class to handle storing records and keep track of batches/payloads
- Refactor upload runnable and upload delegate into their own classes
- Introduce Last-Modified and X-I-U-S handling into non-batching mode
MozReview-Commit-ID: 3JLExwQvYzM
--HG--
extra : rebase_source : 4a6a2db595fe72473b033acd4f3180fa799319d4
We only require the CirclePageIndicator, hence I've only imported that portion
of the library. The two resource files have been trimmed to only include values
that are relevant to the CirclepageIndicator.
MozReview-Commit-ID: EPyIf7OJHpe
--HG--
extra : rebase_source : b0a0fac13b619add96ec9d89281f5cec2ca6d51c
This uses a ViewPager, with each page containing a grid managed by a separate RecyclerView.
One main adapter splits the data into appropriately sized groups for each RecyclerView
to handle.
MozReview-Commit-ID: 9XGuw0NckD4
--HG--
rename : mobile/android/base/resources/layout/activity_stream_card_top_sites_item.xml => mobile/android/base/resources/layout/activity_stream_topsites_card.xml
extra : rebase_source : cc6ad23ae223b01ab59071d986ab4ad2d41c929c
We'll need this workaround for all the other CardView's we use.
MozReview-Commit-ID: 1B96Y2ZNKrY
--HG--
extra : rebase_source : e32e410045349f3afb7d5766b6dbb2cd80c0fc34
ActivityStream's topsites won't support pinned sites for now,
this allows us to use a simpler query that only retrieves topsites
without the complexity of a temporary table to merge pinned sites.
This results in some duplication between the old and new topsites
queries, however eventually we're going to want to get rid
of one of these queries (we don't know whether ActivityStream will
support pinned sites in the future yet, so we definitely want to keep
the pinned query for now - it's also needed for the old topsites panel).
MozReview-Commit-ID: AQyzXHGl3Cf
--HG--
extra : rebase_source : 6830c50d30a326dc7080ce720d4c1890dbab8e32
Retrieving the doorhanger during onAttachedToWindow seems to be unreliable, resulting in NPE's when
it doesn't work (the only logical explanation would be that onCreate hasn't been called yet, meaning
we don't have a layout yet). We should instead findViewById() it during onCreate, where the layout
is guaranteed to exist.
Since we show the overlay on all devices now, we can make it visible by default, whereas in the past
we had a condition to only enable it on > 2.3 devices.
MozReview-Commit-ID: 1DGVAPSX0mi
--HG--
extra : rebase_source : 025eb790e3b6c2d27ce10e04d624eb19b889d88d
This patch adds the known and widely used disk LRU cache library by Jake Wharton [1].
It's a standalone version of the disk LRU cache found in the AOSP tree.
The goal is to use a flat file disk cache to avoid the overhead of storing blobs
in a database [2] (and some bugs like bug 1108084).
[1] https://github.com/JakeWharton/DiskLruCache
[2] https://wiki.mozilla.org/Performance/Avoid_SQLite_In_Your_Next_Firefox_Feature
MozReview-Commit-ID: 2ayN7SYVe4W
--HG--
extra : rebase_source : d24907e9ab5563999754bb1f554ed31e5c90d47d
Add dispatch() methods to EventDispatcher that allow Java code to
dispatch events to Bundle listeners (currently either UI or background
thread listeners).
Some resource data is for Fennec/XUL era. Since these files is unused now, we should remove these from our package.
MozReview-Commit-ID: Dsx3qrSD01h
--HG--
extra : rebase_source : 66b416bcf7933327242bf6b74b88f81d5aac123a
Make the GeckoAppShell.cameraCallbackBridge callback use the new native
JNI bindings. Also refactor the relevant code in GeckoAppShell and
CameraStreamImpl.
Get rid of LayerView.Compositor.getSurface and just pass in the surface
when creating or resuming the compositor. That also lets us get rid of
some synchronization required for getSurface.
Now that nsWindow doesn't own LayerViewSupport, we shouldn't be using
WindowEvent for LayerViewSupport calls. This patch converts the calls
that dispatch to proxy to dispatch directly to Gecko. For
SyncResumeResizeCompositor, it used a proxy to call OnResumedCompositor
on the Gecko thread; this patch makes SyncResumeResizeCompositor post an
event to call OnResumedCompositor directly, without going through the
proxy.
Right now we report Java exception stacks through two code paths:
- GeckoAppShell.reportJavaCrash for exceptions caught by Java code
- jni::HandleUncaughtException for exceptions caught by native code
This patch combines the code for reporting the Java stack trace into
ReportException, to make it easier to add new features such as reporting
OOM exceptions.
We used to only handle certain exceptions in native code, and otherwise
forward the exception to Java handling code. Handling exceptions in
native code gives us better native stack traces in crash reports, so
this patch makes us always handle uncaught Java exceptions in native
code if possible, and only forward to Java as a fallback.
Bug 1058438 moved disabled hosts to the permission manager which are already cleared by these modules.
MozReview-Commit-ID: InprrYLvjMR
--HG--
extra : rebase_source : 806c2542cbab953b74ad82611501ecac32400930
- Add `envType` to BaseContext.
- Pass an explicit envType to all `registerSchemaAPI` invocations.
- The factories passed to `registerSchemaAPI` will be split up later, so
that content scripts (`content_child`) and addon pages can share
common implementations.
- The factories that implement the addon API will also be split up,
to separate code running in the main process (`addon_parent`) from
code running in a child process (`addon_child`).
- Remove the use of a hardcoded list of `namespaces` from ProxyContext.
Now `envType` is used to specify whether an API should be activated.
MozReview-Commit-ID: Jiff8HIwG92
--HG--
extra : rebase_source : 946a3c0009a4e3223c2d10044b3099a94c845394
Because of the smart folders and section headers, the adapter position needs to be appropriately adjusted when trying to access the corresponding cursor item.
MozReview-Commit-ID: n3FvcsYJ5T
--HG--
extra : rebase_source : 366dadb7abde5283a93fb1d62cff3ff4e3bba28b
Moving all vertically listed items into one RecylerView avoids the layouting issues encountered
with nested RVs. This results in a slightly more complex adapter, however overall this still
seems simpler than having to hack around the RecyclerView height measurements. (This also
makes the layout itself simpler, which hopefully means better performance too.)
MozReview-Commit-ID: HFS9q5JNYpY
--HG--
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/MainRecyclerAdapter.java => mobile/android/base/java/org/mozilla/gecko/home/activitystream/StreamRecyclerAdapter.java
extra : rebase_source : a8914cade238e031f171718914dbd67e8f81fba1
ReaderModeUtils.getUrlFromAboutReader() will return null if this is not a 100% valid reader mode
URL. However ReaderMoteUtils.stripAboutReaderUrl() will return the original URL if the reader mode
URL could not be "decoded".
MozReview-Commit-ID: J07Gkyq07JK
--HG--
extra : rebase_source : 3703d8f7f98fe5cb29d3e74012659996d9149dcb
Using a set is bad since it will silently ignore multiple files with the same timestamp, resulting in crashes when
the set has fewer items than we expected. A list is probably the best choice in this instance.
(Note: I am not familiar enough with this code to know whether or not this is an expected situation, i.e.
whether or not timestamps should be unique.)
MozReview-Commit-ID: 5TRNLgTsSHO
--HG--
extra : rebase_source : eff575ed7ef36555d20ffa568cb80bef1a1dfadc
Gecko could potentially send notifications via ShowAlertNotification (or any related method). It's possible
for this to happen very soon after launching Gecko, so we need to set the GeckoAppShell's notificationClient
before launching Gecko to ensure that it can handle notifications (this also avoids the associated crash - we
could try to do null-checks instead, but that would result in dropped notifications, which doesn't seem
useful).
MozReview-Commit-ID: 5MG8bBnt12M
--HG--
extra : rebase_source : 0723bbf987cf7f1f8dd5a612fb3e5cc81c6e1f78
We need to set the compositor-created flag in LayerView correctly when
reattaching to a new LayerView, so that we resume the compositor instead
of trying to create the compositor again, which we already did
previously.
This patch consists of general code cleanup and a new reattach method in
LayerView.Compositor that we call in order to set the compositor-created
flag correctly.
Implement a new OnFrameAvailableListener callback system for
AndroidSurfaceTexture using native methods. Each AndroidSurfaceTexture
creates its own SurfaceTextureListener object and uses it to forward
OnFrameAvailableListener callbacks to the corresponding nsIRunnable.
ExtensionContext in Extension.jsm has |extension| as an instance member,
so use it instead of passing |extension| to registerSchemaAPI's
callback.
And to make sure that this pattern also works in content processes, move
the |extension| member to BaseContext.
MozReview-Commit-ID: BgsGGCPQxJR
--HG--
extra : rebase_source : 7aa9fb7a53e057e8d3d8c477bd6821f8344c571a
Put presentation surface native methods in PMPM Instead of in
GeckoAppShell, and also make these methods work with multiple GeckoViews
by having them take a GeckoView parameter if necessary. This also lets
us eliminate the static nsWindow reference in nsWindow.cpp.
The touch area of the caret element includes the caret image and the
text above the image. This patch split these two areas, and call the
area covering the text "text overlay".
MozReview-Commit-ID: KWNAwVRP7fN
--HG--
extra : rebase_source : 674dbec65e1c4b04413f9f35fe46aeea46480831
The children of the caret element already have unique class name like
"image" or "bar", we could change the class name to be id, and use id to
locate them.
MozReview-Commit-ID: HLZecyAEYXv
--HG--
extra : rebase_source : 04b59a4d639ad45d2b564f48de15c2f23752fdaf
ExtensionContext in Extension.jsm has |extension| as an instance member,
so use it instead of passing |extension| to registerSchemaAPI's
callback.
And to make sure that this pattern also works in content processes, move
the |extension| member to BaseContext.
MozReview-Commit-ID: BgsGGCPQxJR
--HG--
extra : rebase_source : 9a85d95f0c147198938b86c57127f6e7403fd53c
Asynchronous mode was not available until API level 21. To make it transparent to the caller, introduce a wrapper interface that mimics the new API.
MozReview-Commit-ID: 7idq2lQo35I
--HG--
extra : rebase_source : 304c4267547096450712c05ab65163955fcc1f4f
It's possible for LayerView to be destroyed before it's finished
initializing on the Gecko thread. In that case, we should not continue
with normal destruction of NPZC. Checking isGeckoReady() in
GeckoLayerClient accomplishes that. Also, guard against a case where
LayerView.onSizeChanged is called after LayerView destruction and
results in a NPE from mCompositor being null.
This accomplishes three things:
1) Easier to use CLI when running without the benefit of testing/mochitest/mach_commands.py
2) Guarantees these arguments are mutually exclusive
3) Simplifies a bunch of logic in the test harness
The primary motivation for this change is to slightly improve the UX when running mochitest
from a taskcluster interactive loaner. However, this is more of a bandaid solution that was
easy to implement before the proper fix in bug 1293259 can be landed.
MozReview-Commit-ID: IeHBGrJ0Sji
--HG--
extra : rebase_source : ba1b7e437881e363fe0051dccd3d732221311c59
Combine the callObserver and removeObserver methods used for notifying
alert listeners into the native method
GeckoAppShell.notifyAlertListener. Keep track of the listener and the
alert cookie on the native side so that we don't need
GeckoAppShell.ALERT_COOKIES anymore.
Refactor the notification-related methods in GeckoAppShell. In
particular, combine showPersistentAlertNotification into
showAlertNotification, and move code out of AndroidBridge.
Add native method calls to AndroidGamepadManager to replace the gamepad
events in GeckoEvent. Implement those calls in AndroidGamepad.cpp. The
jni/Refs.h change is necessary to fix a compile error when using
jni::BooleanArray.
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.
We run only a small subset of the test suite to save resources. Over
time, we'll run more of the platform test suite.
--HG--
extra : rebase_source : 264fbe55be5b56857278ae8d731ef51b1b41cf3c
extra : histedit_source : a3550c7e2ea8a41cd6285e511b7268a9e7af11cd%2Cec6024dadcb7c071170aa452064776666283bb27