Commit Graph

4480 Commits

Author SHA1 Message Date
vadimt
f367ced932 Annotating open-app transitions in trace files
Change-Id: I2461186321b7c33dbabca34c066b61f2169010f3
2020-09-08 18:39:32 -07:00
TreeHugger Robot
57cf650115 Merge "Annotating open-Launcher transition in trace files" into ub-launcher3-master 2020-09-08 22:27:58 +00:00
vadimt
70dc1066b6 Annotating open-Launcher transition in trace files
Currently, in trace files, it's hard
to find the exact set of frames for this transition.

Change-Id: I17ac201f9f9bc357ba42003776ec7a20ddef033d
2020-09-08 14:51:43 -07:00
Tony Wickham
01e4070836 Standardize quickstep velocities
- Compute velocities as px/ms from VelocityTracker, instead of
  computing px/s and dividing by 1000 in various places
- Use quickstep_fling_threshold_speed in TriggerSwipeUpTouchTracker
  instead of ViewConfiguration#getScaledMinimumFlingVelocity
- Check MotionPauseDetector to determine whether a fling is
  sufficient to escape after pause, in additon to above threshold

Bug: 159089437
Change-Id: Ib0fae7804e1f008f3b6ab37d6c463352c224b0e4
2020-09-03 10:52:34 -07:00
Tony Wickham
3a89e42237 Don't detach recents from app window after motion pause
- Update MotionPauseListener to have 2 methods: the existing
  onMotionPauseChanged(isPaused) and onMotionPauseDetected()
  - onMotionPauseDetected is the default as most listeners only
    care about the first detected pause
  - AbsSwipeUpHandler still listens to pause changes, to help
    determine the end target at the end of the gesture

Bug: 159089437
Change-Id: I6d14f106cdcbe4e07d8dddba1cee909a963615b1
2020-09-02 17:28:49 -07:00
TreeHugger Robot
1aee9da5b8 Merge "Make modal based UI changes in TaskView only if modalness changes." into ub-launcher3-master 2020-09-02 22:12:34 +00:00
Sreyas
ed5e43bd25 Make modal based UI changes in TaskView only if modalness changes.
Fixes issue with jittery displaying of suggestion chip, when entering overview.
Merging into master manually as automerger failed.
Tested:Manual

Change-Id: I8228c51b22d550cb8f0aa559f997060b571763f1
2020-09-02 11:18:01 -07:00
Sreyas
639505c23b Scale down chip proportional to TaskView becoming fullscreen.
Merging into ub-launcher3-master manually as automerger failed.

Tested: Manual
Change-Id: Ic8e6dd6ba83206d67ee27d4af9d56639e9e43ff9
2020-09-02 11:17:19 -07:00
TreeHugger Robot
017c93488c Merge "Intercept touch events from anywhere while all apps is closing" into ub-launcher3-master 2020-08-31 18:59:32 +00:00
TreeHugger Robot
a10f459281 Merge "Migrate trace proto from nano to lite" into ub-launcher3-master 2020-08-31 18:34:54 +00:00
Winson Chung
486fad2c44 Migrate trace proto from nano to lite
Bug: 166630570

Change-Id: I0567d0f71dd78e5dab87bb5878417c99c9bbe306
2020-08-31 17:55:51 +00:00
Hyunyoung Song
5191fe9ba0 SearchTarget/SearchTargetEvent API
Bug: 165869384
Bug: 161599758

TL;DR;;
Also introduce some additional methods for
- all apps start and stop
- metrics logging

Change-Id: I666ff5a27a5f8befdb0db483ebb07344a90e96bc
2020-08-28 23:58:23 -07:00
Tony Wickham
734be27f9b Intercept touch events from anywhere while all apps is closing
Previously we did this only from a settled state, but now we also
do it during the transition to NORMAL.

Test: open all apps. Then, swipe down to home and back up to all
apps (from above the top of all apps).

Fixes: 159856104
Change-Id: Ib78c6a41d5fa17dd26a7df4e9069e0ada1f46dd0
2020-08-28 13:23:10 -07:00
Sreyas
90faa282f1 Implementing TouchDelegate to make full chip clickable.
Merging to ub-launcher3-master manually as automerger failed.
Tested: Manual

Change-Id: I1b8b43de7f04e1e13cb283c88f95a7c6fea84ea6
2020-08-28 12:10:55 -07:00
TreeHugger Robot
4b84442178 Merge "Fix a couple issues with overview to home transition" into ub-launcher3-master 2020-08-26 18:27:20 +00:00
Vinit Nayak
8acdb23e64 Init rotationTouchHelper before NavModeChange listener
NavModeChange listener relies on rotationTouchHelper
to be non-null, but we instantiate rotationTouchHelper
after nav mode changes are fired off.

