Merge "Allow changing search bar hint in the cling on-the-fly" into jb-ub-now-kermit
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a8dd997..802f5d0 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -4418,6 +4418,20 @@
}
}
+ /**
+ * 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 "";
}