Merge "Fix page indicator tint" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5184c1f6e5
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user