问题
I am trying to use an emulator with which comes with Android Studio, to see what permissions a user can enable / disable from this device.
While a developer can declare he needs access to "Identity" or contact card, it seems that in the emulator, there is no option to display the apps that have disabled access to "identity".
Does this mean that there is no option for a user to refuse access to identity ? Or is it just that it does not appear in the emulator unless you create an app that requests identity ?
回答1:
If you are using an API 23 emulator, the grouping of Android permissions has changed for the new runtime permissions model. The full list of dangerous permissions and their associated groups can be found on this table.
You'll note that most of the permissions in the old Identity bucket have either been removed entirely or moved to the 'Contacts' group (as is the case for GET_ACCOUNTS).
回答2:
Only "dangerous" permissions need to be requested from user in Android 6.0. Others are granted automatically when they are declared in the manifest.
List of dangerous permissions can be found here: http://developer.android.com/guide/topics/security/permissions.html#normal-dangerous - they are divided in groups, which are:
CALENDAR
READ_CALENDAR WRITE_CALENDAR
CAMERA
CAMERA
CONTACTS
READ_CONTACTS WRITE_CONTACTS GET_ACCOUNTS
LOCATION
ACCESS_FINE_LOCATION ACCESS_COARSE_LOCATION
MICROPHONE
RECORD_AUDIO
PHONE
READ_PHONE_STATE CALL_PHONE READ_CALL_LOG WRITE_CALL_LOG ADD_VOICEMAIL USE_SIP PROCESS_OUTGOING_CALLS
SENSORS
BODY_SENSORS
SMS
SEND_SMS RECEIVE_SMS READ_SMS RECEIVE_WAP_PUSH RECEIVE_MMS
STORAGE
READ_EXTERNAL_STORAGE WRITE_EXTERNAL_STORAGE
来源:https://stackoverflow.com/questions/33295810/where-is-the-app-permission-for-identity-in-android-marshmallow