mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
29c1156782
commit
64d1955325
|
@ -23,6 +23,7 @@ import android.content.Context;
|
|||
import android.graphics.Canvas;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.ActionMode;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.textclassifier.TextClassifier;
|
||||
|
@ -270,6 +271,26 @@ public class FixedEditText extends AppCompatEditText {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionMode startActionMode(ActionMode.Callback callback) {
|
||||
try {
|
||||
return super.startActionMode(callback);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionMode startActionMode(ActionMode.Callback callback, int type) {
|
||||
try {
|
||||
return super.startActionMode(callback, type);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
|
|
|
@ -29,6 +29,7 @@ import android.text.Selection;
|
|||
import android.text.Spannable;
|
||||
import android.text.Spanned;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.ActionMode;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
|
@ -351,6 +352,26 @@ public class FixedTextView extends AppCompatTextView {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionMode startActionMode(ActionMode.Callback callback) {
|
||||
try {
|
||||
return super.startActionMode(callback);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionMode startActionMode(ActionMode.Callback callback, int type) {
|
||||
try {
|
||||
return super.startActionMode(callback, type);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setText(CharSequence text, BufferType type) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue