Merge "Check if the sc is valid when finishing seamless rotation" into sc-dev

This commit is contained in:
Vishnu Nair
2021-03-15 19:05:38 +00:00
committed by Android (Google) Code Review

View File

@@ -102,6 +102,10 @@ public class SeamlessRotator {
* window in the new orientation.
*/
void finish(Transaction t, WindowContainer win) {
if (win.mSurfaceControl == null || !win.mSurfaceControl.isValid()) {
return;
}
mTransform.reset();
t.setMatrix(win.mSurfaceControl, mTransform, mFloat9);
t.setPosition(win.mSurfaceControl, win.mLastSurfacePosition.x, win.mLastSurfacePosition.y);