Commit Graph

2856 Commits

Author SHA1 Message Date
Sreyas d567b58810 RecentsExtraCard
Bug fixing / formatting

Change-Id: If36cd64986cc213682af1c7b4fd3281909812c15
2019-11-11 16:19:01 -08:00
vadimt b0a14e96ae Removing temporary tweaks to make tests pass in presubmit
Now that we have a more reliable build of CF

Bug: 142828227
Change-Id: Ib385443048b6ccd9e1eb3372dc39947536f948bd
2019-11-11 09:23:28 -08:00
TreeHugger Robot f59803e708 Merge "Add visual indicator for predicted hotseat icons" into ub-launcher3-master 2019-11-08 15:45:22 +00:00
Tony Wickham b13c14a228 Have LauncherActivityInterface#getCreatedActivity return BaseQuickstepLauncher
This gives access to quickstep-specific functionality such as ShelfPeekAnim.

Change-Id: I514baa45fe9404157de51f06e891eaea3fc86971
2019-11-07 20:35:37 -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
Samuel Fufa ba6b47fd8e Add visual indicator for predicted hotseat icons
Bug: 142753423
Test: Manual
Change-Id: Ie4325660fc5392358ec845ae58385bef279db60f
2019-11-07 16:49:24 -08:00
TreeHugger Robot e49d31c846 Merge "Scaling down hotseat to match prediction row size when going to overview" into ub-launcher3-master 2019-11-07 23:35:15 +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
Winson Chung 5bdae3d869 Merge "Skip calling into recents view if the activity is not yet initialized" into ub-launcher3-master 2019-11-07 03:42:08 +00:00
Winson Chung 5583e53909 Skip calling into recents view if the activity is not yet initialized
Bug: 143792840
Change-Id: Ib7cde70786a49390b253a57161be8eb66a26a188
2019-11-06 16:26:22 -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
TreeHugger Robot 96ea1a05bf Merge "Bound progress to 0 to 1" into ub-launcher3-master 2019-11-06 21:22:57 +00:00
Tony Wickham 3260168f3a Bound progress to 0 to 1
Test: Swipe up far to overview, ensure corners stay rounded throughout
Change-Id: Ie8694237586dad3d2f3605d2a395f1079c9cebc1
2019-11-06 10:35:44 -08:00
Vadim Tryshev a6e19602a6 Merge "Disable failing test testQuickSwitchFromApp" into ub-launcher3-master 2019-11-06 03:19:50 +00:00
vadimt 272a541ab9 Disable failing test testQuickSwitchFromApp
Bug: 143285809
Change-Id: I7df5a1deb74aabf0f874e969a57aba471902747f
2019-11-05 18:26:29 -08:00
Tracy Zhou a522472ab7 Merge "Handling pullback on home handle in Overview for live tile" into ub-launcher3-master 2019-11-05 21:18:08 +00:00
Vadim Tryshev d3e2771bd3 Merge "Not treating "Screen is empty" as an anomaly in NavigationModeSwitchRule" into ub-launcher3-master 2019-11-05 20:06:28 +00:00
vadimt 09ce192b4e Not treating "Screen is empty" as an anomaly in NavigationModeSwitchRule
It's an acceptable state when Launcher just starts under
 instrumentation.

Change-Id: Ia6eb2550effbd9236bb955e0c0e04416fc5fa506
2019-11-05 11:30:35 -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 4356311cfe 17.5/ Remove synchronized calls, verify controller before finishing animation
- The states that trigger the call are all on the UI thread, so we
  shouldn't need to synchronize before calling into it.  But the
  second issue is that we set those states when the gesture ends and
  we calculate the end target.  This can happen before the animation
  started or after the animation has been canceled, so we need to
  guard against the null controller as well.

Bug: 143153963
Change-Id: I4649483a52c85c5662665d5e8905b49d5623b6dc
2019-11-04 20:13:18 -08: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
TreeHugger Robot 1d222f9ea6 Merge "fix the issue now playing shortcut cannot be dragged" into ub-launcher3-master 2019-11-04 23:55:39 +00: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
vadimt 137f5b62ac Improve diags when system errors cause failing Launcher tests
Now, for example, we won't diagnose a locked phone as a
"home button not showing in 3-button mode", even though it's technically
correct.

