mostly fix 2392102 by overriding the force-open input thing
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 1830521..8e61f11 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -61,6 +61,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnLongClickListener;
+import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.TextView;
@@ -397,6 +398,15 @@
protected void onResume() {
super.onResume();
+ /*
+ // We can't hide the IME if it was forced open. So don't bother.
+ final InputMethodManager inputManager = (InputMethodManager)
+ getSystemService(Context.INPUT_METHOD_SERVICE);
+ WindowManager.LayoutParams lp = getWindow().getAttributes();
+ inputManager.hideSoftInputFromWindow(lp.token, 0);
+ Log.d(TAG, "called hideSoftInputFromWindow");
+ */
+
mPaused = false;
if (mRestoring) {
@@ -448,6 +458,11 @@
}
}
+ // Eat the long press event so the keyboard doesn't come up.
+ if (keyCode == KeyEvent.KEYCODE_MENU && event.isLongPress()) {
+ return true;
+ }
+
return handled;
}