Commit Graph

2058 Commits

Author SHA1 Message Date
TreeHugger Robot
b2507acec9 Merge "Adds ability to use LauncherPreviewRenderer in Sandbox." into ub-launcher3-master 2020-09-24 20:09:32 +00:00
TreeHugger Robot
8aade720b2 Merge "Make overview to home translate faster" into ub-launcher3-master 2020-09-24 19:38:03 +00:00
Tracy Zhou
a6a0ec986d Merge " [Live tile] Use OverviewInputConsumer in live tile mode" into ub-launcher3-master 2020-09-24 18:13:43 +00:00
Tracy Zhou
a7ddfc0722 [Live tile] Use OverviewInputConsumer in live tile mode
Fixes: 169285206
Test: fling the home handle in Overview to go home
Change-Id: I41eae8a5120857b653a8b261a03cd5f83f99e6bb
2020-09-23 19:40:14 -07:00
Tony Wickham
69f9cae810 Remove CurveProperties#pageParentScale
Test: Set TaskView#EDGE_SCALE_DOWN_FACTOR = 0.2f, then swipe
down on the centermost TaskView; ensure it fills the screen.
Alternatively, touch and hold the nav bar and ensure there is
no jump in scale on the app window.

Fixes: 169259407
Change-Id: Ib3cfba6ebafbcb90de9c6b1ab79f53605d995321
2020-09-23 17:39:07 -07:00
Tony Wickham
a8e2ad2c1f Merge "Scale task view in TaskViewSimulator before translating it" into ub-launcher3-master 2020-09-23 18:52:33 +00:00
Tony Wickham
657f396c9c Scale task view in TaskViewSimulator before translating it
The pivot is supposed to be at the center of the task view, hence why
we use width / 2, height / 2, but technically this is assuming that
translation == 0. This error isn't normally noticeable because scale
is 1 when the task is centered, so the pivot doesn't matter. By
scaling before translating, we ensure the pivot doesn't depend on
the translation.

Test: scroll side to side while swiping up from an app, ensure the
running window scales down properly; when you let go to enter recents
while the second task is centermost, the running window ends in the
exact position as the first TaskView that replaces it.

Fixes: 169103357
Change-Id: Ica53c6b6fb073304c29f26d30fb829bb9d282185
2020-09-22 17:33:46 -07:00
TreeHugger Robot
52e4994767 Merge "Remove invisible home task view as soon as gesture to Recents ends" into ub-launcher3-master 2020-09-22 01:08:29 +00:00
Tony Wickham
c445a359ae Remove invisible home task view as soon as gesture to Recents ends
Fixes: 168288052
Change-Id: I929d021b26dad8b2f9b1f6a659522054bbf3ec28
2020-09-21 17:20:51 -07:00
Tony Wickham
a85fa09885 Make overview to home translate faster
Fixes: 169052350
Change-Id: Ia6f21f479498927a5561819fcc256b698acbd095
2020-09-21 11:14:49 -07:00
Winson Chung
1ecce38357 Merge "Only check activity rotation allowed when considering menu layout" into ub-launcher3-master 2020-09-21 16:32:33 +00:00
Pinyao Ting
28633e9985 Fix the issue Launcher is calling minimal device endpoint on UI thread
Test: manual
Change-Id: I72b12da43520d775bfd652a3b10406440f7cf64f
2020-09-20 05:27:21 +00:00
Winson Chung
24f0f34d01 Only check activity rotation allowed when considering menu layout
- The canRecentsActivityRotate() also checks whether system rotation
  is enabled which prevents us from using the right layout orientation
  when home rotation is enabled while system rotation is disabled.

Bug: 168278832
Test: Tested menu visibility in combination of
      Auto rotate setting x Home rotation setting X Device orientation
Change-Id: If74a38b1ec51abd2ea7f3ba3de23f0b2c4cab0ab
2020-09-17 13:23:39 -07:00
Andy Wickham
9e754b008d Adds ability to use LauncherPreviewRenderer in Sandbox.
This is mostly a proof-of-concept for future use and
tweaks as desired by UX.

The idea is to better replicate the actual UI.

Screenshot: https://drive.google.com/file/d/1EGDgcrSH2QZuSh6P3zWLBl6L8Xd-gtFY/view?usp=sharing

Bug: 148542211
Change-Id: Ibed4b8118346ef72599463c9fd6a2f71166993fd
2020-09-16 19:35:18 -07:00
TreeHugger Robot
445e4b4b9b Merge "Dismiss task menu when swiping to home" into ub-launcher3-master 2020-09-14 21:31:47 +00:00
Tony Wickham
ef4b506c34 Dismiss task menu when swiping to home
Change-Id: Ie23e12cefeed2835aa0e5902337856505a5815bc
2020-09-11 13:00:06 -07:00
TreeHugger Robot
b350c66b6c Merge changes I358a6020,I202ed999 into ub-launcher3-master
* changes:
  Inline INDEX_PAUSE_TO_OVERVIEW_ANIM
  Allow pause during quick switch for any horizontal displacement
2020-09-11 02:08:25 +00:00
Tony Wickham
1c3150fa1f Inline INDEX_PAUSE_TO_OVERVIEW_ANIM
It is only used by NoButtonQuickSwitchTouchController. Also removed
the interpolator overrides that are no longer needed since we don't
animate the shelf into overview mode.

Change-Id: I358a6020caaee859c6b22179591ab1d11a432f1d
2020-09-10 18:33:24 -07:00
TreeHugger Robot
b7cc9fcc9e Merge "Adding content push button behind flag to OAV." into ub-launcher3-master 2020-09-10 21:07:44 +00:00
Sreyas
46aba2a46e Adding content push button behind flag to OAV.
Tested: TaplTestsNexus:testOverviewActions()
Change-Id: I83bc6e5033e2292776c927fba363214f347e01ce
2020-09-10 12:59:55 -07:00
Tony Wickham
248a7f89ac Only set live target if there is a target to set
Fixes: 166143722
Change-Id: I10c5bf384f6cee02cc55c035647911672f638e48
2020-09-10 00:41:22 +00:00
Tony Wickham
4318324ab4 Allow pause during quick switch for any horizontal displacement
The shelf no longer exists in 0 button mode, so it's not necessary
to wait for workspace to be invisible before allowing the pause.

Change-Id: I202ed9991b18f5e7cb2e4f0aa6be7a0d66b8ffd7
2020-09-09 17:12:49 -07:00
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
Winson Chung
486fad2c44 Migrate trace proto from nano to lite
Bug: 166630570

Change-Id: I0567d0f71dd78e5dab87bb5878417c99c9bbe306
2020-08-31 17:55:51 +00: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