Loading packages/SystemUI/src/com/android/systemui/media/PlayerViewHolder.kt +9 −1 Original line number Original line Diff line number Diff line Loading @@ -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 Loading @@ -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. */ */ Loading Loading @@ -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 { Loading Loading
packages/SystemUI/src/com/android/systemui/media/PlayerViewHolder.kt +9 −1 Original line number Original line Diff line number Diff line Loading @@ -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 Loading @@ -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. */ */ Loading Loading @@ -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 { Loading