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

Commit 8d36ffe5 authored by Sandeep Siddhartha's avatar Sandeep Siddhartha Committed by Android (Google) Code Review
Browse files

Merge "Allow changing search bar hint in the cling on-the-fly" into jb-ub-now-kermit

parents 72b4c7c3 d4d3d087
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -4418,6 +4418,20 @@ public class Launcher extends Activity
        }
    }

    /**
     * Called when the SearchBar hint should be changed.
     *
     * @param hint the hint to be displayed in the search bar.
     */
    protected void onSearchBarHintChanged(String hint) {
        Cling cling = (Cling) findViewById(R.id.first_run_cling);
        if (cling != null && cling.getVisibility() == View.VISIBLE && !hint.isEmpty()) {
            TextView sbHint = (TextView) cling.findViewById(R.id.search_bar_hint);
            sbHint.setText(hint);
            sbHint.setVisibility(View.VISIBLE);
        }
    }

    protected String getFirstRunClingSearchBarHint() {
        return "";
    }