diff options
| author | 2016-07-15 15:59:23 -0700 | |
|---|---|---|
| committer | 2016-07-15 15:59:23 -0700 | |
| commit | 41dc83bd578c12a481a42357ca51a8cab82ce54c (patch) | |
| tree | 25e2ea50dcdb39ac94ada0cabfc910b37301c61f | |
| parent | d5b43852dcce39d260bce2562542b3dce4c8b588 (diff) | |
Document that WallpaperManager.getDrawable() can return null
Bug 30164766
Change-Id: Idc03a41ea3fab3772de4f24551765dff78eb6d7f
| -rw-r--r-- | core/java/android/app/WallpaperManager.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index 53da4e32eb8a..2ee92a6ec778 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -417,8 +417,14 @@ public class WallpaperManager { * This is returned as an * abstract Drawable that you can install in a View to display whatever * wallpaper the user has currently set. - * - * @return Returns a Drawable object that will draw the wallpaper. + * <p> + * This method can return null if there is no system wallpaper available, if + * wallpapers are not supported in the current user, or if the calling app is not + * permitted to access the system wallpaper. + * + * @return Returns a Drawable object that will draw the system wallpaper, + * or {@code null} if no system wallpaper exists or if the calling application + * is not able to access the wallpaper. */ public Drawable getDrawable() { Bitmap bm = sGlobals.peekWallpaperBitmap(mContext, true, FLAG_SYSTEM); |