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
First, this cancels the existing pip animation if it is
told to exit. Without this, an exit animation that
starts before an enter animation finishes will have its
state clobbered by the exit's finishTransition call.
Next, make pip-enter transitions queue-up so that they
don't interleave before other queued transitions (very
common during CTS).
Bug: 231150615
Test: atest PinnedStackTests
Change-Id: I7f162c0b1f24ab845770b805c8fae2252814945e
This makes the Tv Pip move away from the dialog in order to not cover
its content
Bug: 227596282
Test: manual: start activity in Pip; start Duo and send:
adb shell cmd sensor_privacy enable 0 microphone && \
adb shell appops start com.google.android.apps.tachyon 27
Change-Id: Ifb0a11cc6c09b2b088d8a28c6016b831f5c57ac9
If an internal system window wants to drop focus from an embedded
window, requestFocusTransfer doesn't need to be called and instead we
can directly call setFocusedWindow. This fixes the case where transfer
focus fails if the old focused window loses visibility by the time the
transfer request arrives. The transfer won't be allowed because the old
window isn't focused anymore so we can't honor the transfer request.
This fix is fine for internal system windows because there's no security
issue with transferring focus from embedded to something WMS computes.
However, there's still a race condition for cases where apps want to
transfer focus from embedded back to host when they are setting
visibility on the embedded window since the embedded window can become
invisible before the transfer goes through.
Test: Pip Menu focus lost
Fixes: 230851770
Change-Id: I09db0bbdf4db6eeaffa30275233811b13ea31132
Merged-In: I09db0bbdf4db6eeaffa30275233811b13ea31132
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
Test: atest AppTransitionTest + manual
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
Change-Id: Id0a8b472b9a3d7cf5b55852de83cbd50b985b834
Reference RCU has 2 models with different numbers of keys.
And some keys have multiple HID key IDs used by different
partners.
This change lists all possible HID key values of reference RCU.
Change-Id: I9c3c93c17701f39b415989ccf066744fb314d29c
bug: 229692045
test: manually tested on tm-dev build
When the activity exits PiP and is reparented to the original Task, the
organizer should handle it as a new launch.
Bug: 225371112
Test: atest WmTests:TaskFragmentTest
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Change-Id: Ia7e32e995a35e167b0d76e701c972b269ae068cc
In general this removes commit b2e3780. Because since rotation
is a part of configuration, it is enough to redraw according to
the configuration change.
Otherwise because forceRelayout is also used for syncRedraw,
that will cause to drop pre-allocated buffers and increase the
time of the initial frames for reallocation.
Bug: 229366100
Test: ActivityRecordTests#testLandscapeSeascapeRotationByApp
Test: Rotate 180 degree with various apps and no upside down
afterimage remains on the screen.
Change-Id: I3f03f7c8674ddc4a8c0b9c0b0528816114075732
The transaction was not applied anymore after the refactor and the
end of animation callback was not correctly set.
Bug: 228202811
Test: com.android.server.wm.BackNavigationControllerTests#backNavInfo_HomeWhenBackToLauncher
Change-Id: Id4635f2988a23ad7e214fb37739ba8dc2c394ee4