广播权限检查:
Exception occurred while executing 'broadcast':
java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.BOOT_COMPLETED from pid=17366, uid=2000
at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19113)
at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:18912)
at com.android.server.am.ActivityManagerService.broadcastIntentWithFeature(ActivityManagerService.java:19919)
at com.android.server.am.ActivityManagerShellCommand.runSendBroadcast(ActivityManagerShellCommand.java:772)
at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:205)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:13117)
at android.os.Binder.shellCommand(Binder.java:965)
at android.os.Binder.onTransact(Binder.java:839)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:6026)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3628)
at android.os.Binder.execTransactInternal(Binder.java:1195)
at android.os.Binder.execTransact(Binder.java:1159)
广播权限
https://developer.android.com/guide/components/broadcasts#restrict-broadcasts-permissions
网友评论