diff options
| author | 2017-08-30 19:19:13 +0000 | |
|---|---|---|
| committer | 2017-08-30 19:19:13 +0000 | |
| commit | c5a16291adf9410ab4c99e3afe6a9e293f85ec62 (patch) | |
| tree | 06216180173f18f72f507fd7ee47d66ad17d78bd | |
| parent | ef1c48fa054b39de5f76c85c2cc0fa9a45b69bc2 (diff) | |
| parent | 367bbff6881d47dd4a56dcbd4dbce958d098982b (diff) | |
Merge "Setting a wallpaper must be synchronous" into oc-mr1-dev am: b00a8aa688
am: 367bbff688
Change-Id: I81b6d1356dad7db58b10a76ae049d64590ac8909
| -rw-r--r-- | services/core/java/com/android/server/wallpaper/WallpaperManagerService.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java index f6f5341ff0a9..b963561dfd3c 100644 --- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java @@ -280,14 +280,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { Slog.v(TAG, "Crop done; invoking completion callback"); } wallpaper.imageWallpaperPending = false; - if (wallpaper.setComplete != null) { - try { - wallpaper.setComplete.onWallpaperChanged(); - } catch (RemoteException e) { - // if this fails we don't really care; the setting app may just - // have crashed and that sort of thing is a fact of life. - } - } if (sysWallpaperChanged) { // If this was the system wallpaper, rebind... bindWallpaperComponentLocked(mImageWallpaper, true, @@ -311,6 +303,16 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { } saveSettingsLocked(wallpaper.userId); + + // Publish completion *after* we've persisted the changes + if (wallpaper.setComplete != null) { + try { + wallpaper.setComplete.onWallpaperChanged(); + } catch (RemoteException e) { + // if this fails we don't really care; the setting app may just + // have crashed and that sort of thing is a fact of life. + } + } } } } |