Commit Graph

9466 Commits

Author SHA1 Message Date
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
Tony Wickham 238c4bae27 Merge "Add BothAxesSwipeDetector" into ub-launcher3-qt-future-dev
am: ea09b9c963

Change-Id: I926c97b277e1ee268269955b6a8c66dab32f3178
2019-11-06 09:12:00 -08:00
Tony Wickham ea09b9c963 Merge "Add BothAxesSwipeDetector" into ub-launcher3-qt-future-dev 2019-11-06 16:58:07 +00:00
Samuel Fufa 5fe9dd028c Merge "Fix icons vanishing when dragged within folder" into ub-launcher3-qt-future-dev
am: 734574221b

Change-Id: I857a428a0a828a922482372dbe63a8bd3bbd233b
2019-11-05 20:54:57 -08:00
TreeHugger Robot 734574221b Merge "Fix icons vanishing when dragged within folder" into ub-launcher3-qt-future-dev 2019-11-06 04:40:41 +00:00
Samuel Fufa 1b9e540a52 Fix icons vanishing when dragged within folder
Bug: 143702700
Test: Manual
Change-Id: Idc24086553fd337fc2a553e25daa570073d9ad51
2019-11-05 19:49:30 -08:00
Samuel Fufa 306177c14e Fix dragging icon badge offset
am: 37b2489ff7

Change-Id: Ibe7dbed4d3880086da14692597341ea9487efc29
2019-11-05 18:53:46 -08:00
Pinyao Ting fe160c55c2 Merge "Add IconCache support for deep shortcuts, loads deepshortcut on background thread. Added a feature flag to toggle on/off this feature." into ub-launcher3-master 2019-11-05 23:33:48 +00:00
Samuel Fufa 37b2489ff7 Fix dragging icon badge offset
Bug: 143702640
Test: Manual
Change-Id: I86d97c1f0ea02c86f4bf745a8bdda3887c62f27e
2019-11-05 15:29:22 -08:00
Pinyao Ting c1a1ced33a Add IconCache support for deep shortcuts, loads deepshortcut on
background thread.  Added a feature flag to toggle on/off this
feature.

Bug: 140242324
Test:
  1. (Custom Shortcut) Long click on google maps -> widgets -> drag
     driving mode to workspace.

  2. Open chrome -> add to home screen -> add -> add automatically.

  3. InstallShortcutReceiver
     In Launcher.completeAddShortcut, commend out the code that
     calls PinRequestHelper.createWorkspaceItemFromPinItemRequest,
     then open chrome -> add to home screen -> add -> add
     automatically.

  4. ShortcutDragPreviewProvider
     qdb -> long press on suggested app that has deep shortcut
     -> drag to workspace.

Change-Id: If7babe4eddf5434909bf686b4e9bde15e444d9fd
2019-11-05 11:27:28 -08:00
TreeHugger Robot 8e24097014 Merge "Implement hotseat prediction client" into ub-launcher3-master 2019-11-05 19:18:49 +00:00
Samuel Fufa efb665d3ec Implement hotseat prediction client
Bug: 142753423
Test: Manual
Change-Id: I9f697c474b29340c9b33ddf896a49e8f3f893f8b
2019-11-05 09:53:25 -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
Jon Miranda e6691f34c1 Add additional shortcutExists check to prevent same app from being auto added.
am: f788bbb0c4

Change-Id: I42f0c4d75f8be38b9e81c5932fc1def710a68f36
2019-11-04 17:32:56 -08:00
Jon Miranda f788bbb0c4 Add additional shortcutExists check to prevent same app from being auto added.
Since we made the change to treat all auto added workspace items as promise
icons, the initial shortcutExists check breaks since its comparing the promise
intent to the actual app intent. This additional shortcutExists check can
compare the proper intents.

Bug: 143803446
Change-Id: Ifa27b15205d6e17f83a4437ac175d51815688c84
2019-11-04 14:19:17 -08:00
TreeHugger Robot 43968167d9 Merge "enable custom shortcut test" into ub-launcher3-master 2019-11-04 20:24:55 +00:00
Tony Wickham 0124076feb Merge "Fix issue where popup jumps to full size before closing" into ub-launcher3-qt-future-dev
am: d942b4208d

Change-Id: I8380d0a9659f1f24c1a451d1a07b97e5ec0689fa
2019-11-01 16:59:42 -07:00
Tony Wickham 59a53e4a43 Merge "Maintain dot and text visibility if a new popup is created while closing" into ub-launcher3-qt-future-dev
am: c1fafebd47

Change-Id: I64870047d8bbcdcbc01b767da52c734f946480af
2019-11-01 16:59:22 -07:00
Tony Wickham d942b4208d Merge "Fix issue where popup jumps to full size before closing" into ub-launcher3-qt-future-dev 2019-11-01 23:39:18 +00:00
Tony Wickham c1fafebd47 Merge "Maintain dot and text visibility if a new popup is created while closing" into ub-launcher3-qt-future-dev 2019-11-01 23:38:51 +00:00
Tony Wickham 6894f4f1bb Fix issue where popup jumps to full size before closing
Some background on what was happening:
- When mEndRect.isEmpty(), we set it to (0, 0 , width, height)
- We called mEndRect.setEmpty() in animateClose(), but override
  mEndRect if the reveal animation set the outline bounds.
- But the reveal animation doesn't set the outline bounds until
  after the arrow animation (40ms) finishes, i.e. the arrow scales
  up for 40ms then we clip to outline and start revealing the popup
- Thus, if you started a drag before the arrow animation finished,
  we called mEndRect.setEmpty(), which made the close animation start
  from the full popup size even though it was previously invisible.

To fix this, we clip the popup to its (empty) outline while the
arrow animates in, and then we can always start from wherever the
outline currently is when we close the popup.

Test:
- Set animation duration to 10x
- Long press an icon, and start dragging before the arrow scale
  animation finishes
- The popup never shows, whereas before it jumped to full size

Bug: 143639898
Change-Id: I284dd06a23e0e9c3faf066a0083ac13bac88ebcc
2019-11-01 15:53:52 -07:00
Tony Wickham 20af12eb38 Maintain dot and text visibility if a new popup is created while closing
Test:
- Long press an icon to open the popup
- Long press the same icon while the popup is open

Previously, the dot would reappear (when the original popup finished closing).
Now, the dot stays hidden, as it should since a popup is showing.

Bug: 143639898
Change-Id: Ia0bdb626e02f4ad9ba12c27d94fea054b4afe50e
2019-11-01 13:26:40 -07:00
Pinyao Ting 5eee5f4da0 enable custom shortcut test
Bug: 141568904
Change-Id: Ie51ef6f7a2f5d4579689a82184bdd7681a266d04
2019-10-31 17:09:40 -07:00
Samuel Fufa 3f43d823ae Merge "Predictive hotseat prototype" into ub-launcher3-master 2019-10-30 20:49:51 +00:00
Samuel Fufa 225ac27143 Predictive hotseat prototype
Supports filling hotseat with predicted apps, pinning of predicted apps
and manages replacing predicted apps with user drag.

Bug:142753423
Test:Manual
Change-Id: I224294f9353a64c46d28c22263a72332a79fddf4
2019-10-30 13:19:10 -07:00
TreeHugger Robot de6770a2ec Merge "Adding support for dynamic calendar and clock icons" into ub-launcher3-master 2019-10-30 18:16:28 +00:00
Jon Miranda 6173355db1 Merge "Fix bug where Files app keeps getting added to the workspace." into ub-launcher3-qt-future-dev
am: 23df556ec4

Change-Id: I408d6c3d537124b8c8bfa4670261435d004eb7d3
2019-10-30 10:54:26 -07:00
TreeHugger Robot 23df556ec4 Merge "Fix bug where Files app keeps getting added to the workspace." into ub-launcher3-qt-future-dev 2019-10-30 17:29:36 +00:00
Jon Miranda a8109fb98c Fix bug where Files app keeps getting added to the workspace.
Caused by mainline updates where Files app session commit is broadcasted.
Launcher workaround is to not auto-add system apps to the workspace.

Bug: 139663018
Change-Id: Id61532bd0df2cd5f3bdfc28a3616ba5e5ff3d18a
2019-10-30 09:56:44 -07:00
TreeHugger Robot a9c69e1c43 Merge "Cleaning up unused allAppsIconSize/allAppsIconTextSize variables." into ub-launcher3-master 2019-10-29 22:57:24 +00:00
Andy Wickham 6547f1a937 Forces OveriewInputConsumer to be used when Assistant is running on top of Launcher.
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
Merged-In: I261653118aff289b329ec2a7ca6e52f100f7835a
2019-10-29 14:39:35 -07:00
Andy Wickham d386d7da7c Forces OveriewInputConsumer to be used when Assistant is running on top of Launcher.
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.
2019-10-29 14:25:29 -07:00
Sunny Goyal 14168431bd Adding support for dynamic calendar and clock icons
Change-Id: Icdba34340a27a4f6dff7310d0bf9fd29aef1330c
2019-10-29 13:50:02 -07:00
Jonathan Miranda 632bcf76af Merge "Fix NPE caused by an install flow where we decode the LauncherActivityInfo but we don't fill in the data Intent." into ub-launcher3-qt-future-dev
am: dafd8d9225

Change-Id: If55021b2aa2c031adc132b9b4404d4d6fb1a8003
2019-10-29 12:17:45 -07:00
Jonathan Miranda dafd8d9225 Merge "Fix NPE caused by an install flow where we decode the LauncherActivityInfo but we don't fill in the data Intent." into ub-launcher3-qt-future-dev 2019-10-29 19:03:25 +00:00
TreeHugger Robot bec28445ea Merge "Removing tracing for a fixed bug" into ub-launcher3-master 2019-10-29 00:32:31 +00:00
vadimt 5631b4a7ef Removing tracing for a fixed bug
Bug: 141770616
Change-Id: I52ec681eca20733021090fe50058bc7d3f996ade
2019-10-28 16:59:45 -07:00
Sunny Goyal 3808a69a6c Storing BitmapInfo instead of icon and color directly in itemInfo
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
2019-10-28 11:12:47 -07:00
TreeHugger Robot ac04c5fd31 Merge "Reducing chances for the object with finalizer to be reffed by register" into ub-launcher3-master 2019-10-26 03:37:19 +00:00
vadimt 56b800bfea Reducing chances for the object with finalizer to be reffed by register
As suggested in b/143155020#comment27

Bug: 143155020
Change-Id: I4ed87a003fcd7afde213014fc1ba8b004500e71a
2019-10-25 18:12:25 -07:00
TreeHugger Robot db7631ba4b Merge "14/ Bake the running task info into the gesture state" into ub-launcher3-master 2019-10-26 00:43:31 +00:00
Tony Wickham 7af5033e49 Add BothAxesSwipeDetector
This reports both x and y displacement, and both velocities onDragEnd().

Bug: 126596417
Change-Id: I1c62074b99fe21bc9eedf615e3c9a0a0a400bf81
2019-10-25 16:54:41 -07:00
TreeHugger Robot 7744b8251a Merge "Moving some notification binder calls to worker thread" into ub-launcher3-master 2019-10-25 22:56:44 +00:00
Tony Wickham 329fca4550 Move overview haptic feedback to VibratorWrapper singleton
Bug: 141886704
Change-Id: I0178a52088dd4150d7ba054983697ea63a00d9a8
Merged-In: I0178a52088dd4150d7ba054983697ea63a00d9a8
2019-10-25 22:53:21 +00: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
Tony Wickham 052c881415 Move overview haptic feedback to VibratorWrapper singleton
Bug: 141886704
Change-Id: I0178a52088dd4150d7ba054983697ea63a00d9a8
2019-10-25 21:48:22 +00:00
Jon Miranda 4459e3f6f9 Fix NPE caused by an install flow where we decode the LauncherActivityInfo
but we don't fill in the data Intent.

Bug: 143190879
Change-Id: I8f774203b99f022b2cf1708de6d8fe2398b332ce
2019-10-25 14:24:05 -07:00
Jon Miranda 2bdd24340d Cleaning up unused allAppsIconSize/allAppsIconTextSize variables.
Change-Id: Ifb77458ca0febdf97a806c34e6d1c16f41789d35
2019-10-25 12:01:45 -07:00
vadimt 23c8341096 Removing tracing and @Stability for a fixed bug
Bug: 142514365
Change-Id: I147850db274c465fb964eca30b97b3ebaaa2ccf6
2019-10-25 11:21:33 -07:00