Skip to content

Commit db904b4

Browse files
Dianne HackbornAndroid (Google) Code Review
authored andcommitted
Merge "Fix issue #5628789: Cannot set static/custom wallpaper after clearing Settings data" into ics-mr1
2 parents cc084f1 + ebac48c commit db904b4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

services/java/com/android/server/WallpaperManagerService.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,13 @@ public ParcelFileDescriptor setWallpaper(String name) {
476476
ParcelFileDescriptor updateWallpaperBitmapLocked(String name) {
477477
if (name == null) name = "";
478478
try {
479+
if (!WALLPAPER_DIR.exists()) {
480+
WALLPAPER_DIR.mkdir();
481+
FileUtils.setPermissions(
482+
WALLPAPER_DIR.getPath(),
483+
FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH,
484+
-1, -1);
485+
}
479486
ParcelFileDescriptor fd = ParcelFileDescriptor.open(WALLPAPER_FILE,
480487
MODE_CREATE|MODE_READ_WRITE);
481488
mName = name;

0 commit comments

Comments
 (0)