summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/AllAppsView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/AllAppsView.java')
-rw-r--r--src/com/android/launcher2/AllAppsView.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 8ee995cfe..baa717489 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -157,6 +157,13 @@ public class AllAppsView extends RSSurfaceView
setOnLongClickListener(this);
setZOrderOnTop(true);
getHolder().setFormat(PixelFormat.TRANSLUCENT);
+
+ mRS = createRenderScript(true);
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ destroyRenderScript();
}
/**
@@ -192,8 +199,7 @@ public class AllAppsView extends RSSurfaceView
super.surfaceChanged(holder, format, w, h);
- if (mRS == null) {
- mRS = createRenderScript(true);
+ if (mRollo == null) {
mRollo = new RolloRS();
mRollo.mHasSurface = true;
mRollo.init(getResources(), w, h);
@@ -204,11 +210,10 @@ public class AllAppsView extends RSSurfaceView
gainFocus();
mShouldGainFocus = false;
}
- mRollo.dirtyCheck();
} else {
mRollo.mHasSurface = true;
- mRollo.dirtyCheck();
}
+ mRollo.dirtyCheck();
mRS.mMessageCallback = mMessageProc = new AAMessage();
@@ -298,7 +303,7 @@ public class AllAppsView extends RSSurfaceView
public boolean onKeyDown(int keyCode, KeyEvent event) {
boolean handled = false;
-
+
if (!isVisible()) {
return false;
}