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

Commit f6296c9d authored by Fabian Kozynski's avatar Fabian Kozynski Committed by Android (Google) Code Review
Browse files

Merge "Load wifi icons in bg instead of in composable" into main

parents c9450097 da60865d
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import com.android.systemui.common.shared.model.Text
import com.android.systemui.common.shared.model.Text.Companion.loadText
import com.android.systemui.plugins.qs.QSTile
import com.android.systemui.qs.tileimpl.QSTileImpl
import com.android.systemui.qs.tileimpl.QSTileImpl.ResourceIcon

/** Model describing the state that the QS Internet tile should be in. */
sealed interface InternetTileModel {
@@ -49,10 +50,13 @@ sealed interface InternetTileModel {
        state.contentDescription = contentDescription.loadContentDescription(context)

        // To support both SignalDrawable and other icons, give priority to icons over IDs
        if (icon != null) {
            state.icon = icon
        } else if (iconId != null) {
            state.icon = QSTileImpl.maybeLoadResourceIcon(iconId!!, context)
        state.icon =
            when {
                icon is ResourceIcon ->
                    QSTileImpl.maybeLoadResourceIcon((icon as ResourceIcon).resId, context)
                icon != null -> icon
                iconId != null -> QSTileImpl.maybeLoadResourceIcon(iconId!!, context)
                else -> null
            }

        state.state =