Merge "Check if SC is valid before calling setTransparentRegionHint" into sc-dev

This commit is contained in:
Chavi Weingarten
2021-02-11 17:47:48 +00:00
committed by Android (Google) Code Review

View File

@@ -3064,8 +3064,10 @@ public final class ViewRootImpl implements ViewParent,
// via the WM relayout code path. We probably eventually
// want to synchronize transparent region hint changes
// with draws.
mTransaction.setTransparentRegionHint(getSurfaceControl(),
mTransparentRegion).apply();
SurfaceControl sc = getSurfaceControl();
if (sc.isValid()) {
mTransaction.setTransparentRegionHint(sc, mTransparentRegion).apply();
}
}
}