Loading packages/SystemUI/src/com/android/systemui/haptics/qs/QSLongPressEffectViewBinder.kt +45 −52 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import com.android.app.tracing.coroutines.launch import com.android.systemui.lifecycle.repeatWhenAttached import com.android.systemui.qs.tileimpl.QSTileViewImpl import kotlinx.coroutines.DisposableHandle import kotlinx.coroutines.flow.filterNotNull object QSLongPressEffectViewBinder { Loading @@ -49,9 +50,8 @@ object QSLongPressEffectViewBinder { launch({ "${tileSpec ?: "unknownTileSpec"}#LongPressEffect#action" }) { var effectAnimator: ValueAnimator? = null qsLongPressEffect.actionType.collect { action -> action?.let { when (it) { qsLongPressEffect.actionType.filterNotNull().collect { action -> when (action) { QSLongPressEffect.ActionType.CLICK -> { tile.performClick() qsLongPressEffect.clearActionType() Loading @@ -74,9 +74,7 @@ object QSLongPressEffectViewBinder { qsLongPressEffect.effectDuration.toLong() interpolator = AccelerateDecelerateInterpolator() doOnStart { qsLongPressEffect.handleAnimationStart() } doOnStart { qsLongPressEffect.handleAnimationStart() } addUpdateListener { val value = animatedValue as Float if (value == 0f) { Loading @@ -85,12 +83,8 @@ object QSLongPressEffectViewBinder { tile.updateLongPressEffectProperties(value) } } doOnEnd { qsLongPressEffect.handleAnimationComplete() } doOnCancel { qsLongPressEffect.handleAnimationCancel() } doOnEnd { qsLongPressEffect.handleAnimationComplete() } doOnCancel { qsLongPressEffect.handleAnimationCancel() } start() } } Loading @@ -112,7 +106,6 @@ object QSLongPressEffectViewBinder { } } } } @SuppressLint("ClickableViewAccessibility") private fun setTouchListener(tile: QSTileViewImpl, longPressEffect: QSLongPressEffect?) { Loading Loading
packages/SystemUI/src/com/android/systemui/haptics/qs/QSLongPressEffectViewBinder.kt +45 −52 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import com.android.app.tracing.coroutines.launch import com.android.systemui.lifecycle.repeatWhenAttached import com.android.systemui.qs.tileimpl.QSTileViewImpl import kotlinx.coroutines.DisposableHandle import kotlinx.coroutines.flow.filterNotNull object QSLongPressEffectViewBinder { Loading @@ -49,9 +50,8 @@ object QSLongPressEffectViewBinder { launch({ "${tileSpec ?: "unknownTileSpec"}#LongPressEffect#action" }) { var effectAnimator: ValueAnimator? = null qsLongPressEffect.actionType.collect { action -> action?.let { when (it) { qsLongPressEffect.actionType.filterNotNull().collect { action -> when (action) { QSLongPressEffect.ActionType.CLICK -> { tile.performClick() qsLongPressEffect.clearActionType() Loading @@ -74,9 +74,7 @@ object QSLongPressEffectViewBinder { qsLongPressEffect.effectDuration.toLong() interpolator = AccelerateDecelerateInterpolator() doOnStart { qsLongPressEffect.handleAnimationStart() } doOnStart { qsLongPressEffect.handleAnimationStart() } addUpdateListener { val value = animatedValue as Float if (value == 0f) { Loading @@ -85,12 +83,8 @@ object QSLongPressEffectViewBinder { tile.updateLongPressEffectProperties(value) } } doOnEnd { qsLongPressEffect.handleAnimationComplete() } doOnCancel { qsLongPressEffect.handleAnimationCancel() } doOnEnd { qsLongPressEffect.handleAnimationComplete() } doOnCancel { qsLongPressEffect.handleAnimationCancel() } start() } } Loading @@ -112,7 +106,6 @@ object QSLongPressEffectViewBinder { } } } } @SuppressLint("ClickableViewAccessibility") private fun setTouchListener(tile: QSTileViewImpl, longPressEffect: QSLongPressEffect?) { Loading