diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-11-18 18:20:39 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2009-11-18 18:34:19 -0800 |
commit | 23ef7b4836d66d31430fedee2aac36275bb30d4b (patch) | |
tree | 9a9eeddb6fb4f8fdda376694c5f09ba7a081d6e4 /core/java/android | |
parent | d2a9f54f9ec997562623091d404e0208fd9ce5f8 (diff) | |
download | frameworks_base-23ef7b4836d66d31430fedee2aac36275bb30d4b.zip frameworks_base-23ef7b4836d66d31430fedee2aac36275bb30d4b.tar.gz frameworks_base-23ef7b4836d66d31430fedee2aac36275bb30d4b.tar.bz2 |
Fix most of issue #2271640: Fix wallpaper etc docs
Only thing remaining is the live wallpaper feature.
Change-Id: I8854c7978999d759bf618307f4f984c9c89d3fc8
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/app/WallpaperInfo.java | 4 | ||||
-rw-r--r-- | core/java/android/app/WallpaperManager.java | 17 | ||||
-rw-r--r-- | core/java/android/os/Build.java | 5 | ||||
-rw-r--r-- | core/java/android/service/wallpaper/WallpaperService.java | 13 | ||||
-rw-r--r-- | core/java/android/service/wallpaper/WallpaperSettingsActivity.java | 1 |
5 files changed, 36 insertions, 4 deletions
diff --git a/core/java/android/app/WallpaperInfo.java b/core/java/android/app/WallpaperInfo.java index 34d3133..1034fab 100644 --- a/core/java/android/app/WallpaperInfo.java +++ b/core/java/android/app/WallpaperInfo.java @@ -101,10 +101,10 @@ public final class WallpaperInfo implements Parcelable { com.android.internal.R.styleable.Wallpaper_thumbnail, -1); authorRes = sa.getResourceId( - com.android.internal.R.styleable.Wallpaper_wallpaperAuthor, + com.android.internal.R.styleable.Wallpaper_author, -1); descriptionRes = sa.getResourceId( - com.android.internal.R.styleable.Wallpaper_wallpaperDescription, + com.android.internal.R.styleable.Wallpaper_description, -1); sa.recycle(); diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index f606346..e455a59 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -63,6 +63,21 @@ public class WallpaperManager { public static final String ACTION_LIVE_WALLPAPER_CHOOSER = "android.service.wallpaper.LIVE_WALLPAPER_CHOOSER"; + /** + * Command for {@link #sendWallpaperCommand}: reported by the wallpaper + * host when the user taps on an empty area (not performing an action + * in the host). The x and y arguments are the location of the tap in + * screen coordinates. + */ + public static final String COMMAND_TAP = "android.wallpaper.tap"; + + /** + * Command for {@link #sendWallpaperCommand}: reported by the wallpaper + * host when the user drops an object into an area of the host. The x + * and y arguments are the location of the drop. + */ + public static final String COMMAND_DROP = "android.home.drop"; + private final Context mContext; /** @@ -604,7 +619,7 @@ public class WallpaperManager { /** * For applications that use multiple virtual screens showing a wallpaper, * specify the step size between virtual screens. For example, if the - * launcher has 5 virtual screens, it would specify an xStep of 0.5, + * launcher has 3 virtual screens, it would specify an xStep of 0.5, * since the X offset for those screens are 0.0, 0.5 and 1.0 * @param xStep The X offset delta from one screen to the next one * @param yStep The Y offset delta from one screen to the next one diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java index ee18e88..e9353d8 100644 --- a/core/java/android/os/Build.java +++ b/core/java/android/os/Build.java @@ -161,6 +161,11 @@ public class Build { * December 2009: Android 2.0.1 */ public static final int ECLAIR_0_1 = 6; + + /** + * January 2010: Android 2.1 + */ + public static final int ECLAIR_MR1 = 7; } /** The type of build, like "user" or "eng". */ diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index b29d837..8000ad3 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -46,7 +46,12 @@ import android.view.WindowManagerImpl; /** * A wallpaper service is responsible for showing a live wallpaper behind - * applications that would like to sit on top of it. + * applications that would like to sit on top of it. This service object + * itself does very little -- its only purpose is to generate instances of + * {@link WallpaperSerice.Engine} as needed. Implementing a wallpaper thus + * involves subclassing from this, subclassing an Engine implementation, + * and implementing {@link #onCreateEngine()} to return a new instance of + * your engine. */ public abstract class WallpaperService extends Service { /** @@ -861,5 +866,11 @@ public abstract class WallpaperService extends Service { mCallbackLooper = looper; } + /** + * Must be implemented to return a new instance of the wallpaper's engine. + * Note that multiple instances may be active at the same time, such as + * when the wallpaper is currently set as the active wallpaper and the user + * is in the wallpaper picker viewing a preview of it as well. + */ public abstract Engine onCreateEngine(); } diff --git a/core/java/android/service/wallpaper/WallpaperSettingsActivity.java b/core/java/android/service/wallpaper/WallpaperSettingsActivity.java index 501947d..aca336f 100644 --- a/core/java/android/service/wallpaper/WallpaperSettingsActivity.java +++ b/core/java/android/service/wallpaper/WallpaperSettingsActivity.java @@ -24,6 +24,7 @@ import android.preference.PreferenceActivity; * Base class for activities that will be used to configure the settings of * a wallpaper. You should derive from this class to allow it to select the * proper theme of the activity depending on how it is being used. + * @hide */ public class WallpaperSettingsActivity extends PreferenceActivity { /** |