Merge "Fix bug 3391818 - Keyboard covers the "Show in chat list" selection in talk > Friend Info" into honeycomb
diff --git a/core/java/android/widget/ListPopupWindow.java b/core/java/android/widget/ListPopupWindow.java
index 5dc42e4..8116a12 100644
--- a/core/java/android/widget/ListPopupWindow.java
+++ b/core/java/android/widget/ListPopupWindow.java
@@ -190,6 +190,7 @@
     public ListPopupWindow(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
         mContext = context;
         mPopup = new PopupWindow(context, attrs, defStyleAttr, defStyleRes);
+        mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
     }
 
     /**
@@ -576,7 +577,6 @@
             }
 
             mPopup.setWindowLayoutMode(widthSpec, heightSpec);
-            mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
             mPopup.setClipToScreenEnabled(true);
             
             // use outside touchable to dismiss drop down when touching outside of it, so
diff --git a/core/java/android/widget/Spinner.java b/core/java/android/widget/Spinner.java
index 0baddcb..a92272c 100644
--- a/core/java/android/widget/Spinner.java
+++ b/core/java/android/widget/Spinner.java
@@ -665,6 +665,7 @@
         @Override
         public void show() {
             setWidth(Spinner.this.getWidth());
+            setInputMethodMode(ListPopupWindow.INPUT_METHOD_NOT_NEEDED);
             super.show();
             getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
             setSelection(Spinner.this.getSelectedItemPosition());