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

Commit f54661bf 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 am: e3d66c38

parents d55c003a e3d66c38
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2940,6 +2940,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);
@@ -2975,7 +2976,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;
                        }
                    }
@@ -3007,6 +3008,9 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
                    }
                }
            }
            for (WallpaperData wp: pendingColorExtraction) {
                notifyWallpaperColorsChanged(wp, wp.mWhich);
            }
        } finally {
            Binder.restoreCallingIdentity(ident);
        }