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
- 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
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
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
- 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
- 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
Fixes issue with jittery displaying of suggestion chip, when entering overview.
Merging into master manually as automerger failed.
Tested:Manual
Change-Id: I8228c51b22d550cb8f0aa559f997060b571763f1
Bug: 165869384
Bug: 161599758
TL;DR;;
Also introduce some additional methods for
- all apps start and stop
- metrics logging
Change-Id: I666ff5a27a5f8befdb0db483ebb07344a90e96bc
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
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
- 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
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
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
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
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