SurfaceView: Synchronize visibility changes with VRI frame

There is a flicker in wallpaper picker due to a recent change where
SurfaceView creation changes were synchronized with VRI frame. This
breaks wallpaper picker because wallpaper picker doesn't actually
draw into the SV surface, instead they attach a surface package.

The current implementation meant the SurfacePackage would be visible
before it was scaled correctly.

This fix applies the visibility changes along with the scaling changes.

Test: steps in b/211945947
Fixes: 211945947
Change-Id: I4e5107ac2caf634429e1bec3201fdcaa8f5f92bc
(cherry picked from commit 230677e7b3)
This commit is contained in:
Vishnu Nair
2022-01-05 16:26:17 -08:00
parent 34d9f068d1
commit 1b068c44b3

View File

@@ -975,9 +975,9 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
mParentSurfaceSequenceId = viewRoot.getSurfaceSequenceId();
if (mViewVisibility) {
mTmpTransaction.show(mSurfaceControl);
geometryTransaction.show(mSurfaceControl);
} else {
mTmpTransaction.hide(mSurfaceControl);
geometryTransaction.hide(mSurfaceControl);
}
if (mSurfacePackage != null) {