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

Commit bbe3b208 authored by Joshua Tsuji's avatar Joshua Tsuji
Browse files

Fix long-press issue in RelativeTouchListener.

performLongClick does not check if the view is long-clickable, and defaults to showing a context menu if the long-click listener is not set. This crashes Bubbles. Just check if the view is long-clickable first.

Test: manual
Fixes: 154417194
Change-Id: I0bb1363fac3b5a2d16d1f5dc79f40b4a2bf88f4d
parent ce316be9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -115,7 +115,9 @@ abstract class RelativeTouchListener : View.OnTouchListener {

                performedLongClick = false
                handler.postDelayed({
                    if (v.isLongClickable) {
                        performedLongClick = v.performLongClick()
                    }
                }, ViewConfiguration.getLongPressTimeout().toLong())
            }