mirror of https://github.com/M66B/FairEmail.git
Added fail safe
This commit is contained in:
parent
eb90b9914e
commit
c56151750b
|
@ -92,11 +92,15 @@ public class EditTextCompose extends FixedEditText {
|
||||||
setCustomInsertionActionModeCallback(new ActionMode.Callback() {
|
setCustomInsertionActionModeCallback(new ActionMode.Callback() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
||||||
|
try {
|
||||||
if (undo_manager && can(android.R.id.undo))
|
if (undo_manager && can(android.R.id.undo))
|
||||||
menu.add(Menu.CATEGORY_ALTERNATIVE, R.string.title_undo, 1, getTitle(R.string.title_undo));
|
menu.add(Menu.CATEGORY_ALTERNATIVE, R.string.title_undo, 1, getTitle(R.string.title_undo));
|
||||||
if (undo_manager && can(android.R.id.redo))
|
if (undo_manager && can(android.R.id.redo))
|
||||||
menu.add(Menu.CATEGORY_ALTERNATIVE, R.string.title_redo, 2, getTitle(R.string.title_redo));
|
menu.add(Menu.CATEGORY_ALTERNATIVE, R.string.title_redo, 2, getTitle(R.string.title_redo));
|
||||||
menu.add(Menu.CATEGORY_ALTERNATIVE, R.string.title_insert_line, 3, R.string.title_insert_line);
|
menu.add(Menu.CATEGORY_ALTERNATIVE, R.string.title_insert_line, 3, R.string.title_insert_line);
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Log.e(ex);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue