Add @PromotedNotificationLog
This will be used by the PromotedNotificationContentExtractor and
potentially other classes.
Bug: 369151941
Test: builds
Flag: android.app.ui_rich_ongoing
Flag: com.android.systemui.status_bar_notification_chips
Change-Id: I0d71af2bfb8a4a765b76859b138b836688c04f3b
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt
index 7dd4cde..d3359d3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/dagger/NotificationsLogModule.kt
@@ -32,6 +32,7 @@
import com.android.systemui.log.dagger.UnseenNotificationLog
import com.android.systemui.log.dagger.VisualStabilityLog
import com.android.systemui.statusbar.notification.NotifPipelineFlags
+import com.android.systemui.statusbar.notification.promoted.PromotedNotificationLog
import com.android.systemui.util.Compile
import dagger.Module
import dagger.Provides
@@ -117,6 +118,14 @@
return factory.create("NotifSectionLog", 1000, /* maxSize */ false /* systrace */)
}
+ /** Provides a [LogBuffer] for use by promoted notifications. */
+ @Provides
+ @SysUISingleton
+ @PromotedNotificationLog
+ fun providesPromotedNotificationLog(factory: LogBufferFactory): LogBuffer {
+ return factory.create("PromotedNotifLog", 50)
+ }
+
/** */
@Provides
@SysUISingleton
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationLog.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationLog.kt
new file mode 100644
index 0000000..f9d9c97
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationLog.kt
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.promoted
+
+import javax.inject.Qualifier
+
+/** A [com.android.systemui.log.LogBuffer] for use by promoted notifications. */
+@Qualifier
+@MustBeDocumented
+@Retention(AnnotationRetention.RUNTIME)
+annotation class PromotedNotificationLog