File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed
cmds/am/src/com/android/commands/am Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -4069,10 +4069,12 @@ package android.app {
40694069 method public void setWallpaperOffsetSteps(float, float);
40704070 method public void setWallpaperOffsets(android.os.IBinder, float, float);
40714071 method public void suggestDesiredDimensions(int, int);
4072+ field public static final java.lang.String ACTION_CHANGE_LIVE_WALLPAPER = "android.service.wallpaper.CHANGE_LIVE_WALLPAPER";
40724073 field public static final java.lang.String ACTION_LIVE_WALLPAPER_CHOOSER = "android.service.wallpaper.LIVE_WALLPAPER_CHOOSER";
40734074 field public static final java.lang.String COMMAND_DROP = "android.home.drop";
40744075 field public static final java.lang.String COMMAND_SECONDARY_TAP = "android.wallpaper.secondaryTap";
40754076 field public static final java.lang.String COMMAND_TAP = "android.wallpaper.tap";
4077+ field public static final java.lang.String EXTRA_LIVE_WALLPAPER_COMPONENT = "android.service.wallpaper.extra.LIVE_WALLPAPER_COMPONENT";
40764078 field public static final java.lang.String WALLPAPER_PREVIEW_META_DATA = "android.wallpaper.preview";
40774079 }
40784080
Original file line number Diff line number Diff line change @@ -194,6 +194,12 @@ private Intent makeIntent() throws URISyntaxException {
194194 String key = nextArgRequired ();
195195 String value = nextArgRequired ();
196196 intent .putExtra (key , Uri .parse (value ));
197+ } else if (opt .equals ("--ecn" )) {
198+ String key = nextArgRequired ();
199+ String value = nextArgRequired ();
200+ ComponentName cn = ComponentName .unflattenFromString (value );
201+ if (cn == null ) throw new IllegalArgumentException ("Bad component name: " + value );
202+ intent .putExtra (key , cn );
197203 } else if (opt .equals ("--eia" )) {
198204 String key = nextArgRequired ();
199205 String value = nextArgRequired ();
@@ -1366,6 +1372,7 @@ private static void showUsage() {
13661372 " [--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...]\n " +
13671373 " [--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...]\n " +
13681374 " [--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...]\n " +
1375+ " [--ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>]\n " +
13691376 " [--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]\n " +
13701377 " [--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]\n " +
13711378 " [--efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]\n " +
Original file line number Diff line number Diff line change @@ -66,6 +66,23 @@ public class WallpaperManager {
6666 public static final String ACTION_LIVE_WALLPAPER_CHOOSER
6767 = "android.service.wallpaper.LIVE_WALLPAPER_CHOOSER" ;
6868
69+ /**
70+ * Directly launch live wallpaper preview, allowing the user to immediately
71+ * confirm to switch to a specific live wallpaper. You must specify
72+ * {@link #EXTRA_LIVE_WALLPAPER_COMPONENT} with the ComponentName of
73+ * a live wallpaper component that is to be shown.
74+ */
75+ public static final String ACTION_CHANGE_LIVE_WALLPAPER
76+ = "android.service.wallpaper.CHANGE_LIVE_WALLPAPER" ;
77+
78+ /**
79+ * Extra in {@link #ACTION_CHANGE_LIVE_WALLPAPER} that specifies the
80+ * ComponentName of a live wallpaper that should be shown as a preview,
81+ * for the user to confirm.
82+ */
83+ public static final String EXTRA_LIVE_WALLPAPER_COMPONENT
84+ = "android.service.wallpaper.extra.LIVE_WALLPAPER_COMPONENT" ;
85+
6986 /**
7087 * Manifest entry for activities that respond to {@link Intent#ACTION_SET_WALLPAPER}
7188 * which allows them to provide a custom large icon associated with this action.
You can’t perform that action at this time.
0 commit comments