> Fixing crash when some properties are not initialized if draw is not called
> Adding robolectic support for UI testing
> Adding robo tests to verify workspace, all-apps, widgets and folder scrolling
Bug: 147312357
Change-Id: Id7756e07f06396359e441cdff2e4f992bdcb97bb
Before, we did this by extending the window/launcher animation to
match the scroller duration. But now that we are using springs to
control the scroller, that duration is not really accurate. So
instead, we now let the window/launcher move at its own pace, and
wait for both that animation and the scroller to finish before
calling onSettledOnEndTarget().
Bug: 147302669
Change-Id: I37a9dd3eea17ebe663c33c3a4478b1b53a63dcc2
This sets the feature flag on launcher side
and also updates the setting in Settings.Global
Launcher DOES NOT listen to the Settings.Global
change from adb anymore. This should take
preference over setting it from command line.
Also fix a related swipe to home animation bug
that happened w/ merge conflict.
Fixes: 150260456
Test: Set and unset, visually verified behavior.
Tested w/ autorotate on and off.
Checked Settings.Global value correctly updated
via "adb shell settings get global
fixed_rotation_transform"
TODO: Update tests to reflect this new
default-on fixed rotation behavior.
Change-Id: Id95f006eb1e92a59e24b05567298fd21b1409b13
Also stop OrientationTouchTransformer from
spamming logs
b/150214193 should track properly handling
this in the future
Fixes: 146176182
Test: New vertical layout showed up when
swiping to Overview w/ landscape app.
Works for both autorotate on and off.
Change-Id: I3707cf7b5693be0fcf4d63491901f4ec00793f4f
WM is making changes which allows apps to maintain
their orientation independent of the orientation of
the foreground app. This allows recents to always start
in portrait even when the app currently running is in
landscape. This means we have to give the illusion of
a landscape oriented overview when user swipes up in
gesterual nav when launcher is started in portrait
configuration.
PagedOrientationHandler abstracts all coordinate specific
logic from Paged/RecentsView primarily, but also all
other dynamic calculations throughout launcher.
PagedViewOrientationState is the single point of exposure
to other classes that depend on those changes. The goal
is to also minimize holding state to allow for default
implementations of PagedOrientationHandler for all the
3p/Fallback classes. PagedViewOrientationState also
holds other data around rotation that isn't
specifically tied to view logic.
The fake landscape overview can be toggled with:
adb shell settings put global forced_rotation [0/1]
Fixes: 146176182
Change-Id: I65d8d4e9f92b93931cbe0053ccaf0cda8d2ffd6c
The flag is only set when building from Android Studio... and is never
used for dogfood.
Test: local
Change-Id: I898d585f4558c2437f0152ef102bea59c351f80b
Send TYPE_VIEW_FOCUSED in the following places:
- When page transition ends on a task
- When finishing state transition to overview
- When un-hiding the current running task view
Bug: 145647019
Change-Id: I7bb357ea60e1dea79daf2ad50efa51071e064da8
Forcing OverviewActions buttons to appear as if it is shown only once in overview screen by overlapping all instances in the same spot.
Change-Id: I195d5455d5eb9f12a19c352169bc995849e59281
- Don't set current page to running task when applying load plan,
if we are already settling on a new task to launch.
- When starting a new task, finish to the running app if that's
the task being started (should not happen with above change)
- When disabling free scroll mode, don't snap to a page if we're
already on it. This was setting mNextPage so the first check
was falsing.
Bug: 142068081
Change-Id: I5b392d9726a81c51718d2f94eee6cd4f78b61f69
The logic to keep mIsBeingDragged when touching down during a scroll
animation was in onInterceptTouchEvent(), which we were bypassing by
using onTouchEvent() directly. Now we update mIsBeingDragged on touch
down in both onInterceptTouchEvent() and in onTouchEvent().
Bug: 141024521
Change-Id: I77abd4c36f3ccee27e160c817dadb3923e6cfc06
This reverts commit d5af944f41.
Reason for revert: Test failure on master that might be related to this code change.
Change-Id: I269bf5b0a6505da291e1ff4ed181a851268d6ed8
For PagedView, when isPageOrderFlipped is true, it means the LTR mode is
flipped. For the "recents" in launcher, isPageOrderFlipped is true.
However, this doesn't affect the directional page operations since
scrollLeft()/Right() already has correct Rtl considerations. See
b/78788182 for more information on the LTR mode.
Test: Tested with the "recents" in launcher. Verified that page left
action always move pages to the right (so that the next page from the
left side shows), and page right actions always move pages to the left
(so that the next page from the right side shows). Also tested with the
home screen 1/2, 2/2 paging.
Bug: 136277517
Change-Id: I965d651c37d258eaa8ea347d1ad6f698f9b590bf
The original bug that was solving seems to be fixed by other changes,
and this allows users to scroll, dismiss, etc on recent tasks before
fully reaching overview from an app.
Bug: 137487381
Change-Id: I28a708811bba3ce739ce261f19eb29558d8f0e7d
=> Regression from recent CL ag/8074890
=> Fix which scopes the change down to the RecentsView, but not all PagedViews
Bug 136733573
Change-Id: I0abaa61b2b132d8086dc3b2cb3e3e9c1f181b5f5
> When running one-off animations during quickstep, cancelling prevoisly
running animations.
> Cancelling such one-off animations when state is reset
> Preventing touch proxied from recent transition to affect quickswitch
(by affecting pagedView)
Bug: 135686388
Bug: 135571566
Change-Id: Id647015a583761d8fd46a02e3e2d88027e282a79
- Detect when start of the next task is interrupted with another gesture
(after finishing the recents animation but before the next task is
launched), and ensure that the next gesture is continued with another
other activity input consumer (but without actual remote animation
targets)
Bug: 128376812
Test: Introduce artificial delay in recents animation finish, try to quick
switch quickly
Change-Id: I057a0b2c4b7e8636467e37f5bbc8800b46c24345
Also fix a bug where we logged workspace swipe upon clicking undo, since
rebinding the pages causes us to reset mCurrentPage = 0 followed by
setCurrentPage(pageBoundFirst). Since the page isn't actually visibly
changing, we shouldn't log in that case.
Bug: 118758133
Change-Id: Ie87164a8c7c278680f67dee75657210bd33408a4
- Add support for mMinScrollX to PagedView
- Add RECENTS_CLEAR_ALL_BUTTON as a state-specified visible element
- In BackgroundAppState, set Clear all invisible and bound RecentsView
scroll to the last task
Test:
- Open an app, quick switch until reaching the end, ensure Clear all
does not show up and an overscroll effect is performed
- Enter overview, scroll to the end and ensure Clear all shows up
- Same tests in RTL and 3rd party launcher
Bug: 130160876
Change-Id: I5fb958744d0055b83ced1f8b0d7face0e06a0cc5
It's no longer necessary, and causes issues when trying to scroll
a PagedView that only takes up the bottom half of the screen (e.g.
RecentsView in split screen mode).
Bug: 126606858
Change-Id: I117dfe9416cdeef1247d6e783390cf5c391e8254
- Apply the bounded current scroll to the overscroll instead of assuming
the max scroll (on the last tick, the overscroll amount can be zero,
causing us to shift to the max scroll until the next draw)
Bug: 126767319
Change-Id: Ia60ecb0c3f18e68d0c91620aa79b21df72c213cf
Velocity tracker is able to calculate the velocity using cached copy of motionEvent
as long as the event as correct timeStamp
Change-Id: I2b0f612e010fdfcf144d5bed928c5a96b36f3ac7
- Add max orthogonal displacement to MotionPauseDetector to avoid
pausing when swiping left or right
- When gesture in ambiguous between swipe up for home or swipe over
for the new task, base the decision on the faster velocity component
- Disable recents freescroll mode when dispatching motion from the nav
bar. This way recents handles it naturally and we don't need custom
logic to snap to the next page at the end of the gesture.
- Fix a bug where you couldn't hook to start a new task when SWIPE_HOME
was disabled
Bug: 111926330
Change-Id: If63aa2bb32b57c3f401c5df8b3f6f4efec97b1fa
- Behind feature flag QUICKSTEP_SPRINGS
- Springs control settling the page and allow for overscroll for the
first/last pages
Bug: 111698021
Change-Id: Ib4a9ef59463cc46e31ac0766bf7705612f6c63c1
- Scale down current task and translate it to the left
- Translate previous task in from the left
- This is a toggle; quick switch again returns to the first task
Currently this is implemented by repurposing onQuickScrub(progress) to update the positions
of the first two pages. This makes tracking velocity a bit difficult; if we want to go down
this path in the long run we should probably track velocity properly on MotionEvents.
Change-Id: I4445b5f08b6e88e71cbb5e30b1f1d45c5f1edc68
It moved from Settings.System, so there were constant warnings in the
logs. This only affects dogfood builds.
Change-Id: Ic3c179837f78a8040579fcc6ad485f6fabe1c2a1
> Fixing PagedView resetting the currentPage, if scrollToPage was called before first layout
This causes quickscrub to jump back to the current task if launcher activity was dead.
> Fixing missing callbacks in DeferredTouchConsumer causing missed quick scrub flings
> Sending the resents animation callbacks on the motion queue thread, to avoid synchronization
issues with sysui callbacks.
> Waiting until the recents animation is received before starting the scale down animation
> Calculating the offset for quickscrub statically incase launcher activity was dead
Bug: 80214390
Change-Id: I1b7d00b7b266655a92fcd6239f25ba191655150f
Also fixes task position being incorrectly reported specifically for
swipe events due to using stale getCurrentPage().
Bug: 72222505
Test: Manual
Change-Id: Ic79b67f8a6ffbfabc397b411b14afc309405197e