Merge "Release lock before color extraction on dim changes" into udc-qpr-dev am: e3d66c3857 am: f54661bf5a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24111946 Change-Id: I9e40e95bbc3b5b3bad08663619918f646223bf76 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2935,6 +2935,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
|
||||
checkPermission(android.Manifest.permission.SET_WALLPAPER_DIM_AMOUNT);
|
||||
final long ident = Binder.clearCallingIdentity();
|
||||
try {
|
||||
List<WallpaperData> pendingColorExtraction = new ArrayList<>();
|
||||
synchronized (mLock) {
|
||||
WallpaperData wallpaper = mWallpaperMap.get(mCurrentUserId);
|
||||
WallpaperData lockWallpaper = mLockWallpaperMap.get(mCurrentUserId);
|
||||
@@ -2970,7 +2971,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
|
||||
// Need to extract colors again to re-calculate dark hints after
|
||||
// applying dimming.
|
||||
wp.mIsColorExtractedFromDim = true;
|
||||
notifyWallpaperColorsChanged(wp, wp.mWhich);
|
||||
pendingColorExtraction.add(wp);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
@@ -3002,6 +3003,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
|
||||
}
|
||||
}
|
||||
}
|
||||
for (WallpaperData wp: pendingColorExtraction) {
|
||||
notifyWallpaperColorsChanged(wp, wp.mWhich);
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(ident);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user