Commit Graph

1486 Commits

Author SHA1 Message Date
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
Tony Wickham
c449a6417d Update all apps fade interpolators for home <-> all app
Previously, predictions faded in quickly but then all apps faded in
linerally over entire rest of the transition. Now, all apps fades in
quickly after reaching the overview threshold where predictions are
opaque.

Also implemented the reverse, so that predictions/all apps content
remain opaque when returning home until reaching the overview threshold
near the bottom, where they fade out as quickly as they faded in.

We do this for 3-button mode as well.

Bug: 141986013
Change-Id: Ia35ab3ac9714e89f754293445a7839e15da5313d
2019-10-02 09:51:51 -07:00
Sunny Goyal
e84c5b82be Unifying activity tracker callback
> Using a common class for both Launcher and RecentsActivity
> Removing static refenrece to LauncherModel and using a common pattern for
  tracking activities

Bug: 141376165
Bug: 137568159
Change-Id: Ic1897abe6913ec78e25725118eedf5b468d5ec70
2019-10-01 13:54:26 -07:00
Samuel Fufa
db202abe4e Merge "Fix ScrimView caret alignment and ignore touches" into ub-launcher3-qt-future-dev
am: d69327e9c0

Change-Id: Ia19d766bdeb5d2a4023b1c408bddfe30e4de4dac
2019-09-26 17:38:25 -07:00
Samuel Fufa
0316d6cd7a Fix ScrimView caret alignment and ignore touches
Test:Manual
Bug:79868152
Change-Id: Idd5a2b965173b8071697b50aac8760b0d84e469f
2019-09-26 16:30:46 -07:00
Winson Chung
280242e5dd Merge "Updating launcher interface for recents animation change" into ub-launcher3-master 2019-09-24 05:26:59 +00:00
Winson Chung
eff177a7f2 Fix wrong check for debug mode
Bug: 140246642
Change-Id: I4ce7cf623fe31d53fd9f6506f339d51a64ed8f8d
2019-09-23 20:11:43 +00:00
Winson Chung
1b231ecc56 Updating launcher interface for recents animation change
Bug: 140626334
Change-Id: Ib8e837c157bb99db429b7936fdf111e05170ac25
2019-09-20 15:15:43 -07:00
TreeHugger Robot
3a5d7cca9e Merge "Updating animation start callback" into ub-launcher3-master 2019-09-20 21:31:20 +00:00
Becky Qiu
4df06903bc Fill in LauncherTarget fields with values extracted from LauncherLogProto.Target.
Test: manual
Bug: 137777105

Log result:
1. Swipe to -1:
  data {
    elapsed_timestamp_nanos: 1372265229686264
    atom {
      launcher_event {
        action: SWIPE_LEFT
        src_state: HOME
        dst_state: HOME
        extension {
          src_target {
          }
        }
        is_swipe_up_enabled: true
      }
    }
  }
2. Swipe out of -1:
  data {
    elapsed_timestamp_nanos: 1372368006970305
    atom {
      launcher_event {
        action: SWIPE_RIGHT
        src_state: HOME
        dst_state: HOME
        extension {
          src_target {
            page_id: -1
          }
        }
        is_swipe_up_enabled: true
      }
    }
  }
3. Launch app from homescreen:
  data {
    elapsed_timestamp_nanos: 1372397640628726
    atom {
      launcher_event {
        action: LAUNCH_APP
        src_state: HOME
        dst_state: BACKGROUND
        extension {
          src_target {
            item: APP_ICON
            grid_x: 2
            grid_y: 1
          }
          src_target {
          }
        }
        is_swipe_up_enabled: true
      }
    }
  }
4. Launch app from hotseat:
  data {
    elapsed_timestamp_nanos: 1372399813031963
    atom {
      launcher_event {
        action: LAUNCH_APP
        src_state: HOME
        dst_state: BACKGROUND
        extension {
          src_target {
            item: APP_ICON
            grid_x: 2
          }
          src_target {
            container: HOTSEAT
          }
        }
        is_swipe_up_enabled: true
      }
    }
  }
5. Launch app from allapps prediction:
  data {
    elapsed_timestamp_nanos: 1372403080724736
    atom {
      launcher_event {
        action: LAUNCH_APP
        src_state: ALLAPPS
        dst_state: BACKGROUND
        extension {
          src_target {
            item: APP_ICON
          }
          src_target {
            container: PREDICTION
          }
        }
        is_swipe_up_enabled: true
      }
    }
  }

Change-Id: I981401d06577c15948cfee0062b8a6f8a5594345
2019-09-20 21:26:59 +00:00
Winson Chung
f779e78789 Updating animation start callback
Bug: 140626334
Test: Builds
Change-Id: I86e8d448188d21f0318ac2ea053a8394a1d0cf1a
2019-09-20 17:40:17 +00:00
Sunny Goyal
eb71cef629 Playing wallpaper animation if Launcher is destroyed
Bug: 140539007
Change-Id: I6573eafda353f4f399768613ef068de86c8f37f4
2019-09-20 09:53:47 -07:00
Winson Chung
a879f9c481 Adding binder tracking support in tests
- Whitelist specific binder calls when handling touch during swipe up
  gestures
- Only track binding for touch handling and certain launcher lifecycle
  changes for now

Bug: 140246642
Change-Id: I6ba30280dd17da358662870f8719ae851536ad8b
2019-09-18 17:08:05 -07:00