Hide the keyboard on saving a contact
am: bf564f015e
Change-Id: Iafa49d1f6fb1e49ec98db7cc5f127fddce769f13
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index a8e3cd8..ce4b9bc 100755
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -928,7 +928,7 @@
}
setEnabled(false);
-
+ hideSoftKeyboard();
return doSaveAction(saveMode, /* joinContactId */ null);
}
@@ -1837,4 +1837,12 @@
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);
+ }
+ }
}