Merge "Release lock before color extraction on dim changes" into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e3d66c3857
@@ -2895,6 +2895,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);
|
||||||
@@ -2930,7 +2931,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2962,6 +2963,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