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
This commit is contained in:
@@ -115,7 +115,9 @@ abstract class RelativeTouchListener : View.OnTouchListener {
|
||||
|
||||
performedLongClick = false
|
||||
handler.postDelayed({
|
||||
performedLongClick = v.performLongClick()
|
||||
if (v.isLongClickable) {
|
||||
performedLongClick = v.performLongClick()
|
||||
}
|
||||
}, ViewConfiguration.getLongPressTimeout().toLong())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user