- Previously, we would only cancel the current animation if
sharedState.canBeContinued which was only set when mGestureEndTarget
was set, which is only calculated when the swipe gesture ends,
and is only true if the end target is not Launcher.
In ag//9518396 the check for the null end target was moved into
isRunningAnimationToLauncher(), but that call actually bakes in two
checks together, which means that even when tapping the home button
(where there is no gesture and no end target), it would return false.
Instead, we should ensure that the gesture target is set before trying
to cancel the animation.
- Also fix an existing issue where if the consumer is cleaned up after
the start callback is registered, but not before the callback has
returned, that we may incorrectly set the wrong launcher state since
the callback is made to the old gesture handler which tries to prepare
the recents UI (this manifests as a blank launcher screen).
Bug: 141886704
Change-Id: I642f20d631924730e98d10bb2123bd9448793fc6
The plan:
1. Skip all tests that fail in inproc mode on CF (this CL)
2. Observe postsubmit and make sure no inproc tests are failing or too
flaky on CF
3. Enable presubmit
4. Switch to skipping tests from step 1 only for inproc presubmit;
they'll start failing in postsubmit
5. Gradually make all tests pass and not flaky and enable them back on
presubmit
Bug: 142828227
Change-Id: I6ea3d53771503e8fd968555bb2e4cb1be10d83ef
- Require users of the activity interface to go through the interface to
get the raw activity
- Remove calls that pass in the activity since the interface already can
get the reference to it internally (and the interface always has the
reference before the caller)
Bug: 141886704
Change-Id: I13e52caba593db918e8a7764c751044142fe7ece
Signed-off-by: Winson Chung <winsonc@google.com>
- Allow multiple callbacks to be set for the same state
- Expose method to set state on ui thread directly
- Ensure callbacks are made immediately if the state is already set
- Clarify that the one shot callbacks vs the state listeners
Bug: 141886704
Change-Id: I8ea0dcd2821ee18d071706eaddeb2852afa13f30
- Instead of a shared state which is written into, gestures update their
own gesture state and that state is passed to the next gesture.
- The existing shared state encoded the final end target (which is
currently directly correlated with canGestureBeContinued). If we move
the end target calculations to the GestureState, the handlers can listen
for those changes and we can use the previous gesture state to decide
which consumer to choose. In addition, we move over the interrupted-
finish-launch-task id.
Bug: 141886704
Change-Id: Icb6a3815c16b23692dbcde316114bd3cea06634e
Signed-off-by: Winson Chung <winsonc@google.com>
- Add TaskAnimationManager which keeps track of the animation state whose
lifecycle can be longer than the gesture. Move some of the logic related
to cleaning up old animations into this class (called when the state is
shared across gestures).
- Instead of calling into the shared state directly via UIFactory, add
callback to cleanup the animation and shared state from Launcher
Bug: 141886704
Change-Id: Ib6140b37162f7460a20fa1046cfd4f4068e4a1c6
Signed-off-by: Winson Chung <winsonc@google.com>
- Adding trace tokens since we can be starting/ending traces out of order
- Fixing issue with draw hitting twice causing the trace stack to be
popped twice
- Fix issue with endFlagOverrides not removing from the stack
Bug: 142803200
Change-Id: I8649b94249910a352f00f2f2c2459c355d2bab00
It should swipe from the bottom right to top right when the nav bar is
on the right, rather than from the bottom left to bottom right.
For now, disable testQuickSwitchFromApp() because it seems to have
other failures as well.
Bug: 140252765
Change-Id: I1f4989f3ea5456c18bb9cbf42ea4b157cee500d7
Test is failing and blocking drop.
Only failing on TH, passing locally.
Tracked in b/141579810
Bug:141579810
Change-Id: Iadf8098cad22835b026984c0a9ea5122054b484b
- There are two issues:
1) Currently the system does not add the task to the task list until
the activity starting the task has been resumed (to be fixed in a
follow up platform CL). When the three activities are started in
sequence, it's possible for one of the activities to not reach the
resumed state leading to an unexpected number of recent tasks the
next time it's fetched.
2) When swiping up, it may take time for getTasks to return and call
applyLoadPlan, so try and wait until the task views have had a
chance to be applied before continuing.
3) Use the launcher activity tracker instead of activity rule since it
will return the same activity even after the activity is destroyed
- Move the margin handling to the caller instead of the scroll method
Bug: 141580748
Change-Id: I2b7634f5ac6869ba4b369b3bd60e0f63747c0f0b
This adds another card in the Recents Overview space which can show various items.
Change-Id: Ifc36639ece8aa6b554bdbd3256f4195b1b220d68
Merged-In: Ifc36639ece8aa6b554bdbd3256f4195b1b220d68
- Workaround issue where instrumentation will fail to finish an activity
causing the activity to linger longer than expected (leading to issues
with ordering of static resources like the app widget host registration)
- Fix calculation for scrolling the screen, the previous calculation
would result in the gesture starting at the left gesture margin due
to rounding which can trigger a back action instead of the desired
scroll
Bug: 142351228
Change-Id: I34bdb471030518d2b983cac2badd4d8b0e7d571b
- ActivityControlHelper -> BaseActivityInterface
LauncherActivityControlHelper -> LauncherActivityInterface
FallbackActivityControlHelper -> FallbackActivityInterface
QuickCaptureTouchConsumer -> QuickCaptureInputConsumer
- Move gestures to use the activity interface from the gesture state
Bug: 141886704
Change-Id: I6f12daeb03d564143404767dfe4576e3e5da2a1d
- Move the recents animation classes out of util into base quickstep pkg
- Clean up some local var names
Bug: 141886704
Change-Id: I1556179e203cbb43b77ea58e6fe520aa9944099b
- RecentsAnimationTargets: manages information about the targets only
RecentsAnimationCallbacks: manages callbacks from WM about the animation
RecentsAnimationWrapper: manages calls into WM to update the animation
(to be renamed accordingly in a follow up CL)
- Create the Callbacks as a part of starting the recents animation, and
have the callbacks create the controller wrapper and the targets, which
are both notified to the listeners through the callbacks.
- Instead of passing through a callback for recents animation finished,
have it be a part of the recents animation callbacks.
Bug: 141886704
Change-Id: I4ff26a175654e82efe059fa74d1f310e93961dc9
- We can move the background call to UiThreadHelper, the last sysui flags
and back button alpha to SystemUiProxy (and dedupe values there as well)
Bug: 141886704
Change-Id: I22183608700c6d71355597c7a08eefa19f4381fd
Stole ag/9453040 from jspierce@ and added a feature flag.
ag/9453040: Exploratory prototype to test leftward swipe access to
Compose across home screen, launcher, and lock screen. Requires Compose
APK (installed separately).
Change-Id: I15a045976b1eb41392795d3a4f0743f365dec1d2
- Feed the class down to the input consumers and related gesture classes
instead of specific sysui state flags
Bug: 141886704
Change-Id: I2ade7f48555c9d0ba0d3fac5c1f2dae694624224