Merge changes from topic "broadcast_multiple_perm"
* changes: AndroidKeyStoreProvider: Add @throws documentation RemoteException: Add @throws documentation Context: Rename Context.sendBroadcastMultiplePermissions
This commit is contained in:
committed by
Android (Google) Code Review
commit
2f6c5fe32f
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -2081,12 +2081,38 @@ 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.");
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user