Loading core/java/android/app/admin/DeviceAdminReceiver.java +1 −1 Original line number Diff line number Diff line Loading @@ -1073,6 +1073,7 @@ public class DeviceAdminReceiver extends BroadcastReceiver { private void onOperationSafetyStateChanged(Context context, Intent intent) { if (!hasRequiredExtra(intent, EXTRA_OPERATION_SAFETY_REASON) || !hasRequiredExtra(intent, EXTRA_OPERATION_SAFETY_STATE)) { Log.w(TAG, "Igoring intent that's missing required extras"); return; } Loading @@ -1084,7 +1085,6 @@ public class DeviceAdminReceiver extends BroadcastReceiver { } boolean isSafe = intent.getBooleanExtra(EXTRA_OPERATION_SAFETY_STATE, /* defaultValue=*/ false); onOperationSafetyStateChanged(context, reason, isSafe); } Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +0 −2 Original line number Diff line number Diff line Loading @@ -12344,7 +12344,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { Slog.v(LOG_TAG, String.format("notifyUnsafeOperationStateChanged(): %s=%b", DevicePolicyManager.operationSafetyReasonToString(reason), isSafe)); } Preconditions.checkArgument(mSafetyChecker == checker, "invalid checker: should be %s, was %s", mSafetyChecker, checker); Loading @@ -12352,7 +12351,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { extras.putInt(DeviceAdminReceiver.EXTRA_OPERATION_SAFETY_REASON, reason); extras.putBoolean(DeviceAdminReceiver.EXTRA_OPERATION_SAFETY_STATE, isSafe); // TODO(b/178494483): add CTS test sendDeviceOwnerCommand(DeviceAdminReceiver.ACTION_OPERATION_SAFETY_STATE_CHANGED, extras); for (int profileOwnerId : mOwners.getProfileOwnerKeys()) { services/devicepolicy/java/com/android/server/devicepolicy/OneTimeSafetyChecker.java +4 −4 Original line number Diff line number Diff line Loading @@ -72,11 +72,11 @@ final class OneTimeSafetyChecker implements DevicePolicySafetyChecker { DevicePolicyManagerInternal dpmi = LocalServices .getService(DevicePolicyManagerInternal.class); Slog.i(TAG, "notifying " + reasonName + " is active"); dpmi.notifyUnsafeOperationStateChanged(this, reason, true); Slog.i(TAG, "notifying " + reasonName + " is UNSAFE"); dpmi.notifyUnsafeOperationStateChanged(this, reason, /* isSafe= */ false); Slog.i(TAG, "notifying " + reasonName + " is inactive"); dpmi.notifyUnsafeOperationStateChanged(this, reason, false); Slog.i(TAG, "notifying " + reasonName + " is SAFE"); dpmi.notifyUnsafeOperationStateChanged(this, reason, /* isSafe= */ true); Slog.i(TAG, "returning " + reasonName); Loading Loading
core/java/android/app/admin/DeviceAdminReceiver.java +1 −1 Original line number Diff line number Diff line Loading @@ -1073,6 +1073,7 @@ public class DeviceAdminReceiver extends BroadcastReceiver { private void onOperationSafetyStateChanged(Context context, Intent intent) { if (!hasRequiredExtra(intent, EXTRA_OPERATION_SAFETY_REASON) || !hasRequiredExtra(intent, EXTRA_OPERATION_SAFETY_STATE)) { Log.w(TAG, "Igoring intent that's missing required extras"); return; } Loading @@ -1084,7 +1085,6 @@ public class DeviceAdminReceiver extends BroadcastReceiver { } boolean isSafe = intent.getBooleanExtra(EXTRA_OPERATION_SAFETY_STATE, /* defaultValue=*/ false); onOperationSafetyStateChanged(context, reason, isSafe); } Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +0 −2 Original line number Diff line number Diff line Loading @@ -12344,7 +12344,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { Slog.v(LOG_TAG, String.format("notifyUnsafeOperationStateChanged(): %s=%b", DevicePolicyManager.operationSafetyReasonToString(reason), isSafe)); } Preconditions.checkArgument(mSafetyChecker == checker, "invalid checker: should be %s, was %s", mSafetyChecker, checker); Loading @@ -12352,7 +12351,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { extras.putInt(DeviceAdminReceiver.EXTRA_OPERATION_SAFETY_REASON, reason); extras.putBoolean(DeviceAdminReceiver.EXTRA_OPERATION_SAFETY_STATE, isSafe); // TODO(b/178494483): add CTS test sendDeviceOwnerCommand(DeviceAdminReceiver.ACTION_OPERATION_SAFETY_STATE_CHANGED, extras); for (int profileOwnerId : mOwners.getProfileOwnerKeys()) {
services/devicepolicy/java/com/android/server/devicepolicy/OneTimeSafetyChecker.java +4 −4 Original line number Diff line number Diff line Loading @@ -72,11 +72,11 @@ final class OneTimeSafetyChecker implements DevicePolicySafetyChecker { DevicePolicyManagerInternal dpmi = LocalServices .getService(DevicePolicyManagerInternal.class); Slog.i(TAG, "notifying " + reasonName + " is active"); dpmi.notifyUnsafeOperationStateChanged(this, reason, true); Slog.i(TAG, "notifying " + reasonName + " is UNSAFE"); dpmi.notifyUnsafeOperationStateChanged(this, reason, /* isSafe= */ false); Slog.i(TAG, "notifying " + reasonName + " is inactive"); dpmi.notifyUnsafeOperationStateChanged(this, reason, false); Slog.i(TAG, "notifying " + reasonName + " is SAFE"); dpmi.notifyUnsafeOperationStateChanged(this, reason, /* isSafe= */ true); Slog.i(TAG, "returning " + reasonName); Loading