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

Commit d96d8541 authored by Anton Potapov's avatar Anton Potapov
Browse files

Add isSliceViewClickable before processing onClick in SliceView

Flag: aconfig new_volume_panel NEXTFOOD
Test: manual on tablet. Check that the ANC button works
Bug: 333835509
Change-Id: Idf85dbed3f188c00313a2c277d819252da8601b6
parent e604171b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -98,10 +98,10 @@ private class ClickableSliceView(
    }

    override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
        return onClick != null || super.onInterceptTouchEvent(ev)
        return (isSliceViewClickable && onClick != null) || super.onInterceptTouchEvent(ev)
    }

    override fun onClick(v: View?) {
        onClick?.let { it() } ?: super.onClick(v)
        onClick?.takeIf { isSliceViewClickable }?.let { it() } ?: super.onClick(v)
    }
}