summaryrefslogtreecommitdiff
path: root/core/java/android/app/SearchDialog.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2010-09-15 16:13:43 -0700
committerAmith Yamasani <yamasani@google.com>2010-09-16 06:37:26 -0700
commite678f46ec45076203f6260f8a26f56d838c6b6ff (patch)
tree32cbbf95c192c37947d4814a85d03ff3615bf726 /core/java/android/app/SearchDialog.java
parent44c7197a8b3156c055fb596e62c5fd7f6bca7e8c (diff)
Query refinement feature in SearchView.
New method : setQueryRefinementEnabled() which will either enable all suggestions to have the little query refinement icon in the right or just the ones that have a bit set in the new SUGGEST_FLAGS column of the suggestion provider cursor.
Diffstat (limited to 'core/java/android/app/SearchDialog.java')
-rw-r--r--core/java/android/app/SearchDialog.java16
1 files changed, 3 insertions, 13 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index 1f115e80b6ad..18602dfa0a2a 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -1083,7 +1083,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
protected void launchQuerySearch(int actionKey, String actionMsg) {
String query = mSearchAutoComplete.getText().toString();
String action = Intent.ACTION_SEARCH;
- Intent intent = createIntent(action, null, null, query, null,
+ Intent intent = createIntent(action, null, null, query,
actionKey, actionMsg);
launchIntent(intent);
}
@@ -1185,11 +1185,6 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
// use specific action if supplied, or default action if supplied, or fixed default
String action = getColumnString(c, SearchManager.SUGGEST_COLUMN_INTENT_ACTION);
- // some items are display only, or have effect via the cursor respond click reporting.
- if (SearchManager.INTENT_ACTION_NONE.equals(action)) {
- return null;
- }
-
if (action == null) {
action = mSearchable.getSuggestIntentAction();
}
@@ -1211,14 +1206,10 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
}
Uri dataUri = (data == null) ? null : Uri.parse(data);
- String componentName = getColumnString(
- c, SearchManager.SUGGEST_COLUMN_INTENT_COMPONENT_NAME);
-
String query = getColumnString(c, SearchManager.SUGGEST_COLUMN_QUERY);
String extraData = getColumnString(c, SearchManager.SUGGEST_COLUMN_INTENT_EXTRA_DATA);
- return createIntent(action, dataUri, extraData, query, componentName, actionKey,
- actionMsg);
+ return createIntent(action, dataUri, extraData, query, actionKey, actionMsg);
} catch (RuntimeException e ) {
int rowNum;
try { // be really paranoid now
@@ -1239,7 +1230,6 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
* @param data Intent data, or <code>null</code>.
* @param extraData Data for {@link SearchManager#EXTRA_DATA_KEY} or <code>null</code>.
* @param query Intent query, or <code>null</code>.
- * @param componentName Data for {@link SearchManager#COMPONENT_NAME_KEY} or <code>null</code>.
* @param actionKey The key code of the action key that was pressed,
* or {@link KeyEvent#KEYCODE_UNKNOWN} if none.
* @param actionMsg The message for the action key that was pressed,
@@ -1249,7 +1239,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
* @return The intent.
*/
private Intent createIntent(String action, Uri data, String extraData, String query,
- String componentName, int actionKey, String actionMsg) {
+ int actionKey, String actionMsg) {
// Now build the Intent
Intent intent = new Intent(action);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);