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

Commit 3b34be81 authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

Add missing log for public singleline view in Row Content Binder

Bug: 352020702
Test: Presubmit
Flag: EXEMPT adding new log
Change-Id: I7bfa0ee5912839bb97e946e5306999530383e9f9
parent daea33e6
Loading
Loading
Loading
Loading
+12 −20
Original line number Original line Diff line number Diff line
@@ -19,13 +19,12 @@ package com.android.systemui.statusbar.notification.row
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.core.LogLevel
import com.android.systemui.log.core.LogLevel
import com.android.systemui.log.dagger.NotifInflationLog
import com.android.systemui.log.dagger.NotifInflationLog
import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.logKey
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_ALL
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_ALL
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_CONTRACTED
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_CONTRACTED
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_EXPANDED
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_EXPANDED
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_HEADS_UP
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_HEADS_UP
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_PUBLIC
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_PUBLIC
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_PUBLIC_SINGLE_LINE
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_SINGLE_LINE
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_SINGLE_LINE
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_GROUP_SUMMARY_HEADER
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_GROUP_SUMMARY_HEADER
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_LOW_PRIORITY_GROUP_SUMMARY_HEADER
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_LOW_PRIORITY_GROUP_SUMMARY_HEADER
@@ -36,12 +35,7 @@ class NotificationRowContentBinderLogger
@Inject
@Inject
constructor(@NotifInflationLog private val buffer: LogBuffer) {
constructor(@NotifInflationLog private val buffer: LogBuffer) {
    fun logNotBindingRowWasRemoved(entry: String) {
    fun logNotBindingRowWasRemoved(entry: String) {
        buffer.log(
        buffer.log(TAG, LogLevel.INFO, { str1 = entry }, { "not inflating $str1: row was removed" })
            TAG,
            LogLevel.INFO,
            { str1 = entry },
            { "not inflating $str1: row was removed" }
        )
    }
    }


    fun logBinding(entry: String, @InflationFlag flag: Int) {
    fun logBinding(entry: String, @InflationFlag flag: Int) {
@@ -52,17 +46,12 @@ constructor(@NotifInflationLog private val buffer: LogBuffer) {
                str1 = entry
                str1 = entry
                int1 = flag
                int1 = flag
            },
            },
            { "binding views ${flagToString(int1)} for $str1" }
            { "binding views ${flagToString(int1)} for $str1" },
        )
        )
    }
    }


    fun logCancelBindAbortedTask(entry: String) {
    fun logCancelBindAbortedTask(entry: String) {
        buffer.log(
        buffer.log(TAG, LogLevel.INFO, { str1 = entry }, { "aborted task to cancel binding $str1" })
            TAG,
            LogLevel.INFO,
            { str1 = entry },
            { "aborted task to cancel binding $str1" }
        )
    }
    }


    fun logUnbinding(entry: String, @InflationFlag flag: Int) {
    fun logUnbinding(entry: String, @InflationFlag flag: Int) {
@@ -73,7 +62,7 @@ constructor(@NotifInflationLog private val buffer: LogBuffer) {
                str1 = entry
                str1 = entry
                int1 = flag
                int1 = flag
            },
            },
            { "unbinding views ${flagToString(int1)} for $str1" }
            { "unbinding views ${flagToString(int1)} for $str1" },
        )
        )
    }
    }


@@ -85,7 +74,7 @@ constructor(@NotifInflationLog private val buffer: LogBuffer) {
                str1 = entry
                str1 = entry
                str2 = progress
                str2 = progress
            },
            },
            { "async task for $str1: $str2" }
            { "async task for $str1: $str2" },
        )
        )
    }
    }


@@ -98,14 +87,14 @@ constructor(@NotifInflationLog private val buffer: LogBuffer) {
                str2 = logContext
                str2 = logContext
                str3 = exception.stackTraceToString()
                str3 = exception.stackTraceToString()
            },
            },
            { "async task for $str1 got exception $str2: $str3" }
            { "async task for $str1 got exception $str2: $str3" },
        )
        )
    }
    }


    fun logInflateSingleLine(
    fun logInflateSingleLine(
        entry: String?,
        entry: String?,
        @InflationFlag inflationFlags: Int,
        @InflationFlag inflationFlags: Int,
        isConversation: Boolean
        isConversation: Boolean,
    ) {
    ) {
        buffer.log(
        buffer.log(
            TAG,
            TAG,
@@ -118,7 +107,7 @@ constructor(@NotifInflationLog private val buffer: LogBuffer) {
            {
            {
                "inflateSingleLineView, inflationFlags: ${flagToString(int1)} for $str1, " +
                "inflateSingleLineView, inflationFlags: ${flagToString(int1)} for $str1, " +
                    "isConversation: $bool1"
                    "isConversation: $bool1"
            }
            },
        )
        )
    }
    }


@@ -147,6 +136,9 @@ constructor(@NotifInflationLog private val buffer: LogBuffer) {
            if (flag and FLAG_CONTENT_VIEW_SINGLE_LINE != 0) {
            if (flag and FLAG_CONTENT_VIEW_SINGLE_LINE != 0) {
                l.add("SINGLE_LINE")
                l.add("SINGLE_LINE")
            }
            }
            if (flag and FLAG_CONTENT_VIEW_PUBLIC_SINGLE_LINE != 0) {
                l.add("PUBLIC_SINGLE_LINE")
            }
            if (flag and FLAG_GROUP_SUMMARY_HEADER != 0) {
            if (flag and FLAG_GROUP_SUMMARY_HEADER != 0) {
                l.add("GROUP_SUMMARY_HEADER")
                l.add("GROUP_SUMMARY_HEADER")
            }
            }