Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6779413 authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

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
parent 0c59d91a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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)