summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/WallpaperManagerService.java
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-09-14 11:30:29 -0700
committerBrad Fitzpatrick <bradfitz@android.com>2010-09-14 11:30:29 -0700
commit194b19a4b3ff877d2720ed35e607e329fcfa8186 (patch)
tree52249141dc3e6913b1227cdcb7307034bd6946e6 /services/java/com/android/server/WallpaperManagerService.java
parent13f6270eb14b409709c936b828e2a2fd40e427c4 (diff)
downloadframeworks_base-194b19a4b3ff877d2720ed35e607e329fcfa8186.zip
frameworks_base-194b19a4b3ff877d2720ed35e607e329fcfa8186.tar.gz
frameworks_base-194b19a4b3ff877d2720ed35e607e329fcfa8186.tar.bz2
Add missing wallpaper service lock.
Unimportant, but found while reading the code for other reasons. Change-Id: I9f2fad3ff5d081aef7a35e5f33ec5de7dc92195e
Diffstat (limited to 'services/java/com/android/server/WallpaperManagerService.java')
-rw-r--r--services/java/com/android/server/WallpaperManagerService.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/services/java/com/android/server/WallpaperManagerService.java b/services/java/com/android/server/WallpaperManagerService.java
index 124da4e..c837a3a 100644
--- a/services/java/com/android/server/WallpaperManagerService.java
+++ b/services/java/com/android/server/WallpaperManagerService.java
@@ -727,9 +727,10 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
}
}
+ // Called by SystemBackupAgent after files are restored to disk.
void settingsRestored() {
if (DEBUG) Slog.v(TAG, "settingsRestored");
-
+
boolean success = false;
synchronized (mLock) {
loadSettingsLocked();
@@ -766,7 +767,10 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
mName = "";
WALLPAPER_FILE.delete();
}
- saveSettingsLocked();
+
+ synchronized (mLock) {
+ saveSettingsLocked();
+ }
}
boolean restoreNamedResourceLocked() {