I have question. I have fully managed device and use Android Management API (https://developers.google.com/android/management)
I created policy with this definition:
{
  "applications": [
    {
      "packageName": "com.example.myapp",
      "installType": "KIOSK",
      "defaultPermissionPolicy": "GRANT"
    }
  ],
  "cameraDisabled": false,
  "defaultPermissionPolicy": "GRANT",
  "debuggingFeaturesAllowed": true
}
but I want allow access to device settings or exit kiosk mode (kiosk app), when user write some password. It's possible to do it only with change policy above? Or I must write some specific code in my app com.example.myapp?