Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/StatusBarIconViewBinder.kt +10 −8 Original line number Diff line number Diff line Loading @@ -35,12 +35,13 @@ object StatusBarIconViewBinder { // view-model (which, at the time of this writing, does not yet exist). suspend fun bindColor(view: StatusBarIconView, color: Flow<Int>) { color.collectTracingEach("SBIV#bindColor") { color -> // Don't change the icon color if an app icon experiment is enabled. if (!android.app.Flags.notificationsUseAppIcon()) { color.collectTracingEach("SBIV#bindColor") { color -> view.staticDrawableColor = color view.setDecorColor(color) } // Continue changing the overflow dot color view.setDecorColor(color) } } Loading @@ -57,15 +58,16 @@ object StatusBarIconViewBinder { iconColors: Flow<NotificationIconColors>, contrastColorUtil: ContrastColorUtil, ) { iconColors.collectTracingEach("SBIV#bindIconColors") { colors -> // Don't change the icon color if an app icon experiment is enabled. if (!android.app.Flags.notificationsUseAppIcon()) { iconColors.collectTracingEach("SBIV#bindIconColors") { colors -> val isPreL = java.lang.Boolean.TRUE == view.getTag(R.id.icon_is_pre_L) val isColorized = !isPreL || NotificationUtils.isGrayscale(view, contrastColorUtil) view.staticDrawableColor = if (isColorized) colors.staticDrawableColor(view.viewBounds) else NO_COLOR view.setDecorColor(colors.tint) } // Continue changing the overflow dot color view.setDecorColor(colors.tint) } } } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/StatusBarIconViewBinder.kt +10 −8 Original line number Diff line number Diff line Loading @@ -35,12 +35,13 @@ object StatusBarIconViewBinder { // view-model (which, at the time of this writing, does not yet exist). suspend fun bindColor(view: StatusBarIconView, color: Flow<Int>) { color.collectTracingEach("SBIV#bindColor") { color -> // Don't change the icon color if an app icon experiment is enabled. if (!android.app.Flags.notificationsUseAppIcon()) { color.collectTracingEach("SBIV#bindColor") { color -> view.staticDrawableColor = color view.setDecorColor(color) } // Continue changing the overflow dot color view.setDecorColor(color) } } Loading @@ -57,15 +58,16 @@ object StatusBarIconViewBinder { iconColors: Flow<NotificationIconColors>, contrastColorUtil: ContrastColorUtil, ) { iconColors.collectTracingEach("SBIV#bindIconColors") { colors -> // Don't change the icon color if an app icon experiment is enabled. if (!android.app.Flags.notificationsUseAppIcon()) { iconColors.collectTracingEach("SBIV#bindIconColors") { colors -> val isPreL = java.lang.Boolean.TRUE == view.getTag(R.id.icon_is_pre_L) val isColorized = !isPreL || NotificationUtils.isGrayscale(view, contrastColorUtil) view.staticDrawableColor = if (isColorized) colors.staticDrawableColor(view.viewBounds) else NO_COLOR view.setDecorColor(colors.tint) } // Continue changing the overflow dot color view.setDecorColor(colors.tint) } } } Loading