mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 10:17:18 +00:00
Prevent crash
This commit is contained in:
parent
eded20caae
commit
e21e34800a
1 changed files with 14 additions and 2 deletions
|
@ -83,7 +83,19 @@ public class DrawerLayoutEx extends DrawerLayout {
|
|||
if (!rect.contains((int) ev.getX(), (int) ev.getY()))
|
||||
return false;
|
||||
}
|
||||
return super.onInterceptTouchEvent(ev);
|
||||
|
||||
try {
|
||||
return super.onInterceptTouchEvent(ev);
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
/*
|
||||
java.lang.NullPointerException: Attempt to get length of null array
|
||||
java.lang.NullPointerException: Attempt to get length of null array
|
||||
at androidx.customview.widget.ViewDragHelper.checkTouchSlop(SourceFile:1334)
|
||||
at androidx.drawerlayout.widget.DrawerLayout.onInterceptTouchEvent(SourceFile:1512)
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -97,7 +109,7 @@ public class DrawerLayoutEx extends DrawerLayout {
|
|||
if (rect.contains((int) ev.getX(), (int) ev.getY()))
|
||||
return content.dispatchGenericMotionEvent(ev);
|
||||
}
|
||||
|
||||
return super.dispatchGenericMotionEvent(ev);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue