Stop non-DO devices from disabling network logging
Bug: 32623860 Change-Id: Ia53ce842fffb2a15c16c9535fbe07421ae7f2578
This commit is contained in:
@@ -9107,20 +9107,19 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
||||
}
|
||||
|
||||
private synchronized void disableDeviceOwnerManagedSingleUserFeaturesIfNeeded() {
|
||||
if (!mOwners.hasDeviceOwner()) {
|
||||
return;
|
||||
}
|
||||
if (!isDeviceOwnerManagedSingleUserDevice()) {
|
||||
mInjector.securityLogSetLoggingEnabledProperty(false);
|
||||
Slog.w(LOG_TAG, "Security logging turned off as it's no longer a single user device.");
|
||||
|
||||
getDeviceOwnerAdminLocked().isNetworkLoggingEnabled = false;
|
||||
saveSettingsLocked(mInjector.userHandleGetCallingUserId());
|
||||
setNetworkLoggingActiveInternal(false);
|
||||
Slog.w(LOG_TAG, "Network logging turned off as it's no longer a single user"
|
||||
+ " device.");
|
||||
|
||||
if (mOwners.hasDeviceOwner()) {
|
||||
setBackupServiceEnabledInternal(false);
|
||||
Slog.w(LOG_TAG, "Backup is off as it's a managed device that has more that one user.");
|
||||
}
|
||||
setBackupServiceEnabledInternal(false);
|
||||
Slog.w(LOG_TAG, "Security logging, network logging and backup service turned off as"
|
||||
+ " it's not a single user device.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user