1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-28 02:37:16 +00:00

Prevent crash

This commit is contained in:
M66B 2020-01-04 16:46:06 +01:00
parent eded20caae
commit e21e34800a

View file

@ -83,7 +83,19 @@ public class DrawerLayoutEx extends DrawerLayout {
if (!rect.contains((int) ev.getX(), (int) ev.getY()))
return false;
}
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);
}
}