ReceiverRestrictedContextpublic class ReceiverRestrictedContext extends android.content.ContextWrapper
Methods Summary |
---|
public boolean | bindService(android.content.Intent service, android.content.ServiceConnection conn, int flags)
throw new ReceiverCallNotAllowedException(
"BroadcastReceiver components are not allowed to bind to services");
| public android.content.Intent | registerReceiver(android.content.BroadcastReceiver receiver, android.content.IntentFilter filter)
return registerReceiver(receiver, filter, null, null);
| public android.content.Intent | registerReceiver(android.content.BroadcastReceiver receiver, android.content.IntentFilter filter, java.lang.String broadcastPermission, android.os.Handler scheduler)
if (receiver == null) {
// Allow retrieving current sticky broadcast; this is safe since we
// aren't actually registering a receiver.
return super.registerReceiver(null, filter, broadcastPermission, scheduler);
} else {
throw new ReceiverCallNotAllowedException(
"BroadcastReceiver components are not allowed to register to receive intents");
}
| public android.content.Intent | registerReceiverAsUser(android.content.BroadcastReceiver receiver, android.os.UserHandle user, android.content.IntentFilter filter, java.lang.String broadcastPermission, android.os.Handler scheduler)
if (receiver == null) {
// Allow retrieving current sticky broadcast; this is safe since we
// aren't actually registering a receiver.
return super.registerReceiverAsUser(null, user, filter, broadcastPermission, scheduler);
} else {
throw new ReceiverCallNotAllowedException(
"BroadcastReceiver components are not allowed to register to receive intents");
}
|
|