Merge "Add API to clear a specific wallpaper" into nyc-dev

am: d493ed6c0c

* commit 'd493ed6c0c37b3d70087ea0512811526e41bb8b8':
  Add API to clear a specific wallpaper
This commit is contained in:
Christopher Tate
2016-03-03 01:49:26 +00:00
committed by android-build-merger
5 changed files with 30 additions and 0 deletions

View File

@@ -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.
*