{"action":"created","issue":{"url":"https://api.github.com/repos/yanzhenjie/AndPermission/issues/226","repository_url":"https://api.github.com/repos/yanzhenjie/AndPermission","labels_url":"https://api.github.com/repos/yanzhenjie/AndPermission/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/yanzhenjie/AndPermission/issues/226/comments","events_url":"https://api.github.com/repos/yanzhenjie/AndPermission/issues/226/events","html_url":"https://github.com/yanzhenjie/AndPermission/issues/226","id":312430881,"number":226,"title":"VIVO手机权限问题及其思考","user":{"login":"niezhangyu","id":16338852,"avatar_url":"https://avatars3.githubusercontent.com/u/16338852?v=4","gravatar_id":"","url":"https://api.github.com/users/niezhangyu","html_url":"https://github.com/niezhangyu","followers_url":"https://api.github.com/users/niezhangyu/followers","following_url":"https://api.github.com/users/niezhangyu/following{/other_user}","gists_url":"https://api.github.com/users/niezhangyu/gists{/gist_id}","starred_url":"https://api.github.com/users/niezhangyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niezhangyu/subscriptions","organizations_url":"https://api.github.com/users/niezhangyu/orgs","repos_url":"https://api.github.com/users/niezhangyu/repos","events_url":"https://api.github.com/users/niezhangyu/events{/privacy}","received_events_url":"https://api.github.com/users/niezhangyu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-09T07:59:30Z","updated_at":"2018-04-09T08:26:42Z","closed_at":null,"author_association":"NONE","body":"您好，在VIVO X20上申请权限出现问题。我要申请的读取联系人权限，但VIVO系统自动返回onGranted且不会弹出系统申请权限的提示，而这个onGranted其实是虚假的，我并不会真正的取回来联系人的电话号码。我读您的源码发现，您一般采用的StandardChecker模式调用的是AppOpsManager获取权限的方法，但这种方法在vivo是不行的，默认就是true。而StrictChecker模式只有StandardChecker返回false才进行。于是，我修改了您的代码，直接用StrictChecker模式，可是依然失败。在StrictChecker模式中，您使用cursor是否为空或者是否抛异常来判断是否拥有权限，但在VIVO手机上这两者都不会发生。所以我直接采用了判断cursor.getCount()是否为0来判断我是否获得权限。最终，用这个我拿到了是否真正拥有vivo的权限。但是，这么搞我个人觉得还是有很大隐患的，比如用户联系表就是为空等情况。说的很啰嗦，不知道各位有没有更好的办法来解决手机系统直接在你申请权限的时候返回虚假的true？"},"comment":{"url":"https://api.github.com/repos/yanzhenjie/AndPermission/issues/comments/379674408","html_url":"https://github.com/yanzhenjie/AndPermission/issues/226#issuecomment-379674408","issue_url":"https://api.github.com/repos/yanzhenjie/AndPermission/issues/226","id":379674408,"user":{"login":"niezhangyu","id":16338852,"avatar_url":"https://avatars3.githubusercontent.com/u/16338852?v=4","gravatar_id":"","url":"https://api.github.com/users/niezhangyu","html_url":"https://github.com/niezhangyu","followers_url":"https://api.github.com/users/niezhangyu/followers","following_url":"https://api.github.com/users/niezhangyu/following{/other_user}","gists_url":"https://api.github.com/users/niezhangyu/gists{/gist_id}","starred_url":"https://api.github.com/users/niezhangyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niezhangyu/subscriptions","organizations_url":"https://api.github.com/users/niezhangyu/orgs","repos_url":"https://api.github.com/users/niezhangyu/repos","events_url":"https://api.github.com/users/niezhangyu/events{/privacy}","received_events_url":"https://api.github.com/users/niezhangyu/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T08:26:42Z","updated_at":"2018-04-09T08:26:42Z","author_association":"NONE","body":"@cervy 谢谢回复 您没有问题吗？好像我描述有误，我这里直接就可以进联系人列表了  然后在联系人列表里弹框申请权限    如果这个时候拒绝了 我下次还是可以进联系人列表 而没有任何提示 如果debug的话 这个时候走的还是onGranted"}}
{"actor":{"display_login":"niezhangyu"}}