I want to know whether a program has the per开发者_开发百科mission "android.permission.MOUNT_UNMOUNT_FILESYSTEMS"? I used:
context.checkCallingOrSelfPermission("android.permission.MOUNT_UNMOUNT_FILESYSTEMS");
but it always returns 0 no matter if I have the permission.
http://developer.android.com/reference/android/content/pm/PackageManager.html#PERMISSION_GRANTED
Depending on the reference 0 means that the permission has been granted. So it's good ;-)
精彩评论