summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ruslan Tkhakokhov <rthakohov@google.com> 2020-03-26 12:02:42 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-03-26 12:02:42 +0000
commit74fabfe5da248c643fbe9ee436000f4aa07d59ea (patch)
tree769dddcb72c59a1b0c8c251c2fe8a26bdfbdb106
parente5d60ed552de0dfeb1330a4f17b05f3cf41074f9 (diff)
parent3929da0a54e82793a03a4b9d93521d606b24d1bc (diff)
Merge "Add logs to WallpaperManagerService when setting wallpaper" into rvc-dev
-rw-r--r--services/core/java/com/android/server/wallpaper/WallpaperManagerService.java17
1 files changed, 9 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 722d9f7e7c38..ddf166eb0bd5 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -2441,9 +2441,8 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
* the caller here writes new bitmap data.
*/
if (which == FLAG_SYSTEM && mLockWallpaperMap.get(userId) == null) {
- if (DEBUG) {
- Slog.i(TAG, "Migrating system->lock to preserve");
- }
+ Slog.i(TAG, "Migrating current wallpaper to be lock-only before"
+ + "updating system wallpaper");
migrateSystemToLockWallpaperLocked(userId);
}
@@ -2511,6 +2510,8 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
ParcelFileDescriptor fd = ParcelFileDescriptor.open(wallpaper.wallpaperFile,
MODE_CREATE|MODE_READ_WRITE|MODE_TRUNCATE);
if (!SELinux.restorecon(wallpaper.wallpaperFile)) {
+ Slog.w(TAG, "restorecon failed for wallpaper file: " +
+ wallpaper.wallpaperFile.getPath());
return null;
}
wallpaper.name = name;
@@ -2520,10 +2521,8 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
// Nullify field to require new computation
wallpaper.primaryColors = null;
- if (DEBUG) {
- Slog.v(TAG, "updateWallpaperBitmapLocked() : id=" + wallpaper.wallpaperId
- + " name=" + name + " file=" + wallpaper.wallpaperFile.getName());
- }
+ Slog.v(TAG, "updateWallpaperBitmapLocked() : id=" + wallpaper.wallpaperId
+ + " name=" + name + " file=" + wallpaper.wallpaperFile.getName());
return fd;
} catch (FileNotFoundException e) {
Slog.w(TAG, "Error setting wallpaper", e);
@@ -2556,7 +2555,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
WallpaperData wallpaper;
synchronized (mLock) {
- if (DEBUG) Slog.v(TAG, "setWallpaperComponent name=" + name);
+ Slog.v(TAG, "setWallpaperComponent name=" + name);
wallpaper = mWallpaperMap.get(userId);
if (wallpaper == null) {
throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
@@ -2571,6 +2570,8 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
if (mLockWallpaperMap.get(userId) == null) {
// We're using the static imagery and there is no lock-specific image in place,
// therefore it's a shared system+lock image that we need to migrate.
+ Slog.i(TAG, "Migrating current wallpaper to be lock-only before"
+ + "updating system wallpaper");
migrateSystemToLockWallpaperLocked(userId);
}
}