diff options
author | Yoshiaki Naka <yoshiaki.naka@sony.com> | 2022-01-11 08:59:10 +0900 |
---|---|---|
committer | Yoshiaki Naka <yoshiaki.naka@sony.com> | 2022-03-15 09:24:53 +0000 |
commit | d4b2f110c7cb968d14d09d24be1028d70b528efc (patch) | |
tree | ba3a491e13b8f13bb0e6e6688a65c115eaa10f15 /src/com/android/stk | |
parent | c215fda9397f54cda4051c85a237d93a6074b12a (diff) | |
download | Stk-d4b2f110c7cb968d14d09d24be1028d70b528efc.tar.gz |
Hide the soft keyboard when StkInputActivity is not in the foreground
There is an usecase that the software keyboard remains in the screen
even after closing StkInputActivity. This change is an approach to fix
the issue on SIM Toolkit app side.
Bug: 224586736
Test: Manually confirmed that the software keyboard disappears
Change-Id: I217737858d0d02688dd7e114459e496aa904fbac
Diffstat (limited to 'src/com/android/stk')
-rw-r--r-- | src/com/android/stk/StkInputActivity.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/stk/StkInputActivity.java b/src/com/android/stk/StkInputActivity.java index b9c821b..06aaa58 100644 --- a/src/com/android/stk/StkInputActivity.java +++ b/src/com/android/stk/StkInputActivity.java @@ -36,6 +36,7 @@ import android.view.MenuItem; import android.view.View; import android.view.WindowManager; import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; @@ -217,6 +218,10 @@ public class StkInputActivity extends AppCompatActivity implements View.OnClickL if (mPopupMenu != null) { mPopupMenu.dismiss(); } + if (mTextIn != null) { + InputMethodManager imm = getSystemService(InputMethodManager.class); + imm.hideSoftInputFromWindow(mTextIn.getWindowToken(), 0); + } } @Override |