美文网首页
Android 面试拾遗

Android 面试拾遗

作者: 小磊长江大 | 来源:发表于2021-12-24 17:42 被阅读0次

广播权限检查:

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

相关文章

网友评论

      本文标题:Android 面试拾遗

      本文链接:https://www.haomeiwen.com/subject/pptrqrtx.html