Also includes some massaging of `CameraGestureHelper` to be more
testable.
Test: Made sure that double-tapping the power button still brings up the
camera correctly in all the scenarios described in ag/19214502
Bug: b/235403546
Change-Id: I54e3f760b0c2fa5738766f8b97568caf07676a8d
Exit the split-screen in case users put the uncontrolled task into
split-screen. This CL do below change to support handling this task.
1. If no controlling activity appeared, dismiss the split screen
and show a toast to inform users.
2. Reparent all tasks out of split root when dismissing instead of
just reparent controlling tasks.
3. Disable the split-item from launcher for tasks that are
uncontrolled.
Bug: 230461945
Bug: 208646963
Bug: 238032411
Test: atest MultiWindowTests
atest WMShellUnitTests
Change-Id: Iab59561e9d532b10dab8f5063047c4b68b73eb87
The code flow:
RecentsAnimationController#finishController
mOnFinishedListener.accept(this);
RecentsAnimationCallbacks#onAnimationFinished
*Post to "main" thread
RecentsAnimationListener#onRecentsAnimationFinished
TaskAnimationManager#cleanUpRecentsAnimation
Invoke SurfaceControl#release
*Post to "UiThreadHelper" thread
RemoteTransitionCompat.RecentsControllerWrap#finish
Invoke SurfaceControl.Transaction#remove
on the same SurfaceControl.
Then it may be either NullPointerException from
SurfaceControl#checkNotReleased. Or rarely native crash by
changing the surface control from 2 threads at the same time.
Bug: 238192072
Bug: 238047903
Bug: 237631001
Bug: 237497909
Bug: 235616350
Test: Loop launch app and swipe to home.
Change-Id: I7e4ce2c273b8396ed464eb48426fd4435d6c5338
To avoid Recents thumbnail being empty, a snapshot is triggered if no
cache exists.
Bug: 191272693
Test: manually test with Exo (Host apps on virtual display.) to check if
the Recents displays non-empty thumbnail.
Change-Id: I2a898d5127e18e6209ff236d3a72aa22c2a0ca82
There were a couple of situations where both cancel and finish
collided. In those cases make sure only one is called.
Somewhat related, launcher actually continues to use leashes
even after calling the finishCallback. Since we make leashes
for launcher anyways, just use launcher's existing leash
clean-up logic.
Bug: 235616350
Test: run/monitor wm presubmits.
Try launching and closing apps in rapid succession.
Change-Id: I7553ba9f9bbad052632a4d8d5a7225ab6c3dbce5
The PipTransitionAnimation#ofBounds is used when entering PiP on back pressed.
- Adjust the scale based on current animation progress
- Alter the auto-enter-pip animation running in Launcher to use the same
mechanism
- Update the ofBounds animation to ignore small source rect hint,
similar to what's in auto-enter-pip animation running in Launcher
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dv35ov6nK2Mrr98DGkLNaE
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/gm8Kl7N3NPIoWoDKyDfd5s
Bug: 235268241
Test: Verify enter PiP animation on back pressed with YouTube in \
both folded and unfolded state. See also videos.
Change-Id: I6043cff31eed7b63087ea03b17ced7549c89e4fb
The default behavior (if nothing is done) for a merge request
is to let the animation continue and queue up the incoming animation
to start once the current one has finished.
This is maybe the "smoothest" default; however, it is not
responsive for the user. So, instead, go through and, where
appropriate, make animations "jump-to-end" when they receive
a merge request. This way the user will see the new animation
start immediately after they perform an action. There is
technically a "jump" in the animation, but it seems like the
responsiveness is preferable and the jumps aren't super
noticable anyways. This is also how legacy transitions works
so it's not a behavior change.
Bug: 236309064
Test: interrupt animations with other transitions and observe.
Example: launch an app and then go "back" before it finishes
animating.
Change-Id: I4a76e7efe2c610b22f3fe97b0bd3ab692a01be08
Starting bounds are undefined in open transitions.
Bug: 235496520
Test: Animation leash isn't put at the origin of the screen display for
non-fullscreen tasks.
Change-Id: I4913daeead5471f82086d41eac61600b342d02a0
There're 3 different parameters trying to affect the insets provided by
a window and can be set independently but are related. This change will
make a new class InsetsFrameProvider to let the window set all the
information needed for the insets at the same place.
Besides, this change also extends the insets calculation logic to
support more use cases. With this, the bars can provide insets outside
of its window frame as well.
Test: atest DisplayPolicyLayoutTests
Bug: 161689946
Bug: 232044523
Merged-In: I7059b3a222745818b6852a288416e197e2afd7b2
Change-Id: I7059b3a222745818b6852a288416e197e2afd7b2
When merge a TO_FRONT transition to the recents animation,
onTasksAppeared will finish the recents animation, so there can be a
race that the open transition for recents animation might be finish
before the merge transition, which leave the merge transition become
a standalone transition.
To make the sequence correct, register a transition commit callback
to know the merge transition has done in Shell, then goes to finish
the recents animation.
Bug: 235433368
Test: enable shell transitin, quick switch back/forward and verify no
flicker.
Change-Id: I39fc898a8922f900e1e1808f92a471749664e194
Adds support of DeviceConfig feature flags.
DeviceConfig flags are used by Phenotype
A/B testing framework.
Bug: 218314434
Test: change phenotype flag =>
check that FeatureFlags returns correct value
Test: atest com.android.systemui.flags.FeatureFlagsDebugTest
Test: atest com.android.systemui.flags.FeatureFlagsReleaseTest
Change-Id: I7dd9e47280ba56b7f9ea552c0d44d3e36fc6b041
User can enter recents animation while a showWhenLocked activity on top
of keyguard by touch down navigation bar. In legacy, Launcher start the
recents animation by keep the original top activity on top. But for
shell transition, Launcher will start home activity with transient
launch flag. When core receive start activity request, unlike
startRecentsAnimation, core will try to move the activity to top, which
break the keyguard occluding state, so the keyguard will pop up on
screen before dismiss recents animation, and there is not have enough
information for shell know whether to hide the surface of the original
top activity.
To make the occluding state unchange during start transient launch, we
do not resume the launcher activity, also we do not move it to top. So
what we need to do is to collect the surfaces from launcher + top
occluding task + wallpaper and send this transition to shell.
Another change is Launcher will finish recents animation by calling the
RecentsAnimationController directly without start home activity. By
determine the top activity when set restoreTransientOrder, there will
update the hierarchy, which may change the occluding state and decide
whether to play unoccluding animation.
Bug: 230582311
Test: monitor no strange animation when running atest KeyguardTests
Test: enable shell transition. Start showWhenLocked activity while
keyguard showing. Scroll up to dismiss the activity and verify the
activity and home shall be stopped and only keyguard remains on the
screen.
Also verify entering recents works fine when device is unlocked.
Change-Id: Ia16fa01fdc09547cfb3ae1370875ac70f07ede8d
* Remove existing coloured background.
* Add a background with a layout that includes a
badged icon of the app being opened.
Manual testing steps:
* Set up device with a work profile using TestDPC
* Set a fingerprint in the work profile
* Open a work app
* Lock the device
* Verify the background protection is shown behind
the biometric prompt
Screenshots:
* Dark mode: https://screenshot.googleplex.com/3SwGWrBREYoZFaH
* Light mode: https://screenshot.googleplex.com/8bzX9wLoFGJ2ado
Bug: 206761107
Test: Manual testing
WorkLockActivityControllerTest
TaskStackListenerImplTest
Change-Id: I90d117a97d7457a3186953c16db8bd0bbac048ed
No behaviour changes in this CL.
Extracted classes related to the fold/unfold
animation (that plays on foldable devices) to
a separate library that does not depend on
system classes. This is necessary to ease
reusing these classes in live wallpapers.
Bug: 231936088
Test: fold/unfold device
Change-Id: Ic1e1ec742867fca9c1209b930accd5738de18e39
For new split screen, we are using supportsMultiWindow and other
multi-window features should use it too so remove
supportsSplitScreenMultiWindow and update some files which still
use it.
Bug: 199236198
Test: pass existing tests
Change-Id: I3b3ec3376a4c79295f9d9f913585534a3815e75a
Removes the last call to Dependency#get from NavigationBarView. A few
more calls were added in the process, but they will be easier to deal
with in future cls.
Bug: 218354102
Test: manual && atest SystemUITests
Change-Id: I0b6b3837d9f1cfd11f0cdb4089fb51ecf79b467b
Merged-In: I0b6b3837d9f1cfd11f0cdb4089fb51ecf79b467b
Removes the last call to Dependency#get from NavigationBarView. A few
more calls were added in the process, but they will be easier to deal
with in future cls.
Bug: 218354102
Test: manual && atest SystemUITests
Change-Id: I0b6b3837d9f1cfd11f0cdb4089fb51ecf79b467b
Merged-In: I0b6b3837d9f1cfd11f0cdb4089fb51ecf79b467b
Move the functionality for wrapping an uncaught exception pre-handler
from PluginManager to a standalone manager. Make DumpHandler register
another uncaught exception pre-handler that will tell the log buffer
eulogizer to dump contents to a file.
Fixes: 213884413
Test: manually verified, added tests, and ran atest
Change-Id: If829fc33769819624530f766178689ecf0374926
Bug: 222308557
Bug: 216301097
Test: Manual, invoke assistant on the lockscreen and verify you can
go back
Change-Id: I675a0c694b8d85e7cd67f7a550fe8e8ab85e9ad2
See justification/explanation in linked bug.
I re-ordered some methods in the unlock controller so they'd make more sense,
they're generally called from top to bottom now during the unlock sequence.
Bug: 229890190
Fixes: 227713319
Test: atest SystemUITests
Test: manual
Merged-In: I58fa437eea183691ff29548143664698498c2105
Change-Id: I58fa437eea183691ff29548143664698498c2105
Initializes move from center animator for the statusbar
views with 1f progress, so when the device is booted
in unfolded state and rotated it the translation
wil be applied with 1f progress.
When booted in folded mode the progress will start
from 0f so it doesn't affect the animation.
Bug: 229738545
Test: kill sysui in unfolded state, rotate the device,
rotate during fold/unfold animation
Test: atest com.android.systemui.statusbar.phone.StatusBarMoveFromCenterAnimationControllerTest
Change-Id: Ia0d4a44ddc444420d3695cab328558bf2fbe589d