summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSandeep Siddhartha <sansid@google.com>2013-12-26 15:42:52 -0800
committerSandeep Siddhartha <sansid@google.com>2013-12-26 15:42:52 -0800
commitd4d3d08741b2c183dbcba1fa25ca100783bfe1ee (patch)
treec95c52a78441a55312491f31352fa1bbc837c2cf /src
parent5f85bb4977d95a1a8148ce28d534586fb1dff45d (diff)
downloadandroid_packages_apps_Trebuchet-d4d3d08741b2c183dbcba1fa25ca100783bfe1ee.tar.gz
android_packages_apps_Trebuchet-d4d3d08741b2c183dbcba1fa25ca100783bfe1ee.tar.bz2
android_packages_apps_Trebuchet-d4d3d08741b2c183dbcba1fa25ca100783bfe1ee.zip
Allow changing search bar hint in the cling on-the-fly
- This allows GEL to initially supply an empty string if hotword isn't active, and later on update the cling if and when the hotword becomes active. - This isn't expensive as it'll only be called if Launcher first calls getFirstRunClingSearchBarHint, i.e. once every fresh install/clear data Bug: 11116105 Change-Id: Ia963bb62d7b331afd0c34adfa6c4b6bdbac48349
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Launcher.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a8dd99795..802f5d022 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -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 "";
}