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

Commit f8790036 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Show AutoCompleteTextView dropdown in Search dialog when cursor updates. Fixes b/2426929"

parents fe4f2c9e defb1df5
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -577,6 +577,13 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
        mVoiceButton.setVisibility(visibility);
    }

    /** Called by SuggestionsAdapter when the cursor contents changed. */
    void onDataSetChanged() {
        if (mSearchAutoComplete != null && mSuggestionsAdapter != null) {
            mSearchAutoComplete.onFilterComplete(mSuggestionsAdapter.getCount());
        }
    }

    /**
     * Hack to determine whether this is the browser, so we can adjust the UI.
     */
+2 −0
Original line number Diff line number Diff line
@@ -189,6 +189,8 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
        if (DBG) Log.d(LOG_TAG, "notifyDataSetChanged");
        super.notifyDataSetChanged();

        mSearchDialog.onDataSetChanged();

        updateSpinnerState(getCursor());
    }