From 3505c1ae030335105fd8cd6979988bc49b609d29 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 1 Sep 2021 20:33:58 +0200 Subject: [PATCH] Revert "Queue keyboard show/hide" This reverts commit 2470316fd05fdcabd569c022df2835d224b79880. --- .../main/java/eu/faircode/email/Helper.java | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 6fad177870..79faf829b4 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -1171,43 +1171,25 @@ public class Helper { } static void showKeyboard(final View view) { - Context context = view.getContext(); + final Context context = view.getContext(); InputMethodManager imm = (InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE); if (imm == null) return; - view.post(new Runnable() { - @Override - public void run() { - try { - Log.i("showKeyboard view=" + view); - imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); - } catch (Throwable ex) { - Log.e(ex); - } - } - }); + Log.i("showKeyboard view=" + view); + imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); } static void hideKeyboard(final View view) { - Context context = view.getContext(); + final Context context = view.getContext(); InputMethodManager imm = (InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE); if (imm == null) return; - view.post(new Runnable() { - @Override - public void run() { - try { - Log.i("hideKeyboard view=" + view); - imm.hideSoftInputFromWindow(view.getWindowToken(), 0); - } catch (Throwable ex) { - Log.e(ex); - } - } - }); + Log.i("hideKeyboard view=" + view); + imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } // Formatting