Skip to content

Commit

Permalink
SystemUIGoogle: Hide now playing icon if not clickable
Browse files Browse the repository at this point in the history
Change-Id: I4dcd125ca9d9a106c1eeae47a60f0b5106240cd4
Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
  • Loading branch information
minaripenguin authored and Kitsunejasutin committed Aug 28, 2023
1 parent 7f3c624 commit 411b213
Showing 1 changed file with 8 additions and 6 deletions.
Expand Up @@ -285,17 +285,19 @@ class AmbientIndicationContainer @JvmOverloads constructor(
if (TextUtils.isEmpty(text) && !showAmbientMusicText) {
updatePill = false
}
val vis: Int
vis = if (!updatePill) {
val vis: Int = if (!updatePill) {
View.GONE
} else {
View.VISIBLE
}
mTextView!!.visibility = vis
if (icon == null) {
mIconView!!.visibility = View.GONE

mTextView?.visibility = vis

val iconView = mIconView
if (icon == null || (iconView != null && !iconView.isClickable)) {
iconView?.visibility = View.GONE
} else {
mIconView!!.visibility = vis
iconView?.visibility = vis
}
if (!updatePill) {
mTextView!!.animate().cancel()
Expand Down

0 comments on commit 411b213

Please sign in to comment.