Commit Graph

4451 Commits

Author SHA1 Message Date
Tracy Zhou f9abe7bcbd Update rect in LiveTileOverlay via copying
Probably a recent change updates the rect when reaching overview, which wasn't happening before. Regardless, we shouldn't have copied the rect by reference since the referenced copy can be changed.

Fixes: 165143463
Test: manual
Change-Id: I9315a20226f0a4b3440ce5ee6cc1f4ed1ddca487
2020-08-17 22:27:55 -07:00
Tony Wickham 532b962a03 resolve merge conflicts of 107fe60f6e to ub-launcher3-master
Change-Id: I9a1c52e66edd627fd54cc3cb423fa28a6175f8ac
2020-08-15 00:20:44 +00:00
Tony Wickham d844fe758c Remove ENABLE_OVERVIEW_ACTIONS flag, defaulting to true
We no longer support the "peeking" model where the shelf would
peek on motion pause from an app and overview would peek on motion
pause from home. Thus, removed/inlined the following:
- FlingAndHoldTouchController (merged into its sole subclass
  NoButtonNavbarToOverviewTouchController)
- ShelfPeekAnim
- OverviewPeekState

Change-Id: I066a3ad2636fde4786089c922b896bf1e03361fd
2020-08-14 15:58:29 -07:00
Tony Wickham 107fe60f6e Ensure we clearState() when going to Overview from home
We need to do this before potentially starting another
interaction during the animation, or we could end up in
an inconsistent state.

Fixes: 160759508
Change-Id: Ia28dceddcc258679fc0b968f5a83fae5ef3f5acb
2020-08-14 22:49:18 +00:00
TreeHugger Robot 6c1a88f172 Merge "Track OverviewToHomeAnim with StateManager" into ub-launcher3-rvc-qpr-dev 2020-08-14 22:45:17 +00:00
Tony Wickham 9dfcc316c1 Track OverviewToHomeAnim with StateManager
This way we mark the the current state as NORMAL at the start of
the animation, and cancel it as part of other state transitions.
This allows us to interact with launcher (e.g. to go to all apps
or pull down the notification shade) during the animation.

Also use OverviewToHomeAnim from RecentsView#startHome() to
ensure the animation is consistent, e.g. doesn't fade out
RecentsView, scrolls to page 1, etc.

Bug: 144170434
Change-Id: I5348565b9e705d8ffba39818dde9efe82b16bb7a
Merged-In: I5348565b9e705d8ffba39818dde9efe82b16bb7a
2020-08-14 22:30:33 +00:00
Tony Wickham 4fb5f74bb4 Track OverviewToHomeAnim with StateManager
This way we mark the the current state as NORMAL at the start of
the animation, and cancel it as part of other state transitions.
This allows us to interact with launcher (e.g. to go to all apps
or pull down the notification shade) during the animation.

Also use OverviewToHomeAnim from RecentsView#startHome() to
ensure the animation is consistent, e.g. doesn't fade out
RecentsView, scrolls to page 1, etc.

Bug: 144170434
Change-Id: I5348565b9e705d8ffba39818dde9efe82b16bb7a
2020-08-14 14:38:24 -07:00
Sunny Goyal 5fb83a47f2 Removing icon recents version
Change-Id: Ibdc88715e38590cedf8a7b5174061bb2c6ef9533
2020-08-14 10:49:19 -07:00
Tracy Zhou 8ad575e1e6 Handle overview actions in Live Tile mode
- Switch to screenshot and finish recents animation when an overview action is selected

Fixes: 162564471
Test: Manual
Change-Id: I3db20619435d079bb39ce4cb37b46ea775416336
2020-08-13 15:23:18 -07:00
Tracy Zhou 9a472fbd7d Merge "[Live Tile] Place the target app back above Launcher when swipe up end target is home" into ub-launcher3-master 2020-08-13 21:29:28 +00:00
TreeHugger Robot 895ece297d Merge "[Overview Actions] Reset the modal task view when rotate from select mode." into ub-launcher3-rvc-qpr-dev am: 20983ae1f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12366024

Change-Id: I3fec240a659c5a1c80bf4f78aca1af6ace270e27
2020-08-13 18:57:49 +00:00
TreeHugger Robot 20983ae1f8 Merge "[Overview Actions] Reset the modal task view when rotate from select mode." into ub-launcher3-rvc-qpr-dev 2020-08-13 18:42:46 +00:00
Tracy Zhou 81c0cac457 [Live Tile] Place the target app back above Launcher when swipe up end target is home
Test: manual
Bug: 160361464
Change-Id: Ic2b332774fe3f25f36f0bfd2b5e6cf66fb1d09dd
2020-08-13 11:01:15 -07:00
Tony Wickham 59d04e6ea6 Use system VelocityTracker instead of forking least squares algorithm
Change-Id: I8e03cdd0942b9037054cd1955bdb6809c89f3ea2
2020-08-13 10:41:49 -07:00
TreeHugger Robot 9529b95e06 Merge "Store mHistoricTimes as longs intead of floats" into ub-launcher3-rvc-qpr-dev am: f35053ad58
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12365858

