Fix touches activating TaskView when showing user education

Test: manual - force user education to show, expand a bubble
             - while manage user education is up tap on the
               task view & verify the user education hides
Bug: 195592791
Change-Id: Ie0e3647b8ea68ed8504b3ad7f27713ba15c5a8ca
This commit is contained in:
Mady Mellor
2021-08-04 16:41:20 -07:00
parent 204080732f
commit 22fbd83872

View File

@@ -47,6 +47,7 @@ class ManageEducationView constructor(context: Context, positioner: BubblePositi
private var isHiding = false
private var realManageButtonRect = Rect()
private var bubbleExpandedView: BubbleExpandedView? = null
init {
LayoutInflater.from(context).inflate(R.layout.bubbles_manage_button_education, this)
@@ -97,6 +98,9 @@ class ManageEducationView constructor(context: Context, positioner: BubblePositi
setButtonColor()
if (visibility == VISIBLE) return
bubbleExpandedView = expandedView
expandedView.taskView?.setObscuredTouchRect(Rect(positioner.screenRect))
layoutParams.width = if (positioner.isLargeScreen)
context.resources.getDimensionPixelSize(
R.dimen.bubbles_user_education_width_large_screen)
@@ -131,6 +135,7 @@ class ManageEducationView constructor(context: Context, positioner: BubblePositi
}
fun hide() {
bubbleExpandedView?.taskView?.setObscuredTouchRect(null)
if (visibility != VISIBLE || isHiding) return
animate()