Is doesn't reflect whether jank monitors is collecting metrics,
which will eventually be always true anyways.
Change-Id: Iaebdc838ed2b2cebd32c8c48d7e45bdd93f76fb4
Added tutorial_steps string array in the intent to allow specifying an ordered list of tutorial steps.
Change-Id: Ic42a65598a74a64f8441a22f58c6cd988a5762e3
WindowCallbacks is called during the draw pass, before the frame has
been sent to the surfaceFlinger. Frame callback will provide a closer
approximation for when the frame is actually rendered on screen.
Bug: 141126144
Change-Id: I62aab526c2ca24b00b5e7b312b36080f26c7b439
Rotating the screen in the homescreen empties the hotseat, however it does not get populated while it is visible to the user. The user should not be able to see an empty hotseat or prediction row if predictions are available. It should therefore be possible to populate these when they are empty even if they are visible to the user.
Change-Id: I8e5252bd29050c2cd9d443aedcb3f3e305c0e2d7
Two methods are added to support communications between Launcher and
SysUI when user swipes an auto PiP-able Activity to home.
Bug: 143965596
Test: N/A
Change-Id: I2c73a287a094e882bde3cd71c27f9f66ae20e64a
(cherry picked from commit 88ddae38db)
Pass the touch down time to RecentsAnimation#startRecentsActivity.
Bug: 169221287
Test: Enable statsd log: "adb shell cmd stats print-logs"
Touch gesture navigation bar.
adb logcat | grep statsd | grep "(48)"
The line may contain 0x100000->4[I] 0x110000->20[I]
that means 4=by recents and 20=latency 20ms.
Change-Id: I81ee804895b7712f4d925736f5b4694c11a12cbe
(cherry picked from commit 63623967b8)
- Get rid of the defer cancelation logic
- Render animation on the task view of the task being launched upon task view appeared callback
- Finish the recents animation upon the end of the recents window animation
Fixes: 164926736
Test: manual
Change-Id: Ibffb6a9c74c235efc8615a22b0306551532c7b61
Test: manual
Fixes: 168653219
Changing app icons under the user's finger could be disruptive. Added a checks for whether the hotseatand all apps predictions are visible and callbacks to update them when they become hidden.
Change-Id: Ib9e6e904e9f662ecfaeea6a2fe21d1d81ba39b96
- A change in the system (ie. sysui crash or nav mode change) could
cause the input monitor to be disposed before the swipe animation
settles
Bug: 170121063
Test: Kill sysui while swiping up
Change-Id: I1417b109fecdb98fae6197c7038dbe9307470853
Two methods are added to support communications between Launcher and
SysUI when user swipes an auto PiP-able Activity to home.
Bug: 143965596
Test: N/A
Change-Id: I2c73a287a094e882bde3cd71c27f9f66ae20e64a
HandlerThread.getLooper blocks until the thread is ready. Instead
moving all looper dependency to the new thread itself.
Change-Id: I240e8c56b855a991433a7fe93875059e6dab146b
When how things are structured changed in the past 1-2 releases, we have dup logic in launchTask. There are two cases
- Swipe down from Overview: RecentsView#createTaskLaunchAnimation. In endListener, call launchTask in the non live tile case, and call finishRecentsAnimation in the live tile case
- Tap on the TaskView to launch task: In the non live tile case, call launchTask as it calls startActivity with option. In the live tile, currently we call createLaunchAnimationForRunningTask, which plays the task launch animation, which calls finishRecentsAnimation at the end. But this animation is not sufficient, when the user swipes the live tile task off to the right and tries to launch it. We will need to replace this animation with createRecentsWindowAnimator
Fixes: 169516051
Test: manual
Change-Id: Id764d6787175bcdb1c82adb8e4743af192a1fd9d
Test: manual
Added a Sandbox mode tutorial fragment and controller. This fragment allows the user to try all the gesture commands and receive feedback, whether the gesture was successful or not.
Preview: https://drive.google.com/file/d/1Qmn71ZHMOrv2XjUngb6S4W5jOaBIvF1_/view?usp=sharing
Change-Id: I7d28ce25daa38fa6d05b18d43d02b77c1fc8a264
Pass the touch down time to RecentsAnimation#startRecentsActivity.
Bug: 169221287
Test: Enable statsd log: "adb shell cmd stats print-logs"
Touch gesture navigation bar.
adb logcat | grep statsd | grep "(48)"
The line may contain 0x100000->4[I] 0x110000->20[I]
that means 4=by recents and 20=latency 20ms.
Change-Id: I81ee804895b7712f4d925736f5b4694c11a12cbe
HandlerThread.getLooper blocks the current thread until.
the final thread is initialized. Updating RecentsModel to
use an executor instead of a handler thread to avoid this.
Change-Id: I3b2e82a375ea65bea1526af4a32c6a2488102541
The onSplitScreenInvoked was used to notify system ui to reset the
divider position before entering split screen. With
SplitScreenTaskOrganizer, WM Shell library could know the exact time
when entering/leaving split screen mode. Removes the legacy API and
resets divider position when leaving split screen mode.
Fix: 168869136
Test: atest WMShellTests
Test: atest SystemUITests
Test: manual check recents and split screen behavior
Change-Id: Id14925619d1ec7c014a3e306fd99ec3734f227da
(cherry picked from commit 44981eb88e)
Test: manual
TutorialFragments needed to implement getHandAnimationResId, however not all TutorialFragments will need a hand gesture animation. Updated TutorialFragment to remove this requirement.
Change-Id: I2f75d6447dcceb226569181176deed1d5e80fa5f
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
Overview was being hidden when gesture was running, this is unnecessary as other hidden flags cover all the use cases.
Bug: 168565347
Change-Id: Ieab36783fccc0088f9cdbe0768a93c5c46b23def
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
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_master_6852432.html
Change-Id: I91066d6c55e88355a10a61281ad0d9b38b43f166
Previously we only allowed touches on the hotseat (due to it being
in the shelf in Overview); now we allow touches anywhere if we are
not in an overview state.
Test: enter overview, swipe up to home and scroll workspace or tap
a workspace icon during the transition
Bug: 169052350
Change-Id: I59ee695ba9cb6f5fddd8e41c5796cdba6b3d2112
The onSplitScreenInvoked was used to notify system ui to reset the
divider position before entering split screen. With
SplitScreenTaskOrganizer, WM Shell library could know the exact time
when entering/leaving split screen mode. Removes the legacy API and
resets divider position when leaving split screen mode.
Fix: 168869136
Test: atest WMShellTests
Test: atest SystemUITests
Test: manual check recents and split screen behavior
Change-Id: Id14925619d1ec7c014a3e306fd99ec3734f227da
- 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
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_master_6834159.html
Change-Id: I4350d0ddedd107d7005625480aefda19e5d06ba2
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
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_master_6799015.html
Change-Id: Ib9d52ba333f2982d2420cab42a0935e8e8a303b3
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
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_master_6777814.html
Change-Id: I0bb722c8f29e91cb382337f8b11bcf43d711949b
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
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_master_6767682.html
Change-Id: I5e9c73a7ac3033fe82006c4bd72824f56b8988f8
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
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
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
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
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
(cherry picked from commit a145670969)
- Switch to screenshot and finish recents animation when an overview action is selected
Fixes: 162564471
Test: Manual
Change-Id: I3db20619435d079bb39ce4cb37b46ea775416336
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
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
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
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
Instead of trying to estimate the insets, we clip the task such it is
restricted within the task insets when possible.
Change-Id: If160115fda07dfd2e01e96d41e4b5dc43a77ac94
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
This reverts commit f3bc797182.
Reason for revert: updating upstream, need to wait to cherry-pick until that's approved
Change-Id: I702286dba66fb4582ab682a5b0b8cd80ccebf346
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
Now recents view follows your finger all the way to the top of the
screen. Specifically, your finger tracks the bottom of the window
until resistance starts (when RecentsView is at 75% scale), then
we add translation to compensate for the slower rate of scaling
down, such that your finger slips to the top of the window by the
time it reaches the top of the screen.
Also reset this translation back to 0 in the state handlers.
Bug: 149934536
Fixes: 158701272
Change-Id: Iaee58da758d422f0173c29d002f5c451ce0c1809