Change-Id: I3c21d9d47a525e9c975c6acf38c99a2f1668359c
2020-08-13 02:25:50 +00:00
TreeHugger Robot f35053ad58 Merge "Store mHistoricTimes as longs intead of floats" into ub-launcher3-rvc-qpr-dev 2020-08-13 02:10:20 +00:00
TreeHugger Robot 72385839ed Merge "TaskOverlayFactory - remove static factory." into ub-launcher3-rvc-qpr-dev am: 30fe240f99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12353636

Change-Id: Ic165b6184f4f36b5956493d3880a9d93ad27a0d6
2020-08-13 01:01:07 +00:00
TreeHugger Robot 30fe240f99 Merge "TaskOverlayFactory - remove static factory." into ub-launcher3-rvc-qpr-dev 2020-08-13 00:47:34 +00:00
Becky Qiu ba6fec3eae [Overview Actions] Reset the modal task view when rotate from select mode.
Test: local
Bug: 161901771
Change-Id: I103e59ad68874db7fcb39556764d315983ac047c
2020-08-12 17:17:59 -07:00
Zak Cohen 635c08095a Merge "Overscroll plugin - give the plugin its own factory." into ub-launcher3-rvc-qpr-dev am: cbe1fc063d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12353635

Change-Id: Ia471594443d1b744c5c34f0c9c45e7191bbf7938
2020-08-13 00:12:20 +00:00
Tony Wickham a145670969 Store mHistoricTimes as longs intead of floats
The loss of precision was causing us to miscalculate the age of
events, and thus not detecting any pause due to denominator = 0.

Test: have a device that hasn't been rebooted for a certain
amount of time such that SystemClock#uptimeMillis can't be
accurately converted to a float, then try to swipe up and hold

Fixes: 160568387
Change-Id: Idef112187f34a18feea7e6a0b77258626f9d0ed4
2020-08-12 17:02:53 -07:00
Zak Cohen cbe1fc063d Merge "Overscroll plugin - give the plugin its own factory." into ub-launcher3-rvc-qpr-dev 2020-08-12 23:58:38 +00:00
TreeHugger Robot 74f218530e Merge "Wrapping display properties in a wrapper class" into ub-launcher3-master 2020-08-12 23:36:27 +00:00
Zak Cohen cf82754384 TaskOverlayFactory - remove static factory.
Make the overlay factory a member of the recents view.
Before the factory was static. The factory has references to activity
objects so was causing leaks.

Bug: 162012217
Tested: local, factory still works
Change-Id: I2283134f3008b630ba2056f07e65ac042957cdbd
2020-08-12 16:32:45 -07:00
Sunny Goyal fd58da6a75 Wrapping display properties in a wrapper class
This would allow us to support gestures on multiple-displays

Change-Id: I8f426bbdf04520f4189cadce2bde6aab4933c8d9
2020-08-12 13:43:56 -07:00
Becky Qiu cb956ff4f5 [Overview Actions] Set launcher state to Overview when rotate in recents.
Test: local
Bug: 160718310

Change-Id: I73f498151d7cc6a9db9d352549124c9d550ae6f2
2020-08-12 10:27:21 -07:00
Tracy Zhou 73f0c3698f Merge "Only draw app below launcher for TaskViewSimulator at swipe up or in Overview" into ub-launcher3-master 2020-08-12 16:53:23 +00:00
Tracy Zhou d6c3315a67 Only draw app below launcher for TaskViewSimulator at swipe up or in Overview
Bug: 160361464
Test: Manual
Change-Id: Ic4d912f1656d87f445a8016640c0eb166cace0d5
2020-08-11 22:55:04 -07:00
Becky Qiu 9367f98348 [Overview Actions] Set launcher state to Overview when rotate in recents.
Test: local
Bug: 160718310

Change-Id: I73f498151d7cc6a9db9d352549124c9d550ae6f2
Merged-In: I73f498151d7cc6a9db9d352549124c9d550ae6f2
2020-08-12 00:54:20 +00:00
Zak Cohen fac8741522 Overscroll plugin - give the plugin its own factory.
Separate out the overscroll plugin from the task overlay.
These two classes aren't really related.

Bug: 162012217
Tested: checked plugin still works
Change-Id: Id89eff1ad2ae9766efaaecd8cfc66d6521b9ca8c
2020-08-11 16:42:23 -07:00
Sunny Goyal 762d06136c Caching last predictions and loading it with model
Adding support for persisting itemInfos on disk. This uses
a separate xml file. Unlike prefs, it does not keep the items
in memory and is just a wraper over reading/writing a file.

