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

Commit 53f56c4f authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 5358705 - Request no full-screen mode of the IME when a

SearchView is expanded in an action bar

This is a case where we always know there will be room on screen for
the user to meaningfully use the UI in the absence of full-screen
extract mode. Save the old state and restore it when we go in and out
of expanded action bar mode.

Change-Id: I4ae2c5df4f581c6824e6a1f7ff8d97fd86d8e260
parent 4113acf1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {
    private CharSequence mOldQueryText;
    private CharSequence mUserQuery;
    private boolean mExpandedInActionView;
    private int mCollapsedImeOptions;

    private SearchableInfo mSearchable;
    private Bundle mAppSearchData;
@@ -1166,6 +1167,7 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {
        clearFocus();
        updateViewsVisibility(true);
        mQueryTextView.setText("");
        mQueryTextView.setImeOptions(mCollapsedImeOptions);
        mExpandedInActionView = false;
    }

@@ -1175,6 +1177,8 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {
    @Override
    public void onActionViewExpanded() {
        mExpandedInActionView = true;
        mCollapsedImeOptions = mQueryTextView.getImeOptions();
        mQueryTextView.setImeOptions(mCollapsedImeOptions | EditorInfo.IME_FLAG_NO_FULLSCREEN);
        setIconified(false);
    }