Loading packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/row/BundleHeader.kt +1 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ private fun ContentScope.BundleHeaderContent( .element(NotificationRowPrimitives.Elements.NotificationIconBackground), ) Text( text = stringResource(viewModel.titleTextResId), text = stringResource(viewModel.titleText), style = MaterialTheme.typography.titleMediumEmphasized, color = MaterialTheme.colorScheme.primary, overflow = TextOverflow.Ellipsis, Loading packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/row/BundleHeaderGuts.kt +4 −8 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ private fun View.initOnBackPressureDispatcherOwner(lifecycle: Lifecycle) { fun BundleHeaderGuts(viewModel: BundleHeaderGutsViewModel, modifier: Modifier = Modifier) { Column(modifier.padding(horizontal = 16.dp)) { TopRow(viewModel) ContentRow() ContentRow(viewModel) BottomRow(viewModel) } } Loading @@ -100,7 +100,7 @@ private fun TopRow(viewModel: BundleHeaderGutsViewModel, modifier: Modifier = Mo ) { BundleIcon(viewModel.bundleIcon, modifier = Modifier.padding(end = 16.dp)) Text( text = stringResource(viewModel.titleTextResId), text = stringResource(viewModel.titleText), style = MaterialTheme.typography.titleMediumEmphasized, color = MaterialTheme.colorScheme.primary, overflow = TextOverflow.Ellipsis, Loading @@ -126,7 +126,7 @@ private fun TopRow(viewModel: BundleHeaderGutsViewModel, modifier: Modifier = Mo } @Composable private fun ContentRow(modifier: Modifier = Modifier) { private fun ContentRow(viewModel: BundleHeaderGutsViewModel, modifier: Modifier = Modifier) { Row( verticalAlignment = Alignment.CenterVertically, modifier = Loading @@ -149,11 +149,7 @@ private fun ContentRow(modifier: Modifier = Modifier) { maxLines = 1, ) Text( // TODO(b/409748420): Implement string based on bundle type text = stringResource( com.android.systemui.res.R.string.notification_guts_social_summary ), text = stringResource(viewModel.summaryText), style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSecondaryContainer, overflow = TextOverflow.Ellipsis, Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/BundleEntry.kt +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class BundleEntry(spec: BundleSpec) : PipelineEntry(spec.key) { override val bucket: Int = spec.bucket /** The model used by UI. */ val bundleRepository = BundleRepository(spec.titleTextResId, spec.icon) val bundleRepository = BundleRepository(spec.titleText, spec.icon, spec.summaryText) // TODO(b/394483200): move NotificationEntry's implementation to PipelineEntry? val isSensitive: MutableStateFlow<Boolean> = MutableStateFlow(false) Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/BundleSpec.kt +11 −5 Original line number Diff line number Diff line Loading @@ -28,7 +28,8 @@ import com.android.systemui.statusbar.notification.stack.PriorityBucket data class BundleSpec( val key: String, @StringRes val titleTextResId: Int, @StringRes val titleText: Int, @StringRes val summaryText: Int, @DrawableRes val icon: Int, @PriorityBucket val bucket: Int, ) { Loading @@ -36,28 +37,33 @@ data class BundleSpec( val PROMOTIONS = BundleSpec( key = NotificationChannel.PROMOTIONS_ID, titleTextResId = R.string.promotional_notification_channel_label, titleText = R.string.promotional_notification_channel_label, summaryText = com.android.systemui.res.R.string.notification_guts_promotions_summary, icon = com.android.settingslib.R.drawable.ic_promotions, bucket = BUCKET_PROMO, ) val SOCIAL_MEDIA = BundleSpec( key = NotificationChannel.SOCIAL_MEDIA_ID, titleTextResId = R.string.social_notification_channel_label, titleText = R.string.social_notification_channel_label, summaryText = com.android.systemui.res.R.string.notification_guts_social_summary, icon = com.android.settingslib.R.drawable.ic_social, bucket = BUCKET_SOCIAL, ) val NEWS = BundleSpec( key = NotificationChannel.NEWS_ID, titleTextResId = R.string.news_notification_channel_label, titleText = R.string.news_notification_channel_label, summaryText = com.android.systemui.res.R.string.notification_guts_news_summary, icon = com.android.settingslib.R.drawable.ic_news, bucket = BUCKET_NEWS, ) val RECOMMENDED = BundleSpec( key = NotificationChannel.RECS_ID, titleTextResId = R.string.recs_notification_channel_label, titleText = R.string.recs_notification_channel_label, summaryText = com.android.systemui.res.R.string.notification_guts_recs_summary, icon = com.android.settingslib.R.drawable.ic_recs, bucket = BUCKET_RECS, ) Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/BundleHeaderGutsContent.kt +2 −1 Original line number Diff line number Diff line Loading @@ -44,8 +44,9 @@ class BundleHeaderGutsContent(context: Context) : GutsContent { val repository = (row.entryAdapter as BundleEntryAdapter).entry.bundleRepository val viewModel = BundleHeaderGutsViewModel( titleTextResId = repository.titleTextResId, titleText = repository.titleText, bundleIcon = repository.bundleIcon, summaryText = repository.summaryText, onSettingsClicked = onSettingsClicked, onDoneClicked = onDoneClicked, onDismissClicked = onDismissClicked, Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/row/BundleHeader.kt +1 −1 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ private fun ContentScope.BundleHeaderContent( .element(NotificationRowPrimitives.Elements.NotificationIconBackground), ) Text( text = stringResource(viewModel.titleTextResId), text = stringResource(viewModel.titleText), style = MaterialTheme.typography.titleMediumEmphasized, color = MaterialTheme.colorScheme.primary, overflow = TextOverflow.Ellipsis, Loading
packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/row/BundleHeaderGuts.kt +4 −8 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ private fun View.initOnBackPressureDispatcherOwner(lifecycle: Lifecycle) { fun BundleHeaderGuts(viewModel: BundleHeaderGutsViewModel, modifier: Modifier = Modifier) { Column(modifier.padding(horizontal = 16.dp)) { TopRow(viewModel) ContentRow() ContentRow(viewModel) BottomRow(viewModel) } } Loading @@ -100,7 +100,7 @@ private fun TopRow(viewModel: BundleHeaderGutsViewModel, modifier: Modifier = Mo ) { BundleIcon(viewModel.bundleIcon, modifier = Modifier.padding(end = 16.dp)) Text( text = stringResource(viewModel.titleTextResId), text = stringResource(viewModel.titleText), style = MaterialTheme.typography.titleMediumEmphasized, color = MaterialTheme.colorScheme.primary, overflow = TextOverflow.Ellipsis, Loading @@ -126,7 +126,7 @@ private fun TopRow(viewModel: BundleHeaderGutsViewModel, modifier: Modifier = Mo } @Composable private fun ContentRow(modifier: Modifier = Modifier) { private fun ContentRow(viewModel: BundleHeaderGutsViewModel, modifier: Modifier = Modifier) { Row( verticalAlignment = Alignment.CenterVertically, modifier = Loading @@ -149,11 +149,7 @@ private fun ContentRow(modifier: Modifier = Modifier) { maxLines = 1, ) Text( // TODO(b/409748420): Implement string based on bundle type text = stringResource( com.android.systemui.res.R.string.notification_guts_social_summary ), text = stringResource(viewModel.summaryText), style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSecondaryContainer, overflow = TextOverflow.Ellipsis, Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/BundleEntry.kt +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class BundleEntry(spec: BundleSpec) : PipelineEntry(spec.key) { override val bucket: Int = spec.bucket /** The model used by UI. */ val bundleRepository = BundleRepository(spec.titleTextResId, spec.icon) val bundleRepository = BundleRepository(spec.titleText, spec.icon, spec.summaryText) // TODO(b/394483200): move NotificationEntry's implementation to PipelineEntry? val isSensitive: MutableStateFlow<Boolean> = MutableStateFlow(false) Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/BundleSpec.kt +11 −5 Original line number Diff line number Diff line Loading @@ -28,7 +28,8 @@ import com.android.systemui.statusbar.notification.stack.PriorityBucket data class BundleSpec( val key: String, @StringRes val titleTextResId: Int, @StringRes val titleText: Int, @StringRes val summaryText: Int, @DrawableRes val icon: Int, @PriorityBucket val bucket: Int, ) { Loading @@ -36,28 +37,33 @@ data class BundleSpec( val PROMOTIONS = BundleSpec( key = NotificationChannel.PROMOTIONS_ID, titleTextResId = R.string.promotional_notification_channel_label, titleText = R.string.promotional_notification_channel_label, summaryText = com.android.systemui.res.R.string.notification_guts_promotions_summary, icon = com.android.settingslib.R.drawable.ic_promotions, bucket = BUCKET_PROMO, ) val SOCIAL_MEDIA = BundleSpec( key = NotificationChannel.SOCIAL_MEDIA_ID, titleTextResId = R.string.social_notification_channel_label, titleText = R.string.social_notification_channel_label, summaryText = com.android.systemui.res.R.string.notification_guts_social_summary, icon = com.android.settingslib.R.drawable.ic_social, bucket = BUCKET_SOCIAL, ) val NEWS = BundleSpec( key = NotificationChannel.NEWS_ID, titleTextResId = R.string.news_notification_channel_label, titleText = R.string.news_notification_channel_label, summaryText = com.android.systemui.res.R.string.notification_guts_news_summary, icon = com.android.settingslib.R.drawable.ic_news, bucket = BUCKET_NEWS, ) val RECOMMENDED = BundleSpec( key = NotificationChannel.RECS_ID, titleTextResId = R.string.recs_notification_channel_label, titleText = R.string.recs_notification_channel_label, summaryText = com.android.systemui.res.R.string.notification_guts_recs_summary, icon = com.android.settingslib.R.drawable.ic_recs, bucket = BUCKET_RECS, ) Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/BundleHeaderGutsContent.kt +2 −1 Original line number Diff line number Diff line Loading @@ -44,8 +44,9 @@ class BundleHeaderGutsContent(context: Context) : GutsContent { val repository = (row.entryAdapter as BundleEntryAdapter).entry.bundleRepository val viewModel = BundleHeaderGutsViewModel( titleTextResId = repository.titleTextResId, titleText = repository.titleText, bundleIcon = repository.bundleIcon, summaryText = repository.summaryText, onSettingsClicked = onSettingsClicked, onDoneClicked = onDoneClicked, onDismissClicked = onDismissClicked, Loading