Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5705,6 +5705,7 @@ package android.app { method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed(); method public boolean isWallpaperSupported(); method public android.graphics.drawable.Drawable peekDrawable(); method public android.graphics.drawable.Drawable peekFastDrawable(); Loading Loading @@ -29264,6 +29265,7 @@ package android.os { field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; field public static final java.lang.String DISALLOW_SAFE_BOOT = "no_safe_boot"; field public static final java.lang.String DISALLOW_SET_USER_ICON = "no_set_user_icon"; field public static final java.lang.String DISALLOW_SET_WALLPAPER = "no_set_wallpaper"; field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location"; field public static final java.lang.String DISALLOW_SMS = "no_sms"; field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps"; api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5838,6 +5838,7 @@ package android.app { method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed(); method public boolean isWallpaperSupported(); method public android.graphics.drawable.Drawable peekDrawable(); method public android.graphics.drawable.Drawable peekFastDrawable(); Loading Loading @@ -31310,6 +31311,7 @@ package android.os { field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; field public static final java.lang.String DISALLOW_SAFE_BOOT = "no_safe_boot"; field public static final java.lang.String DISALLOW_SET_USER_ICON = "no_set_user_icon"; field public static final java.lang.String DISALLOW_SET_WALLPAPER = "no_set_wallpaper"; field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location"; field public static final java.lang.String DISALLOW_SMS = "no_sms"; field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps"; api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5707,6 +5707,7 @@ package android.app { method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed(); method public boolean isWallpaperSupported(); method public android.graphics.drawable.Drawable peekDrawable(); method public android.graphics.drawable.Drawable peekFastDrawable(); Loading Loading @@ -29274,6 +29275,7 @@ package android.os { field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; field public static final java.lang.String DISALLOW_SAFE_BOOT = "no_safe_boot"; field public static final java.lang.String DISALLOW_SET_USER_ICON = "no_set_user_icon"; field public static final java.lang.String DISALLOW_SET_WALLPAPER = "no_set_wallpaper"; field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location"; field public static final java.lang.String DISALLOW_SMS = "no_sms"; field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps"; core/java/android/app/IWallpaperManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -113,4 +113,9 @@ interface IWallpaperManager { * Check whether wallpapers are supported for the calling user. */ boolean isWallpaperSupported(in String callingPackage); /** * Check whether setting of wallpapers are allowed for the calling user. */ boolean isWallpaperSettingAllowed(in String callingPackage); } core/java/android/app/WallpaperManager.java +43 −21 Original line number Diff line number Diff line Loading @@ -74,7 +74,8 @@ import java.util.concurrent.TimeUnit; * {@link #getInstance(android.content.Context) getInstance()}. * * <p> An app can check whether wallpapers are supported for the current user, by calling * {@link #isWallpaperSupported()}. * {@link #isWallpaperSupported()}, and whether setting of wallpapers is allowed, by calling * {@link #isWallpaperSettingAllowed()}. */ public class WallpaperManager { private static String TAG = "WallpaperManager"; Loading Loading @@ -1306,7 +1307,8 @@ public class WallpaperManager { /** * Returns whether wallpapers are supported for the calling user. If this function returns * false, any attempts to changing the wallpaper will have no effect. * {@code false}, any attempts to changing the wallpaper will have no effect, * and any attempt to obtain of the wallpaper will return {@code null}. */ public boolean isWallpaperSupported() { if (sGlobals.mService == null) { Loading @@ -1321,6 +1323,26 @@ public class WallpaperManager { return false; } /** * Returns whether the calling package is allowed to set the wallpaper for the calling user. * If this function returns {@code false}, any attempts to change the wallpaper will have * no effect. Always returns {@code true} for device owner and profile owner. * * @see android.os.UserManager#DISALLOW_SET_WALLPAPER */ public boolean isWallpaperSettingAllowed() { if (sGlobals.mService == null) { Log.w(TAG, "WallpaperService not running"); } else { try { return sGlobals.mService.isWallpaperSettingAllowed(mContext.getOpPackageName()); } catch (RemoteException e) { // Ignore } } return false; } /** * Clear the offsets previously associated with this window through * {@link #setWallpaperOffsets(IBinder, float, float)}. This reverts Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5705,6 +5705,7 @@ package android.app { method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed(); method public boolean isWallpaperSupported(); method public android.graphics.drawable.Drawable peekDrawable(); method public android.graphics.drawable.Drawable peekFastDrawable(); Loading Loading @@ -29264,6 +29265,7 @@ package android.os { field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; field public static final java.lang.String DISALLOW_SAFE_BOOT = "no_safe_boot"; field public static final java.lang.String DISALLOW_SET_USER_ICON = "no_set_user_icon"; field public static final java.lang.String DISALLOW_SET_WALLPAPER = "no_set_wallpaper"; field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location"; field public static final java.lang.String DISALLOW_SMS = "no_sms"; field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps";
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5838,6 +5838,7 @@ package android.app { method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed(); method public boolean isWallpaperSupported(); method public android.graphics.drawable.Drawable peekDrawable(); method public android.graphics.drawable.Drawable peekFastDrawable(); Loading Loading @@ -31310,6 +31311,7 @@ package android.os { field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; field public static final java.lang.String DISALLOW_SAFE_BOOT = "no_safe_boot"; field public static final java.lang.String DISALLOW_SET_USER_ICON = "no_set_user_icon"; field public static final java.lang.String DISALLOW_SET_WALLPAPER = "no_set_wallpaper"; field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location"; field public static final java.lang.String DISALLOW_SMS = "no_sms"; field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps";
api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -5707,6 +5707,7 @@ package android.app { method public static android.app.WallpaperManager getInstance(android.content.Context); method public android.app.WallpaperInfo getWallpaperInfo(); method public boolean hasResourceWallpaper(int); method public boolean isWallpaperSettingAllowed(); method public boolean isWallpaperSupported(); method public android.graphics.drawable.Drawable peekDrawable(); method public android.graphics.drawable.Drawable peekFastDrawable(); Loading Loading @@ -29274,6 +29275,7 @@ package android.os { field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; field public static final java.lang.String DISALLOW_SAFE_BOOT = "no_safe_boot"; field public static final java.lang.String DISALLOW_SET_USER_ICON = "no_set_user_icon"; field public static final java.lang.String DISALLOW_SET_WALLPAPER = "no_set_wallpaper"; field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location"; field public static final java.lang.String DISALLOW_SMS = "no_sms"; field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps";
core/java/android/app/IWallpaperManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -113,4 +113,9 @@ interface IWallpaperManager { * Check whether wallpapers are supported for the calling user. */ boolean isWallpaperSupported(in String callingPackage); /** * Check whether setting of wallpapers are allowed for the calling user. */ boolean isWallpaperSettingAllowed(in String callingPackage); }
core/java/android/app/WallpaperManager.java +43 −21 Original line number Diff line number Diff line Loading @@ -74,7 +74,8 @@ import java.util.concurrent.TimeUnit; * {@link #getInstance(android.content.Context) getInstance()}. * * <p> An app can check whether wallpapers are supported for the current user, by calling * {@link #isWallpaperSupported()}. * {@link #isWallpaperSupported()}, and whether setting of wallpapers is allowed, by calling * {@link #isWallpaperSettingAllowed()}. */ public class WallpaperManager { private static String TAG = "WallpaperManager"; Loading Loading @@ -1306,7 +1307,8 @@ public class WallpaperManager { /** * Returns whether wallpapers are supported for the calling user. If this function returns * false, any attempts to changing the wallpaper will have no effect. * {@code false}, any attempts to changing the wallpaper will have no effect, * and any attempt to obtain of the wallpaper will return {@code null}. */ public boolean isWallpaperSupported() { if (sGlobals.mService == null) { Loading @@ -1321,6 +1323,26 @@ public class WallpaperManager { return false; } /** * Returns whether the calling package is allowed to set the wallpaper for the calling user. * If this function returns {@code false}, any attempts to change the wallpaper will have * no effect. Always returns {@code true} for device owner and profile owner. * * @see android.os.UserManager#DISALLOW_SET_WALLPAPER */ public boolean isWallpaperSettingAllowed() { if (sGlobals.mService == null) { Log.w(TAG, "WallpaperService not running"); } else { try { return sGlobals.mService.isWallpaperSettingAllowed(mContext.getOpPackageName()); } catch (RemoteException e) { // Ignore } } return false; } /** * Clear the offsets previously associated with this window through * {@link #setWallpaperOffsets(IBinder, float, float)}. This reverts Loading