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

Commit dfc2f00e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Re-add the PromotedNotificationContentModel flag validation as Log.e" into main

parents 7fa8fc91 c194f9b4
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@ package com.android.systemui.statusbar.notification.shared


import android.app.PendingIntent
import android.app.PendingIntent
import android.graphics.drawable.Icon
import android.graphics.drawable.Icon
import android.util.Log
import com.android.systemui.statusbar.StatusBarIconView
import com.android.systemui.statusbar.StatusBarIconView
import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentModel
import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentModel
import com.android.systemui.statusbar.notification.stack.PriorityBucket
import com.android.systemui.statusbar.notification.stack.PriorityBucket
@@ -85,6 +86,15 @@ data class ActiveNotificationModel(
     */
     */
    val promotedContent: PromotedNotificationContentModel?,
    val promotedContent: PromotedNotificationContentModel?,
) : ActiveNotificationEntryModel() {
) : 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 {
    companion object {
        private const val TAG = "ActiveNotificationEntryModel"
        private const val TAG = "ActiveNotificationEntryModel"
    }
    }