Loading services/core/java/com/android/server/wm/WindowManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -8851,7 +8851,7 @@ public class WindowManagerService extends IWindowManager.Stub + " pid=" + ws.mSession.mPid + " uid=" + ws.mSession.mUid); wsa.destroySurface(); ws.mHasSurface = false; ws.setHasSurface(false); mForceRemoves.add(ws); leakedSurface = true; } else if (ws.mAppToken != null && ws.mAppToken.clientHidden) { Loading @@ -8861,7 +8861,7 @@ public class WindowManagerService extends IWindowManager.Stub + " saved=" + ws.mAppToken.mHasSavedSurface); if (SHOW_TRANSACTIONS) logSurface(ws, "LEAK DESTROY", null); wsa.destroySurface(); ws.mHasSurface = false; ws.setHasSurface(false); ws.mAppToken.mHasSavedSurface = false; leakedSurface = true; } Loading Loading @@ -8908,7 +8908,7 @@ public class WindowManagerService extends IWindowManager.Stub if (SHOW_TRANSACTIONS || SHOW_SURFACE_ALLOC) logSurface(winAnimator.mWin, "RECOVER DESTROY", null); surfaceController.destroyInTransaction(); winAnimator.mWin.mHasSurface = false; winAnimator.mWin.setHasSurface(false); scheduleRemoveStartingWindowLocked(winAnimator.mWin.mAppToken); } Loading services/core/java/com/android/server/wm/WindowState.java +4 −0 Original line number Diff line number Diff line Loading @@ -1295,6 +1295,10 @@ final class WindowState implements WindowManagerPolicy.WindowState { mConfigHasChanged = false; } void setHasSurface(boolean hasSurface) { mHasSurface = hasSurface; } private final class DeadWindowEventReceiver extends InputEventReceiver { DeadWindowEventReceiver(InputChannel inputChannel) { super(inputChannel, mService.mH.getLooper()); Loading services/core/java/com/android/server/wm/WindowStateAnimator.java +13 −6 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ class WindowStateAnimator { */ boolean mSurfaceResized; WindowSurfaceController mSurfaceController; WindowSurfaceController mPendingDestroySurface; private WindowSurfaceController mPendingDestroySurface; /** * Set if the client has asked that the destroy of its surface be delayed Loading @@ -110,7 +110,7 @@ class WindowStateAnimator { */ boolean mSurfaceDestroyDeferred; boolean mDestroyPreservedSurfaceUponRedraw; private boolean mDestroyPreservedSurfaceUponRedraw; float mShownAlpha = 0; float mAlpha = 0; float mLastAlpha = 0; Loading Loading @@ -654,7 +654,7 @@ class WindowStateAnimator { attrs.getTitle().toString(), width, height, format, flags, this); w.mHasSurface = true; w.setHasSurface(true); if (SHOW_TRANSACTIONS || SHOW_SURFACE_ALLOC) { Slog.i(TAG, " CREATE SURFACE " Loading @@ -666,13 +666,13 @@ class WindowStateAnimator { + " / " + this); } } catch (OutOfResourcesException e) { w.mHasSurface = false; w.setHasSurface(false); Slog.w(TAG, "OutOfResourcesException creating surface"); mService.reclaimSomeSurfaceMemoryLocked(this, "create", true); mDrawState = NO_SURFACE; return null; } catch (Exception e) { w.mHasSurface = false; w.setHasSurface(false); Slog.e(TAG, "Exception creating surface", e); mDrawState = NO_SURFACE; return null; Loading Loading @@ -759,7 +759,14 @@ class WindowStateAnimator { + ": " + e.toString()); } mWin.mHasSurface = false; // Whether the surface was preserved (and copied to mPendingDestroySurface) or not, it // needs to be cleared to match the WindowState.mHasSurface state. It is also necessary // so it can be recreated successfully in mPendingDestroySurface case. mWin.setHasSurface(false); if (mSurfaceController != null) { mSurfaceController.setShown(false); } mSurfaceController = null; mDrawState = NO_SURFACE; } } Loading services/core/java/com/android/server/wm/WindowSurfaceController.java +4 −0 Original line number Diff line number Diff line Loading @@ -364,6 +364,10 @@ class WindowSurfaceController { return mSurfaceShown; } void setShown(boolean surfaceShown) { mSurfaceShown = surfaceShown; } float getX() { return mSurfaceX; } Loading Loading
services/core/java/com/android/server/wm/WindowManagerService.java +3 −3 Original line number Diff line number Diff line Loading @@ -8851,7 +8851,7 @@ public class WindowManagerService extends IWindowManager.Stub + " pid=" + ws.mSession.mPid + " uid=" + ws.mSession.mUid); wsa.destroySurface(); ws.mHasSurface = false; ws.setHasSurface(false); mForceRemoves.add(ws); leakedSurface = true; } else if (ws.mAppToken != null && ws.mAppToken.clientHidden) { Loading @@ -8861,7 +8861,7 @@ public class WindowManagerService extends IWindowManager.Stub + " saved=" + ws.mAppToken.mHasSavedSurface); if (SHOW_TRANSACTIONS) logSurface(ws, "LEAK DESTROY", null); wsa.destroySurface(); ws.mHasSurface = false; ws.setHasSurface(false); ws.mAppToken.mHasSavedSurface = false; leakedSurface = true; } Loading Loading @@ -8908,7 +8908,7 @@ public class WindowManagerService extends IWindowManager.Stub if (SHOW_TRANSACTIONS || SHOW_SURFACE_ALLOC) logSurface(winAnimator.mWin, "RECOVER DESTROY", null); surfaceController.destroyInTransaction(); winAnimator.mWin.mHasSurface = false; winAnimator.mWin.setHasSurface(false); scheduleRemoveStartingWindowLocked(winAnimator.mWin.mAppToken); } Loading
services/core/java/com/android/server/wm/WindowState.java +4 −0 Original line number Diff line number Diff line Loading @@ -1295,6 +1295,10 @@ final class WindowState implements WindowManagerPolicy.WindowState { mConfigHasChanged = false; } void setHasSurface(boolean hasSurface) { mHasSurface = hasSurface; } private final class DeadWindowEventReceiver extends InputEventReceiver { DeadWindowEventReceiver(InputChannel inputChannel) { super(inputChannel, mService.mH.getLooper()); Loading
services/core/java/com/android/server/wm/WindowStateAnimator.java +13 −6 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ class WindowStateAnimator { */ boolean mSurfaceResized; WindowSurfaceController mSurfaceController; WindowSurfaceController mPendingDestroySurface; private WindowSurfaceController mPendingDestroySurface; /** * Set if the client has asked that the destroy of its surface be delayed Loading @@ -110,7 +110,7 @@ class WindowStateAnimator { */ boolean mSurfaceDestroyDeferred; boolean mDestroyPreservedSurfaceUponRedraw; private boolean mDestroyPreservedSurfaceUponRedraw; float mShownAlpha = 0; float mAlpha = 0; float mLastAlpha = 0; Loading Loading @@ -654,7 +654,7 @@ class WindowStateAnimator { attrs.getTitle().toString(), width, height, format, flags, this); w.mHasSurface = true; w.setHasSurface(true); if (SHOW_TRANSACTIONS || SHOW_SURFACE_ALLOC) { Slog.i(TAG, " CREATE SURFACE " Loading @@ -666,13 +666,13 @@ class WindowStateAnimator { + " / " + this); } } catch (OutOfResourcesException e) { w.mHasSurface = false; w.setHasSurface(false); Slog.w(TAG, "OutOfResourcesException creating surface"); mService.reclaimSomeSurfaceMemoryLocked(this, "create", true); mDrawState = NO_SURFACE; return null; } catch (Exception e) { w.mHasSurface = false; w.setHasSurface(false); Slog.e(TAG, "Exception creating surface", e); mDrawState = NO_SURFACE; return null; Loading Loading @@ -759,7 +759,14 @@ class WindowStateAnimator { + ": " + e.toString()); } mWin.mHasSurface = false; // Whether the surface was preserved (and copied to mPendingDestroySurface) or not, it // needs to be cleared to match the WindowState.mHasSurface state. It is also necessary // so it can be recreated successfully in mPendingDestroySurface case. mWin.setHasSurface(false); if (mSurfaceController != null) { mSurfaceController.setShown(false); } mSurfaceController = null; mDrawState = NO_SURFACE; } } Loading
services/core/java/com/android/server/wm/WindowSurfaceController.java +4 −0 Original line number Diff line number Diff line Loading @@ -364,6 +364,10 @@ class WindowSurfaceController { return mSurfaceShown; } void setShown(boolean surfaceShown) { mSurfaceShown = surfaceShown; } float getX() { return mSurfaceX; } Loading