Skip to content

Commit f0cabba

Browse files
Craig MautnerAndroid (Google) Code Review
authored andcommitted
Merge "Fix NPE in setTransparentRegion."
2 parents cd2a3ea + 1f4e0cc commit f0cabba

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6919,8 +6919,6 @@ public void handleMessage(Message msg) {
69196919
(Pair<WindowStateAnimator, Region>) msg.obj;
69206920
final WindowStateAnimator winAnimator = pair.first;
69216921
winAnimator.setTransparentRegionHint(pair.second);
6922-
6923-
scheduleAnimationLocked();
69246922
break;
69256923
}
69266924

services/java/com/android/server/wm/WindowStateAnimator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,10 @@ public void prepareSurfaceLocked(final boolean recoveringMemory) {
943943
}
944944

945945
void setTransparentRegionHint(final Region region) {
946+
if (mSurface == null) {
947+
Slog.w(TAG, "setTransparentRegionHint: null mSurface after mHasSurface true");
948+
return;
949+
}
946950
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
947951
">>> OPEN TRANSACTION setTransparentRegion");
948952
Surface.openTransaction();

0 commit comments

Comments
 (0)