Fix translation between APPLY_RESTRICTION and SOFT_RESTRICTED
Previously we were not using APPLY_RESTRICTION because there might be platform callers passing that flag, and using the exempt flags to compute that instead. However that approach no longer works after ag/26400879 made the restriction flags only set for soft restriction when the permission is actually soft restricted, instead of always set as long as there's no exemption. So with the previous approach of translation, we would be setting SOFT_RESTRICTED when the permission isn't actually restricted again, nullifying the intended change of ag/26400879 and breaking the test. And since we actually don't have any platform code setting APPLY_RESTRICTION and it's entirely managed within UPS right now, we can just rely on the current value of APPLY_RESTRICTION and translate that into SOFT_RESTRICTED for soft restricted permissions. Fixes: 328323837 Test: PackageSetInstallerTest Change-Id: I9f96b9baa2a4e7f89299e1822d1f2cbae6b05a99
Loading
Please register or sign in to comment