MediaBrowserService: Add a constant for suggestion keywords
EXTRA_SUGGESTION_KEYWORDS will be used for denoting specific keywords which will be considered when the browser service suggests media items. Bug: 28210241 Change-Id: I3831c0819f9d3ffa3fdd628031063069a5a62006
This commit is contained in:
@@ -34697,6 +34697,7 @@ package android.service.media {
|
||||
field public static final java.lang.String EXTRA_OFFLINE = "android.service.media.extra.OFFLINE";
|
||||
field public static final java.lang.String EXTRA_RECENT = "android.service.media.extra.RECENT";
|
||||
field public static final java.lang.String EXTRA_SUGGESTED = "android.service.media.extra.SUGGESTED";
|
||||
field public static final java.lang.String EXTRA_SUGGESTION_KEYWORDS = "android.service.media.extra.SUGGESTION_KEYWORDS";
|
||||
}
|
||||
|
||||
public class MediaBrowserService.Result {
|
||||
|
||||
@@ -37445,6 +37445,7 @@ package android.service.media {
|
||||
field public static final java.lang.String EXTRA_OFFLINE = "android.service.media.extra.OFFLINE";
|
||||
field public static final java.lang.String EXTRA_RECENT = "android.service.media.extra.RECENT";
|
||||
field public static final java.lang.String EXTRA_SUGGESTED = "android.service.media.extra.SUGGESTED";
|
||||
field public static final java.lang.String EXTRA_SUGGESTION_KEYWORDS = "android.service.media.extra.SUGGESTION_KEYWORDS";
|
||||
}
|
||||
|
||||
public class MediaBrowserService.Result {
|
||||
|
||||
@@ -34774,6 +34774,7 @@ package android.service.media {
|
||||
field public static final java.lang.String EXTRA_OFFLINE = "android.service.media.extra.OFFLINE";
|
||||
field public static final java.lang.String EXTRA_RECENT = "android.service.media.extra.RECENT";
|
||||
field public static final java.lang.String EXTRA_SUGGESTED = "android.service.media.extra.SUGGESTED";
|
||||
field public static final java.lang.String EXTRA_SUGGESTION_KEYWORDS = "android.service.media.extra.SUGGESTION_KEYWORDS";
|
||||
}
|
||||
|
||||
public class MediaBrowserService.Result {
|
||||
|
||||
@@ -363,6 +363,7 @@ public abstract class MediaBrowserService extends Service {
|
||||
* @see BrowserRoot#EXTRA_RECENT
|
||||
* @see BrowserRoot#EXTRA_OFFLINE
|
||||
* @see BrowserRoot#EXTRA_SUGGESTED
|
||||
* @see BrowserRoot#EXTRA_SUGGESTION_KEYWORDS
|
||||
*/
|
||||
public abstract @Nullable BrowserRoot onGetRoot(@NonNull String clientPackageName,
|
||||
int clientUid, @Nullable Bundle rootHints);
|
||||
@@ -500,6 +501,7 @@ public abstract class MediaBrowserService extends Service {
|
||||
* @see MediaBrowserService.BrowserRoot#EXTRA_RECENT
|
||||
* @see MediaBrowserService.BrowserRoot#EXTRA_OFFLINE
|
||||
* @see MediaBrowserService.BrowserRoot#EXTRA_SUGGESTED
|
||||
* @see MediaBrowserService.BrowserRoot#EXTRA_SUGGESTION_KEYWORDS
|
||||
*/
|
||||
public final Bundle getBrowserRootHints() {
|
||||
if (mCurConnection == null) {
|
||||
@@ -735,6 +737,7 @@ public abstract class MediaBrowserService extends Service {
|
||||
*
|
||||
* @see #EXTRA_OFFLINE
|
||||
* @see #EXTRA_SUGGESTED
|
||||
* @see #EXTRA_SUGGESTION_KEYWORDS
|
||||
*/
|
||||
public static final String EXTRA_RECENT = "android.service.media.extra.RECENT";
|
||||
|
||||
@@ -752,6 +755,7 @@ public abstract class MediaBrowserService extends Service {
|
||||
*
|
||||
* @see #EXTRA_RECENT
|
||||
* @see #EXTRA_SUGGESTED
|
||||
* @see #EXTRA_SUGGESTION_KEYWORDS
|
||||
*/
|
||||
public static final String EXTRA_OFFLINE = "android.service.media.extra.OFFLINE";
|
||||
|
||||
@@ -770,9 +774,31 @@ public abstract class MediaBrowserService extends Service {
|
||||
*
|
||||
* @see #EXTRA_RECENT
|
||||
* @see #EXTRA_OFFLINE
|
||||
* @see #EXTRA_SUGGESTION_KEYWORDS
|
||||
*/
|
||||
public static final String EXTRA_SUGGESTED = "android.service.media.extra.SUGGESTED";
|
||||
|
||||
/**
|
||||
* The lookup key for a string that indicates specific keywords which will be considered
|
||||
* when the browser service suggests media items.
|
||||
*
|
||||
* <p>When creating a media browser for a given media browser service, this key can be
|
||||
* supplied as a root hint together with {@link #EXTRA_SUGGESTED} for retrieving suggested
|
||||
* media items related with the keywords. The list of media items passed in
|
||||
* {@link android.media.browse.MediaBrowser.SubscriptionCallback#onChildrenLoaded(String, List)}
|
||||
* is considered ordered by relevance, first being the top suggestion.
|
||||
* If the media browser service can provide such media items, the implementation must return
|
||||
* the key in the root hint when {@link #onGetRoot(String, int, Bundle)} is called back.
|
||||
*
|
||||
* <p>The root hint may contain multiple keys.
|
||||
*
|
||||
* @see #EXTRA_RECENT
|
||||
* @see #EXTRA_OFFLINE
|
||||
* @see #EXTRA_SUGGESTED
|
||||
*/
|
||||
public static final String EXTRA_SUGGESTION_KEYWORDS
|
||||
= "android.service.media.extra.SUGGESTION_KEYWORDS";
|
||||
|
||||
final private String mRootId;
|
||||
final private Bundle mExtras;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user