From 0f69d9608f9e52a2ff3c301326eb963a17ac6178 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Wed, 7 Apr 2021 17:48:56 -0400 Subject: Set callback for the color background in the tile When the background of the tile changes from no ripple (colorBackgroundDrawable) to ripple (mRipple), it sets the callback in colorBackgroundDrawable to null. Need to make sure it's set back to the RippleDrawable. Test: manual Fixes: 183888161 Change-Id: I7282296ca54e6f7d6ee5bec8dfbb5f6b0d1e12b0 --- .../src/com/android/systemui/qs/tileimpl/QSTileViewHorizontal.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewHorizontal.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewHorizontal.kt index 7a8b2c696fa0..b9533237e3d5 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewHorizontal.kt +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewHorizontal.kt @@ -118,7 +118,11 @@ open class QSTileViewHorizontal( override fun setClickable(clickable: Boolean) { super.setClickable(clickable) background = if (clickable && mShowRippleEffect) { - mTileBackground + mRipple?.also { + // In case that the colorBackgroundDrawable was used as the background, make sure + // it has the correct callback instead of null + colorBackgroundDrawable?.callback = it + } } else { colorBackgroundDrawable } -- cgit v1.2.3-59-g8ed1b