summaryrefslogtreecommitdiffstats
path: root/services/core
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2014-10-09 02:04:01 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-09 02:04:02 +0000
commit2e0f66820e12bbd24f476fba863d9dab564c6f97 (patch)
treeaaacd07c48ab342c7f29644146ea25395300af80 /services/core
parent6c858c25f31bcdd72b60cbd0c91b085d9f298ffa (diff)
parentda058e260d1c5ac8039034b38db8c697c16017bb (diff)
downloadframeworks_base-2e0f66820e12bbd24f476fba863d9dab564c6f97.zip
frameworks_base-2e0f66820e12bbd24f476fba863d9dab564c6f97.tar.gz
frameworks_base-2e0f66820e12bbd24f476fba863d9dab564c6f97.tar.bz2
Merge "Also monitor MOVED_TO events for wallpaper updates" into lmp-dev
Diffstat (limited to 'services/core')
-rw-r--r--services/core/java/com/android/server/wallpaper/WallpaperManagerService.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index a8245e7..8a36335 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -116,7 +116,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
public WallpaperObserver(WallpaperData wallpaper) {
super(getWallpaperDir(wallpaper.userId).getAbsolutePath(),
- CLOSE_WRITE | DELETE | DELETE_SELF);
+ CLOSE_WRITE | MOVED_TO | DELETE | DELETE_SELF);
mWallpaperDir = getWallpaperDir(wallpaper.userId);
mWallpaper = wallpaper;
mWallpaperFile = new File(mWallpaperDir, WALLPAPER);
@@ -137,9 +137,11 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
File changedFile = new File(mWallpaperDir, path);
if (mWallpaperFile.equals(changedFile)) {
notifyCallbacksLocked(mWallpaper);
- if (mWallpaper.wallpaperComponent == null || event != CLOSE_WRITE
+ final boolean written = (event == CLOSE_WRITE || event == MOVED_TO);
+ if (mWallpaper.wallpaperComponent == null
+ || event != CLOSE_WRITE // includes the MOVED_TO case
|| mWallpaper.imageWallpaperPending) {
- if (event == CLOSE_WRITE) {
+ if (written) {
mWallpaper.imageWallpaperPending = false;
}
bindWallpaperComponentLocked(mImageWallpaper, true,