mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-04-21 05:17:46 +02:00
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()
|
(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) {
|
if (mLongPressedIcon != null && event.actionMasked == MotionEvent.ACTION_UP || event.actionMasked == MotionEvent.ACTION_CANCEL) {
|
||||||
mLastUpEvent = System.currentTimeMillis()
|
mLastUpEvent = System.currentTimeMillis()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user