diff options
| -rw-r--r-- | api/system-current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/content/Context.java | 9 | ||||
| -rw-r--r-- | core/java/android/content/ContextWrapper.java | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 636c556e9a7b..9420a286d67a 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -1414,6 +1414,7 @@ package android.content { method @Nullable @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public android.content.Intent registerReceiverForAllUsers(@Nullable android.content.BroadcastReceiver, @NonNull android.content.IntentFilter, @Nullable String, @Nullable android.os.Handler); method public abstract void sendBroadcast(android.content.Intent, @Nullable String, @Nullable android.os.Bundle); method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public abstract void sendBroadcastAsUser(@RequiresPermission android.content.Intent, android.os.UserHandle, @Nullable String, @Nullable android.os.Bundle); + method public void sendBroadcastMultiplePermissions(@NonNull android.content.Intent, @NonNull String[]); method public abstract void sendOrderedBroadcast(@NonNull android.content.Intent, @Nullable String, @Nullable android.os.Bundle, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, @Nullable String, @Nullable android.os.Bundle); method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public void startActivityAsUser(@NonNull @RequiresPermission android.content.Intent, @NonNull android.os.UserHandle); field public static final String APP_PREDICTION_SERVICE = "app_prediction"; diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 41b773e81c46..03b49136bde4 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -2072,7 +2072,7 @@ public abstract class Context { * Intent will receive the broadcast. * @param receiverPermissions Array of names of permissions that a receiver must hold * in order to receive your broadcast. - * If null or empty, no permissions are required. + * If empty, no permissions are required. * * @see android.content.BroadcastReceiver * @see #registerReceiver @@ -2081,8 +2081,11 @@ public abstract class Context { * @see #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle) * @hide */ - public abstract void sendBroadcastMultiplePermissions(Intent intent, - String[] receiverPermissions); + @SystemApi + public void sendBroadcastMultiplePermissions(@NonNull Intent intent, + @NonNull String[] receiverPermissions) { + throw new RuntimeException("Not implemented. Must override in a subclass."); + } /** * Broadcast the given intent to all interested BroadcastReceivers, allowing diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java index 5bdea52d63e1..b04f7810ed45 100644 --- a/core/java/android/content/ContextWrapper.java +++ b/core/java/android/content/ContextWrapper.java @@ -464,7 +464,8 @@ public class ContextWrapper extends Context { /** @hide */ @Override - public void sendBroadcastMultiplePermissions(Intent intent, String[] receiverPermissions) { + public void sendBroadcastMultiplePermissions(@NonNull Intent intent, + @NonNull String[] receiverPermissions) { mBase.sendBroadcastMultiplePermissions(intent, receiverPermissions); } |