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

Commit 0ad1375c authored by Gary Mai's avatar Gary Mai Committed by android-build-merger
Browse files

Hide the keyboard on saving a contact

am: bf564f01

Change-Id: Iafa49d1f6fb1e49ec98db7cc5f127fddce769f13
parents 51e28e4c bf564f01
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);
        }
    }
}