Bug: 160748731
Change-Id: Iaccab9928ab8f30127fb3c2d630ca8ca83f0bd05
2020-08-11 13:23:29 -07:00
Sunny Goyal d62e797d18 Disabling debug log as the associated bug is closed
Bug: 154951045
Change-Id: I2e503c6d2f0a9f694ee1f88167924114fe495c2f
2020-08-11 12:11:18 -07:00
TreeHugger Robot 1bdb8f0efc Merge "Removing some obsolete methods and wrapper" into ub-launcher3-master 2020-08-11 18:57:13 +00:00
Hyunyoung Song 3003e57d17 Merge "Handle IME selection focus for ENABLE_DEVICE_SEARCH" into ub-launcher3-master 2020-08-11 17:56:59 +00:00
Hyunyoung Song 5dd045bec6 Handle IME selection focus for ENABLE_DEVICE_SEARCH
Bug: 162861289
Change-Id: I15e4eae09be2aa9f89a5157fd74c95e91e64bc53
2020-08-11 09:27:45 -07:00
Tony Wickham e14b55c2a9 Merge "Don't reapply window transform if we are already running a window anim" into ub-launcher3-rvc-qpr-dev 2020-08-11 00:19:28 +00:00
TreeHugger Robot b810c10bb9 Merge "Ensure that the task is always clipped to match the tile aspect ratio" into ub-launcher3-master 2020-08-10 23:55:24 +00:00
TreeHugger Robot 9fc65cb0b7 Merge "Fix TaskViewTouchController success progress to match haptic" into ub-launcher3-rvc-qpr-dev am: b460ff1ef1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12321076

Change-Id: Ic4317b94cca7d760d23da0c1c115d422236586e7
2020-08-10 23:02:20 +00:00
TreeHugger Robot b460ff1ef1 Merge "Fix TaskViewTouchController success progress to match haptic" into ub-launcher3-rvc-qpr-dev 2020-08-10 22:46:03 +00:00
Sunny Goyal b55f7591ed Ensure that the task is always clipped to match the tile aspect ratio
Instead of trying to estimate the insets, we clip the task such it is
restricted within the task insets when possible.

Change-Id: If160115fda07dfd2e01e96d41e4b5dc43a77ac94
2020-08-10 15:42:38 -07:00
Tony Wickham 06513f11c2 Don't reapply window transform if we are already running a window anim
Bug: 149934536
Change-Id: I3fa7f0b2581ca83923a42f37f52850b02c22e995
Merged-In: I3fa7f0b2581ca83923a42f37f52850b02c22e995
2020-08-10 22:20:36 +00:00
Tony Wickham c830bef923 Don't reapply window transform if we are already running a window anim
Bug: 149934536
Change-Id: I3fa7f0b2581ca83923a42f37f52850b02c22e995
2020-08-10 15:19:33 -07:00
Tony Wickham cf5aea05b3 Update overview from home transitions am: 03a4a0cd53
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12184426

Change-Id: Iac33ad0742264a97e754a1cc4336ed3ab727944a
2020-08-10 21:29:00 +00:00
Tony Wickham 2fe0d5f71d Merge "Add back code missing from upstream merge" into ub-launcher3-master 2020-08-10 21:08:54 +00:00
Tony Wickham 03a4a0cd53 Update overview from home transitions
For both NoButtonNavbarToOverviewTouchController and
NavBarToHomeTouchController:
- Have consistent resistance applied such that RecentsView scales
  down and translates up slightly (but not as much as from an app)
- Have consistent animation to home if you fling to that state
  rather than stay in overview. This is handled by a new class,
  OverviewToHomeAnim, which consolidates logic from NBTHTC and
  overrides some interpolators such that RecentsView doesn't fade
  out or translate downwards during the animation (it just slides
  off the screen while the home animation plays).

Also make overview actions not clickable when alpha == 0, so that
you can tap the hotseat/qsb during the transition from home to
overview.

Bug: 144170434
Change-Id: Ic291f285ff2f63c477633c48d4fadb23cf70c28a
2020-08-10 13:15:23 -07:00
Tony Wickham 90751820d9 Add back code missing from upstream merge
Change-Id: I7c2f08ed1b9c7462feabe1ad793af4ddc55aff1b
2020-08-10 13:11:43 -07:00
TreeHugger Robot a2c6c97374 Merge "Revert "Update overview from home transitions"" into ub-launcher3-master 2020-08-10 20:01:06 +00:00
Tony Wickham e6f9e0eb7e Revert "Update overview from home transitions"
This reverts commit f3bc797182.

Reason for revert: updating upstream, need to wait to cherry-pick until that's approved

Change-Id: I702286dba66fb4582ab682a5b0b8cd80ccebf346
2020-08-10 19:13:17 +00:00
Tony Wickham c0ed292ccb Merge "Add swipe up resistance to quick switch from home" into ub-launcher3-rvc-qpr-dev am: 999e08f6ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12174364

Change-Id: I6ce2dbb31ec8ed0d340165b2fc9a9f0532081d3e
2020-08-10 16:32:08 +00:00
TreeHugger Robot e54db4fbd4 Merge "Fixing cutouts insets not clipped properly during swipeup for rotated activities" into ub-launcher3-rvc-qpr-dev am: 2ace6a25d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12327967

Change-Id: I6e3f28e464a8ca63840a53f1b35c86cf377c4ad4
2020-08-10 16:31:44 +00:00