diff options
| author | 2023-04-18 13:31:46 +0000 | |
|---|---|---|
| committer | 2023-04-18 18:27:07 +0000 | |
| commit | 845b2b1e56a29a9489144870aecec37f467fc9b0 (patch) | |
| tree | acecfe9c8f59e4247b57c2480c0b85061680c0b5 | |
| parent | 766ec400f26c4c5ea661d8dcdb10fdb87505a3c3 (diff) | |
Reduce spammy bubble logging.
Change-Id: Idf75207d0a66d2ac5aea0e2922ab2640dcd11a96
Fixes: 278698932
Test: atest SystemUITests
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptLogger.kt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptLogger.kt index a352f23bfc1c..115e050258c3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptLogger.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptLogger.kt @@ -16,6 +16,8 @@ package com.android.systemui.statusbar.notification.interruption +import android.util.Log + import com.android.systemui.log.dagger.NotificationInterruptLog import com.android.systemui.plugins.log.LogBuffer import com.android.systemui.plugins.log.LogLevel.DEBUG @@ -23,6 +25,7 @@ import com.android.systemui.plugins.log.LogLevel.INFO import com.android.systemui.plugins.log.LogLevel.WARNING import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.logKey +import com.android.systemui.util.Compile import javax.inject.Inject class NotificationInterruptLogger @Inject constructor( @@ -44,11 +47,13 @@ class NotificationInterruptLogger @Inject constructor( } fun logNoBubbleNotAllowed(entry: NotificationEntry) { - buffer.log(TAG, DEBUG, { - str1 = entry.logKey - }, { - "No bubble up: not allowed to bubble: $str1" - }) + if (Compile.IS_DEBUG && Log.isLoggable(TAG, Log.DEBUG)) { + buffer.log(TAG, DEBUG, { + str1 = entry.logKey + }, { + "No bubble up: not allowed to bubble: $str1" + }) + } } fun logNoBubbleNoMetadata(entry: NotificationEntry) { |