Merge "ActivityRecordInputSink: Ensure timely release of SurfaceControl" into tm-dev

This commit is contained in:
TreeHugger Robot
2022-04-12 02:17:45 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 0 deletions

View File

@@ -3967,6 +3967,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
} else {
onRemovedFromDisplay();
}
mActivityRecordInputSink.releaseSurfaceControl();
super.removeImmediately();
}

View File

@@ -99,4 +99,11 @@ class ActivityRecordInputSink {
return inputWindowHandle;
}
void releaseSurfaceControl() {
if (mSurfaceControl != null) {
mSurfaceControl.release();
mSurfaceControl = null;
}
}
}