Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b0c7db4 authored by Daisuke Miyakawa's avatar Daisuke Miyakawa
Browse files

Avoid NPE on hideInputMethod()

It happens when there's no focused view.

Bug: 5157908
Change-Id: I82e7d69b71f2e23274696a1d1a582f503ca80fcc
parent 0a20c77a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -753,7 +753,7 @@ public class DialtactsActivity extends Activity {

    private void hideInputMethod(View view) {
        InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
        if (imm != null) {
        if (imm != null && view != null) {
            imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
        }
    }