Merge "Fix issue #5342788: Setting wallpaper from gallery set default..." into ics-mr0
This commit is contained in:
committed by
Android (Google) Code Review
commit
943da7b895
@@ -102,7 +102,7 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
|
|||||||
* everytime the wallpaper is changed.
|
* everytime the wallpaper is changed.
|
||||||
*/
|
*/
|
||||||
private final FileObserver mWallpaperObserver = new FileObserver(
|
private final FileObserver mWallpaperObserver = new FileObserver(
|
||||||
WALLPAPER_DIR.getAbsolutePath(), CREATE | CLOSE_WRITE | DELETE | DELETE_SELF) {
|
WALLPAPER_DIR.getAbsolutePath(), CLOSE_WRITE | DELETE | DELETE_SELF) {
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(int event, String path) {
|
public void onEvent(int event, String path) {
|
||||||
if (path == null) {
|
if (path == null) {
|
||||||
@@ -118,8 +118,11 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
|
|||||||
File changedFile = new File(WALLPAPER_DIR, path);
|
File changedFile = new File(WALLPAPER_DIR, path);
|
||||||
if (WALLPAPER_FILE.equals(changedFile)) {
|
if (WALLPAPER_FILE.equals(changedFile)) {
|
||||||
notifyCallbacksLocked();
|
notifyCallbacksLocked();
|
||||||
if (mWallpaperComponent == null || mImageWallpaperPending) {
|
if (mWallpaperComponent == null || event != CLOSE_WRITE
|
||||||
|
|| mImageWallpaperPending) {
|
||||||
|
if (event == CLOSE_WRITE) {
|
||||||
mImageWallpaperPending = false;
|
mImageWallpaperPending = false;
|
||||||
|
}
|
||||||
bindWallpaperComponentLocked(mImageWallpaperComponent,
|
bindWallpaperComponentLocked(mImageWallpaperComponent,
|
||||||
true, false);
|
true, false);
|
||||||
saveSettingsLocked();
|
saveSettingsLocked();
|
||||||
|
|||||||
Reference in New Issue
Block a user