Loading packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/compose/OngoingActivityChip.kt +12 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.util.Log import android.view.ViewGroup import android.widget.FrameLayout import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.height Loading Loading @@ -199,6 +200,17 @@ private fun ChipBody( modifier = Modifier.sysuiResTag(STATUS_BAR_CHIP_CONTENT_ID), ) } model.decorativeIcon?.let { Icon( icon = it.icon, modifier = modifier .background(color = it.backgroundColor, shape = it.backgroundShape) .padding(vertical = 2.dp, horizontal = 8.dp) .size(12.dp), ) } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/OngoingActivityChipModel.kt +11 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ import android.annotation.StringRes import android.os.SystemClock import android.view.View import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Shape import com.android.internal.logging.InstanceId import com.android.systemui.animation.ComposableControllerFactory import com.android.systemui.animation.Expandable Loading Loading @@ -89,7 +91,8 @@ sealed class OngoingActivityChipModel { val isHidden: Boolean = false, /** Whether the transition from hidden to shown should be animated. */ val shouldAnimate: Boolean = true, /** A decorative icon to show on the end side of the chip. */ val decorativeIcon: DecorativeIcon? = null, /** * An optional per-chip ID used for logging. Should stay the same throughout the lifetime of * a single chip. Loading Loading @@ -283,4 +286,11 @@ sealed class OngoingActivityChipModel { */ val hideChipForTransition: Boolean = false, ) /** Represents a decorative icon to show on the right side of the chip. */ data class DecorativeIcon( val icon: Icon, val backgroundColor: Color, val backgroundShape: Shape, ) } Loading
packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/compose/OngoingActivityChip.kt +12 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.util.Log import android.view.ViewGroup import android.widget.FrameLayout import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.height Loading Loading @@ -199,6 +200,17 @@ private fun ChipBody( modifier = Modifier.sysuiResTag(STATUS_BAR_CHIP_CONTENT_ID), ) } model.decorativeIcon?.let { Icon( icon = it.icon, modifier = modifier .background(color = it.backgroundColor, shape = it.backgroundShape) .padding(vertical = 2.dp, horizontal = 8.dp) .size(12.dp), ) } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/OngoingActivityChipModel.kt +11 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ import android.annotation.StringRes import android.os.SystemClock import android.view.View import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Shape import com.android.internal.logging.InstanceId import com.android.systemui.animation.ComposableControllerFactory import com.android.systemui.animation.Expandable Loading Loading @@ -89,7 +91,8 @@ sealed class OngoingActivityChipModel { val isHidden: Boolean = false, /** Whether the transition from hidden to shown should be animated. */ val shouldAnimate: Boolean = true, /** A decorative icon to show on the end side of the chip. */ val decorativeIcon: DecorativeIcon? = null, /** * An optional per-chip ID used for logging. Should stay the same throughout the lifetime of * a single chip. Loading Loading @@ -283,4 +286,11 @@ sealed class OngoingActivityChipModel { */ val hideChipForTransition: Boolean = false, ) /** Represents a decorative icon to show on the right side of the chip. */ data class DecorativeIcon( val icon: Icon, val backgroundColor: Color, val backgroundShape: Shape, ) }