summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/WallpaperManagerService.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-11-29 18:01:50 -0800
committerDianne Hackborn <hackbod@google.com>2011-11-29 18:01:50 -0800
commitebac48c6adf738cb27ea59669c9eca4467063d18 (patch)
tree648eb9745eee8a8ee8a899eee23087140d5eb72b /services/java/com/android/server/WallpaperManagerService.java
parent1808f214b0cd7a62628b273b93a1ea688f262565 (diff)
downloadframeworks_base-ebac48c6adf738cb27ea59669c9eca4467063d18.zip
frameworks_base-ebac48c6adf738cb27ea59669c9eca4467063d18.tar.gz
frameworks_base-ebac48c6adf738cb27ea59669c9eca4467063d18.tar.bz2
Fix issue #5628789: Cannot set static/custom wallpaper after clearing Settings data
Need to make sure the "files" directory is created. Change-Id: I8d5b374a5a03590a5ce7fafb5171705414f7b2f9
Diffstat (limited to 'services/java/com/android/server/WallpaperManagerService.java')
-rw-r--r--services/java/com/android/server/WallpaperManagerService.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/java/com/android/server/WallpaperManagerService.java b/services/java/com/android/server/WallpaperManagerService.java
index 7fa404e..4925a4e 100644
--- a/services/java/com/android/server/WallpaperManagerService.java
+++ b/services/java/com/android/server/WallpaperManagerService.java
@@ -476,6 +476,13 @@ class WallpaperManagerService extends IWallpaperManager.Stub {
ParcelFileDescriptor updateWallpaperBitmapLocked(String name) {
if (name == null) name = "";
try {
+ if (!WALLPAPER_DIR.exists()) {
+ WALLPAPER_DIR.mkdir();
+ FileUtils.setPermissions(
+ WALLPAPER_DIR.getPath(),
+ FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH,
+ -1, -1);
+ }
ParcelFileDescriptor fd = ParcelFileDescriptor.open(WALLPAPER_FILE,
MODE_CREATE|MODE_READ_WRITE);
mName = name;