am 4a817924
: Merge "Revert "Allow array of required permissions in sendBroadcast"" into mnc-dev
* commit '4a817924ecb282eef48b06b92f8e1914edd6cec2': Revert "Allow array of required permissions in sendBroadcast"
This commit is contained in:
@ -456,14 +456,14 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
|
|||||||
int resultCode = data.readInt();
|
int resultCode = data.readInt();
|
||||||
String resultData = data.readString();
|
String resultData = data.readString();
|
||||||
Bundle resultExtras = data.readBundle();
|
Bundle resultExtras = data.readBundle();
|
||||||
String[] perms = data.readStringArray();
|
String perm = data.readString();
|
||||||
int appOp = data.readInt();
|
int appOp = data.readInt();
|
||||||
Bundle options = data.readBundle();
|
Bundle options = data.readBundle();
|
||||||
boolean serialized = data.readInt() != 0;
|
boolean serialized = data.readInt() != 0;
|
||||||
boolean sticky = data.readInt() != 0;
|
boolean sticky = data.readInt() != 0;
|
||||||
int userId = data.readInt();
|
int userId = data.readInt();
|
||||||
int res = broadcastIntent(app, intent, resolvedType, resultTo,
|
int res = broadcastIntent(app, intent, resolvedType, resultTo,
|
||||||
resultCode, resultData, resultExtras, perms, appOp,
|
resultCode, resultData, resultExtras, perm, appOp,
|
||||||
options, serialized, sticky, userId);
|
options, serialized, sticky, userId);
|
||||||
reply.writeNoException();
|
reply.writeNoException();
|
||||||
reply.writeInt(res);
|
reply.writeInt(res);
|
||||||
@ -3007,7 +3007,7 @@ class ActivityManagerProxy implements IActivityManager
|
|||||||
public int broadcastIntent(IApplicationThread caller,
|
public int broadcastIntent(IApplicationThread caller,
|
||||||
Intent intent, String resolvedType, IIntentReceiver resultTo,
|
Intent intent, String resolvedType, IIntentReceiver resultTo,
|
||||||
int resultCode, String resultData, Bundle map,
|
int resultCode, String resultData, Bundle map,
|
||||||
String[] requiredPermissions, int appOp, Bundle options, boolean serialized,
|
String requiredPermission, int appOp, Bundle options, boolean serialized,
|
||||||
boolean sticky, int userId) throws RemoteException
|
boolean sticky, int userId) throws RemoteException
|
||||||
{
|
{
|
||||||
Parcel data = Parcel.obtain();
|
Parcel data = Parcel.obtain();
|
||||||
@ -3020,7 +3020,7 @@ class ActivityManagerProxy implements IActivityManager
|
|||||||
data.writeInt(resultCode);
|
data.writeInt(resultCode);
|
||||||
data.writeString(resultData);
|
data.writeString(resultData);
|
||||||
data.writeBundle(map);
|
data.writeBundle(map);
|
||||||
data.writeStringArray(requiredPermissions);
|
data.writeString(requiredPermission);
|
||||||
data.writeInt(appOp);
|
data.writeInt(appOp);
|
||||||
data.writeBundle(options);
|
data.writeBundle(options);
|
||||||
data.writeInt(serialized ? 1 : 0);
|
data.writeInt(serialized ? 1 : 0);
|
||||||
|
@ -180,7 +180,7 @@ class ContextImpl extends Context {
|
|||||||
@GuardedBy("mSync")
|
@GuardedBy("mSync")
|
||||||
private File[] mExternalMediaDirs;
|
private File[] mExternalMediaDirs;
|
||||||
|
|
||||||
private static final String[] EMPTY_STRING_ARRAY = {};
|
private static final String[] EMPTY_FILE_LIST = {};
|
||||||
|
|
||||||
// The system service cache for the system services that are cached per-ContextImpl.
|
// The system service cache for the system services that are cached per-ContextImpl.
|
||||||
final Object[] mServiceCache = SystemServiceRegistry.createServiceCache();
|
final Object[] mServiceCache = SystemServiceRegistry.createServiceCache();
|
||||||
@ -552,7 +552,7 @@ class ContextImpl extends Context {
|
|||||||
@Override
|
@Override
|
||||||
public String[] fileList() {
|
public String[] fileList() {
|
||||||
final String[] list = getFilesDir().list();
|
final String[] list = getFilesDir().list();
|
||||||
return (list != null) ? list : EMPTY_STRING_ARRAY;
|
return (list != null) ? list : EMPTY_FILE_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -591,7 +591,7 @@ class ContextImpl extends Context {
|
|||||||
@Override
|
@Override
|
||||||
public String[] databaseList() {
|
public String[] databaseList() {
|
||||||
final String[] list = getDatabasesDir().list();
|
final String[] list = getDatabasesDir().list();
|
||||||
return (list != null) ? list : EMPTY_STRING_ARRAY;
|
return (list != null) ? list : EMPTY_FILE_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -777,28 +777,11 @@ class ContextImpl extends Context {
|
|||||||
public void sendBroadcast(Intent intent, String receiverPermission) {
|
public void sendBroadcast(Intent intent, String receiverPermission) {
|
||||||
warnIfCallingFromSystemProcess();
|
warnIfCallingFromSystemProcess();
|
||||||
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
||||||
String[] receiverPermissions = receiverPermission == null ? null
|
|
||||||
: new String[] {receiverPermission};
|
|
||||||
try {
|
try {
|
||||||
intent.prepareToLeaveProcess();
|
intent.prepareToLeaveProcess();
|
||||||
ActivityManagerNative.getDefault().broadcastIntent(
|
ActivityManagerNative.getDefault().broadcastIntent(
|
||||||
mMainThread.getApplicationThread(), intent, resolvedType, null,
|
mMainThread.getApplicationThread(), intent, resolvedType, null,
|
||||||
Activity.RESULT_OK, null, null, receiverPermissions, AppOpsManager.OP_NONE,
|
Activity.RESULT_OK, null, null, receiverPermission, AppOpsManager.OP_NONE,
|
||||||
null, false, false, getUserId());
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
throw new RuntimeException("Failure from system", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendBroadcast(Intent intent, String[] receiverPermissions) {
|
|
||||||
warnIfCallingFromSystemProcess();
|
|
||||||
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
|
||||||
try {
|
|
||||||
intent.prepareToLeaveProcess();
|
|
||||||
ActivityManagerNative.getDefault().broadcastIntent(
|
|
||||||
mMainThread.getApplicationThread(), intent, resolvedType, null,
|
|
||||||
Activity.RESULT_OK, null, null, receiverPermissions, AppOpsManager.OP_NONE,
|
|
||||||
null, false, false, getUserId());
|
null, false, false, getUserId());
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw new RuntimeException("Failure from system", e);
|
throw new RuntimeException("Failure from system", e);
|
||||||
@ -809,13 +792,11 @@ class ContextImpl extends Context {
|
|||||||
public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
|
public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
|
||||||
warnIfCallingFromSystemProcess();
|
warnIfCallingFromSystemProcess();
|
||||||
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
||||||
String[] receiverPermissions = receiverPermission == null ? null
|
|
||||||
: new String[] {receiverPermission};
|
|
||||||
try {
|
try {
|
||||||
intent.prepareToLeaveProcess();
|
intent.prepareToLeaveProcess();
|
||||||
ActivityManagerNative.getDefault().broadcastIntent(
|
ActivityManagerNative.getDefault().broadcastIntent(
|
||||||
mMainThread.getApplicationThread(), intent, resolvedType, null,
|
mMainThread.getApplicationThread(), intent, resolvedType, null,
|
||||||
Activity.RESULT_OK, null, null, receiverPermissions, AppOpsManager.OP_NONE,
|
Activity.RESULT_OK, null, null, receiverPermission, AppOpsManager.OP_NONE,
|
||||||
options, false, false, getUserId());
|
options, false, false, getUserId());
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw new RuntimeException("Failure from system", e);
|
throw new RuntimeException("Failure from system", e);
|
||||||
@ -826,13 +807,11 @@ class ContextImpl extends Context {
|
|||||||
public void sendBroadcast(Intent intent, String receiverPermission, int appOp) {
|
public void sendBroadcast(Intent intent, String receiverPermission, int appOp) {
|
||||||
warnIfCallingFromSystemProcess();
|
warnIfCallingFromSystemProcess();
|
||||||
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
||||||
String[] receiverPermissions = receiverPermission == null ? null
|
|
||||||
: new String[] {receiverPermission};
|
|
||||||
try {
|
try {
|
||||||
intent.prepareToLeaveProcess();
|
intent.prepareToLeaveProcess();
|
||||||
ActivityManagerNative.getDefault().broadcastIntent(
|
ActivityManagerNative.getDefault().broadcastIntent(
|
||||||
mMainThread.getApplicationThread(), intent, resolvedType, null,
|
mMainThread.getApplicationThread(), intent, resolvedType, null,
|
||||||
Activity.RESULT_OK, null, null, receiverPermissions, appOp, null, false, false,
|
Activity.RESULT_OK, null, null, receiverPermission, appOp, null, false, false,
|
||||||
getUserId());
|
getUserId());
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw new RuntimeException("Failure from system", e);
|
throw new RuntimeException("Failure from system", e);
|
||||||
@ -843,13 +822,11 @@ class ContextImpl extends Context {
|
|||||||
public void sendOrderedBroadcast(Intent intent, String receiverPermission) {
|
public void sendOrderedBroadcast(Intent intent, String receiverPermission) {
|
||||||
warnIfCallingFromSystemProcess();
|
warnIfCallingFromSystemProcess();
|
||||||
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
||||||
String[] receiverPermissions = receiverPermission == null ? null
|
|
||||||
: new String[] {receiverPermission};
|
|
||||||
try {
|
try {
|
||||||
intent.prepareToLeaveProcess();
|
intent.prepareToLeaveProcess();
|
||||||
ActivityManagerNative.getDefault().broadcastIntent(
|
ActivityManagerNative.getDefault().broadcastIntent(
|
||||||
mMainThread.getApplicationThread(), intent, resolvedType, null,
|
mMainThread.getApplicationThread(), intent, resolvedType, null,
|
||||||
Activity.RESULT_OK, null, null, receiverPermissions, AppOpsManager.OP_NONE,
|
Activity.RESULT_OK, null, null, receiverPermission, AppOpsManager.OP_NONE,
|
||||||
null, true, false, getUserId());
|
null, true, false, getUserId());
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw new RuntimeException("Failure from system", e);
|
throw new RuntimeException("Failure from system", e);
|
||||||
@ -906,13 +883,11 @@ class ContextImpl extends Context {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
||||||
String[] receiverPermissions = receiverPermission == null ? null
|
|
||||||
: new String[] {receiverPermission};
|
|
||||||
try {
|
try {
|
||||||
intent.prepareToLeaveProcess();
|
intent.prepareToLeaveProcess();
|
||||||
ActivityManagerNative.getDefault().broadcastIntent(
|
ActivityManagerNative.getDefault().broadcastIntent(
|
||||||
mMainThread.getApplicationThread(), intent, resolvedType, rd,
|
mMainThread.getApplicationThread(), intent, resolvedType, rd,
|
||||||
initialCode, initialData, initialExtras, receiverPermissions, appOp,
|
initialCode, initialData, initialExtras, receiverPermission, appOp,
|
||||||
options, true, false, getUserId());
|
options, true, false, getUserId());
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw new RuntimeException("Failure from system", e);
|
throw new RuntimeException("Failure from system", e);
|
||||||
@ -942,13 +917,11 @@ class ContextImpl extends Context {
|
|||||||
public void sendBroadcastAsUser(Intent intent, UserHandle user,
|
public void sendBroadcastAsUser(Intent intent, UserHandle user,
|
||||||
String receiverPermission, int appOp) {
|
String receiverPermission, int appOp) {
|
||||||
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
||||||
String[] receiverPermissions = receiverPermission == null ? null
|
|
||||||
: new String[] {receiverPermission};
|
|
||||||
try {
|
try {
|
||||||
intent.prepareToLeaveProcess();
|
intent.prepareToLeaveProcess();
|
||||||
ActivityManagerNative.getDefault().broadcastIntent(
|
ActivityManagerNative.getDefault().broadcastIntent(
|
||||||
mMainThread.getApplicationThread(), intent, resolvedType, null,
|
mMainThread.getApplicationThread(), intent, resolvedType, null,
|
||||||
Activity.RESULT_OK, null, null, receiverPermissions, appOp, null, false, false,
|
Activity.RESULT_OK, null, null, receiverPermission, appOp, null, false, false,
|
||||||
user.getIdentifier());
|
user.getIdentifier());
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw new RuntimeException("Failure from system", e);
|
throw new RuntimeException("Failure from system", e);
|
||||||
@ -986,13 +959,11 @@ class ContextImpl extends Context {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
|
||||||
String[] receiverPermissions = receiverPermission == null ? null
|
|
||||||
: new String[] {receiverPermission};
|
|
||||||
try {
|
try {
|
||||||
intent.prepareToLeaveProcess();
|
intent.prepareToLeaveProcess();
|
||||||
ActivityManagerNative.getDefault().broadcastIntent(
|
ActivityManagerNative.getDefault().broadcastIntent(
|
||||||
mMainThread.getApplicationThread(), intent, resolvedType, rd,
|
mMainThread.getApplicationThread(), intent, resolvedType, rd,
|
||||||
initialCode, initialData, initialExtras, receiverPermissions,
|
initialCode, initialData, initialExtras, receiverPermission,
|
||||||
appOp, null, true, false, user.getIdentifier());
|
appOp, null, true, false, user.getIdentifier());
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw new RuntimeException("Failure from system", e);
|
throw new RuntimeException("Failure from system", e);
|
||||||
|
@ -106,7 +106,7 @@ public interface IActivityManager extends IInterface {
|
|||||||
public void unregisterReceiver(IIntentReceiver receiver) throws RemoteException;
|
public void unregisterReceiver(IIntentReceiver receiver) throws RemoteException;
|
||||||
public int broadcastIntent(IApplicationThread caller, Intent intent,
|
public int broadcastIntent(IApplicationThread caller, Intent intent,
|
||||||
String resolvedType, IIntentReceiver resultTo, int resultCode,
|
String resolvedType, IIntentReceiver resultTo, int resultCode,
|
||||||
String resultData, Bundle map, String[] requiredPermissions,
|
String resultData, Bundle map, String requiredPermission,
|
||||||
int appOp, Bundle options, boolean serialized, boolean sticky, int userId) throws RemoteException;
|
int appOp, Bundle options, boolean serialized, boolean sticky, int userId) throws RemoteException;
|
||||||
public void unbroadcastIntent(IApplicationThread caller, Intent intent, int userId) throws RemoteException;
|
public void unbroadcastIntent(IApplicationThread caller, Intent intent, int userId) throws RemoteException;
|
||||||
public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle map,
|
public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle map,
|
||||||
|
@ -1516,32 +1516,6 @@ public abstract class Context {
|
|||||||
public abstract void sendBroadcast(Intent intent,
|
public abstract void sendBroadcast(Intent intent,
|
||||||
@Nullable String receiverPermission);
|
@Nullable String receiverPermission);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 null or 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)
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
public abstract void sendBroadcast(Intent intent, String[] receiverPermissions);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Broadcast the given intent to all interested BroadcastReceivers, allowing
|
* Broadcast the given intent to all interested BroadcastReceivers, allowing
|
||||||
* an optional required permission to be enforced. This
|
* an optional required permission to be enforced. This
|
||||||
|
@ -401,12 +401,6 @@ public class ContextWrapper extends Context {
|
|||||||
mBase.sendBroadcast(intent, receiverPermission);
|
mBase.sendBroadcast(intent, receiverPermission);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
|
||||||
@Override
|
|
||||||
public void sendBroadcast(Intent intent, String[] receiverPermissions) {
|
|
||||||
mBase.sendBroadcast(intent, receiverPermissions);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@SystemApi
|
@SystemApi
|
||||||
@Override
|
@Override
|
||||||
|
@ -6355,7 +6355,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
0, null, null,
|
0, null, null,
|
||||||
new String[] {android.Manifest.permission.RECEIVE_BOOT_COMPLETED},
|
android.Manifest.permission.RECEIVE_BOOT_COMPLETED,
|
||||||
AppOpsManager.OP_NONE, null, true, false,
|
AppOpsManager.OP_NONE, null, true, false,
|
||||||
MY_PID, Process.SYSTEM_UID, userId);
|
MY_PID, Process.SYSTEM_UID, userId);
|
||||||
}
|
}
|
||||||
@ -11773,7 +11773,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
throws RemoteException {
|
throws RemoteException {
|
||||||
}
|
}
|
||||||
}, 0, null, null,
|
}, 0, null, null,
|
||||||
new String[] {INTERACT_ACROSS_USERS}, AppOpsManager.OP_NONE,
|
INTERACT_ACROSS_USERS, AppOpsManager.OP_NONE,
|
||||||
null, true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
|
null, true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
Slog.wtf(TAG, "Failed sending first user broadcasts", t);
|
Slog.wtf(TAG, "Failed sending first user broadcasts", t);
|
||||||
@ -16327,7 +16327,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
private final int broadcastIntentLocked(ProcessRecord callerApp,
|
private final int broadcastIntentLocked(ProcessRecord callerApp,
|
||||||
String callerPackage, Intent intent, String resolvedType,
|
String callerPackage, Intent intent, String resolvedType,
|
||||||
IIntentReceiver resultTo, int resultCode, String resultData,
|
IIntentReceiver resultTo, int resultCode, String resultData,
|
||||||
Bundle resultExtras, String[] requiredPermissions, int appOp, Bundle options,
|
Bundle resultExtras, String requiredPermission, int appOp, Bundle options,
|
||||||
boolean ordered, boolean sticky, int callingPid, int callingUid, int userId) {
|
boolean ordered, boolean sticky, int callingPid, int callingUid, int userId) {
|
||||||
intent = new Intent(intent);
|
intent = new Intent(intent);
|
||||||
|
|
||||||
@ -16580,9 +16580,9 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
Slog.w(TAG, msg);
|
Slog.w(TAG, msg);
|
||||||
throw new SecurityException(msg);
|
throw new SecurityException(msg);
|
||||||
}
|
}
|
||||||
if (requiredPermissions != null && requiredPermissions.length > 0) {
|
if (requiredPermission != null) {
|
||||||
Slog.w(TAG, "Can't broadcast sticky intent " + intent
|
Slog.w(TAG, "Can't broadcast sticky intent " + intent
|
||||||
+ " and enforce permissions " + Arrays.toString(requiredPermissions));
|
+ " and enforce permission " + requiredPermission);
|
||||||
return ActivityManager.BROADCAST_STICKY_CANT_HAVE_PERMISSION;
|
return ActivityManager.BROADCAST_STICKY_CANT_HAVE_PERMISSION;
|
||||||
}
|
}
|
||||||
if (intent.getComponent() != null) {
|
if (intent.getComponent() != null) {
|
||||||
@ -16690,7 +16690,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
// components to be launched.
|
// components to be launched.
|
||||||
final BroadcastQueue queue = broadcastQueueForIntent(intent);
|
final BroadcastQueue queue = broadcastQueueForIntent(intent);
|
||||||
BroadcastRecord r = new BroadcastRecord(queue, intent, callerApp,
|
BroadcastRecord r = new BroadcastRecord(queue, intent, callerApp,
|
||||||
callerPackage, callingPid, callingUid, resolvedType, requiredPermissions,
|
callerPackage, callingPid, callingUid, resolvedType, requiredPermission,
|
||||||
appOp, brOptions, registeredReceivers, resultTo, resultCode, resultData,
|
appOp, brOptions, registeredReceivers, resultTo, resultCode, resultData,
|
||||||
resultExtras, ordered, sticky, false, userId);
|
resultExtras, ordered, sticky, false, userId);
|
||||||
if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST, "Enqueueing parallel broadcast " + r);
|
if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST, "Enqueueing parallel broadcast " + r);
|
||||||
@ -16780,7 +16780,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
BroadcastQueue queue = broadcastQueueForIntent(intent);
|
BroadcastQueue queue = broadcastQueueForIntent(intent);
|
||||||
BroadcastRecord r = new BroadcastRecord(queue, intent, callerApp,
|
BroadcastRecord r = new BroadcastRecord(queue, intent, callerApp,
|
||||||
callerPackage, callingPid, callingUid, resolvedType,
|
callerPackage, callingPid, callingUid, resolvedType,
|
||||||
requiredPermissions, appOp, brOptions, receivers, resultTo, resultCode,
|
requiredPermission, appOp, brOptions, receivers, resultTo, resultCode,
|
||||||
resultData, resultExtras, ordered, sticky, false, userId);
|
resultData, resultExtras, ordered, sticky, false, userId);
|
||||||
|
|
||||||
if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST, "Enqueueing ordered broadcast " + r
|
if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST, "Enqueueing ordered broadcast " + r
|
||||||
@ -16829,7 +16829,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
public final int broadcastIntent(IApplicationThread caller,
|
public final int broadcastIntent(IApplicationThread caller,
|
||||||
Intent intent, String resolvedType, IIntentReceiver resultTo,
|
Intent intent, String resolvedType, IIntentReceiver resultTo,
|
||||||
int resultCode, String resultData, Bundle resultExtras,
|
int resultCode, String resultData, Bundle resultExtras,
|
||||||
String[] requiredPermissions, int appOp, Bundle options,
|
String requiredPermission, int appOp, Bundle options,
|
||||||
boolean serialized, boolean sticky, int userId) {
|
boolean serialized, boolean sticky, int userId) {
|
||||||
enforceNotIsolatedCaller("broadcastIntent");
|
enforceNotIsolatedCaller("broadcastIntent");
|
||||||
synchronized(this) {
|
synchronized(this) {
|
||||||
@ -16842,14 +16842,13 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
int res = broadcastIntentLocked(callerApp,
|
int res = broadcastIntentLocked(callerApp,
|
||||||
callerApp != null ? callerApp.info.packageName : null,
|
callerApp != null ? callerApp.info.packageName : null,
|
||||||
intent, resolvedType, resultTo, resultCode, resultData, resultExtras,
|
intent, resolvedType, resultTo, resultCode, resultData, resultExtras,
|
||||||
requiredPermissions, appOp, null, serialized, sticky,
|
requiredPermission, appOp, null, serialized, sticky,
|
||||||
callingPid, callingUid, userId);
|
callingPid, callingUid, userId);
|
||||||
Binder.restoreCallingIdentity(origId);
|
Binder.restoreCallingIdentity(origId);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int broadcastIntentInPackage(String packageName, int uid,
|
int broadcastIntentInPackage(String packageName, int uid,
|
||||||
Intent intent, String resolvedType, IIntentReceiver resultTo,
|
Intent intent, String resolvedType, IIntentReceiver resultTo,
|
||||||
int resultCode, String resultData, Bundle resultExtras,
|
int resultCode, String resultData, Bundle resultExtras,
|
||||||
@ -16859,12 +16858,9 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
intent = verifyBroadcastLocked(intent);
|
intent = verifyBroadcastLocked(intent);
|
||||||
|
|
||||||
final long origId = Binder.clearCallingIdentity();
|
final long origId = Binder.clearCallingIdentity();
|
||||||
String[] requiredPermissions = requiredPermission == null ? null
|
|
||||||
: new String[] {requiredPermission};
|
|
||||||
int res = broadcastIntentLocked(null, packageName, intent, resolvedType,
|
int res = broadcastIntentLocked(null, packageName, intent, resolvedType,
|
||||||
resultTo, resultCode, resultData, resultExtras,
|
resultTo, resultCode, resultData, resultExtras, requiredPermission,
|
||||||
requiredPermissions, AppOpsManager.OP_NONE, options, serialized,
|
AppOpsManager.OP_NONE, options, serialized, sticky, -1, uid, userId);
|
||||||
sticky, -1, uid, userId);
|
|
||||||
Binder.restoreCallingIdentity(origId);
|
Binder.restoreCallingIdentity(origId);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -19799,7 +19795,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
int sendingUser) throws RemoteException {
|
int sendingUser) throws RemoteException {
|
||||||
}
|
}
|
||||||
}, 0, null, null,
|
}, 0, null, null,
|
||||||
new String[] {INTERACT_ACROSS_USERS}, AppOpsManager.OP_NONE,
|
INTERACT_ACROSS_USERS, AppOpsManager.OP_NONE,
|
||||||
null, true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
|
null, true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -19861,9 +19857,8 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
intent.putExtra(Intent.EXTRA_USER_HANDLE, newUserId);
|
intent.putExtra(Intent.EXTRA_USER_HANDLE, newUserId);
|
||||||
broadcastIntentLocked(null, null, intent,
|
broadcastIntentLocked(null, null, intent,
|
||||||
null, null, 0, null, null,
|
null, null, 0, null, null,
|
||||||
new String[] {android.Manifest.permission.MANAGE_USERS},
|
android.Manifest.permission.MANAGE_USERS, AppOpsManager.OP_NONE,
|
||||||
AppOpsManager.OP_NONE, null, false, false, MY_PID, Process.SYSTEM_UID,
|
null, false, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
|
||||||
UserHandle.USER_ALL);
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
Binder.restoreCallingIdentity(ident);
|
Binder.restoreCallingIdentity(ident);
|
||||||
@ -20046,9 +20041,8 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
intent.addFlags(Intent.FLAG_RECEIVER_NO_ABORT);
|
intent.addFlags(Intent.FLAG_RECEIVER_NO_ABORT);
|
||||||
broadcastIntentLocked(null, null, intent,
|
broadcastIntentLocked(null, null, intent,
|
||||||
null, null, 0, null, null,
|
null, null, 0, null, null,
|
||||||
new String[] {android.Manifest.permission.RECEIVE_BOOT_COMPLETED},
|
android.Manifest.permission.RECEIVE_BOOT_COMPLETED, AppOpsManager.OP_NONE,
|
||||||
AppOpsManager.OP_NONE, null, true, false, MY_PID, Process.SYSTEM_UID,
|
null, true, false, MY_PID, Process.SYSTEM_UID, userId);
|
||||||
userId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -20186,7 +20180,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
// Kick things off.
|
// Kick things off.
|
||||||
broadcastIntentLocked(null, null, stoppingIntent,
|
broadcastIntentLocked(null, null, stoppingIntent,
|
||||||
null, stoppingReceiver, 0, null, null,
|
null, stoppingReceiver, 0, null, null,
|
||||||
new String[] {INTERACT_ACROSS_USERS}, AppOpsManager.OP_NONE,
|
INTERACT_ACROSS_USERS, AppOpsManager.OP_NONE,
|
||||||
null, true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
|
null, true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
|
||||||
} finally {
|
} finally {
|
||||||
Binder.restoreCallingIdentity(ident);
|
Binder.restoreCallingIdentity(ident);
|
||||||
|
@ -493,10 +493,8 @@ public final class BroadcastQueue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!skip && r.requiredPermissions != null && r.requiredPermissions.length > 0) {
|
if (!skip) {
|
||||||
for (int i = 0; i < r.requiredPermissions.length; i++) {
|
int perm = mService.checkComponentPermission(r.requiredPermission,
|
||||||
String requiredPermission = r.requiredPermissions[i];
|
|
||||||
int perm = mService.checkComponentPermission(requiredPermission,
|
|
||||||
filter.receiverList.pid, filter.receiverList.uid, -1, true);
|
filter.receiverList.pid, filter.receiverList.uid, -1, true);
|
||||||
if (perm != PackageManager.PERMISSION_GRANTED) {
|
if (perm != PackageManager.PERMISSION_GRANTED) {
|
||||||
Slog.w(TAG, "Permission Denial: receiving "
|
Slog.w(TAG, "Permission Denial: receiving "
|
||||||
@ -504,14 +502,15 @@ public final class BroadcastQueue {
|
|||||||
+ " to " + filter.receiverList.app
|
+ " to " + filter.receiverList.app
|
||||||
+ " (pid=" + filter.receiverList.pid
|
+ " (pid=" + filter.receiverList.pid
|
||||||
+ ", uid=" + filter.receiverList.uid + ")"
|
+ ", uid=" + filter.receiverList.uid + ")"
|
||||||
+ " requires " + requiredPermission
|
+ " requires " + r.requiredPermission
|
||||||
+ " due to sender " + r.callerPackage
|
+ " due to sender " + r.callerPackage
|
||||||
+ " (uid " + r.callingUid + ")");
|
+ " (uid " + r.callingUid + ")");
|
||||||
skip = true;
|
skip = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
int appOp = AppOpsManager.permissionToOpCode(requiredPermission);
|
int appOp = AppOpsManager.OP_NONE;
|
||||||
if (appOp != r.appOp
|
if (r.requiredPermission != null) {
|
||||||
|
appOp = AppOpsManager.permissionToOpCode(r.requiredPermission);
|
||||||
|
if (appOp != AppOpsManager.OP_NONE
|
||||||
&& mService.mAppOpsService.noteOperation(appOp,
|
&& mService.mAppOpsService.noteOperation(appOp,
|
||||||
filter.receiverList.uid, filter.packageName)
|
filter.receiverList.uid, filter.packageName)
|
||||||
!= AppOpsManager.MODE_ALLOWED) {
|
!= AppOpsManager.MODE_ALLOWED) {
|
||||||
@ -521,29 +520,13 @@ public final class BroadcastQueue {
|
|||||||
+ " (pid=" + filter.receiverList.pid
|
+ " (pid=" + filter.receiverList.pid
|
||||||
+ ", uid=" + filter.receiverList.uid + ")"
|
+ ", uid=" + filter.receiverList.uid + ")"
|
||||||
+ " requires appop " + AppOpsManager.permissionToOp(
|
+ " requires appop " + AppOpsManager.permissionToOp(
|
||||||
requiredPermission)
|
r.requiredPermission)
|
||||||
+ " due to sender " + r.callerPackage
|
|
||||||
+ " (uid " + r.callingUid + ")");
|
|
||||||
skip = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!skip && (r.requiredPermissions == null || r.requiredPermissions.length == 0)) {
|
|
||||||
int perm = mService.checkComponentPermission(null,
|
|
||||||
filter.receiverList.pid, filter.receiverList.uid, -1, true);
|
|
||||||
if (perm != PackageManager.PERMISSION_GRANTED) {
|
|
||||||
Slog.w(TAG, "Permission Denial: security check failed when receiving "
|
|
||||||
+ r.intent.toString()
|
|
||||||
+ " to " + filter.receiverList.app
|
|
||||||
+ " (pid=" + filter.receiverList.pid
|
|
||||||
+ ", uid=" + filter.receiverList.uid + ")"
|
|
||||||
+ " due to sender " + r.callerPackage
|
+ " due to sender " + r.callerPackage
|
||||||
+ " (uid " + r.callingUid + ")");
|
+ " (uid " + r.callingUid + ")");
|
||||||
skip = true;
|
skip = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!skip && r.appOp != AppOpsManager.OP_NONE
|
if (!skip && r.appOp != appOp && r.appOp != AppOpsManager.OP_NONE
|
||||||
&& mService.mAppOpsService.noteOperation(r.appOp,
|
&& mService.mAppOpsService.noteOperation(r.appOp,
|
||||||
filter.receiverList.uid, filter.packageName)
|
filter.receiverList.uid, filter.packageName)
|
||||||
!= AppOpsManager.MODE_ALLOWED) {
|
!= AppOpsManager.MODE_ALLOWED) {
|
||||||
@ -552,15 +535,17 @@ public final class BroadcastQueue {
|
|||||||
+ " to " + filter.receiverList.app
|
+ " to " + filter.receiverList.app
|
||||||
+ " (pid=" + filter.receiverList.pid
|
+ " (pid=" + filter.receiverList.pid
|
||||||
+ ", uid=" + filter.receiverList.uid + ")"
|
+ ", uid=" + filter.receiverList.uid + ")"
|
||||||
+ " requires appop " + AppOpsManager.opToName(r.appOp)
|
+ " requires appop " + AppOpsManager.permissionToOp(
|
||||||
|
r.requiredPermission)
|
||||||
+ " due to sender " + r.callerPackage
|
+ " due to sender " + r.callerPackage
|
||||||
+ " (uid " + r.callingUid + ")");
|
+ " (uid " + r.callingUid + ")");
|
||||||
skip = true;
|
skip = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!mService.mIntentFirewall.checkBroadcast(r.intent, r.callingUid,
|
if (!skip) {
|
||||||
r.callingPid, r.resolvedType, filter.receiverList.uid)) {
|
skip = !mService.mIntentFirewall.checkBroadcast(r.intent, r.callingUid,
|
||||||
return;
|
r.callingPid, r.resolvedType, filter.receiverList.uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filter.receiverList.app == null || filter.receiverList.app.crashing) {
|
if (filter.receiverList.app == null || filter.receiverList.app.crashing) {
|
||||||
@ -875,15 +860,12 @@ public final class BroadcastQueue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!skip && info.activityInfo.applicationInfo.uid != Process.SYSTEM_UID &&
|
if (!skip && info.activityInfo.applicationInfo.uid != Process.SYSTEM_UID &&
|
||||||
r.requiredPermissions != null && r.requiredPermissions.length > 0) {
|
r.requiredPermission != null) {
|
||||||
for (int i = 0; i < r.requiredPermissions.length; i++) {
|
|
||||||
String requiredPermission = r.requiredPermissions[i];
|
|
||||||
try {
|
try {
|
||||||
perm = AppGlobals.getPackageManager().
|
perm = AppGlobals.getPackageManager().
|
||||||
checkPermission(requiredPermission,
|
checkPermission(r.requiredPermission,
|
||||||
info.activityInfo.applicationInfo.packageName,
|
info.activityInfo.applicationInfo.packageName,
|
||||||
UserHandle
|
UserHandle.getUserId(info.activityInfo.applicationInfo.uid));
|
||||||
.getUserId(info.activityInfo.applicationInfo.uid));
|
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
perm = PackageManager.PERMISSION_DENIED;
|
perm = PackageManager.PERMISSION_DENIED;
|
||||||
}
|
}
|
||||||
@ -891,14 +873,16 @@ public final class BroadcastQueue {
|
|||||||
Slog.w(TAG, "Permission Denial: receiving "
|
Slog.w(TAG, "Permission Denial: receiving "
|
||||||
+ r.intent + " to "
|
+ r.intent + " to "
|
||||||
+ component.flattenToShortString()
|
+ component.flattenToShortString()
|
||||||
+ " requires " + requiredPermission
|
+ " requires " + r.requiredPermission
|
||||||
+ " due to sender " + r.callerPackage
|
+ " due to sender " + r.callerPackage
|
||||||
+ " (uid " + r.callingUid + ")");
|
+ " (uid " + r.callingUid + ")");
|
||||||
skip = true;
|
skip = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
int appOp = AppOpsManager.permissionToOpCode(requiredPermission);
|
}
|
||||||
if (appOp != AppOpsManager.OP_NONE && appOp != r.appOp
|
int appOp = AppOpsManager.OP_NONE;
|
||||||
|
if (!skip && r.requiredPermission != null) {
|
||||||
|
appOp = AppOpsManager.permissionToOpCode(r.requiredPermission);
|
||||||
|
if (appOp != AppOpsManager.OP_NONE
|
||||||
&& mService.mAppOpsService.noteOperation(appOp,
|
&& mService.mAppOpsService.noteOperation(appOp,
|
||||||
info.activityInfo.applicationInfo.uid, info.activityInfo.packageName)
|
info.activityInfo.applicationInfo.uid, info.activityInfo.packageName)
|
||||||
!= AppOpsManager.MODE_ALLOWED) {
|
!= AppOpsManager.MODE_ALLOWED) {
|
||||||
@ -906,22 +890,21 @@ public final class BroadcastQueue {
|
|||||||
+ r.intent + " to "
|
+ r.intent + " to "
|
||||||
+ component.flattenToShortString()
|
+ component.flattenToShortString()
|
||||||
+ " requires appop " + AppOpsManager.permissionToOp(
|
+ " requires appop " + AppOpsManager.permissionToOp(
|
||||||
requiredPermission)
|
r.requiredPermission)
|
||||||
+ " due to sender " + r.callerPackage
|
+ " due to sender " + r.callerPackage
|
||||||
+ " (uid " + r.callingUid + ")");
|
+ " (uid " + r.callingUid + ")");
|
||||||
skip = true;
|
skip = true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (!skip && r.appOp != appOp && r.appOp != AppOpsManager.OP_NONE
|
||||||
if (!skip && r.appOp != AppOpsManager.OP_NONE
|
|
||||||
&& mService.mAppOpsService.noteOperation(r.appOp,
|
&& mService.mAppOpsService.noteOperation(r.appOp,
|
||||||
info.activityInfo.applicationInfo.uid, info.activityInfo.packageName)
|
info.activityInfo.applicationInfo.uid, info.activityInfo.packageName)
|
||||||
!= AppOpsManager.MODE_ALLOWED) {
|
!= AppOpsManager.MODE_ALLOWED) {
|
||||||
Slog.w(TAG, "Appop Denial: receiving "
|
Slog.w(TAG, "Appop Denial: receiving "
|
||||||
+ r.intent + " to "
|
+ r.intent + " to "
|
||||||
+ component.flattenToShortString()
|
+ component.flattenToShortString()
|
||||||
+ " requires appop " + AppOpsManager.opToName(r.appOp)
|
+ " requires appop " + AppOpsManager.permissionToOp(
|
||||||
|
r.requiredPermission)
|
||||||
+ " due to sender " + r.callerPackage
|
+ " due to sender " + r.callerPackage
|
||||||
+ " (uid " + r.callingUid + ")");
|
+ " (uid " + r.callingUid + ")");
|
||||||
skip = true;
|
skip = true;
|
||||||
|
@ -32,7 +32,6 @@ import android.util.PrintWriterPrinter;
|
|||||||
import android.util.TimeUtils;
|
import android.util.TimeUtils;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -52,7 +51,7 @@ final class BroadcastRecord extends Binder {
|
|||||||
final boolean initialSticky; // initial broadcast from register to sticky?
|
final boolean initialSticky; // initial broadcast from register to sticky?
|
||||||
final int userId; // user id this broadcast was for
|
final int userId; // user id this broadcast was for
|
||||||
final String resolvedType; // the resolved data type
|
final String resolvedType; // the resolved data type
|
||||||
final String[] requiredPermissions; // permissions the caller has required
|
final String requiredPermission; // a permission the caller has required
|
||||||
final int appOp; // an app op that is associated with this broadcast
|
final int appOp; // an app op that is associated with this broadcast
|
||||||
final BroadcastOptions options; // BroadcastOptions supplied by caller
|
final BroadcastOptions options; // BroadcastOptions supplied by caller
|
||||||
final List receivers; // contains BroadcastFilter and ResolveInfo
|
final List receivers; // contains BroadcastFilter and ResolveInfo
|
||||||
@ -104,10 +103,8 @@ final class BroadcastRecord extends Binder {
|
|||||||
pw.print(callerApp != null ? callerApp.toShortString() : "null");
|
pw.print(callerApp != null ? callerApp.toShortString() : "null");
|
||||||
pw.print(" pid="); pw.print(callingPid);
|
pw.print(" pid="); pw.print(callingPid);
|
||||||
pw.print(" uid="); pw.println(callingUid);
|
pw.print(" uid="); pw.println(callingUid);
|
||||||
if ((requiredPermissions != null && requiredPermissions.length > 0)
|
if (requiredPermission != null || appOp != AppOpsManager.OP_NONE) {
|
||||||
|| appOp != AppOpsManager.OP_NONE) {
|
pw.print(prefix); pw.print("requiredPermission="); pw.print(requiredPermission);
|
||||||
pw.print(prefix); pw.print("requiredPermissions=");
|
|
||||||
pw.print(Arrays.toString(requiredPermissions));
|
|
||||||
pw.print(" appOp="); pw.println(appOp);
|
pw.print(" appOp="); pw.println(appOp);
|
||||||
}
|
}
|
||||||
if (options != null) {
|
if (options != null) {
|
||||||
@ -187,7 +184,7 @@ final class BroadcastRecord extends Binder {
|
|||||||
|
|
||||||
BroadcastRecord(BroadcastQueue _queue,
|
BroadcastRecord(BroadcastQueue _queue,
|
||||||
Intent _intent, ProcessRecord _callerApp, String _callerPackage,
|
Intent _intent, ProcessRecord _callerApp, String _callerPackage,
|
||||||
int _callingPid, int _callingUid, String _resolvedType, String[] _requiredPermissions,
|
int _callingPid, int _callingUid, String _resolvedType, String _requiredPermission,
|
||||||
int _appOp, BroadcastOptions _options, List _receivers, IIntentReceiver _resultTo,
|
int _appOp, BroadcastOptions _options, List _receivers, IIntentReceiver _resultTo,
|
||||||
int _resultCode, String _resultData, Bundle _resultExtras, boolean _serialized,
|
int _resultCode, String _resultData, Bundle _resultExtras, boolean _serialized,
|
||||||
boolean _sticky, boolean _initialSticky,
|
boolean _sticky, boolean _initialSticky,
|
||||||
@ -200,7 +197,7 @@ final class BroadcastRecord extends Binder {
|
|||||||
callingPid = _callingPid;
|
callingPid = _callingPid;
|
||||||
callingUid = _callingUid;
|
callingUid = _callingUid;
|
||||||
resolvedType = _resolvedType;
|
resolvedType = _resolvedType;
|
||||||
requiredPermissions = _requiredPermissions;
|
requiredPermission = _requiredPermission;
|
||||||
appOp = _appOp;
|
appOp = _appOp;
|
||||||
options = _options;
|
options = _options;
|
||||||
receivers = _receivers;
|
receivers = _receivers;
|
||||||
|
@ -138,11 +138,6 @@ public class BroadcastInterceptingContext extends ContextWrapper {
|
|||||||
sendBroadcast(intent);
|
sendBroadcast(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendBroadcast(Intent intent, String[] receiverPermissions) {
|
|
||||||
sendBroadcast(intent);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendBroadcastAsUser(Intent intent, UserHandle user) {
|
public void sendBroadcastAsUser(Intent intent, UserHandle user) {
|
||||||
sendBroadcast(intent);
|
sendBroadcast(intent);
|
||||||
|
@ -317,12 +317,6 @@ public class MockContext extends Context {
|
|||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
|
||||||
@Override
|
|
||||||
public void sendBroadcast(Intent intent, String[] receiverPermissions) {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@SystemApi
|
@SystemApi
|
||||||
@Override
|
@Override
|
||||||
|
@ -1508,12 +1508,6 @@ public final class BridgeContext extends Context {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendBroadcast(Intent intent, String[] receiverPermissions) {
|
|
||||||
// pass
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendBroadcast(Intent arg0, String arg1, Bundle arg2) {
|
public void sendBroadcast(Intent arg0, String arg1, Bundle arg2) {
|
||||||
// pass
|
// pass
|
||||||
|
Reference in New Issue
Block a user