From 3eb62d0ee64bbecfb16c979d56b0a0f8be837714 Mon Sep 17 00:00:00 2001 From: LibXZR Date: Mon, 2 May 2022 20:55:00 +0530 Subject: [PATCH] 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 Reviewed-on: https://review.statixos.com/c/android_packages_apps_Statix_ThemePicker/+/7729 Tested-by: Anay Wadhera Reviewed-by: Sourajit Karmakar --- .../customization/model/color/ColorSectionController.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/statix/android/customization/model/color/ColorSectionController.kt b/src/com/statix/android/customization/model/color/ColorSectionController.kt index 2ec43f8..168ad16 100644 --- a/src/com/statix/android/customization/model/color/ColorSectionController.kt +++ b/src/com/statix/android/customization/model/color/ColorSectionController.kt @@ -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