Commit Graph

1498 Commits

Author SHA1 Message Date
Zak Cohen
e895869f47 Overview actions - adds feature flag and base class for Overview Actions.
Adds ENABLE_OVERVIEW_ACTIONS feature flag and base factory. Requires an
implementation in overlay to show any actions.

Test: run locally with flag on and off.
Bug: 145628186

Change-Id: I1c36330464cc01e1e987ebfea1a9f451067598a5
2019-12-09 16:43:54 -08:00
Vadim Tryshev
0c3fd9823e Merge "Moving processing data received from Wellbeing to a supress-all block" into ub-launcher3-master 2019-12-06 20:21:53 +00:00
vadimt
c55f89c630 Moving processing data received from Wellbeing to a supress-all block
Bug: 144927220
Change-Id: I25f02d5844b32abb73c2b4b6fcdaa68f438e6aa4
2019-12-06 11:08:56 -08:00
TreeHugger Robot
56c9c86fe9 Merge "Removing custom activity dump logic" into ub-launcher3-master 2019-12-05 20:34:54 +00:00
Zak Cohen
b053371672 Make it possible to set a bottom margin on the task thumbnail view.
Test: manual test

Change-Id: Idb18efeb5e2ee46f789488529513874e028532db
2019-12-02 15:56:57 -08:00
Sunny Goyal
fca20151b0 Removing custom activity dump logic
Change-Id: I37c339be205a4e35227986544d36ca03b1ae4ba4
2019-11-25 11:18:28 -08:00
Tony Wickham
37a0970bf5 Improve quick switch from home by tracking both x and y motion
- Add NoButtonQuickSwitchTouchController which uses
  BothAxesSwipeDetector to track horizontal and vertical motion.
