Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95e5c0f8 authored by Chris Poultney's avatar Chris Poultney Committed by Android (Google) Code Review
Browse files

Merge "Fix ThemePicker crash on launch" into udc-qpr-dev

parents c8406412 ee9dea3e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -432,7 +432,8 @@ class ColorProvider(private val context: Context, stubPackageName: String) :
            val extractor = ColorBundlePreviewExtractor(mContext)
            val bundles: MutableList<ColorOption> = ArrayList()

            val bundleNames = getItemsFromStub(COLOR_BUNDLES_ARRAY_NAME)
            val bundleNames =
                if (isAvailable) getItemsFromStub(COLOR_BUNDLES_ARRAY_NAME) else emptyArray()
            // Color option index value starts from 1.
            var index = 1
            val maxPresetColors = if (themeStyleEnabled) bundleNames.size else MAX_PRESET_COLORS