Merge change I464c055a into eclair
* changes:
Bug 2244530 - Disable the attempt at not flickering. It's interfering with the frame rate while rollo animates in.
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 8ee995c..baa7174 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -157,6 +157,13 @@
setOnLongClickListener(this);
setZOrderOnTop(true);
getHolder().setFormat(PixelFormat.TRANSLUCENT);
+
+ mRS = createRenderScript(true);
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ destroyRenderScript();
}
/**
@@ -192,8 +199,7 @@
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 @@
gainFocus();
mShouldGainFocus = false;
}
- mRollo.dirtyCheck();
} else {
mRollo.mHasSurface = true;
- mRollo.dirtyCheck();
}
+ mRollo.dirtyCheck();
mRS.mMessageCallback = mMessageProc = new AAMessage();
@@ -298,7 +303,7 @@
public boolean onKeyDown(int keyCode, KeyEvent event) {
boolean handled = false;
-
+
if (!isVisible()) {
return false;
}
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 6ca4624..c04176f 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -22,7 +22,6 @@
import android.app.ISearchManager;
import android.app.SearchManager;
import android.app.StatusBarManager;
-import android.app.WallpaperInfo;
import android.app.WallpaperManager;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
@@ -34,7 +33,6 @@
import android.content.Intent.ShortcutIconResource;
import android.content.IntentFilter;
import android.content.pm.ActivityInfo;
-import android.content.pm.LabeledIntent;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Configuration;
@@ -1288,15 +1286,17 @@
final Intent pickWallpaper = new Intent(Intent.ACTION_SET_WALLPAPER);
Intent chooser = Intent.createChooser(pickWallpaper,
getText(R.string.chooser_wallpaper));
- WallpaperManager wm = (WallpaperManager)
- getSystemService(Context.WALLPAPER_SERVICE);
- WallpaperInfo wi = wm.getWallpaperInfo();
- if (wi != null && wi.getSettingsActivity() != null) {
- LabeledIntent li = new LabeledIntent(getPackageName(),
- R.string.configure_wallpaper, 0);
- li.setClassName(wi.getPackageName(), wi.getSettingsActivity());
- chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] { li });
- }
+ // NOTE: Adds a configure option to the chooser if the wallpaper supports it
+ // Removed in Eclair MR1
+// WallpaperManager wm = (WallpaperManager)
+// getSystemService(Context.WALLPAPER_SERVICE);
+// WallpaperInfo wi = wm.getWallpaperInfo();
+// if (wi != null && wi.getSettingsActivity() != null) {
+// LabeledIntent li = new LabeledIntent(getPackageName(),
+// R.string.configure_wallpaper, 0);
+// li.setClassName(wi.getPackageName(), wi.getSettingsActivity());
+// chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] { li });
+// }
startActivityForResult(chooser, REQUEST_PICK_WALLPAPER);
}