Easing calling restriction for onSubscribe/onUnsubscribe to LIBRARY_GROUP_PREFIX
Note: 1.7.0-beta-01 was never publicly released, so changing the API files is legitimate.
Bug: 302377810
Test: Restricting calls to androidx libraries. Existing unit tests pass.
Change-Id: Ia46e5e143b60bf48637a2d68d4ff82fb56426e90
diff --git a/media/media/api/restricted_1.7.0-beta01.txt b/media/media/api/restricted_1.7.0-beta01.txt
index 4f0864c..fa7d4db 100644
--- a/media/media/api/restricted_1.7.0-beta01.txt
+++ b/media/media/api/restricted_1.7.0-beta01.txt
@@ -650,6 +650,8 @@
method public void onLoadChildren(String, androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem!>!>, android.os.Bundle);
method public void onLoadItem(String!, androidx.media.MediaBrowserServiceCompat.Result<android.support.v4.media.MediaBrowserCompat.MediaItem!>);
method public void onSearch(String, android.os.Bundle!, androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem!>!>);
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public void onSubscribe(String!, android.os.Bundle!);
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public void onUnsubscribe(String!);
method public void setSessionToken(android.support.v4.media.session.MediaSessionCompat.Token!);
field public static final String SERVICE_INTERFACE = "android.media.browse.MediaBrowserService";
}
diff --git a/media/media/api/restricted_current.txt b/media/media/api/restricted_current.txt
index 4f0864c..fa7d4db 100644
--- a/media/media/api/restricted_current.txt
+++ b/media/media/api/restricted_current.txt
@@ -650,6 +650,8 @@
method public void onLoadChildren(String, androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem!>!>, android.os.Bundle);
method public void onLoadItem(String!, androidx.media.MediaBrowserServiceCompat.Result<android.support.v4.media.MediaBrowserCompat.MediaItem!>);
method public void onSearch(String, android.os.Bundle!, androidx.media.MediaBrowserServiceCompat.Result<java.util.List<android.support.v4.media.MediaBrowserCompat.MediaItem!>!>);
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public void onSubscribe(String!, android.os.Bundle!);
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public void onUnsubscribe(String!);
method public void setSessionToken(android.support.v4.media.session.MediaSessionCompat.Token!);
field public static final String SERVICE_INTERFACE = "android.media.browse.MediaBrowserService";
}
diff --git a/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java b/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java
index c01a837..2e8e145 100644
--- a/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java
+++ b/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java
@@ -1357,7 +1357,7 @@
* @param id id
* @param option option
*/
- @RestrictTo(LIBRARY)
+ @RestrictTo(LIBRARY_GROUP_PREFIX)
public void onSubscribe(String id, Bundle option) {
}
@@ -1366,7 +1366,7 @@
*
* @param id
*/
- @RestrictTo(LIBRARY)
+ @RestrictTo(LIBRARY_GROUP_PREFIX)
public void onUnsubscribe(String id) {
}