diff options
| -rw-r--r-- | api/current.txt | 2 | ||||
| -rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 7 | ||||
| -rw-r--r-- | core/java/android/app/WallpaperManager.java | 17 |
3 files changed, 26 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt index 20c0b55..43d6a95 100644 --- a/api/current.txt +++ b/api/current.txt @@ -4069,10 +4069,12 @@ package android.app { method public void setWallpaperOffsetSteps(float, float); method public void setWallpaperOffsets(android.os.IBinder, float, float); method public void suggestDesiredDimensions(int, int); + field public static final java.lang.String ACTION_CHANGE_LIVE_WALLPAPER = "android.service.wallpaper.CHANGE_LIVE_WALLPAPER"; field public static final java.lang.String ACTION_LIVE_WALLPAPER_CHOOSER = "android.service.wallpaper.LIVE_WALLPAPER_CHOOSER"; field public static final java.lang.String COMMAND_DROP = "android.home.drop"; field public static final java.lang.String COMMAND_SECONDARY_TAP = "android.wallpaper.secondaryTap"; field public static final java.lang.String COMMAND_TAP = "android.wallpaper.tap"; + field public static final java.lang.String EXTRA_LIVE_WALLPAPER_COMPONENT = "android.service.wallpaper.extra.LIVE_WALLPAPER_COMPONENT"; field public static final java.lang.String WALLPAPER_PREVIEW_META_DATA = "android.wallpaper.preview"; } diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index 53a0186..8cd8900 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -194,6 +194,12 @@ public class Am { String key = nextArgRequired(); String value = nextArgRequired(); intent.putExtra(key, Uri.parse(value)); + } else if (opt.equals("--ecn")) { + String key = nextArgRequired(); + String value = nextArgRequired(); + ComponentName cn = ComponentName.unflattenFromString(value); + if (cn == null) throw new IllegalArgumentException("Bad component name: " + value); + intent.putExtra(key, cn); } else if (opt.equals("--eia")) { String key = nextArgRequired(); String value = nextArgRequired(); @@ -1366,6 +1372,7 @@ public class Am { " [--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...]\n" + " [--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...]\n" + " [--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...]\n" + + " [--ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>]\n" + " [--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]\n" + " [--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]\n" + " [--efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]\n" + diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index c057d66..6f19934 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -67,6 +67,23 @@ public class WallpaperManager { = "android.service.wallpaper.LIVE_WALLPAPER_CHOOSER"; /** + * Directly launch live wallpaper preview, allowing the user to immediately + * confirm to switch to a specific live wallpaper. You must specify + * {@link #EXTRA_LIVE_WALLPAPER_COMPONENT} with the ComponentName of + * a live wallpaper component that is to be shown. + */ + public static final String ACTION_CHANGE_LIVE_WALLPAPER + = "android.service.wallpaper.CHANGE_LIVE_WALLPAPER"; + + /** + * Extra in {@link #ACTION_CHANGE_LIVE_WALLPAPER} that specifies the + * ComponentName of a live wallpaper that should be shown as a preview, + * for the user to confirm. + */ + public static final String EXTRA_LIVE_WALLPAPER_COMPONENT + = "android.service.wallpaper.extra.LIVE_WALLPAPER_COMPONENT"; + + /** * Manifest entry for activities that respond to {@link Intent#ACTION_SET_WALLPAPER} * which allows them to provide a custom large icon associated with this action. */ |
