Loading core/java/android/widget/SearchView.java +23 −9 Original line number Diff line number Diff line Loading @@ -118,6 +118,21 @@ public class SearchView extends LinearLayout implements CollapsibleActionView { private SearchableInfo mSearchable; private Bundle mAppSearchData; /* * SearchView can be set expanded before the IME is ready to be shown during * initial UI setup. The show operation is asynchronous to account for this. */ private Runnable mShowImeRunnable = new Runnable() { public void run() { InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { imm.showSoftInputUnchecked(0, null); } } }; // For voice searching private final Intent mVoiceWebSearchIntent; private final Intent mVoiceAppSearchIntent; Loading Loading @@ -650,16 +665,15 @@ public class SearchView extends LinearLayout implements CollapsibleActionView { mSubmitArea.getBackground().setState(focused ? FOCUSED_STATE_SET : EMPTY_STATE_SET); } private void setImeVisibility(boolean visible) { private void setImeVisibility(final boolean visible) { if (visible) { post(mShowImeRunnable); } else { removeCallbacks(mShowImeRunnable); InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); // We made sure the IME was displayed, so also make sure it is closed // when we go away. if (imm != null) { if (visible) { imm.showSoftInputUnchecked(0, null); } else { imm.hideSoftInputFromWindow(getWindowToken(), 0); } } Loading core/java/com/android/internal/view/menu/MenuBuilder.java +0 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Parcelable; import android.util.Log; import android.util.SparseArray; import android.view.ActionProvider; import android.view.ContextMenu.ContextMenuInfo; Loading policy/src/com/android/internal/policy/impl/PhoneWindow.java +7 −7 Original line number Diff line number Diff line Loading @@ -343,6 +343,13 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } } if (mActionBar != null) { if (mActionMenuPresenterCallback == null) { mActionMenuPresenterCallback = new ActionMenuPresenterCallback(); } mActionBar.setMenu(st.menu, mActionMenuPresenterCallback); } // Call callback, and return if it doesn't want to display menu. // Creating the panel menu will involve a lot of manipulation; Loading @@ -356,13 +363,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } st.refreshMenuContent = false; if (mActionBar != null) { if (mActionMenuPresenterCallback == null) { mActionMenuPresenterCallback = new ActionMenuPresenterCallback(); } mActionBar.setMenu(st.menu, mActionMenuPresenterCallback); } } // Callback and return if the callback does not want to show the menu Loading Loading
core/java/android/widget/SearchView.java +23 −9 Original line number Diff line number Diff line Loading @@ -118,6 +118,21 @@ public class SearchView extends LinearLayout implements CollapsibleActionView { private SearchableInfo mSearchable; private Bundle mAppSearchData; /* * SearchView can be set expanded before the IME is ready to be shown during * initial UI setup. The show operation is asynchronous to account for this. */ private Runnable mShowImeRunnable = new Runnable() { public void run() { InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { imm.showSoftInputUnchecked(0, null); } } }; // For voice searching private final Intent mVoiceWebSearchIntent; private final Intent mVoiceAppSearchIntent; Loading Loading @@ -650,16 +665,15 @@ public class SearchView extends LinearLayout implements CollapsibleActionView { mSubmitArea.getBackground().setState(focused ? FOCUSED_STATE_SET : EMPTY_STATE_SET); } private void setImeVisibility(boolean visible) { private void setImeVisibility(final boolean visible) { if (visible) { post(mShowImeRunnable); } else { removeCallbacks(mShowImeRunnable); InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); // We made sure the IME was displayed, so also make sure it is closed // when we go away. if (imm != null) { if (visible) { imm.showSoftInputUnchecked(0, null); } else { imm.hideSoftInputFromWindow(getWindowToken(), 0); } } Loading
core/java/com/android/internal/view/menu/MenuBuilder.java +0 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Parcelable; import android.util.Log; import android.util.SparseArray; import android.view.ActionProvider; import android.view.ContextMenu.ContextMenuInfo; Loading
policy/src/com/android/internal/policy/impl/PhoneWindow.java +7 −7 Original line number Diff line number Diff line Loading @@ -343,6 +343,13 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } } if (mActionBar != null) { if (mActionMenuPresenterCallback == null) { mActionMenuPresenterCallback = new ActionMenuPresenterCallback(); } mActionBar.setMenu(st.menu, mActionMenuPresenterCallback); } // Call callback, and return if it doesn't want to display menu. // Creating the panel menu will involve a lot of manipulation; Loading @@ -356,13 +363,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } st.refreshMenuContent = false; if (mActionBar != null) { if (mActionMenuPresenterCallback == null) { mActionMenuPresenterCallback = new ActionMenuPresenterCallback(); } mActionBar.setMenu(st.menu, mActionMenuPresenterCallback); } } // Callback and return if the callback does not want to show the menu Loading