mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
24bb405fbd
commit
1c3357b79e
|
@ -23,6 +23,7 @@ import android.content.Context;
|
|||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
@ -78,6 +79,28 @@ public class FixedTextView extends AppCompatTextView {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
try {
|
||||
return super.onTouchEvent(event);
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
return false;
|
||||
/*
|
||||
java.lang.IllegalArgumentException
|
||||
at com.android.internal.util.Preconditions.checkArgument(Preconditions.java:33)
|
||||
at android.widget.SelectionActionModeHelper$TextClassificationHelper.init(SelectionActionModeHelper.java:640)
|
||||
at android.widget.SelectionActionModeHelper.resetTextClassificationHelper(SelectionActionModeHelper.java:203)
|
||||
at android.widget.SelectionActionModeHelper.invalidateActionModeAsync(SelectionActionModeHelper.java:104)
|
||||
at android.widget.Editor.invalidateActionModeAsync(Editor.java:2028)
|
||||
at android.widget.Editor.showFloatingToolbar(Editor.java:1419)
|
||||
at android.widget.Editor.updateFloatingToolbarVisibility(Editor.java:1397)
|
||||
at android.widget.Editor.onTouchEvent(Editor.java:1367)
|
||||
at android.widget.TextView.onTouchEvent(TextView.java:9701)
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue