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

Commit 774a94c8 authored by Gary Mai's avatar Gary Mai Committed by android-build-merger
Browse files

Hide the keyboard on saving a contact am: bf564f01

am: 0ad1375c

Change-Id: I9c352b49cf741209654d0063a866d70baa9e264b
parents ea2689ef 0ad1375c
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -928,7 +928,7 @@ public class ContactEditorFragment extends Fragment implements
        }

        setEnabled(false);

        hideSoftKeyboard();
        return doSaveAction(saveMode, /* joinContactId */ null);
    }

@@ -1837,4 +1837,12 @@ public class ContactEditorFragment extends Fragment implements
            RESTORE_FOCUS_DELAY_MILLIS);
    }

    private void hideSoftKeyboard() {
        InputMethodManager imm = (InputMethodManager) mContext.getSystemService(
            Context.INPUT_METHOD_SERVICE);
        if (imm != null && mContent != null) {
            imm.hideSoftInputFromWindow(
                mContent.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
        }
    }
}