Change-Id: Ibdfa0741af7ff8545a811f6702dda74dc6c31c2e
2019-11-04 14:50:22 -08:00
Tracy Zhou ec2080def3 Handling pullback on home handle in Overview for live tile
- We do need to redraw live tile when translationX changes
- Switch live tile to screenshot and finish recents animation when the drag takes user back home

Fixes: 143857157
Test: Swipe up from app to Overview, pull back on home handle, and observe that the live tile follows through the recents view with translationX change
Change-Id: Ie1b726c9efc1a86605847c960e2ce1e2b50bdae3
2019-11-04 01:30:09 -08:00
Tracy Zhou 7d9cee5ffe Reset current task id to -1 when recents animation is finished.
After we finish the recents animation, the current task id should be correctly reset so that when the task is launched from Overview later, it goes through the flow of starting a new task instead of finishing recents animation to app. A typical example of this is (1) user swipes up from app to Overview (2) user taps on QSB (3) user goes back to Overview and launch the most recent task.

Fixes: 143377934
Test: Turn on live tile, swipe up to Overview. Tap on QSB, see QSB launching correctly. Go back to Overview, tap on the most recent app tile, make sure the app is launched correctly.

Change-Id: Ibc1c8249d9b79584495bf0cec2ae6f7debfa658f
2019-11-01 16:33:06 -07:00
Winson Chung 11aef9efdf 16/ Renaming the swipe handlers
- FallbackNoButtonInputConsumer -> FallbackSwipeHandler
- WindowTransformSwipeHandler -> LauncherSwipeHandler

Bug: 141886704
Change-Id: I6ccfab861eac2a4b49b8981acfac09e85301d825
2019-11-01 14:54:20 -07:00
Tracy Zhou a4f3ffef7a Merge "Finish recents animation when launching another task in Overview" into ub-launcher3-master 2019-11-01 20:43:29 +00:00
Tracy Zhou e7df9b8bfa Merge "Finish the current task in live tile mode when swiping up and right to the previous task" into ub-launcher3-master 2019-11-01 20:42:28 +00:00
Tracy Zhou e62eaa16b3 Finish recents animation when launching another task in Overview
App open animation gets cancelled because of screenshot cleanup (launcher is stopped). We need window manager support to allow them to go parallel (b/143774568). As a workaround, we can either (1) delay launching the next task until recents animation is properly cancelled (2) finish the recents animation before launching the next task. Performance is the same, so go with (2) since it's a cleaner solution

Fixes: 143773683
Test: Swipe up to Overview from app, launch another task in Overview. See everything animate smoothly.
Change-Id: Iafd3f6f529fba32c1113b766c033e5932f19f4f3
2019-11-01 12:58:40 -07:00
Tracy Zhou 263cebc2bd Finish the current task in live tile mode when swiping up and right to the previous task
Fixes: 143714109
Test: manual
Change-Id: I65689d49679e073be7fd51b92dd72f71ae11f37c
2019-10-31 14:12:27 -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
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
Sally Yuen 70d7860eae Merge "Fix TalkBack page announcments in RecentsView" into ub-launcher3-master 2019-10-28 19:10:51 +00: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
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
Tony Wickham 052c881415 Move overview haptic feedback to VibratorWrapper singleton
Bug: 141886704
Change-Id: I0178a52088dd4150d7ba054983697ea63a00d9a8
2019-10-25 21:48:22 +00:00
Tracy Zhou c491463895 Merge "Fix unable to launch shortcuts in live tile mode." into ub-launcher3-master 2019-10-25 20:23:53 +00:00
TreeHugger Robot 2193689fe1 Merge "Merging task icon cache with content description cache" into ub-launcher3-master 2019-10-25 20:10:18 +00:00
Winson Chung b247608b3f Merge "Skip handling input while the user is still locked" into ub-launcher3-master 2019-10-25 19:35:43 +00: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
vadimt 23c8341096 Removing tracing and @Stability for a fixed bug
Bug: 142514365
Change-Id: I147850db274c465fb964eca30b97b3ebaaa2ccf6
2019-10-25 11:21:33 -07:00
Winson Chung fc8c975880 Skip handling input while the user is still locked
- None of the gestures work when the user is locked so
  we can just skip them.

Bug: 143107728
Test: Manual
Change-Id: I2661d58269f7eccbfcd2214792c128b432e0347c
2019-10-25 18:04:54 +00:00
Tracy Zhou 6b5b190324 Fix unable to launch shortcuts in live tile mode.
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
2019-10-25 10:58:11 -07:00