summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Christopher Tate <ctate@google.com> 2016-07-01 00:36:32 +0000
committer android-build-merger <android-build-merger@google.com> 2016-07-01 00:36:32 +0000
commit5d327bbd302ff6bf9b21786a8d72d58d0e47c3e7 (patch)
tree7ed8b9782cea122c7007d6f6802ee71a90e8202e
parent7258aac39ab36268d3c548720d2ecffa2e7f1a9f (diff)
parent9ecf5010d3be549eac3db1659eed2cc6edbbd0d9 (diff)
Make sure SELinux labels are correct after move-to operations am: fa7d97fa15
am: 9ecf5010d3 Change-Id: Ie23d5d9dbc75ddbbe50033dcdc71e6802086c8df
-rw-r--r--services/core/java/com/android/server/wallpaper/WallpaperManagerService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index 7c2ba1eaaac1..79fe18b77585 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -229,10 +229,12 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
if (moved && lockWallpaperChanged) {
// We just migrated sys -> lock to preserve imagery for an impending
- // new system-only wallpaper. Tell keyguard about it but that's it.
+ // new system-only wallpaper. Tell keyguard about it and make sure it
+ // has the right SELinux label.
if (DEBUG) {
Slog.i(TAG, "Sys -> lock MOVED_TO");
}
+ SELinux.restorecon(changedFile);
notifyLockWallpaperChanged();
return;
}
@@ -254,9 +256,11 @@ public class WallpaperManagerService extends IWallpaperManager.Stub {
if (moved) {
// This is a restore, so generate the crop using any just-restored new
// crop guidelines, making sure to preserve our local dimension hints.
+ // We also make sure to reapply the correct SELinux label.
if (DEBUG) {
Slog.v(TAG, "moved-to, therefore restore; reloading metadata");
}
+ SELinux.restorecon(changedFile);
loadSettingsLocked(wallpaper.userId, true);
}
generateCrop(wallpaper);