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

Commit 2d87003c authored by Julia Tuttle's avatar Julia Tuttle
Browse files

[RONs] Add debug flag to promote all notifs to Live Updates

Bug: 404838239
Flag: com.android.systemui.debug_live_updates_promote_all
Test: manual
Change-Id: I7f6b1d5b109ff9f31201445ce0ce7be5d385919f
parent 250a0eda
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -541,6 +541,13 @@ flag {
    bug: "367705002"
}

flag {
    name: "debug_live_updates_promote_all"
    namespace: "systemui"
    description: "Promote all notifications to Live Updates (RONs). (For testing/debugging only, do not promote/release!)"
    bug: "404838239"
}

flag {
    name: "compose_bouncer"
    namespace: "systemui"
+6 −0
Original line number Diff line number Diff line
@@ -23,11 +23,13 @@ import android.app.Notification
import android.app.Notification.FLAG_PROMOTED_ONGOING
import androidx.annotation.ColorInt
import com.android.internal.widget.NotificationProgressModel
import com.android.systemui.Flags
import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi
import com.android.systemui.statusbar.notification.row.ImageResult
import com.android.systemui.statusbar.notification.row.LazyImage
import com.android.systemui.statusbar.notification.row.shared.ImageModel
import com.android.systemui.util.Compile

/**
 * The content needed to render a promoted notification to surfaces besides the notification stack,
@@ -213,6 +215,10 @@ data class PromotedNotificationContentModel(
         */
        @JvmStatic
        fun isPromotedForStatusBarChip(notification: Notification): Boolean {
            if (Compile.IS_DEBUG && Flags.debugLiveUpdatesPromoteAll()) {
                return true
            }

            // Notification.isPromotedOngoing checks the ui_rich_ongoing flag, but we want the
            // status bar chip to be ready before all the features behind the ui_rich_ongoing flag
            // are ready.