event at onTouchEvent can apparently be null, check it
This commit is contained in:
parent
f4ea085118
commit
38f3e4034f
|
@ -133,7 +133,11 @@ class MainActivity : SimpleActivity(), FlingListener {
|
|||
(widgets_fragment as WidgetsFragment).onConfigurationChanged()
|
||||
}
|
||||
|
||||
override fun onTouchEvent(event: MotionEvent): Boolean {
|
||||
override fun onTouchEvent(event: MotionEvent?): Boolean {
|
||||
if (event == null) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (mLongPressedIcon != null && event.actionMasked == MotionEvent.ACTION_UP || event.actionMasked == MotionEvent.ACTION_CANCEL) {
|
||||
mLastUpEvent = System.currentTimeMillis()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue