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

Workaround yet another Android crash

This commit is contained in:
M66B 2020-07-19 10:56:49 +02:00
parent a1c5427e10
commit 0ff5ccc5dd

View file

@ -20,6 +20,7 @@ package eu.faircode.email;
*/
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.MotionEvent;
@ -69,6 +70,23 @@ public class FixedEditText extends AppCompatEditText {
}
}
@Override
protected void onDraw(Canvas canvas) {
try {
super.onDraw(canvas);
} catch (Throwable ex) {
Log.w(ex);
/*
java.lang.ArrayIndexOutOfBoundsException: length=39; index=-3
at android.text.DynamicLayout.getBlockIndex(DynamicLayout.java:648)
at android.widget.Editor.drawHardwareAccelerated(Editor.java:1703)
at android.widget.Editor.onDraw(Editor.java:1672)
at android.widget.TextView.onDraw(TextView.java:6914)
at android.view.View.draw(View.java:19200)
*/
}
}
@Override
public boolean onTouchEvent(MotionEvent event) {
try {