ThemePicker: Fix incorrect logic in wallpapersColorsChanged

Fixes a crash when lockscreen wallpaper is different
from home screen wallpaper, or some other unknown case.

Change-Id: Iab496d67f7ab5f363102b633a0708867df0121d6
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Reviewed-on: https://review.statixos.com/c/android_packages_apps_Statix_ThemePicker/+/7729
Tested-by: Anay Wadhera <anay1018@gmail.com>
Reviewed-by: Sourajit Karmakar <sourajit@live.com>
This commit is contained in:
LibXZR 2022-05-02 20:55:00 +05:30 committed by StatiXOS Gerrit
parent de4619e5c0
commit 3eb62d0ee6
1 changed files with 2 additions and 2 deletions

View File

@ -201,8 +201,8 @@ class ColorSectionController(
}
val wallpaperColors3 = mColorManager.mHomeWallpaperColors
val colorProvider = mColorManager.mProvider as ColorProvider
val wallpapersColorsChanged = (colorProvider.homeWallpaperColors == wallpaperColors3
) || (colorProvider.lockWallpaperColors == wallpaperColors2)
val wallpapersColorsChanged = (colorProvider.homeWallpaperColors != wallpaperColors3
) || (colorProvider.lockWallpaperColors != wallpaperColors2)
if (wallpapersColorsChanged) {
colorProvider.homeWallpaperColors = wallpaperColors3
colorProvider.lockWallpaperColors = wallpaperColors2