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

Commit aaec96cd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Catch null handler in PlayerViewHolder.marquee."

parents c87eb5a4 add734d0
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


package com.android.systemui.media
package com.android.systemui.media


import android.util.Log
import android.view.LayoutInflater
import android.view.LayoutInflater
import android.view.View
import android.view.View
import android.view.ViewGroup
import android.view.ViewGroup
@@ -26,6 +27,8 @@ import android.widget.TextView
import com.android.systemui.R
import com.android.systemui.R
import com.android.systemui.util.animation.TransitionLayout
import com.android.systemui.util.animation.TransitionLayout


private const val TAG = "PlayerViewHolder"

/**
/**
 * ViewHolder for a media player.
 * ViewHolder for a media player.
 */
 */
@@ -94,7 +97,12 @@ class PlayerViewHolder private constructor(itemView: View) {
    }
    }


    fun marquee(start: Boolean, delay: Long) {
    fun marquee(start: Boolean, delay: Long) {
        longPressText.getHandler().postDelayed({ longPressText.setSelected(start) }, delay)
        val longPressTextHandler = longPressText.getHandler()
        if (longPressTextHandler == null) {
            Log.d(TAG, "marquee while longPressText.getHandler() is null", Exception())
            return
        }
        longPressTextHandler.postDelayed({ longPressText.setSelected(start) }, delay)
    }
    }


    companion object {
    companion object {