From f84f2310dab42d43c338fe7f7d1a42bb40db5bf8 Mon Sep 17 00:00:00 2001 From: Shubhi Date: Thu, 21 Nov 2024 17:03:21 +0000 Subject: Clean up SearchSuggestionType class and use CloudMediaProviderContract Instead of creating a custom SearchSuggestionType class, resue the suggestion defined in CloudMediaProviderContract Bug: 374920933 Test: atest SearchSuggestionsProviderTest Test: atest SearchRequestDatabaseUtilTest Test: atest SearchSuggestionsDatabaseUtilTest Flag: com.android.providers.media.flags.enable_photopicker_search Change-Id: Ifbe712212bef4fce09bacbb86d0cfbb88e478d2c --- .../java/android/provider/CloudMediaProviderContract.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'apex') diff --git a/apex/framework/java/android/provider/CloudMediaProviderContract.java b/apex/framework/java/android/provider/CloudMediaProviderContract.java index 30bbd162f..a5b84d72d 100644 --- a/apex/framework/java/android/provider/CloudMediaProviderContract.java +++ b/apex/framework/java/android/provider/CloudMediaProviderContract.java @@ -1460,6 +1460,16 @@ public final class CloudMediaProviderContract { public static final String SEARCH_SUGGESTION_ALBUM = "com.android.providers.media.SEARCH_SUGGESTION_ALBUM"; + /** + * Suggestion based on user's search history. + * @see SearchSuggestionColumns#TYPE + * Type: STRING + * + * @hide + */ + public static final String SEARCH_SUGGESTION_HISTORY = + "com.android.providers.media.SEARCH_SUGGESTION_HISTORY"; + /** * Defines the different types of search suggestions available and supported in photo picker. * @@ -1471,7 +1481,8 @@ public final class CloudMediaProviderContract { SEARCH_SUGGESTION_FACE, SEARCH_SUGGESTION_LOCATION, SEARCH_SUGGESTION_DATE, - SEARCH_SUGGESTION_ALBUM + SEARCH_SUGGESTION_ALBUM, + SEARCH_SUGGESTION_HISTORY }) @Retention(SOURCE) public @interface SearchSuggestionType {} -- cgit v1.2.3-59-g8ed1b