Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c6da66fa authored by Hai Zhang's avatar Hai Zhang
Browse files

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
parent ebbf77ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment