am 172b1e24: am 477f9cd5: am 81134796: Fix leak when receiving multiple surface changed messages, typically when exiting a landscape app.
Merge commit '172b1e24a3f2d775f7721ff33751773a59c68a4d'
* commit '172b1e24a3f2d775f7721ff33751773a59c68a4d':
Fix leak when receiving multiple surface changed messages, typically when exiting a landscape app.
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index d842f2d..2dd3b4d 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -166,6 +166,12 @@
long startTime = SystemClock.uptimeMillis();
+ if (mRS != null) {
+ destroyRenderScript();
+ mRS = null;
+ mRollo = null;
+ }
+
mRS = createRenderScript(true);
mRollo = new RolloRS();
mRollo.init(getResources(), w, h);