Fix color options showing default colors (2/3)

Fix color options showing default colors for certain wallpapers.
Computing color info using thumbnail should only be used to get initial
colors while actual colors are being loaded. Actual colors should be
obtained from wallpaper manager.

Bug: 282999514
Test: manually verified, see bug
Change-Id: Ib54e354202108a8d6eb66bdfe485e65ceaef0a55
diff --git a/src/com/android/customization/module/DefaultCustomizationSections.java b/src/com/android/customization/module/DefaultCustomizationSections.java
index 6a5f2f6..520b301 100644
--- a/src/com/android/customization/module/DefaultCustomizationSections.java
+++ b/src/com/android/customization/module/DefaultCustomizationSections.java
@@ -1,5 +1,6 @@
 package com.android.customization.module;
 
+import android.app.WallpaperManager;
 import android.os.Bundle;
 
 import androidx.annotation.Nullable;
@@ -100,6 +101,7 @@
             DisplayUtils displayUtils,
             CustomizationPickerViewModel customizationPickerViewModel,
             WallpaperInteractor wallpaperInteractor,
+            WallpaperManager wallpaperManager,
             boolean isTwoPaneAndSmallWidth) {
         List<CustomizationSectionController<?>> sectionControllers = new ArrayList<>();
 
@@ -118,6 +120,7 @@
                         wallpaperPreviewNavigator,
                         sectionNavigationController,
                         wallpaperInteractor,
+                        wallpaperManager,
                         isTwoPaneAndSmallWidth)
                         : new ScreenPreviewSectionController(
                                 activity,
@@ -128,6 +131,7 @@
                                 displayUtils,
                                 wallpaperPreviewNavigator,
                                 wallpaperInteractor,
+                                wallpaperManager,
                                 isTwoPaneAndSmallWidth));
 
         sectionControllers.add(
diff --git a/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt b/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt
index 4bd5f1c..5ad01a8 100644
--- a/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt
+++ b/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt
@@ -17,6 +17,7 @@
 
 package com.android.customization.picker.preview.ui.section
 
+import android.app.WallpaperManager
 import android.content.Context
 import android.graphics.Rect
 import android.os.Bundle
@@ -65,6 +66,7 @@
     wallpaperPreviewNavigator: WallpaperPreviewNavigator,
     private val navigationController: CustomizationSectionNavigationController,
     wallpaperInteractor: WallpaperInteractor,
+    wallpaperManager: WallpaperManager,
     private val isTwoPaneAndSmallWidth: Boolean,
 ) :
     ScreenPreviewSectionController(
@@ -76,6 +78,7 @@
         displayUtils,
         wallpaperPreviewNavigator,
         wallpaperInteractor,
+        wallpaperManager,
         isTwoPaneAndSmallWidth,
     ) {