开发者

"android.permission.MOUNT_UNMOUNT_FILESYSTEMS" the permission question

开发者 https://www.devze.com 2023-02-16 03:52 出处:网络
I want to know whether a program has the per开发者_开发百科mission \"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"? I used:

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 ;-)

0

精彩评论

暂无评论...
验证码 换一张
取 消