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