destroyHardwareResources in onStop()

Bug: 27286867

This hopefully makes everything fully-deterministic. It should
also fix some old annoyances around Bitmap lifecycle as they will
be released earlier in onStop() instead of waiting for
dispatchDetachedFromWindow() which may never happen.

Change-Id: I6e871760650780e327c0e42f62950c1052dd8019
This commit is contained in:
John Reck
2016-02-23 10:35:19 -08:00
parent 791a7df8b2
commit d9b1607bd9

View File

@@ -1072,6 +1072,8 @@ public final class ViewRootImpl implements ViewParent,
mStopped = stopped;
if (!mStopped) {
scheduleTraversals();
} else {
destroyHardwareResources();
}
}
}