Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fb5b48e authored by Aurélien Pomini's avatar Aurélien Pomini Committed by Automerger Merge Worker
Browse files

Merge "Release lock before color extraction on dim changes" into udc-qpr-dev...

Merge "Release lock before color extraction on dim changes" into udc-qpr-dev am: e3d66c38 am: f54661bf

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24111946



Change-Id: I9e40e95bbc3b5b3bad08663619918f646223bf76
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0f6c32ca f54661bf
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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);
        }