diff options
| author | 2015-11-09 12:42:37 -0800 | |
|---|---|---|
| committer | 2015-11-09 12:46:40 -0800 | |
| commit | f9e0978a053edde92ce3c1bfadaec2c02bc89ddc (patch) | |
| tree | 6a360784ac35ef1890ccd90edc6230b3fa874c3d | |
| parent | 42817202e2dc1b3d2969faab93b01345b3c9f4a2 (diff) | |
Added removed null checks around calls to WindowSurfaceController
The checks were removed in the refactor in
e6a8351bc715999d1e42dcc1003a6eda6c318dd9
Bug: 25564523
Change-Id: Ia7c571fa48bc5c14bb76c3aa5b6fcbcc7323ed2f
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowStateAnimator.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index 91755ac879b0..491a2ae977ee 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -475,7 +475,9 @@ class WindowStateAnimator { if (!mLastHidden) { //dump(); mLastHidden = true; - mSurfaceController.hideInTransaction(reason); + if (mSurfaceController != null) { + mSurfaceController.hideInTransaction(reason); + } } } @@ -537,7 +539,9 @@ class WindowStateAnimator { return; } if (SHOW_TRANSACTIONS) WindowManagerService.logSurface(mWin, "SET FREEZE LAYER", null); - mSurfaceController.setLayer(mAnimLayer + 1); + if (mSurfaceController != null) { + mSurfaceController.setLayer(mAnimLayer + 1); + } mDestroyPreservedSurfaceUponRedraw = true; mSurfaceDestroyDeferred = true; destroySurfaceLocked(); @@ -1327,6 +1331,10 @@ class WindowStateAnimator { } void setTransparentRegionHintLocked(final Region region) { + if (mSurfaceController == null) { + Slog.w(TAG, "setTransparentRegionHint: null mSurface after mHasSurface true"); + return; + } mSurfaceController.setTransparentRegionHint(region); } @@ -1373,10 +1381,16 @@ class WindowStateAnimator { } void setOpaqueLocked(boolean isOpaque) { + if (mSurfaceController == null) { + return; + } mSurfaceController.setOpaque(isOpaque); } void setSecureLocked(boolean isSecure) { + if (mSurfaceController == null) { + return; + } mSurfaceController.setSecure(isSecure); } |