Fix page indicator tint

Setting tint here was removed in the dark mode fix, but is still needed
for the page indicator to display properly

Fixes: 187486707
Test: manual
Change-Id: I4a24d86a7dcb64fe4854bec814b636ccf74ccab3
This commit is contained in:
Beth Thibodeau
2021-05-14 01:14:12 -04:00
parent 0c59d91acc
commit a6779413e2

View File

@@ -3,6 +3,7 @@ package com.android.systemui.media
import android.app.smartspace.SmartspaceTarget
import android.content.Context
import android.content.Intent
import android.content.res.ColorStateList
import android.content.res.Configuration
import android.provider.Settings.ACTION_MEDIA_CONTROLS_SETTINGS
import android.util.Log
@@ -380,6 +381,7 @@ class MediaCarouselController @Inject constructor(
private fun recreatePlayers() {
bgColor = getBackgroundColor()
pageIndicator.tintList = ColorStateList.valueOf(getForegroundColor())
MediaPlayerData.mediaData().forEach { (key, data) ->
removePlayer(key, dismissMediaData = false)
@@ -391,6 +393,10 @@ class MediaCarouselController @Inject constructor(
return context.getColor(android.R.color.system_accent2_50)
}
private fun getForegroundColor(): Int {
return context.getColor(android.R.color.system_accent2_900)
}
private fun updatePageIndicator() {
val numPages = mediaContent.getChildCount()
pageIndicator.setNumPages(numPages)