Prevent crash

This commit is contained in:
M66B 2022-11-16 11:33:00 +01:00
parent af8a3af8f7
commit cff54b3be4
1 changed files with 21 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package eu.faircode.email;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;
/*
@ -108,4 +109,24 @@ public class ScrollViewEx extends ScrollView {
*/
}
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
try {
return super.dispatchTouchEvent(ev);
} catch (Throwable ex) {
Log.w(ex);
return false;
}
}
@Override
public boolean dispatchGenericMotionEvent(MotionEvent event) {
try {
return super.dispatchGenericMotionEvent(event);
} catch (Throwable ex) {
Log.w(ex);
return false;
}
}
}