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:
parent
a1c5427e10
commit
0ff5ccc5dd
1 changed files with 18 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue