)]}'
{
  "commit": "4ea0c7a9b7534714478846ab55efac3f7f0f9643",
  "tree": "610f5ab26707c83b4eed6678fb53a6744d89ae3f",
  "parents": [
    "8c4262bdfdb71b7330db286e78bad5b0ed4c382e"
  ],
  "author": {
    "name": "Jonathan Scott",
    "email": "scottjonathan@google.com",
    "time": "Tue Nov 21 16:36:13 2023 +0000"
  },
  "committer": {
    "name": "Android Build Coastguard Worker",
    "email": "android-build-coastguard-worker@google.com",
    "time": "Wed Jan 31 03:06:26 2024 +0000"
  },
  "message": "Always sync user restriction state to UserManager\n\nOn certain Android 14 builds, global restrictions set by the\nDPC can errornously go into UserManager\u0027s local restriction\nstore, resulting in a bad state where they cannot be unset\nin future. Fix this by always force syncing user restrictions\nfrom the policy engine to the UserManager when a restriction is\nbeing set or cleared by the DPC. The force sync ensures that both\nlocal and global restriction states of UserManager are consistent\nwith policy engine, for the restriction that is being updated.\n\nRan through the following manual tests:\n1. (DO) Start with A14 bad build, set global restrictions\n   -\u003e OTA to this fix\n   -\u003e try clearing policy\n2. (DO) Start with A14 bad build, set global restrictions\n   -\u003e reboot device\n   -\u003e OTA to this fix\n   -\u003e try clearing policy\n3. (DO) A13 with local \u0026 global restrictions set\n   -\u003e OTA to A14 bad build\n   -\u003e set same restrictions again\n   -\u003e OTA to this fix\n   -\u003e try clearing policy\n4. (DO) A13 with local \u0026 global restrictions set\n   -\u003e OTA to A14 bad build\n   -\u003e reboot device\n   -\u003e set same restrictions again\n   -\u003e OTA to this fix\n   -\u003e try clearing policy\n5. (DO) A13 with local \u0026 global restrictions set\n   -\u003e OTA to A14 bad build\n   -\u003e OTA to this fix\n   -\u003e try clearing policy\n6. (DO) A13 with local \u0026 global restrictions set\n   -\u003e OTA to A14 bad build\n   -\u003e reboot device\n   -\u003e OTA to this fix\n   -\u003e try clearing policy\n7. (DO) A13 with local \u0026 global restrictions set\n   -\u003e OTA to this fix\n   -\u003e try clearing policy\n8. (BYOD PO) A13 with global restrictions set\n   -\u003e OTA to A14 bad build\n   -\u003e reboot device\n   -\u003e OTA to this fix\n   -\u003e try clearing policy\nCase 1 \u0026 2: fresh A14 setup\nCase 3 \u0026 4: OTA\u0027ed devices with workaround applied\nCase 5 \u0026 6: OTA\u0027ed devices without workaround applied\nCase 7: directly OTA\u0027ed to build with fix\nCase 8: same as case 5 \u0026 6 but on a BYOD PO device\n\nBug: 311687929\nBug: 299302474\nTest: btest a.d.c.PolicyEngineTest\nTest: atest android.devicepolicy.cts.UserRestrictionsTest\n(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5394ddbee5dd88a35e2a9a8508dc260395895ac1)\nMerged-In: I4d700bc42ec114d1c0fc86f230f7f7612819195c\nChange-Id: I4d700bc42ec114d1c0fc86f230f7f7612819195c\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "016e85b075a447e046adb242eeccc1b160a7ab66",
      "old_mode": 33188,
      "old_path": "services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java",
      "new_id": "700d8764802353f0ea3e7391c2cde91dc8d496cf",
      "new_mode": 33188,
      "new_path": "services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyEngine.java"
    }
  ]
}
