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

Commit 412667dd authored by Alex Johnston's avatar Alex Johnston Committed by Android (Google) Code Review
Browse files

Merge "Disable security and network logging COPE" into sc-dev

parents 09ca8113 fc35f820
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -883,6 +883,12 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
                synchronized (getLockObject()) {
                    // Check whether the user is affiliated, *before* removing its data.
                    boolean isRemovedUserAffiliated = isUserAffiliatedWithDeviceLocked(userHandle);
                    if (isProfileOwnerOfOrganizationOwnedDevice(userHandle)) {
                        // Disable network and security logging
                        mInjector.securityLogSetLoggingEnabledProperty(false);
                        mSecurityLogMonitor.stop();
                        setNetworkLoggingActiveInternal(false);
                    }
                    removeUserData(userHandle);
                    if (!isRemovedUserAffiliated) {
                        // We discard the logs when unaffiliated users are deleted (so that the