Directly transition Activity to PiP mode in launcher if the Activity
claims auto-pip support. Video is taken by commenting out the
requirement of setting the auto-pip flag.
Note that we need app to actively push up-to-dated
PictureInPictureParams to the framework, otherwise we won't be get
- PictureInPictureParams on first entering
- Staled PictureInPictureParams if the aspect ratio is changed
Video: http://rcll/aaaaaabFQoRHlzixHdtY/abenIxLFI1pZzF2O8t4TbS
Bug: 143965596
Test: see demo videos
Change-Id: Iea9a6ff39a79431ac1afa14aea812c500b3ca3b2
Test: manual - flashed the phone and verified the logging and statsd sampling with default settings
Bug: 131859447, 162927074
Change-Id: I2d0c9fd479654c62841c714eb39f88f84e8ab114
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
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