mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-21 13:47:04 +00:00
Prevent crash
This commit is contained in:
parent
a4497c3992
commit
b6404d6c2d
1 changed files with 12 additions and 8 deletions
|
@ -5329,15 +5329,19 @@ public class FragmentCompose extends FragmentBase {
|
||||||
getMainHandler().post(new Runnable() {
|
getMainHandler().post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
target.requestFocus();
|
try {
|
||||||
|
target.requestFocus();
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
boolean keyboard = prefs.getBoolean("keyboard", true);
|
boolean keyboard = prefs.getBoolean("keyboard", true);
|
||||||
if (keyboard) {
|
if (keyboard) {
|
||||||
InputMethodManager imm =
|
InputMethodManager imm =
|
||||||
(InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
(InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
if (imm != null)
|
if (imm != null)
|
||||||
imm.showSoftInput(target, InputMethodManager.SHOW_IMPLICIT);
|
imm.showSoftInput(target, InputMethodManager.SHOW_IMPLICIT);
|
||||||
|
}
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Log.e(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue