Based on what I'm seeing, if you call scrollToPosition and that causes you to
"scroll into view" (remember, scrollToPosition doesn't actually scroll, it just
redraws the new position) one or more positions, then RecyclerView runs the add
animation on all those views "scrolled onto screen", which, for the list view's
slide-in-from-the-right add animation, looks silly (I think). [Caveat:
RecyclerView sometimes keeps one offscreen view ready to go, which doesn't seem
to get the add animation.]
In non open-tab-from-another-app-with-the-tabs-tray-already-open operations this
was never an issue because either those animations are hidden by the panel being
animated into view when the panel opens and we scroll to the selected position
[at least that's my guess], or we only scroll by at most one, as in the case of
a tab close or undo close. But in the
open-a-tab-and-scroll-to-it-while-the-tabs-tray-is-already-open case that we can
get with opening a tab from another app, the add animation runs for however many
tabs "need to be added" between the current position and the new tab; sometimes
the animation still gets hidden if the new tabs get added quickly enough when
fennec reloads [again, my guess], but on my device I always see the animations
if I open a tab in tab queue and then reopen Fennec by hand, whereas on an
emulator I see the animations in additional external-app-open cases as well.
MozReview-Commit-ID: J3x0bBLPNyz
--HG--
extra : rebase_source : 9ee77d395e452e50f958c6c096167704cbe37795
extra : source : f03ab10a14245f2cd8c71130cb677cb8bf1a31db
If another app opens a link in Fennec, and Fennec restores itself in a state
where the tabs tray is already open, we need to scroll to the newly added tab
since it gets added offscreen (not to mention the scroll position restored when
we open is unconstrained (it's whatever the user left it at before they switched
apps)).
This introduces one small change in behavior:
1) Use a gridded tabs tray;
2) Fill more tabs than will fit in the tray;
3) Put more than one tab on the last row;
4) Scroll so that the last row is partially, but not fully, hidden;
5) Close the last tab and then undo the close.
In that case we now scroll the last row fully into view, whereas previously we
maintained the old (partially hidden) scroll position. (If you undo close any
tab other than the last on the final row then you still get the old behavior.)
Note that this fixes the case where the other app adds a *new* tab in Fennec
with the tabs tray open; it's (currently) also possible to open a link in an
already existing tab with the tabs tray open - that's bug 1353226.
MozReview-Commit-ID: BazXFwT0B8v
--HG--
extra : rebase_source : c5fe91793b90f22dfeea0d05fd8730906d0ccdbe
extra : source : 3c5cea45aec424bee4043cd7d362e80aff9a491d
If the activity is restoring, onTabChanged might not be called.
To update title from existing Tab data in onResume.
MozReview-Commit-ID: 3LqQ6HDh7Dc
--HG--
extra : rebase_source : 1dd49658642be420d54d6a8e2d8c33e7658b0f2e
Now we can get toolbar color from intent directly, and the intent will
be stored in `onSavedInstanceState`. Let's get rid of the local
variable.
MozReview-Commit-ID: OsqwgFJctH
--HG--
extra : rebase_source : a5cd688de88de564739481f77fe514bdeffd6c0e
`getIntent()` not always returns the intent whith start this Activity
due to GeckoApp.onCreate reset it. We make a copy here in case of this
activity is destroyed and re-created.
MozReview-Commit-ID: 7TF3b1WdbM2
--HG--
extra : rebase_source : 60bab715166fd01b1fc89ca149e7f5a0f94e6bd1
Confusion between storeDone() and storeDone(long end) resulted in certain sessions (bookmarks
and form history) not overriding the current method. As a result, their final "flush the queue"
methods weren't being called by the buffering middleware.
This patch removes the storeDone(long end) method, making such confusion a non-issue.
Given that a lot of sessions tend to build up buffers which they need to then flush after a storeDone()
call, passing in a timestamp into that method doesn't make sense. Instead, let's supply a default
implementation in RepositorySession which calls onStoreCompleted(endTimestamp) with current time,
and allow sessions to override this method and own the onStoreCompleted(endTimestamp) call.
MozReview-Commit-ID: 84o7aAL8RPC
--HG--
extra : rebase_source : 41767ad502bd5ad8a0a487235bfdca8cf0d0c927
To observe the difference, use `javap -l`. For example, for
automationRelease and automationDebug built with `./mach gradle clean
app:assembleAutomationRelease app:assembleAutomationDebug`, I see
locally:
$ javap -l objdir-droid/gradle/build/mobile/android/app/intermediates/classes/automation/release/org/mozilla/gecko/home/activitystream/menu/ActivityStreamContextMenu\$1.class
Compiled from "ActivityStreamContextMenu.java"
class org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu$1 extends org.mozilla.gecko.util.UIAsyncTask$WithoutParams<java.lang.Boolean> {
final android.view.MenuItem val$bookmarkItem;
final org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu this$0;
org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu$1(org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu, android.os.Handler, android.view.MenuItem);
LineNumberTable:
line 103: 0
<snip>
}
$ javap -l objdir-droid/gradle/build/mobile/android/app/intermediates/classes/automation/debug/org/mozilla/gecko/home/activitystream/menu/ActivityStreamContextMenu\$1.class
Compiled from "ActivityStreamContextMenu.java"
class org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu$1 extends org.mozilla.gecko.util.UIAsyncTask$WithoutParams<java.lang.Boolean> {
final android.view.MenuItem val$bookmarkItem;
final org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu this$0;
org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu$1(org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu, android.os.Handler, android.view.MenuItem);
LineNumberTable:
line 103: 0
LocalVariableTable:
Start Length Slot Name Signature
0 16 0 this Lorg/mozilla/gecko/home/activitystream/menu/ActivityStreamContextMenu$1;
0 16 1 this$0 Lorg/mozilla/gecko/home/activitystream/menu/ActivityStreamContextMenu;
0 16 2 x0 Landroid/os/Handler;
<snip>
}
MozReview-Commit-ID: 3HmiGkHhowQ
--HG--
extra : rebase_source : c84d8d4b8ac813e49db0c61a30c7098ff2eae3f4
Since we're uploading records atomically, order in which they're processed by the uploader
only matters if we want to do sanity checks on certain types of records. Server might still
preserve some of the order, but for our purposes here it shouldn't matter.
We'd like to ensure that we process the "mobile root" bookmark record along with other folder
records first, so that we increase our chances of avoiding making a failing network request if
that those records' payload is too large.
Sorting by bookmark type achieves this.
MozReview-Commit-ID: KrAs3zepaOk
--HG--
extra : rebase_source : 24f1d3d6aa2ee3b6777dc38abdd1e01aba5213c2
If we try to upload a record whose payload BSO field is larger than the limit specified
by the server, fail that record during BatchingUploader's processing.
Consequently, Synchronizer will fail current sync stage and advance to the next.
Previous behaviour was to essentially rely on the server to fail our POST request,
at which point we'll fail current sync stage. So in a way, this is an optimization to
avoid making network requests which we know will fail.
MozReview-Commit-ID: 5aJRRNoUuXe
--HG--
extra : rebase_source : 18920cfe7b7599be1984c53ebc0c9897c98fb7d9
Also rename Wikipedia Belarusian for consistency
MozReview-Commit-ID: DDtmwrG3sU5
--HG--
extra : rebase_source : 4dcec3ac19f421098f1ed9e9e33a1b13014c745e