diff options
author | 2025-02-07 20:44:50 +0000 | |
---|---|---|
committer | 2025-02-07 20:44:50 +0000 | |
commit | 9ae35515e7bfda6e146c0ee9d4c1026ac41e68b5 (patch) | |
tree | 4b1f15c084882881668572772b6775f49407af85 | |
parent | affb471a4a0b58a3545c161ea5db012846933249 (diff) |
[RONs] bind iconLevel to small icon view
Fixes: 369151941
Test: atest SystemUITests
Flag: com.android.systemui.aod_ui_rich_ongoing
Change-Id: I5641b7b45be100d58a4fe19f92702799ae24c6aa
3 files changed, 5 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/AODPromotedNotification.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/AODPromotedNotification.kt index 5ddb4ea4b94a..dc74c9fcc2af 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/AODPromotedNotification.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/AODPromotedNotification.kt @@ -230,6 +230,7 @@ private class AODPromotedNotificationViewUpdater(root: View) { ) { // Icon binding must be called in this order updateImageView(icon, content.smallIcon) + icon?.setImageLevel(content.iconLevel) icon?.setBackgroundColor(Background.colorInt) icon?.originalIconColor = PrimaryText.colorInt diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationContentExtractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationContentExtractor.kt index cd7872291801..39c7df064c8c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationContentExtractor.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationContentExtractor.kt @@ -96,6 +96,7 @@ constructor( contentBuilder.wasPromotedAutomatically = notification.extras.getBoolean(EXTRA_WAS_AUTOMATICALLY_PROMOTED, false) contentBuilder.smallIcon = notification.smallIconModel(imageModelProvider) + contentBuilder.iconLevel = notification.iconLevel contentBuilder.appName = notification.loadHeaderAppName(context) contentBuilder.subText = notification.subText() contentBuilder.time = notification.extractWhen() diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/shared/model/PromotedNotificationContentModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/shared/model/PromotedNotificationContentModel.kt index af5a8203c979..38d41e37f916 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/shared/model/PromotedNotificationContentModel.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/shared/model/PromotedNotificationContentModel.kt @@ -38,6 +38,7 @@ data class PromotedNotificationContentModel( */ val wasPromotedAutomatically: Boolean, val smallIcon: ImageModel?, + val iconLevel: Int, val appName: CharSequence?, val subText: CharSequence?, val shortCriticalText: String?, @@ -67,6 +68,7 @@ data class PromotedNotificationContentModel( class Builder(val key: String) { var wasPromotedAutomatically: Boolean = false var smallIcon: ImageModel? = null + var iconLevel: Int = 0 var appName: CharSequence? = null var subText: CharSequence? = null var time: When? = null @@ -94,6 +96,7 @@ data class PromotedNotificationContentModel( identity = Identity(key, style), wasPromotedAutomatically = wasPromotedAutomatically, smallIcon = smallIcon, + iconLevel = iconLevel, appName = appName, subText = subText, shortCriticalText = shortCriticalText, |