Android 管理 API 策略应用程序中的权限授予未反映在设备上

Android Management API permissionGrants in policy applications not reflecting on device

我在此策略中有一个包含 permissionGrants 的应用程序。我已将此政策应用于多个完全托管的设备;但是,当转到应用程序查看物理设备上的权限时,这些 GRANT 权限并没有反映在设备上。例如,它只是说 Chrome 没有权限。是否有一个必须到位的前体设置才能通过 Android 管理 API 策略控制特定的应用程序权限?

这是当前的政策:

    "applications": [
    {
        "packageName": "com.android.chrome",
        "installType": "FORCE_INSTALLED",
        "permissionGrants": [
            {
                "permission": "ACCESS_COARSE_LOCATION",
                "policy": "GRANT"
            },
            {
                "permission": "ACCESS_FINE_LOCATION",
                "policy": "GRANT"
            },
            {
                "permission": "WRITE_EXTERNAL_STORAGE",
                "policy": "GRANT"
            },
            {
                "permission": "READ_EXTERNAL_STORAGE",
                "policy": "GRANT"
            },
            {
                "permission": "READ_CALL_LOG",
                "policy": "GRANT"
            },
            {
                "permission": "READ_PHONE_STATE",
                "policy": "GRANT"
            },
            {
                "permission": "READ_CONTACTS",
                "policy": "GRANT"
            },
            {
                "permission": "READ_SMS",
                "policy": "GRANT"
            },
            {
                "permission": "RECEIVE_SMS",
                "policy": "GRANT"
            },
            {
                "permission": "RECEIVE_MMS",
                "policy": "GRANT"
            },
            {
                "permission": "CAMERA",
                "policy": "GRANT"
            },
            {
                "permission": "REQUEST_IGNORE_BATTERY_OPTIMIZATIONS",
                "policy": "GRANT"
            }
        ]
    }
]

权限值应该是permission constant的值,而不是它的名字。例如。而不是“ACCESS_COARSE_LOCATION”你应该有“android.permission.ACCESS_COARSE_LOCATION”

"applications": [
    {
        "packageName": "com.android.chrome",
        "installType": "FORCE_INSTALLED",
        "permissionGrants": [
            {
                "permission": "android.permission.ACCESS_COARSE_LOCATION",
                "policy": "GRANT"
            },
            {
                "permission": "android.permission.ACCESS_FINE_LOCATION",
                "policy": "GRANT"
            },
            {
                "permission": "android.permission.WRITE_EXTERNAL_STORAGE",
                "policy": "GRANT"
            },
            ...
        ]
    }
]