Skip to content

Commit ebac48c

Browse files
author
Dianne Hackborn
committed
Fix issue #5628789: Cannot set static/custom wallpaper after clearing Settings data
Need to make sure the "files" directory is created. Change-Id: I8d5b374a5a03590a5ce7fafb5171705414f7b2f9
1 parent 1808f21 commit ebac48c

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)