When in 'tabletop' or 'book' mode, allow the display to rotate
even if it is frozen. Then return to the previously locked rotation when
the device is unfolded.
Bug: 240146362
Test: locally tested + ran atest on DisplayRotationTests
Change-Id: I9869f5b070fecd7df70e08323dfacef8b883f470
To make sure the embedded TaskFragment surface will be updated when
Shell transition is enabled.
Bug: 207070762
Test: testApplyTransaction_collectTaskFragmentBeforeApplyChange
Change-Id: Id726b67cd30bd68e3ca4bc2665ab0a9024d76dab
Instead of having WM Core to "guess" when to request transtiion, let the
organizer to tell whether or not it needs to be applied immediately.
With the shouldApplyIndependently parameter, we can make sure the future
runtime API to change split layout won't affect other ongoing
transition.
Bug: 207070762
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Change-Id: I658b0ba1ae9decc741f09cb53bfff2c45ea076a0
This moves from having a single global wakelock held by
WindowManagerService whenever any window on any display has
FLAG_KEEP_SCREEN_ON set, to having one per DisplayContent that is only
held when a window on that Display has the flag set.
Bug: 185157739
Test: atest WmTests
Change-Id: I82dcb693ad2bea0a243be4299dae836a1f53930c
Move most of the logic of the Settings' volume panel to a SystemUIDialog
to make the dialogs consistent with other system dialog.
Bug: 202262476
Test: manual build and launch the new dialog.
Change-Id: Ic27dcca77072dee2b78827e1eb58c28022b47265
1. When deferTransitionReady is called, it should un-ready the sync
group.
2. Do not call continueTransitionReady when the transition is no
longer collecting, such as transition timeout or abort.
Bug: 207070762
Test: atest WmTests:TransitionTests
Change-Id: I33a211d574da54ed220c7d0f7c12e201c5e1f681
This adds a "method" to sync-engine where an app just draws
internally and reports (no sync).
The transition system can then use this to implement its own
screenshot-based sync mechanism. For now, this uses legacy logic
around "changeTransition" to decide which levels to take
screenshots at (since screenshots are slow).
This also adds a per-window method override to handle situations
where one window/sub-hierarchy needs to use or not-use a
method (specifically, seamless-rotation needs BLAST even if
the rest of the transitions are screenshot).
Bug: 242056267
Test: atest TransitionTests SyncEngineTests
Change-Id: Iee6ee85bafb8967e2e1e662cd3275fba1efbbdea
When a TaskFragmentTransaction is sent to the organizer during a
transition, have the transition wait for the organizer to finish
handling the transaction.
Bug: 207070762
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Change-Id: I4b7955171cd8ce386686ff2cd64b7c04a6436ddf
Some olders kernels don't yet support HID_PLAYSTATION. While they are
working on supporting this driver, provide this temporary solution.
Before this patch, if the key layout is loaded, but there is no
HID_PLAYSTATION, then the mappings on the device will be incorrect.
With this patch, this key layout will not be loaded unless there is a
CONFIG_HID_PLAYSTATION enabled on the device.
Instead, when the main layout cannot be loaded, we make another attempt
to load a fallback layout. This way, the mappings on DualSense can be
correct even if the HID_PLAYSTATION module is not loaded.
In this CL, the fallback layout was tested using controllerTester.
Bug: 228005926
Test: tested mappings with a DualSense controller on a device that does
not have CONFIG_HID_PLAYSTATION
Change-Id: I7e46ae1943cd2c63b8c0b03fdf5d71adeea89f6f
Destroying the MediaProjection notifies the client app through the
MediaProjection callbacks that the app should handle the session
ending prematurely.
This may happen if setting up task recording failed, or if the
user exited the task that is being recorded.
Registering a listener to the task for configuration changes
also enables handling of the task entering/exiting split
screen.
Fixes: 219761722
Fixes: 237526949
Fixes: 236971595
Test: atest WmTests:ContentRecordingControllerTests
Test: atest WmTests:ContentRecorderTests
Change-Id: I415fb70433a031889f0486e99bb7d3b664333414
1. Collect the TaskFragment when reparenting an activity into it.
2. Check adjacent TaskFragment for transition flag FLAG_TRANSLUCENT.
3. Offset the relative position for default animation.
Bug: 207070762
Test: pass existing
Change-Id: I62b533dbb087007e3ef126170691a59929eb75e1
..to reflect the app transition animating state when shell-transition
enabled for below cases:
1) ImeInsetsSourceProvider#isReadyToShowIme will use WS#isClosing ->
AR#isClosingOrEnteringPip to check if the IME layering target window
is in closing transition. (i.e. It won't be ready to show IME while
the target is in closing app transition.) Also, given isClosing and
isClosingOrEnteringPip currently is only used for checking IME target
validity, wraping those logic into isImeTargetWindowClosing() for
simplicity.
2) With Shell-Transition, the activity will running a transition when
it is visible, it won't be included when fromTransition is true means
the call from finishTransition. As a result, in AR#commitVisibility,
callback onAppVisibilityChanged(visible, runningAppAnimation) with
using the above checking logic and adding logs for tracking. In case
a11y controller will always callback onWindowTransition with
TRANSIT_EXIT due to runningAppAnimation always being false by
isAnimating no-op.
Fix: 212570341
Test: No visible change & Pass existing tests.
Change-Id: I9cc77956b3ff61ae83f5bd120c395cc6aca93af9
When making subsequent draw requests for the same window, drop
any existing buffers since they will be replaced by the new one.
Sometimes the "old" buffer will still be "in-flight" (either
drawing still or in binder). So, also drop incoming buffers
for seqIds that are earlier than the latest prepareSync.
Additionally, immediately apply any applyWithNextDraw that were
requested before the sync, but arrive after the sync started --
otherwise they can get put on pending (which waits for sync
apply) and thus also block the buffer queue.
Bug: 233625646
Test: run tests and check for ANRs
Change-Id: I156a9a73eea8346dc241b5d782a863b99127ca9f
The Task was moved to front while making an Activity to be the
focused app. In that case, the resumed activity will be reset
to the top-most resumed activity in the Task.
However, the top-most resumed activity in the Task should not
always be the current focused activity when activity embedded.
This CL skips unnecessary task movement and making the target
activity to be focused if the task is already on top and focused.
Bug: 236565088
Test: atest TaskFragmentTest
Change-Id: I6cbea10bdfa422e9d51c051595ed592843f5ba79
group name was changed during review but not updated
in the permission mapping.
Bug: 232283779
Test: manual
Change-Id: Ib7df61fa4fd49c8419f0543fd6c54186a33ebeb6
(cherry picked from commit 4486314be6)
Merged-In: Ib7df61fa4fd49c8419f0543fd6c54186a33ebeb6
Map WRITE_SECURITY_LOG to AID_SECURITY_LOG_WRITE which is how logd
controls access to security log buffer.
Bug: 232283779
Test: manual
Change-Id: Ifde2e5192326f0811807dcb05563b1b5b63077ce
(cherry picked from commit e806776e54)
Merged-In: Ifde2e5192326f0811807dcb05563b1b5b63077ce
Changed approach to handle conflict between app transition and recents.
In order to fix flicker which happens when recents and app transition
start in a short time, we delayed app transition while recents was
running. However this approach brought side effects such as b/232984498.
When recents starts, we just want to wait that the launcher activitiy
finishes rendering and commit its visibility without animation. Added a
flag DisplayContent#mExcludeLauncherFromAnimation flag, so that we can
now explicity declare whether we want to apply animation on the launcher
or not.
Bug: 223499269
Bug: 231711212
Bug: 232984498
Test: atest com.android.server.wm.AppTransitionTests
Test: atest AppTransitionTest + manual tests
Test 1
1. Launch Gmail app
2. Click icon on the bottom tab (e.g. Chat)
3. Swipe up from the bottom (immediately after step 2)
4. Verify closing animation only plays once
Test 2
1. Launch "Google TV"
2. Play a trailer
3. Full screen and PIP mode switch twice
4. Verify PIP window is shown
Test 3
1. Change phone to portlait mode
2. Launch Photo app
3. Swipe up from the bottom
4. Verify no rotation animation on the launcher
Test 4
1. Install 3P launcher and set it default.
2. Launch Gmail app
3. Swipe up to go back home
4. Launch Chrome app
5. Swipe up and hold to go to overview.
6. Scroll to Gmail app and click.
7. Verify Gmail app is launched without delay.
Change-Id: I0ccb99479684d17453ce57e8797024c0cd233ac3
Not all pips should be their own transition. This CL
changes the rules so that any pip originally requested
by the system (even if done via the app -- eg legacy
pause+userLeaving) will not get their own transition
and instead be bundled into the current one.
This also fixes an issue where transient launch
committal was only entering pip for the new auto-enter
case but not the legacy userLeaving case.
Bug: 220196913
Bug: 231150615
Test: launch a legacy userLeave-enters-pip app and
then go home (swipe or button).
Change-Id: I3c20341971ab4512509daa70314742f84c1ccd6b
- Override the callback to inject back as we do today while in Overview.
We can't rely on the client side compat callback because the Launcher
window is not focused in this current state.
Bug: 223750399
Test: Open overview, swipe back
Change-Id: I1978ce3a91cba3e57c0f8bab366691b48a9d5921
In general, we need to move to a model where each transition is
a "fixed" transaction (rather than absorbing everything within
a specific time-window).
Bug: 232020248
Test: PinnedStackTests#testMovePipToBack*
Change-Id: Icf5d36e507bc70736e7760c50d5de297bfe4d8f4
This CL adds synchronization of applying of the window
container transaction with split-screen layout changes after
the display size change. This is needed for the unfold
animation to have the split screen layout ready
for the first frame of the unfold animation on foldable
devices.
The flow is similar to the display rotation synchonization,
now it is triggered on both physical display change and
rotation.
Bug: 204925795
Test: folding/unfolding, rotating with a split layout
when Shell transitions enabled/disabled
Change-Id: I30f391dae69cf38768daf49361660d87165f886d
This fixes conflict between app transition and recents animation in the
following scenario.
1) App transition animation finishes after app closing animation, which
is controlled by recents, finishes.
During the app closing animation, recents makes the closing app surface
invisible, but app transition animation overrides it to visible again.
This causes a flicker.
2) App transition starts during recents animation.
This can happen when a user launches an activity, and immediately after
that, swipes up the screen to close the app.
While recents is running, we assume animation on tasks is controlled by
recents, and visibility is commited without animation after recents
animation finishes. However starting app transition during recents
breaks this assumption, which ends up with playing one more unexpected
closing animation (so users see closing animation twice).
Bug: 223499269
Bug: 231669960
Test: atest AppTransitionTest + manual tests
Test 1
1. Launch Gmail app
2. Click icon on the bottom tab (e.g. Chat)
3. Swipe up from the bottom (immediately after step 2)
4. Verify closing animation only plays once
Test 2
1. Launch "Google TV"
2. Play a trailer
3. Full screen and PIP mode switch twice
4. Verify PIP window is shown
Test 3
1. Change phone to portlait mode
2. Launch Photo app
3. Swipe up from the bottom
4. Verify no rotation animation on the launcher
Change-Id: Ic18d00812308903db08d3564136f33f1eccf408c