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

Commit e6a1612d authored by Florian Mayer's avatar Florian Mayer
Browse files

Go back to default MTE state if no longer controlled by policy.

Test: TestDPC
Bug: 322733889
Change-Id: Id47ce5cea173a203fcfd80a38b1119e2ef903a43
parent 8652ad6e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -23128,6 +23128,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                    mInjector.systemPropertiesSet(memtagProperty, "memtag");
                } else if (flags == DevicePolicyManager.MTE_DISABLED) {
                    mInjector.systemPropertiesSet(memtagProperty, "memtag-off");
                } else if (flags == DevicePolicyManager.MTE_NOT_CONTROLLED_BY_POLICY) {
                    if (admin.mtePolicy != DevicePolicyManager.MTE_NOT_CONTROLLED_BY_POLICY) {
                        mInjector.systemPropertiesSet(memtagProperty, "default");
                    }
                }
                admin.mtePolicy = flags;
                saveSettingsLocked(caller.getUserId());