Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationContentExtractor.kt +13 −3 Original line number Diff line number Diff line Loading @@ -84,19 +84,25 @@ constructor( imageModelProvider: ImageModelProvider, ): PromotedNotificationContentModels? { if (!PromotedNotificationContentModel.featureFlagEnabled()) { if (LOG_NOT_EXTRACTED) { logger.logExtractionSkipped(entry, "feature flags disabled") } return null } val notification = entry.sbn.notification if (notification == null) { if (LOG_NOT_EXTRACTED) { logger.logExtractionFailed(entry, "entry.sbn.notification is null") } return null } // The status bar chips rely on this extractor, so take them into account for promotion. if (!isPromotedForStatusBarChip(notification)) { if (LOG_NOT_EXTRACTED) { logger.logExtractionSkipped(entry, "isPromotedOngoing returned false") } return null } Loading Loading @@ -377,6 +383,10 @@ constructor( // TODO: Create NotificationProgressModel.toSkeleton, or something similar. contentBuilder.newProgress = createProgressModel(0xffffffff.toInt(), 0xff000000.toInt()) } companion object { private const val LOG_NOT_EXTRACTED = false } } private fun Notification.getCharSequenceExtraUnlessEmpty(key: String): CharSequence? = Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/PromotedNotificationContentExtractor.kt +13 −3 Original line number Diff line number Diff line Loading @@ -84,19 +84,25 @@ constructor( imageModelProvider: ImageModelProvider, ): PromotedNotificationContentModels? { if (!PromotedNotificationContentModel.featureFlagEnabled()) { if (LOG_NOT_EXTRACTED) { logger.logExtractionSkipped(entry, "feature flags disabled") } return null } val notification = entry.sbn.notification if (notification == null) { if (LOG_NOT_EXTRACTED) { logger.logExtractionFailed(entry, "entry.sbn.notification is null") } return null } // The status bar chips rely on this extractor, so take them into account for promotion. if (!isPromotedForStatusBarChip(notification)) { if (LOG_NOT_EXTRACTED) { logger.logExtractionSkipped(entry, "isPromotedOngoing returned false") } return null } Loading Loading @@ -377,6 +383,10 @@ constructor( // TODO: Create NotificationProgressModel.toSkeleton, or something similar. contentBuilder.newProgress = createProgressModel(0xffffffff.toInt(), 0xff000000.toInt()) } companion object { private const val LOG_NOT_EXTRACTED = false } } private fun Notification.getCharSequenceExtraUnlessEmpty(key: String): CharSequence? = Loading