diff options
| author | Robert Carr <racarr@google.com> | 2018-04-12 12:33:23 -0700 |
|---|---|---|
| committer | Robert Carr <racarr@google.com> | 2018-04-12 16:08:42 -0700 |
| commit | 35274cb0ce90ce4381e534d1c04c9d919eb588fc (patch) | |
| tree | 477b811da65f6e5e1b5c2a2ae2337dfce09c2976 /core/java/android/view/ViewRootImpl.java | |
| parent | 8ec69c71a73f00b7900ae35cd7e40e4c12ab8af4 (diff) | |
ViewRoot: Ensure we release surface from setWindowStopped.
Otherwise, we may attempt to reinitialize the ThreadedRenderer with
a Surface which is not actually valid, e.g. from handleWindowFocusChanged.
Entering a code path where the threaded renderer does not heed the
stopped signal. This change ensures isValid returns false when the Surface
is not valid preventing us from calling initialize/initializeIfNeeded, or
udpateSurface.
Bug: 62536731
Test: For the monkeys.
Change-Id: I65939a29db4db70c6eb6bc4b258a9ed09a86e0ce
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index f6d9a16e4246..722d54ad4d87 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1334,6 +1334,7 @@ public final class ViewRootImpl implements ViewParent, if (renderer != null) { renderer.destroyHardwareResources(mView); } + mSurface.release(); } for (int i = 0; i < mWindowStoppedCallbacks.size(); i++) { |
