diff options
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | api/system-current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/content/Context.java | 28 | ||||
| -rw-r--r-- | core/java/android/os/RemoteException.java | 4 | ||||
| -rw-r--r-- | keystore/java/android/security/keystore/AndroidKeyStoreProvider.java | 6 |
5 files changed, 38 insertions, 2 deletions
diff --git a/api/current.txt b/api/current.txt index 4d07adff6eb9..a45583a432ce 100644 --- a/api/current.txt +++ b/api/current.txt @@ -9895,6 +9895,7 @@ package android.content { method public abstract void sendBroadcast(@RequiresPermission android.content.Intent, @Nullable String); method @RequiresPermission("android.permission.INTERACT_ACROSS_USERS") public abstract void sendBroadcastAsUser(@RequiresPermission android.content.Intent, android.os.UserHandle); method @RequiresPermission("android.permission.INTERACT_ACROSS_USERS") public abstract void sendBroadcastAsUser(@RequiresPermission android.content.Intent, android.os.UserHandle, @Nullable String); + method public void sendBroadcastWithMultiplePermissions(@NonNull android.content.Intent, @NonNull String[]); method public abstract void sendOrderedBroadcast(@RequiresPermission android.content.Intent, @Nullable String); method public abstract void sendOrderedBroadcast(@NonNull @RequiresPermission android.content.Intent, @Nullable String, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, @Nullable String, @Nullable android.os.Bundle); method public void sendOrderedBroadcast(@NonNull android.content.Intent, @Nullable String, @Nullable String, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, @Nullable String, @Nullable android.os.Bundle); diff --git a/api/system-current.txt b/api/system-current.txt index 3a125f60801d..e40fd24fd76e 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -1431,7 +1431,6 @@ 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 936790ff79b7..7703e087bcea 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -2081,7 +2081,6 @@ public abstract class Context { * @see #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle) * @hide */ - @SystemApi public void sendBroadcastMultiplePermissions(@NonNull Intent intent, @NonNull String[] receiverPermissions) { throw new RuntimeException("Not implemented. Must override in a subclass."); @@ -2099,6 +2098,33 @@ public abstract class Context { * * @param intent The Intent to broadcast; all receivers matching this * Intent will receive the broadcast. + * @param receiverPermissions Array of names of permissions that a receiver must hold + * in order to receive your broadcast. + * If empty, no permissions are required. + * + * @see android.content.BroadcastReceiver + * @see #registerReceiver + * @see #sendBroadcast(Intent) + * @see #sendOrderedBroadcast(Intent, String) + * @see #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle) + */ + public void sendBroadcastWithMultiplePermissions(@NonNull Intent intent, + @NonNull String[] receiverPermissions) { + sendBroadcastMultiplePermissions(intent, receiverPermissions); + } + + /** + * Broadcast the given intent to all interested BroadcastReceivers, allowing + * an array of required permissions to be enforced. This call is asynchronous; it returns + * immediately, and you will continue executing while the receivers are run. No results are + * propagated from receivers and receivers can not abort the broadcast. If you want to allow + * receivers to propagate results or abort the broadcast, you must send an ordered broadcast + * using {@link #sendOrderedBroadcast(Intent, String)}. + * + * <p>See {@link BroadcastReceiver} for more information on Intent broadcasts. + * + * @param intent The Intent to broadcast; all receivers matching this + * Intent will receive the broadcast. * @param user The user to send the broadcast to. * @param receiverPermissions Array of names of permissions that a receiver must hold * in order to receive your broadcast. diff --git a/core/java/android/os/RemoteException.java b/core/java/android/os/RemoteException.java index 10ef27952df4..98c66d1beaf4 100644 --- a/core/java/android/os/RemoteException.java +++ b/core/java/android/os/RemoteException.java @@ -44,6 +44,8 @@ public class RemoteException extends AndroidException { * state or making security decisions based on the perceived success or * failure of a call, or any default values returned. For this reason, we * want to strongly throw when there was trouble with the transaction. + * + * @throws RuntimeException */ @NonNull public RuntimeException rethrowAsRuntimeException() { @@ -60,6 +62,8 @@ public class RemoteException extends AndroidException { * state or making security decisions based on the perceived success or * failure of a call, or any default values returned. For this reason, we * want to strongly throw when there was trouble with the transaction. + * + * @throws RuntimeException */ @NonNull public RuntimeException rethrowFromSystemServer() { diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java b/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java index 2cdd00049242..d03329445b18 100644 --- a/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java +++ b/keystore/java/android/security/keystore/AndroidKeyStoreProvider.java @@ -400,6 +400,12 @@ public class AndroidKeyStoreProvider extends Provider { * * <p>Note: the returned {@code KeyStore} is already initialized/loaded. Thus, there is * no need to invoke {@code load} on it. + * + * @param uid Uid for which the keystore provider is requested. + * @throws KeyStoreException if a KeyStoreSpi implementation for the specified type is not + * available from the specified provider. + * @throws NoSuchProviderException If the specified provider is not registered in the security + * provider list. * @hide */ @SystemApi |