- Initially, we only detect swipe left to right to quick switch
  (like before), but then we allow swipe up to either go to
  overview (if you hold) or back home (if you don't hold).
- xDisplacement transitions non-overview components out (e.g. shelf
  and workspace), and translates overview in.
- yDisplacement translates overview up and scales it down

Bug: 126596417
Change-Id: Id679ad84c08246e205c667a78ed5df00d7276258
2019-11-14 15:50:18 -08:00
Pinyao Ting
2cf2871392 include predicted_rank in app launch logging
Test:
1. . build/envsetup.sh && tapas NexusLauncher
2. ccdebug && cclogcat
3. launch from workspace any app that is also in predicted apps
4. verify in terminal it has correct predicted_rank

Bug: 143855018
Change-Id: I07a62f07057537a6c09384cf944bbc5aa5888d22
2019-11-12 16:40:34 -08:00
Tracy Zhou
0493a1e250 Inform RecentsAnimationController when overview is reached.
Fixes: 142088072
Test: manual
Change-Id: I1211885d01535f8d39333c6fcb4a7ec7eefcdf78
2019-11-12 12:56:09 -08:00
Tony Wickham
d0764c04c5 Merge "Move shelf peeking anim code to ShelfPeekAnim class" into ub-launcher3-master 2019-11-08 04:30:19 +00:00
Tony Wickham
85d6f25016 Move shelf peeking anim code to ShelfPeekAnim class
Bug: 126596417
Change-Id: I5ba501b04b3eaf12a20ba1312ef362f9734761c3
2019-11-07 15:21:23 -08:00
Sunny Goyal
37279e2313 Scaling down hotseat to match prediction row size when going to overview
Bug: 141265005
Change-Id: I3b11146881af334508f553e4ca3a36b9291511d9
2019-11-06 14:39:28 -08:00
Winson Chung
5d3dc9c76d Merge changes I4649483a,I890a45e6,I6ccfab86 into ub-launcher3-master
* changes:
  17.5/ Remove synchronized calls, verify controller before finishing animation
  17/ Update activity tracker callback
  16/ Renaming the swipe handlers
2019-11-05 05:18:05 +00:00
Winson Chung
52c57f73d2 17/ Update activity tracker callback
- Immediately callback when scheduling activity tracker callback and the
  activity already exists
- Remove LauncherInitListenerEx, it was only used to update the prediction
  ui state, but not all of the callers of the launcher activity init
  listener actually needs this (ie. Go doesn't have overview predictions,
  overscroll input consumer/touch interaction service doesn't need it.)

  Instead we only call it in the places we need it LauncherSwipeHandler (for
  swipe up) and OverviewCommandHelper (for the nav bar button).

Bug: 141886704

Change-Id: I890a45e658be813e99b2a02f179fce611ede9ce8
2019-11-04 20:13:11 -08:00
Pinyao Ting
c3c5292a24 fix the issue now playing shortcut cannot be dragged
Bug: 143904998
Test: put now playing shortcut in workspace, verify dragging it doesn't
cause a crash

Change-Id: Ic531b43d61d55ec14e9f420ff799a36b8d785e2a
2019-11-04 14:57:43 -08:00
Sunny Goyal
14168431bd Adding support for dynamic calendar and clock icons
Change-Id: Icdba34340a27a4f6dff7310d0bf9fd29aef1330c
2019-10-29 13:50:02 -07:00
Winson Chung
4998b19307 15/ Move some more logic into gesture/device state
- 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
2019-10-25 15:52:25 -07:00
Winson Chung
a19a2b755f 14/ Bake the running task info into the gesture state
- This removes a bunch of places where we pass it through the gesture flow

Bug: 141886704
Change-Id: I28d2c53b0300c614ed074746b06f2d548b5e8cc7
2019-10-25 15:47:19 -07:00
Sunny Goyal
9f975ed089 Merging task icon cache with content description cache
> 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
2019-10-25 12:26:39 -07:00
TreeHugger Robot
a0b026a6ed Merge "Fix screenshot not getting cleaned up after recents animation cancelation" into ub-launcher3-master 2019-10-24 22:43:51 +00:00
Tracy Zhou
734f2d9f15 Fix screenshot not getting cleaned up after recents animation cancelation
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
2019-10-24 14:51:23 -07:00
TreeHugger Robot
b7d463e74c Merge "Refactor SwipeDetector to track both axes" into ub-launcher3-master 2019-10-24 18:36:51 +00:00
Tony Wickham
5aeb3b84b8 Refactor SwipeDetector to track both axes
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
2019-10-24 10:38:17 -07:00
TreeHugger Robot
6735624704 Merge "Adding support for remote app action provider." into ub-launcher3-master 2019-10-24 17:33:42 +00:00
Sunny Goyal
3a1eadd37b Adding support for remote app action provider.
> Connect to a predefined content provider to get package specific action
> Add that action to shortcut menu and task menu

Change-Id: Ide5c09d04112e86c8e19c2f9e66c88c15b3fd04e
2019-10-23 17:51:13 -07:00
Winson Chung
a85365c22b 13/ Rely on the device state's navigation mode
- Rely on the device state navigation mode instead of tracking it
  independently in various places

Bug: 141886704
Change-Id: I421c1fa11ca7362aff8e2388a2b5d427b39af3e9
2019-10-23 15:00:59 -07:00
Sunny Goyal
c78308a9a7 Merge "Subclassing Launcher instead of using UiFactory" into ub-launcher3-master 2019-10-22 19:21:11 +00:00
James O'Leary
9e57e74005 QuickCaptureInputConsumer -> OverscrollInputConsumer + plugin
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
2019-10-22 13:04:20 -04:00
Sunny Goyal
210e174c9c Subclassing Launcher instead of using UiFactory
Allows us to override only the required methods, instead of providing
a proxy method for everything

Change-Id: I816dcdb2a8d5432496050118ded0f2bbe7122cf7
2019-10-21 11:10:21 -07:00
TreeHugger Robot
221823c337 Merge "Fixing nulpointer exception in AOSP quickstep builds" into ub-launcher3-master 2019-10-17 21:03:15 +00:00
Sunny Goyal
be336e0195 Fixing nulpointer exception in AOSP quickstep builds
Change-Id: I37e16b3c238f03306841713d0535eae5882b534d
2019-10-17 12:08:01 -07:00
Winson Chung
dd9d1ea1bf 12/ Clean up some ActivityInterface calls
- 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>
2019-10-16 17:18:12 -07:00
Winson Chung
981ef3a88a 11/ Update MultiStateCallbacks to support multiple callbacks
- 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
2019-10-16 17:18:11 -07:00
Winson Chung
c80b3224aa 10/ Migrate shared state to the gesture state
- 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>
2019-10-16 17:17:34 -07:00
Winson Chung
c9bf6d45ac 9/ Clean up swipe shared state
- 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>
2019-10-16 17:17:34 -07:00
Winson Chung
9196cb11a2 8.5/ Follow up to comments from previous CLs
Bug: 141886704
Change-Id: Ib583753e35e57eab3b1cc413a0f910cf10142e42
2019-10-16 17:17:34 -07:00
Sunny Goyal
17c72fbb60 Unifying various tracing calls
Change-Id: Iedf6662ad1d7281b850bdc43b3a1e373ce535ac6
2019-10-14 14:23:19 -07:00
Winson Chung
d7269bf8b6 8/ Rename ActivityControlHelper
- ActivityControlHelper -> BaseActivityInterface
  LauncherActivityControlHelper -> LauncherActivityInterface
  FallbackActivityControlHelper -> FallbackActivityInterface
  QuickCaptureTouchConsumer -> QuickCaptureInputConsumer
- Move gestures to use the activity interface from the gesture state

Bug: 141886704
Change-Id: I6f12daeb03d564143404767dfe4576e3e5da2a1d
2019-10-08 13:39:13 -07:00
Winson Chung
d3da92ac66 7/ Rename RecentsAnimationWrapper
- Move the recents animation classes out of util into base quickstep pkg
- Clean up some local var names

Bug: 141886704
Change-Id: I1556179e203cbb43b77ea58e6fe520aa9944099b
2019-10-08 13:30:27 -07:00
Winson Chung
9e876a34ee 6/ Update recents animation classes to have their respective responsibilities
- 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
2019-10-08 13:15:15 -07:00
Winson Chung
bfcee430fe 5/ Remove OverviewInteractionState
- 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
2019-10-08 13:15:15 -07:00
Winson Chung
8ff53f7e65 4/ Move SystemUiProxy to its own singleton instead of routing through the model
Bug: 141886704
Change-Id: I415b9ef7b57b525407e3a341b946e3ca66125102
2019-10-08 13:15:13 -07:00
TreeHugger Robot
f31dab5e02 Merge "Removing static instance of LauncherAppsCompat and unnecessary wrapper classes" into ub-launcher3-master 2019-10-08 18:49:36 +00:00
Winson Chung
75eb0e0f20 2/ Move device state logic to its own class
- Feed the class down to the input consumers and related gesture classes
  instead of specific sysui state flags

Bug: 141886704

Change-Id: I2ade7f48555c9d0ba0d3fac5c1f2dae694624224
2019-10-07 20:49:08 -07:00
Winson Chung
92a015f2fc 1/ Renaming some classes for clarity
- SwipeAnimationTargetSet -> RecentsAnimationTargets
- RemoteAnimationTargetSet -> RemoteAnimationTargets
- RecentsAnimationListenerSet -> RecentsAnimationCallbacks
- SwipeAnimationTargetSet.SwipeAnimationListener -> RecentsAnimationCallbacks.RecentsAnimationListener
- ClipAnimationHelper -> AppWindowAnimationHelper
- AssistantTouchConsumer -> AssistantInputConsumer

Bug: 141886704

Change-Id: I78485a1651bb360ffbac2d0c462855931a995ee1
2019-10-07 20:49:08 -07:00
Tracy Zhou
cdb72146e8 Handle app switch in Overview
- Transfer screenshot from WM to launcher when recents animation gets cancelled due to stack order change
- Transform two live windows when app open animation happens from recents

Fixes: 139258979
Fixes: 139259253
Test: switch task in overview

Change-Id: I80bafb8d45b9250fda937223254e365596a7f538
2019-10-03 16:53:43 -07:00
Becky Qiu
d53cb6333f Merge "Fill in LauncherTarget fields with values extracted from LauncherLogProto.Target." into ub-launcher3-qt-future-dev
am: 4a4755fc70

Change-Id: I6435b1e475b7a39e68a78dc893c2a6cc4f2b8d72
2019-10-02 16:36:52 -07:00
Sunny Goyal
e7b00128c7 Removing static instance of LauncherAppsCompat and unnecessary wrapper classes
Bug: 141376165
Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
2019-10-02 16:20:22 -07:00
TreeHugger Robot
4a4755fc70 Merge "Fill in LauncherTarget fields with values extracted from LauncherLogProto.Target." into ub-launcher3-qt-future-dev 2019-10-02 23:09:52 +00:00
Tony Wickham
2cb71ee386 Update all apps fade interpolators for home <-> all app
am: c449a6417d

Change-Id: I34b27a6ec2c62fe657804e7e9f027e21a26568c9
2019-10-02 13:28:08 -07:00