summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2009-07-29 16:23:58 -0700
committerJoe Onorato <joeo@android.com>2009-07-29 16:23:58 -0700
commite712ee3fe1b9ec950dbe5d77993751c2b7b1011c (patch)
tree220e3d08285dfc5842afd632dd0f5d1826b7938a /services
parentbbdf3cafe992381e7c37fb5cc936a0e9c339046f (diff)
downloadframeworks_base-e712ee3fe1b9ec950dbe5d77993751c2b7b1011c.zip
frameworks_base-e712ee3fe1b9ec950dbe5d77993751c2b7b1011c.tar.gz
frameworks_base-e712ee3fe1b9ec950dbe5d77993751c2b7b1011c.tar.bz2
Take ctate's suggestions from 9008.
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/WallpaperService.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/services/java/com/android/server/WallpaperService.java b/services/java/com/android/server/WallpaperService.java
index 11981df..c3479a6 100644
--- a/services/java/com/android/server/WallpaperService.java
+++ b/services/java/com/android/server/WallpaperService.java
@@ -76,11 +76,10 @@ class WallpaperService extends IWallpaperService.Stub {
WALLPAPER_DIR.getAbsolutePath(), CREATE | CLOSE_WRITE | DELETE | DELETE_SELF) {
@Override
public void onEvent(int event, String path) {
+ if (path == null) {
+ return;
+ }
synchronized (mLock) {
- if (path == null) {
- return;
- }
-
// changing the wallpaper means we'll need to back up the new one
long origId = Binder.clearCallingIdentity();
BackupManager bm = new BackupManager(mContext);
@@ -104,11 +103,9 @@ class WallpaperService extends IWallpaperService.Stub {
public WallpaperService(Context context) {
if (Config.LOGD) Log.d(TAG, "WallpaperService startup");
mContext = context;
- if (!WALLPAPER_DIR.exists()) {
- WALLPAPER_DIR.mkdirs();
- }
- mWallpaperObserver.startWatching();
+ WALLPAPER_DIR.mkdirs();
loadSettingsLocked();
+ mWallpaperObserver.startWatching();
}
@Override