android application for permission to perform the procedure

Pop-up window is actually a counterpart authorized activity (implicit intent to start the second box in the figure) (com.android.packageinstaller.permission.ui.GrantpermissionsActivity)

In PackageManageService grantRuntimePermission processing time, the processing is carried out primarily by PermissionState.grantRuntimePermission (This method returns the result of permission to open), including the parity userid (app installed into the system will be assigned a UID), obtaining permission ID list of authorized Analyzing, then through an internal class PermissionState

PermissionData.mGrant to control the state of privilege, the privilege list of authorized writes the results to a file by Settings.writePermisson, and then returns the results to the authorization of onActivityResult Activiy by ActivityThread.

 

Guess you like

Origin www.cnblogs.com/yjpjy/p/11996369.html