Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5712,6 +5712,7 @@ package android.app { public class WallpaperManager { method public void clear() throws java.io.IOException; method public void clear(int) throws java.io.IOException; method public void clearWallpaperOffsets(android.os.IBinder); method public void forgetLoadedWallpaper(); method public android.graphics.drawable.Drawable getBuiltInDrawable(); api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5844,6 +5844,7 @@ package android.app { public class WallpaperManager { method public void clear() throws java.io.IOException; method public void clear(int) throws java.io.IOException; method public void clearWallpaper(); method public void clearWallpaper(int, int); method public void clearWallpaperOffsets(android.os.IBinder); api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5716,6 +5716,7 @@ package android.app { public class WallpaperManager { method public void clear() throws java.io.IOException; method public void clear(int) throws java.io.IOException; method public void clearWallpaperOffsets(android.os.IBinder); method public void forgetLoadedWallpaper(); method public android.graphics.drawable.Drawable getBuiltInDrawable(); core/java/android/app/WallpaperManager.java +19 −0 Original line number Diff line number Diff line Loading @@ -1432,6 +1432,25 @@ public class WallpaperManager { setStream(openDefaultWallpaper(mContext)); } /** * Remove one or more currently set wallpapers, reverting to the system default * display for each one. If {@link #FLAG_SET_SYSTEM} is set in the {@code which} * parameter, the intent {@link Intent#ACTION_WALLPAPER_CHANGED} will be broadcast * upon success. * * @param which A bitwise combination of {@link #FLAG_SET_SYSTEM} or * {@link #FLAG_SET_LOCK} * @throws IOException If an error occurs reverting to the built-in wallpaper. */ public void clear(int which) throws IOException { if ((which & FLAG_SET_SYSTEM) != 0) { clear(); } if ((which & FLAG_SET_LOCK) != 0) { clearWallpaper(FLAG_SET_LOCK, mContext.getUserId()); } } /** * Open stream representing the default static image wallpaper. * Loading services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +8 −0 Original line number Diff line number Diff line Loading @@ -882,6 +882,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { wallpaper = mLockWallpaperMap.get(userId); if (wallpaper == null) { // It's already gone; we're done. if (DEBUG) { Slog.i(TAG, "Lock wallpaper already cleared"); } return; } } else { Loading @@ -902,14 +905,19 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { wallpaper.wallpaperFile.delete(); wallpaper.cropFile.delete(); if (which == FLAG_SET_LOCK) { mLockWallpaperMap.remove(userId); final IWallpaperManagerCallback cb = mKeyguardListener; if (cb != null) { if (DEBUG) { Slog.i(TAG, "Notifying keyguard of lock wallpaper clear"); } try { cb.onWallpaperChanged(); } catch (RemoteException e) { // Oh well it went away; no big deal } } saveSettingsLocked(userId); return; } } Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5712,6 +5712,7 @@ package android.app { public class WallpaperManager { method public void clear() throws java.io.IOException; method public void clear(int) throws java.io.IOException; method public void clearWallpaperOffsets(android.os.IBinder); method public void forgetLoadedWallpaper(); method public android.graphics.drawable.Drawable getBuiltInDrawable();
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5844,6 +5844,7 @@ package android.app { public class WallpaperManager { method public void clear() throws java.io.IOException; method public void clear(int) throws java.io.IOException; method public void clearWallpaper(); method public void clearWallpaper(int, int); method public void clearWallpaperOffsets(android.os.IBinder);
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5716,6 +5716,7 @@ package android.app { public class WallpaperManager { method public void clear() throws java.io.IOException; method public void clear(int) throws java.io.IOException; method public void clearWallpaperOffsets(android.os.IBinder); method public void forgetLoadedWallpaper(); method public android.graphics.drawable.Drawable getBuiltInDrawable();
core/java/android/app/WallpaperManager.java +19 −0 Original line number Diff line number Diff line Loading @@ -1432,6 +1432,25 @@ public class WallpaperManager { setStream(openDefaultWallpaper(mContext)); } /** * Remove one or more currently set wallpapers, reverting to the system default * display for each one. If {@link #FLAG_SET_SYSTEM} is set in the {@code which} * parameter, the intent {@link Intent#ACTION_WALLPAPER_CHANGED} will be broadcast * upon success. * * @param which A bitwise combination of {@link #FLAG_SET_SYSTEM} or * {@link #FLAG_SET_LOCK} * @throws IOException If an error occurs reverting to the built-in wallpaper. */ public void clear(int which) throws IOException { if ((which & FLAG_SET_SYSTEM) != 0) { clear(); } if ((which & FLAG_SET_LOCK) != 0) { clearWallpaper(FLAG_SET_LOCK, mContext.getUserId()); } } /** * Open stream representing the default static image wallpaper. * Loading
services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +8 −0 Original line number Diff line number Diff line Loading @@ -882,6 +882,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { wallpaper = mLockWallpaperMap.get(userId); if (wallpaper == null) { // It's already gone; we're done. if (DEBUG) { Slog.i(TAG, "Lock wallpaper already cleared"); } return; } } else { Loading @@ -902,14 +905,19 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { wallpaper.wallpaperFile.delete(); wallpaper.cropFile.delete(); if (which == FLAG_SET_LOCK) { mLockWallpaperMap.remove(userId); final IWallpaperManagerCallback cb = mKeyguardListener; if (cb != null) { if (DEBUG) { Slog.i(TAG, "Notifying keyguard of lock wallpaper clear"); } try { cb.onWallpaperChanged(); } catch (RemoteException e) { // Oh well it went away; no big deal } } saveSettingsLocked(userId); return; } } Loading