Merge "Save one notifyColorListeners() call" into sc-dev am: 8c9039fca8

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

Change-Id: I506c22c19c8ac251e1e32585ac1a2893e3ca99dd
This commit is contained in:
TreeHugger Robot
2021-06-24 16:40:37 +00:00
committed by Automerger Merge Worker

View File

@@ -405,20 +405,10 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
needsExtraction = wallpaper.primaryColors == null;
}
// Let's notify the current values, it's fine if it's null, it just means
// that we don't know yet.
notifyColorListeners(wallpaper.primaryColors, which, wallpaper.userId, displayId);
if (needsExtraction) {
extractColors(wallpaper);
synchronized (mLock) {
// Don't need to notify if nothing changed.
if (wallpaper.primaryColors == null) {
return;
}
}
notifyColorListeners(wallpaper.primaryColors, which, wallpaper.userId, displayId);
}
notifyColorListeners(wallpaper.primaryColors, which, wallpaper.userId, displayId);
}
private static <T extends IInterface> boolean emptyCallbackList(RemoteCallbackList<T> list) {