diff options
2 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapper.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapper.kt index f2216fce6fef..ebba4b1aa265 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapper.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapper.kt @@ -36,6 +36,8 @@ class NotificationInterruptStateProviderWrapper( SHOULD_INTERRUPT(shouldInterrupt = true), SHOULD_NOT_INTERRUPT(shouldInterrupt = false); + override val logReason = "unknown" + companion object { fun of(booleanDecision: Boolean) = if (booleanDecision) SHOULD_INTERRUPT else SHOULD_NOT_INTERRUPT @@ -49,6 +51,7 @@ class NotificationInterruptStateProviderWrapper( ) : FullScreenIntentDecision { override val shouldInterrupt = originalDecision.shouldLaunch override val wouldInterruptWithoutDnd = originalDecision == NO_FSI_SUPPRESSED_ONLY_BY_DND + override val logReason = originalDecision.name } override fun addSuppressor(suppressor: NotificationInterruptSuppressor) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProvider.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProvider.kt index c0f4fcda56bb..8024016fd3fc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProvider.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProvider.kt @@ -32,9 +32,12 @@ interface VisualInterruptionDecisionProvider { * full-screen intent decisions. * * @property[shouldInterrupt] whether a visual interruption should be triggered + * @property[logReason] a log-friendly string explaining the reason for the decision; should be + * used *only* for logging, not decision-making */ interface Decision { val shouldInterrupt: Boolean + val logReason: String } /** |