From b2a5011578d4a64df2f39bdeeedfe9f37e7aecc4 Mon Sep 17 00:00:00 2001 From: Karl Rosaen Date: Tue, 5 May 2009 21:14:01 -0700 Subject: [PATCH] Define the URI path, columns and constants for shortcut validation. --- core/java/android/app/SearchManager.java | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java index 2d2f98a043b47..90de40d66c531 100644 --- a/core/java/android/app/SearchManager.java +++ b/core/java/android/app/SearchManager.java @@ -1182,6 +1182,17 @@ public class SearchManager * Typically you'll use this with a URI matcher. */ public final static String SUGGEST_URI_PATH_QUERY = "search_suggest_query"; + + /** + * Uri path for shortcut validation. This is the path that the search manager will use when + * querying your content provider to refresh a shortcutted suggestion result and to check if it + * is still valid. When asked, a source may return an up to date result, or no result. No + * result indicates the shortcut refers to a no longer valid sugggestion. + * + * @see #SUGGEST_COLUMN_SHORTCUT_ID + * @hide + */ + public final static String SUGGEST_URI_PATH_SHORTCUT = "search_suggest_shortcut"; /** * MIME type for suggestions data. You'll use this in your suggestions content provider @@ -1302,6 +1313,26 @@ public class SearchManager */ public final static String SUGGEST_COLUMN_QUERY = "suggest_intent_query"; + /** + * Column name for suggestions cursor. Optional. This column is used to indicate whether + * a search suggestion should be stored as a shortcut, and whether it should be validated. If + * missing, the result will be stored as a shortcut and never validated. If set to + * {@link #SUGGEST_NEVER_MAKE_SHORTCUT}, the result will not be stored as a shortcut. + * Otherwise, the shortcut id will be used to check back for validation via + * {@link #SUGGEST_URI_PATH_SHORTCUT}. + * + * @hide Pending API council approval. + */ + public final static String SUGGEST_COLUMN_SHORTCUT_ID = "suggest_shortcut_id"; + + /** + * Column value for suggestion column {@link #SUGGEST_COLUMN_SHORTCUT_ID} when a suggestion + * should not be stored as a shortcut in global search. + * + * @hide Pending API council approval. + */ + public final static String SUGGEST_NEVER_MAKE_SHORTCUT = "_-1"; + /** * If a suggestion has this value in {@link #SUGGEST_COLUMN_INTENT_ACTION}, * the search dialog will switch to a different suggestion source when the