Commit Graph

6741 Commits

Author SHA1 Message Date
Samuel Fufa a9e9444070 Merge "Report app pin/unpin to AppPredictor" into ub-launcher3-master 2019-11-19 01:18:15 +00:00
Winson Chung ea91205f66 Merge "Fix two small thumbnail leaks" into ub-launcher3-master 2019-11-18 18:41:49 +00:00
Samuel Fufa 7a8be030aa Report app pin/unpin to AppPredictor
Test: Manual
Bug: 142753423
Change-Id: I380e58f31ed508d812d0bf8dfc35905a752dc029
2019-11-18 10:14:53 -08:00
Tracy Zhou 897813aa34 Merge "Check if returned surface params are null before adding them for surface transform" into ub-launcher3-master 2019-11-15 21:45:25 +00:00
Tracy Zhou fdf954a353 Check if returned surface params are null before adding them for surface transform
We call finish recents animation before app switch animation finishes. When we finish, the live tile params are not cleared up.

This change takes care of
- clean up recents animation targets when it's finished
- do a sanity check on live tile surface params before adding them to the surface transform array

Fixes: 143889142
Test: Swipe up to Overview in live tile mode, switch to a different task, and make sure it doesn't crash anymore
Change-Id: I089cf0a97744461d1fec4d0c97e0c3c6c1049ae3
2019-11-15 13:06:36 -08:00
Winson Chung 9b5f4aa48d Fix two small thumbnail leaks
- Even though the object wrapper is used within the same process, the
  call to start the fallback recents activity means that the system
  still ends up holding a reference to a copy of the intent and its
  extras, including the reference to the wrapper and the thumbnail it
  references, until the activity is destroyed (or next restarted).
  We need to clear the actual object strong ref after it's used when
  handling the new intent.
- The running task can have an associated thumbnail, so we should also
  clear the tmp running task ref when we leave overview.

Change-Id: Icdc0b1989b13927d112949797752615014856970
2019-11-15 11:31:15 -08:00
vadimt cbc9bffd7e Disabling FallbackRecents tests
Even though they don't block presubmit, the fact that they are failing:
1. Causes sheriffs no not notice other issues;
2. Would block switching to 24hr fix-it policy and Quarterdeck.

Bug: 143488140
Change-Id: I95e3e15b69e0487946919f3f6889e286a1fae141
2019-11-14 17:23:52 -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
Tony Wickham 2785a5996c 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
Merged-In: Id679ad84c08246e205c667a78ed5df00d7276258
2019-11-14 12:31:01 -08:00
Tony Wickham 42a9ef0e9f Move shelf peeking anim code to ShelfPeekAnim class
Bug: 126596417
Change-Id: I5ba501b04b3eaf12a20ba1312ef362f9734761c3
Merged-In: I5ba501b04b3eaf12a20ba1312ef362f9734761c3
2019-11-14 12:30:32 -08:00
Tony Wickham 4df42f85a4 Fix recents scale sometimes lagging behind window scale
We were previously offsetting the launcher animation progress based
on when we got onGestureStart, which meant it would lag behind if
onGestureStart came late. Now that we track the window instead of
the launcher shelf, and we don't show the launcher animation right
away in fully gestural mode anyway, we should remove this to ensure
the launcher part of the animation always lines up with the app
window.

We also reapply state whenever predictions are enabled, e.g. when
launcher starts after being force stopped, and previously this was
canceling the existing state animation. We don't want to do that
because predictions can be enabled at any point on a cold start,
and cancelling the existing state animation means that RecentsView
shows up in fullscreen and not attached to the app window for the
duration of the gesture.

Bug: 144454486
Change-Id: I65a2c71c9acd2f5345941ea2cff7d32c04b7be3f
2019-11-13 16:37:32 -08:00
TreeHugger Robot dc0c224030 Merge "Reattributing disabled tests to a more relevant bug" into ub-launcher3-master 2019-11-13 01:30:15 +00:00
Pinyao Ting 1397a42fc2 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
Merged-In: I07a62f07057537a6c09384cf944bbc5aa5888d22
2019-11-13 01:15:37 +00: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 a318b75cbd Merge "Add live tile overlay only once across multiple LauncherSwipeHandler" into ub-launcher3-master 2019-11-12 22:03:32 +00:00
Tracy Zhou 054a86bffa Add live tile overlay only once across multiple LauncherSwipeHandler
- Use singleton on LiveTileOverlay to make sure we only have one LiveTileOverlay instance
- Clean up upon recents animation cancelation

Fixes: 140337263
Test: diligently swipe up and down
Change-Id: I8e0db3c5240135a6deb4f4d91493b8eede7c5ff1
2019-11-12 13:23:36 -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
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
vadimt 3435f69d1a Reattributing disabled tests to a more relevant bug
Bug: 143488140
Change-Id: I8af35c66293517a3ba7cae583e5c3bff883865d7
2019-11-08 14:50:57 -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
Sunny Goyal a5020007e3 Scaling down hotseat to match prediction row size when going to overview
Bug: 141265005
Change-Id: I3b11146881af334508f553e4ca3a36b9291511d9
2019-11-06 22:36:34 +00: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