Add a global-search column for last access.
NEW_API
This new column may be set in Cursors returned to global search. QSB
will may use this to help sorting results when presenting them to the
user.
Change-Id: Id5bc87dcb50f3e3a55b0a54a8c90057e60fd0e9e
diff --git a/api/current.txt b/api/current.txt
index 12d9cc2..885d9e8 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -3442,6 +3442,7 @@
field public static final java.lang.String SUGGEST_COLUMN_INTENT_DATA = "suggest_intent_data";
field public static final java.lang.String SUGGEST_COLUMN_INTENT_DATA_ID = "suggest_intent_data_id";
field public static final java.lang.String SUGGEST_COLUMN_INTENT_EXTRA_DATA = "suggest_intent_extra_data";
+ field public static final java.lang.String SUGGEST_COLUMN_LAST_ACCESS_HINT = "suggest_last_access_hint";
field public static final java.lang.String SUGGEST_COLUMN_QUERY = "suggest_intent_query";
field public static final java.lang.String SUGGEST_COLUMN_SHORTCUT_ID = "suggest_shortcut_id";
field public static final java.lang.String SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING = "suggest_spinner_while_refreshing";
diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java
index aab087f..8f646c5 100644
--- a/core/java/android/app/SearchManager.java
+++ b/core/java/android/app/SearchManager.java
@@ -328,6 +328,15 @@
public final static String SUGGEST_COLUMN_FLAGS = "suggest_flags";
/**
+ * Column name for suggestions cursor. <i>Optional.</i> This column may be
+ * used to specify the time in (@link System#currentTimeMillis
+ * System.currentTImeMillis()} (wall time in UTC) when an item was last
+ * accessed within the results-providing application. If set, this may be
+ * used to show more-recently-used items first.
+ */
+ public final static String SUGGEST_COLUMN_LAST_ACCESS_HINT = "suggest_last_access_hint";
+
+ /**
* Column value for suggestion column {@link #SUGGEST_COLUMN_SHORTCUT_ID} when a suggestion
* should not be stored as a shortcut in global search.
*/