Merge "Disable security and network logging COPE" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
412667ddaf
@@ -883,6 +883,12 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
|||||||
synchronized (getLockObject()) {
|
synchronized (getLockObject()) {
|
||||||
// Check whether the user is affiliated, *before* removing its data.
|
// Check whether the user is affiliated, *before* removing its data.
|
||||||
boolean isRemovedUserAffiliated = isUserAffiliatedWithDeviceLocked(userHandle);
|
boolean isRemovedUserAffiliated = isUserAffiliatedWithDeviceLocked(userHandle);
|
||||||
|
if (isProfileOwnerOfOrganizationOwnedDevice(userHandle)) {
|
||||||
|
// Disable network and security logging
|
||||||
|
mInjector.securityLogSetLoggingEnabledProperty(false);
|
||||||
|
mSecurityLogMonitor.stop();
|
||||||
|
setNetworkLoggingActiveInternal(false);
|
||||||
|
}
|
||||||
removeUserData(userHandle);
|
removeUserData(userHandle);
|
||||||
if (!isRemovedUserAffiliated) {
|
if (!isRemovedUserAffiliated) {
|
||||||
// We discard the logs when unaffiliated users are deleted (so that the
|
// We discard the logs when unaffiliated users are deleted (so that the
|
||||||
|
|||||||
Reference in New Issue
Block a user