Getting reviewed applications' permissions on android M+
I'm currently studying the new permissions' system from Android (M and over). I need to find a way to see what permissions from all apps have been already consented by the user. For example, if a permission belongs to the dangerous protection level, I need to know if the user was already prompted with the accept/deny dialog (note that I know if that permission is currently denied or granted).
For now, I've discovered that if a permission has a dangerous protection level and it is currently granted, that means that the user has already consented to this permission (since denied is the default on the dangerous level). But if the permission is currently denied, the user may have decided to deny the permission or it may still be the default value (permission was not yet used/prompted to the user). Similarly, if the permission is from the normal protection level and it is currently denied, then the user explicitly denied this permission (since the default is granted). And so on for the other groups.
To sum up what I'm asking: I have access to all packages and all granted and denied permissions. What I want to know is if I have a way to know if the packages' permissions are consented by the user or if it is still the default value.
Thank you very much for any help. Let me know if you need any code or any further explanation.
链接地址: http://www.djcxy.com/p/85358.html上一篇: 记录一个正常或危险的Android权限?