[Unfold animation] Move the dark scrim below
How rotation animation works: * It captures a screenshot of the screen * It puts the screenshot over everything on the screen (in a container with z-index Integer.MAX_VALUE) * Starts the process of resizing windows to the new size. Because the screenshot on top of everything, the resizing is not visible. Black unfold overlay is also added with z-index Integer.MAX_VALUE but because it is added later it is rendered on top of the rotation screenshot. So it is visible how the overlay is resized. Updated z-index of the unfold overlay to render below the rotation animation screenshot to hide it while we are rotating. Bug: 258213952 Bug: 255955520 Test: manual fold and going to tabletop mode after rotating (see comparison videos in the CL) Change-Id: I5e9b5c72dfa28e4ae9f447ad8df7b403c97bf43e
This commit is contained in:
@@ -94,7 +94,7 @@ constructor(
|
||||
overlayContainer = builder.build()
|
||||
|
||||
SurfaceControl.Transaction()
|
||||
.setLayer(overlayContainer, Integer.MAX_VALUE)
|
||||
.setLayer(overlayContainer, UNFOLD_OVERLAY_LAYER_Z_INDEX)
|
||||
.show(overlayContainer)
|
||||
.apply()
|
||||
|
||||
@@ -268,4 +268,12 @@ constructor(
|
||||
this.isFolded = isFolded
|
||||
}
|
||||
)
|
||||
|
||||
private companion object {
|
||||
private const val ROTATION_ANIMATION_OVERLAY_Z_INDEX = Integer.MAX_VALUE
|
||||
|
||||
// Put the unfold overlay below the rotation animation screenshot to hide the moment
|
||||
// when it is rotated but the rotation of the other windows hasn't happen yet
|
||||
private const val UNFOLD_OVERLAY_LAYER_Z_INDEX = ROTATION_ANIMATION_OVERLAY_Z_INDEX - 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user