Instead of starting getAppPackageName() and relying on it being our Test
Pin Item activity, instead launch our own test activities with the
FLAG_ACTIVITY_MULTIPLE_TASK and FLAG_ACTIVITY_NEW_DOCUMENT flags.
Test:
- Locally run testQuickSwitchFromApp() from Android Studio
- flake -oop -t com.android.quickstep.TaplTestsQuickstep#testQuickSwitchFromApp
Bug: 140252765
Change-Id: Ie137261ce65bfd3dd39df78d57784854a026e967
Test: Implemented plugin interface in Compose studiow build in
google_experimental, verified plugin shows up appropriately in
Launcher's home settings screen, verified gesture works if Compose
plugin enabled, and doesn't work if Compose plugin disabled.
Bug: n/a
Change-Id: Ica24ee8fe814ee02a1497a1bfbe7c7a24489b71e
Allows us to override only the required methods, instead of providing
a proxy method for everything
Change-Id: I816dcdb2a8d5432496050118ded0f2bbe7122cf7
- Prior to ag/9526193, there were a mixture of getCreatedActivity() and
passed in Activity calls. In the cases where we used the passed in
activity, it would happily make the call even if the activity is already
destroyed, but since we migrated to using the unified getCreatedActivity()
call, it results in an NPE. Since it's unnecessary to update the destroyed
activity, we can simply skip this work.
Long term, we should consider baking the activity associated with the
call into the activity interface, and ensure that the interface itself
is updated whenever the activity is recreated.
Bug: 141886704
Change-Id: I4f043e455d8d0d1c1b86362cc72618018bfbd900
Signed-off-by: Winson Chung <winsonc@google.com>
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: I0092d6b92b0358866f8cbf9e00dbe3fabe23703d
- 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
mContentAlpha sometimes equals 0, changing to 1 ensures recents card always shows when supposed to
Change-Id: I27eda97b72b75263c0aac09e2355bca72daecc27
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