Fixes: 166303464
Change-Id: Iab92d0fe0ee842d907d7226dfd9ca599e7729675
2020-08-25 18:26:29 -07:00
Hyunyoung Song
516da83f62 Merge "Good riddance UserEventDispatcher [1/n]" into ub-launcher3-master 2020-08-25 09:25:55 +00:00
Hyunyoung Song
6b670d62df Good riddance UserEventDispatcher [1/n]
Bug: 165675920
Change-Id: I237ed4243e1724b3c370c5660673bb3966bf4811
2020-08-24 21:19:09 -07:00
Tony Wickham
b5493b90bc Fix a couple issues with overview to home transition
- In fake portrait, fade out instead of translating offscreen, as
  the orientation doesn't map to where RecentsView actually lives
- From OverviewModalTaskState, start from > 1 scale, and use
  OverviewToHomeAnim (to ensure RecentsView doesn't fade out etc)
  - To keep parameter list sane, added RecentsParams to
    AnimatorControllerWithResistance which has the new startScale
    (set to current scale for modal state) and renames the old
    RecentsParams to RecentsResistanceParams. Sorry if that's
    confusing.

Bug: 144170434
Change-Id: I437f0d18cad4c94feea25954aed3390acedcaed5
2020-08-24 16:27:00 -07:00
TreeHugger Robot
3cc22175e9 Merge "Moving hotseat predictions to ModelDelegate" into ub-launcher3-master 2020-08-24 18:42:01 +00:00
TreeHugger Robot
7658071d27 Merge "Set new scrimMultiplier instead of scrimProgress for overview -> home" into ub-launcher3-master 2020-08-20 02:24:56 +00:00
TreeHugger Robot
255ee17ce8 Merge "Allow swipe up to go home from overivew during task dismiss animation" into ub-launcher3-master 2020-08-20 02:19:23 +00:00
Pinyao Ting
840ad8e8bb Minimal Phone Mode (part-3) am: 96186aff87
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12219772

Change-Id: I27cb81fdb6cc1a5535aec3b259acda16106e084f
2020-08-20 02:03:17 +00:00
Tony Wickham
b176dc99b2 Set new scrimMultiplier instead of scrimProgress for overview -> home
Animating this new property allows us to adjust the scrim without
competing with other state animations that could be setting the
scrim progress. Also reset scrimMultipler = 1 for state transitions.

Test: Swipe from home to overview, then during that transition swipe
from overview to home; when the former transition ends while the
second is still in progress, ensure scrim value doesn't jump

Bug: 144170434
Change-Id: I44b57ced1c6902e558fe1818bcbf11ceb4ff2f6f
2020-08-19 18:42:00 -07:00
Tony Wickham
5af9c3537d Allow swipe up to go home from overivew during task dismiss animation
Test: go to overview, dismiss a task, swipe up to go home during the
transition (easier to try with animation duraation scaled up)

Bug: 144170434
Change-Id: I28b846b43260179aeac877351a7069743f66f3ea
2020-08-19 18:34:13 -07:00
Pinyao Ting
96186aff87 Minimal Phone Mode (part-3)
Introduces a separate database for minimal device mode.

When minimal device mode is enabled/disabled:
1. WellbeingModel receives onChange event from ContentObserver
2. WellbeingModel called DWB's ContentProvider for latest state in
minimal device mode
3. Based on the state, WellbeingModel calls LauncherProvider to put
launcher into normal/minimal mode.
4. When going from normal -> minimal, Launcher switches to a different
database, namely minimal.db, then proceed to database initialization.
5. If the database hasn't been initialized yet, Launcher will call
ContentResolver#openInputStream with following uri:
content://com.google.android.apps.wellbeing.api/launcher_layout
to get the default layout xml.
6. The default layout is then saved in database, and the database is
considered initialized and doesn't need to go through step 5 again in
the future.
7. In case of minimal -> normal, Launcher switches back to its original
database (e.g. launcher.db if the grid size is 5x5), then reload launcher.

Bug: 161462256
Change-Id: I6bafa66440da23281f63454b698ea56b15960022
2020-08-19 14:58:20 -07:00
Tracy Zhou
c5eedfb387 Merge "[Live Tile] Tapping home in Overview does not take user back to app" into ub-launcher3-master 2020-08-19 21:55:26 +00:00
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
Sunny Goyal
0fc3d1275a Moving hotseat predictions to ModelDelegate
Bug: 160748731

Change-Id: I8db7856a17e0b6ca45b4d5ec3513f788f22db11a
2020-08-17 08:43:07 -07:00
Tracy Zhou
66f3ffe39f [Live Tile] Tapping home in Overview does not take user back to app
Fixes: 162340084
Test: Manual
Change-Id: I8e2caa4ec0d3203d70d35fc409e8053cae51e21e
2020-08-15 00:53:02 -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