Previously it was using OtherActivityInputConsumer, which got things in a
pretty weird state (e.g. most recent app would appear in the center as if
it was the active app when you started Quick Switching, etc.).
By default (toggleable by a feature flag), OverviewWithoutFocusInputConsumer
is used because Assistant doesn't seem to respect the CLOSE_SYSTEM_DIALOGS
broadcast, at least in half-shelf mode. In this case, the Home intent is
sent on swipe up, or you can dismiss it with the back gesture or by tapping
above the half shelf.
The new feature flag ASSISTANT_GIVES_LAUNCHER_FOCUS routes touches through
OverviewInputConsumer. As opposed to OverviewWithoutFocusInputConsumer,
this allows Quick Step to work while Assistant is running. Additional logic
is added to dismiss the Assistant when appropriate. Note that the dismissal
happens atomically, so it's not completely fluid with the other animations.
As mentioned above, this is disabled by default because Assistant doesn't
currently respect CLOSE_SYSTEM_DIALOGS.
Demo with the flag enabled (and Assistant respecting CLOSE_SYSTEM_DIALOGS):
https://drive.google.com/open?id=1W5jGpn_TEC-KjrYwQtaBT3pzxG_5tC4W
Bug: 139661510
Change-Id: I261653118aff289b329ec2a7ca6e52f100f7835a
Tested: Manually used quick switch after invoking Assistant from home screen.
This will allow subclassing BitmapInfo to support custom icon/dynamic
icons which can be loaded on the background thread instead of going
through IconFactory which runs on UiThread
Change-Id: Ieced6e91330bdff1b505826d097a8df711dfe967
- Bake overview/home component into the gesture state (it should never
change mid-gesture), this allows us to remove OverviewComponentObserver
refs from the handlers
- Move nav bar position into DeviceState
- Remove passing RecentsModel into the handlers, it already partially
references it statically
Bug: 141886704
Change-Id: I62f9138651cbe1fb984b57b96e4212ebaa1ffb5d
> Removing activity info cache as icon and description are loaded at the same time
> Invalidating icon if task cache is old
Bug: 38268585
Bug: 138944598
Change-Id: I28ae61a089556198534d48fcdb3aae6109748dff
- None of the gestures work when the user is locked so
we can just skip them.
Bug: 143107728
Test: Manual
Change-Id: I2661d58269f7eccbfcd2214792c128b432e0347c
The finish recents animation callback is nullified when invalidateHandlerWithLauncher gets called.
Fixes: 143361207
Test: Turn on live tile mode, swipe up to Overview, try to launch an app from the shortcuts
Change-Id: Icce076f69cd38f54870229344266106360be6aa4
Before this change, mCanceledThumbnail is used but never assigned.
Test: Turn on live tile, swipe up to overview from app and observe that the screenshot from recents animation gets properly cleaned up.
Fixes: 143307786
Change-Id: I8fba46324c43df661adf12cd1e5d9e06a0a3ee6f
addPluginListener() needs to be moved into onUserUnlocked() since it
reads from the shared preferences. This fixes a crash in
Launcher3QuickStepGo on wembley.
Bug: 143249037
Change-Id: Ib60f688cb3f91e377141fab1ad9f2a0071c96694
Existing clients now use the SingleAxisSwipeDetector subclass. A
followup CL will add BothAxesSwipeDetector, whose first client will be
the quick switch from home controller.
Bug: 126596417
Change-Id: I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d
Because a PagedView has page a11y actions (PAGE_LEFT/RIGHT),
a11y services now identify recents apps as a pager.
Tweak the a11y event info to accomodate this so the announcements
are correct.
Also fix the CollectionItemInfo to have the correct page index.
Bug: 141899192
Test: Tested with TalkBack on device
Change-Id: Ic578bee8de26a41f0ab0e5468f1fd060ed21a7e1
> Connect to a predefined content provider to get package specific action
> Add that action to shortcut menu and task menu
Change-Id: Ide5c09d04112e86c8e19c2f9e66c88c15b3fd04e
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
- Rely on the device state navigation mode instead of tracking it
independently in various places
Bug: 141886704
Change-Id: I421c1fa11ca7362aff8e2388a2b5d427b39af3e9
> This makes easier to extend the factory and callbacks separately
> Availability checks are only performed once when getting the shortcut
Change-Id: I413541eabfb2b9e987c852d5171c6696b1853958
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>