Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/ConnectedDisplaysStatusBarNotificationIconViewStore.kt +15 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.notification.icon.ui.viewbinder import android.util.Log import com.android.systemui.display.domain.interactor.DisplayWindowPropertiesInteractor import com.android.systemui.lifecycle.Activatable import com.android.systemui.statusbar.StatusBarIconView Loading Loading @@ -61,9 +62,16 @@ constructor( } override fun iconView(key: String): StatusBarIconView? { val entry = notifCollection.getEntry(key) ?: return null val displayWindowProperties = displayWindowPropertiesInteractor.getForStatusBar(displayId) ?: return null val entry = notifCollection.getEntry(key) if (entry == null) { Log.w(TAG, "No notification entry found for key: $key") return null } val displayWindowProperties = displayWindowPropertiesInteractor.getForStatusBar(displayId) if (displayWindowProperties == null) { Log.w(TAG, "No display properties found for display id: $displayId") return null } return cachedIcons.computeIfAbsent(key) { val context = displayWindowProperties.context iconManager.createSbIconView(context, entry) Loading Loading @@ -93,4 +101,8 @@ constructor( interface Factory { fun create(displayId: Int): ConnectedDisplaysStatusBarNotificationIconViewStore } companion object { private const val TAG = "ConnectedDisplaysNotifIconViewStore" } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/ConnectedDisplaysStatusBarNotificationIconViewStore.kt +15 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.notification.icon.ui.viewbinder import android.util.Log import com.android.systemui.display.domain.interactor.DisplayWindowPropertiesInteractor import com.android.systemui.lifecycle.Activatable import com.android.systemui.statusbar.StatusBarIconView Loading Loading @@ -61,9 +62,16 @@ constructor( } override fun iconView(key: String): StatusBarIconView? { val entry = notifCollection.getEntry(key) ?: return null val displayWindowProperties = displayWindowPropertiesInteractor.getForStatusBar(displayId) ?: return null val entry = notifCollection.getEntry(key) if (entry == null) { Log.w(TAG, "No notification entry found for key: $key") return null } val displayWindowProperties = displayWindowPropertiesInteractor.getForStatusBar(displayId) if (displayWindowProperties == null) { Log.w(TAG, "No display properties found for display id: $displayId") return null } return cachedIcons.computeIfAbsent(key) { val context = displayWindowProperties.context iconManager.createSbIconView(context, entry) Loading Loading @@ -93,4 +101,8 @@ constructor( interface Factory { fun create(displayId: Int): ConnectedDisplaysStatusBarNotificationIconViewStore } companion object { private const val TAG = "ConnectedDisplaysNotifIconViewStore" } }