Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5723,6 +5723,7 @@ package android.app { method public android.graphics.drawable.Drawable getFastDrawable(); method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.os.ParcelFileDescriptor getWallpaperFile(int); method public int getWallpaperId(int); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed(); api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5857,6 +5857,7 @@ package android.app { method public android.graphics.drawable.Drawable getFastDrawable(); method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.os.ParcelFileDescriptor getWallpaperFile(int); method public int getWallpaperId(int); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed(); api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5727,6 +5727,7 @@ package android.app { method public android.graphics.drawable.Drawable getFastDrawable(); method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.os.ParcelFileDescriptor getWallpaperFile(int); method public int getWallpaperId(int); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed(); core/java/android/app/IWallpaperManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,11 @@ interface IWallpaperManager { ParcelFileDescriptor getWallpaper(IWallpaperManagerCallback cb, int which, out Bundle outParams, int userId); /** * Retrieve the given user's current wallpaper ID of the given kind. */ int getWallpaperIdForUser(int which, int userId); /** * If the current system wallpaper is a live wallpaper component, return the * information about that wallpaper. Otherwise, if it is a static image, Loading core/java/android/app/WallpaperManager.java +32 −0 Original line number Diff line number Diff line Loading @@ -725,6 +725,38 @@ public class WallpaperManager { } } /** * Get the ID of the current wallpaper of the given kind. If there is no * such wallpaper configured, returns a negative number. * * @param which The wallpaper whose ID is to be returned. Must be a single * defined kind of wallpaper, either {@link #FLAG_SET_SYSTEM} or * {@link #FLAG_SET_LOCK}. * @return The positive numeric ID of the current wallpaper of the given kind, * or a negative value if no such wallpaper is configured. */ public int getWallpaperId(int which) { return getWallpaperIdForUser(which, mContext.getUserId()); } /** * Get the ID of the given user's current wallpaper of the given kind. If there * is no such wallpaper configured, returns a negative number. * @hide */ public int getWallpaperIdForUser(int which, int userId) { try { if (sGlobals.mService == null) { Log.w(TAG, "WallpaperService not running"); return -1; } else { return sGlobals.mService.getWallpaperIdForUser(which, userId); } } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Gets an Intent that will launch an activity that crops the given * image and sets the device's wallpaper. If there is a default HOME activity Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5723,6 +5723,7 @@ package android.app { method public android.graphics.drawable.Drawable getFastDrawable(); method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.os.ParcelFileDescriptor getWallpaperFile(int); method public int getWallpaperId(int); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed();
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5857,6 +5857,7 @@ package android.app { method public android.graphics.drawable.Drawable getFastDrawable(); method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.os.ParcelFileDescriptor getWallpaperFile(int); method public int getWallpaperId(int); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed();
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5727,6 +5727,7 @@ package android.app { method public android.graphics.drawable.Drawable getFastDrawable(); method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.os.ParcelFileDescriptor getWallpaperFile(int); method public int getWallpaperId(int); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed();
core/java/android/app/IWallpaperManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,11 @@ interface IWallpaperManager { ParcelFileDescriptor getWallpaper(IWallpaperManagerCallback cb, int which, out Bundle outParams, int userId); /** * Retrieve the given user's current wallpaper ID of the given kind. */ int getWallpaperIdForUser(int which, int userId); /** * If the current system wallpaper is a live wallpaper component, return the * information about that wallpaper. Otherwise, if it is a static image, Loading
core/java/android/app/WallpaperManager.java +32 −0 Original line number Diff line number Diff line Loading @@ -725,6 +725,38 @@ public class WallpaperManager { } } /** * Get the ID of the current wallpaper of the given kind. If there is no * such wallpaper configured, returns a negative number. * * @param which The wallpaper whose ID is to be returned. Must be a single * defined kind of wallpaper, either {@link #FLAG_SET_SYSTEM} or * {@link #FLAG_SET_LOCK}. * @return The positive numeric ID of the current wallpaper of the given kind, * or a negative value if no such wallpaper is configured. */ public int getWallpaperId(int which) { return getWallpaperIdForUser(which, mContext.getUserId()); } /** * Get the ID of the given user's current wallpaper of the given kind. If there * is no such wallpaper configured, returns a negative number. * @hide */ public int getWallpaperIdForUser(int which, int userId) { try { if (sGlobals.mService == null) { Log.w(TAG, "WallpaperService not running"); return -1; } else { return sGlobals.mService.getWallpaperIdForUser(which, userId); } } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Gets an Intent that will launch an activity that crops the given * image and sets the device's wallpaper. If there is a default HOME activity Loading