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

Commit dc754293 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 13872691 from 5e4a276e to 25Q4-release

Change-Id: I934ac2a807a0d5ffb82a955a80eab438386d3e0f
parents 3f5c598e 5e4a276e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.graphics.LinearGradient
import android.graphics.Shader.TileMode.CLAMP
import android.util.Log
import androidx.annotation.VisibleForTesting
import com.android.launcher3.Flags
import com.android.launcher3.icons.BitmapInfo
import com.android.launcher3.icons.ClockDrawableWrapper.ClockAnimationInfo
import com.android.launcher3.icons.FastBitmapDrawableDelegate.DelegateFactory
@@ -81,6 +82,11 @@ class ColorAdapter(private val luminanceDelta: Double) {
    private val luminanceComputer = LuminanceComputer.createDefaultLuminanceComputer()

    fun adaptedColorProvider(colorProvider: (Context) -> IntArray): (Context) -> IntArray {
        // if the feature flag is off, then we don't need to adapt the colors at all.
        if (!Flags.forceMonochromeAppIconsAdaptColors()) {
            return colorProvider
        }

        // we need to adapt the color provider here, by adapting the foregrund color at
        // index 0, and the background color at index 1.