Remove "Configure..." option from wallpaper chooser.

Change-Id: Iae9719dc3197ea0ee8e7637456b9d76d9ce8622b
This commit is contained in:
Romain Guy
2009-11-12 17:39:34 -08:00
parent e26d9fc287
commit f2826c7e21
+11 -11
View File
@@ -22,7 +22,6 @@ import android.app.Dialog;
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;
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 @@ public final class Launcher extends Activity
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);
}