Fix WallpaperWindowToken visible update with Shell transition
With Shell transition, when mVisibleRequested is changed, it will wait until the transition finish to update the isVisible(). As a result, if there is a visible change before the previous transition is finished, it will be skipped. For example, when we first open a fullscreen app and then immediately enter pip: 1. TRANSIT_OPEN will call to hide wallpaper and set mVisibleRequest to false, but not commit visible until transition animation is finished. 2. TRANSIT_PIP will call to show wallpaper, but if it is started before the OPEN transition is finsihed, it will not update the wallpaper mVisibleRequested, which will leave the wallpaper hidden. Fix: 210965575 Bug: 210965692 Test: atest WMShellFlickerTests:ExpandPipOnDoubleClickTest Change-Id: I2578aafd024a3c9a6ec96079d4dc6cb740c890d2
This commit is contained in:
@@ -26,9 +26,6 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory
|
||||
import com.android.server.wm.flicker.LAUNCHER_COMPONENT
|
||||
import com.android.server.wm.flicker.annotation.Group3
|
||||
import com.android.server.wm.flicker.dsl.FlickerBuilder
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume.assumeFalse
|
||||
import org.junit.Before
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -65,12 +62,6 @@ class ExpandPipOnDoubleClickTest(testSpec: FlickerTestParameter) : PipTransition
|
||||
}
|
||||
}
|
||||
|
||||
@Before
|
||||
fun onBefore() {
|
||||
// This CUJ don't work in shell transitions because of b/204570898 b/204562589
|
||||
assumeFalse(isShellTransitionsEnabled)
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the pip app window remains inside the display bounds throughout the whole
|
||||
* animation
|
||||
|
||||
@@ -107,7 +107,7 @@ class WallpaperWindowToken extends WindowToken {
|
||||
/** Returns {@code true} if visibility is changed. */
|
||||
boolean updateWallpaperWindows(boolean visible) {
|
||||
boolean changed = false;
|
||||
if (isVisible() != visible) {
|
||||
if (mVisibleRequested != visible) {
|
||||
ProtoLog.d(WM_DEBUG_WALLPAPER, "Wallpaper token %s visible=%b",
|
||||
token, visible);
|
||||
setVisibility(visible);
|
||||
|
||||
Reference in New Issue
Block a user