diff options
author | 2025-03-06 09:10:58 -0800 | |
---|---|---|
committer | 2025-03-06 09:10:58 -0800 | |
commit | dfc2f00ef0584a0aa91e3d83d3c96a660fdaee30 (patch) | |
tree | 08cba3102053666e42a6c09d33913cbe539a3766 | |
parent | 7fa8fc9156ff33b7ef6aaec9024df6a60b7155b6 (diff) | |
parent | c194f9b41d7a1addedc2698195891d74dc4b5579 (diff) |
Merge "Re-add the PromotedNotificationContentModel flag validation as Log.e" into main
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/shared/ActiveNotificationModel.kt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/shared/ActiveNotificationModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/shared/ActiveNotificationModel.kt index d7dd7ec08583..53728c7da62d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/shared/ActiveNotificationModel.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/shared/ActiveNotificationModel.kt @@ -17,6 +17,7 @@ package com.android.systemui.statusbar.notification.shared import android.app.PendingIntent import android.graphics.drawable.Icon +import android.util.Log import com.android.systemui.statusbar.StatusBarIconView import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentModel import com.android.systemui.statusbar.notification.stack.PriorityBucket @@ -85,6 +86,15 @@ data class ActiveNotificationModel( */ val promotedContent: PromotedNotificationContentModel?, ) : ActiveNotificationEntryModel() { + init { + if (!PromotedNotificationContentModel.featureFlagEnabled()) { + if (promotedContent != null) { + // TODO(b/401018545): convert to Log.wtf and fix tests (see: ag/32114199) + Log.e(TAG, "passing non-null promoted content without feature flag enabled") + } + } + } + companion object { private const val TAG = "ActiveNotificationEntryModel" } |