Home
last modified time | relevance | path

Searched refs:deviceOwner (Results 1 – 16 of 16) sorted by relevance

/cts/common/device-side/bedstead/remotedpc/src/library/test/java/com/android/bedstead/remotedpc/
DRemoteDpcTest.java84 assertThat(RemoteDpc.deviceOwner()).isNull(); in deviceOwner_noDeviceOwner_returnsNull()
89 DeviceOwner deviceOwner = in deviceOwner_nonRemoteDpcDeviceOwner_returnsNull() local
92 assertThat(RemoteDpc.deviceOwner()).isNull(); in deviceOwner_nonRemoteDpcDeviceOwner_returnsNull()
94 deviceOwner.remove(); in deviceOwner_nonRemoteDpcDeviceOwner_returnsNull()
103 assertThat(RemoteDpc.deviceOwner()).isNotNull(); in deviceOwner_remoteDpcDeviceOwner_returnsInstance()
257 DeviceOwner deviceOwner = sTestApis.devicePolicy().setDeviceOwner(sUser, in any_nonRemoteDpcDeviceOwner_noProfileOwner_returnsNull() local
263 deviceOwner.remove(); in any_nonRemoteDpcDeviceOwner_noProfileOwner_returnsNull()
318 DeviceOwner deviceOwner = sTestApis.devicePolicy().setDeviceOwner(sUser, in any_userHandle_nonRemoteDpcDeviceOwner_noProfileOwner_returnsNull() local
324 deviceOwner.remove(); in any_userHandle_nonRemoteDpcDeviceOwner_noProfileOwner_returnsNull()
330 RemoteDpc deviceOwner = RemoteDpc.setAsDeviceOwner(sUser); in any_userHandle_remoteDpcDeviceOwner_returnsDeviceOwner() local
[all …]
/cts/common/device-side/bedstead/remotedpc/src/library/main/java/com/android/bedstead/remotedpc/
DRemoteDpc.java59 public static RemoteDpc deviceOwner() { in deviceOwner() method in RemoteDpc
60 DeviceOwner deviceOwner = sTestApis.devicePolicy().getDeviceOwner(); in deviceOwner() local
61 if (deviceOwner == null || !deviceOwner.componentName().equals(DPC_COMPONENT_NAME)) { in deviceOwner()
65 return new RemoteDpc(deviceOwner); in deviceOwner()
149 return deviceOwner(); in any()
185 DeviceOwner deviceOwner = sTestApis.devicePolicy().getDeviceOwner(); in setAsDeviceOwner() local
186 if (deviceOwner != null) { in setAsDeviceOwner()
187 if (deviceOwner.componentName().equals(DPC_COMPONENT_NAME)) { in setAsDeviceOwner()
188 return new RemoteDpc(deviceOwner); // Already set in setAsDeviceOwner()
190 deviceOwner.remove(); in setAsDeviceOwner()
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/devicepolicy/
DDevicePolicyTest.java226 DeviceOwner deviceOwner = in setDeviceOwner_deviceOwnerIsSet() local
230 assertThat(sTestApis.devicePolicy().getDeviceOwner()).isEqualTo(deviceOwner); in setDeviceOwner_deviceOwnerIsSet()
232 deviceOwner.remove(); in setDeviceOwner_deviceOwnerIsSet()
284 DeviceOwner deviceOwner = in setDeviceOwner_sPlus_userAlreadyOnDevice_deviceOwnerIsSet() local
290 deviceOwner.remove(); in setDeviceOwner_sPlus_userAlreadyOnDevice_deviceOwnerIsSet()
333 DeviceOwner deviceOwner = in getDeviceOwner_returnsDeviceOwner() local
337 assertThat(sTestApis.devicePolicy().getDeviceOwner()).isEqualTo(deviceOwner); in getDeviceOwner_returnsDeviceOwner()
339 deviceOwner.remove(); in getDeviceOwner_returnsDeviceOwner()
365 try (DeviceOwner deviceOwner = in deviceOwner_autoclose_removesDeviceOwner() argument
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/
DPolicy.java90 switch (enterprisePolicy.deviceOwner()) { in positiveStates()
106 "Unknown policy control: " + enterprisePolicy.deviceOwner()); in positiveStates()
152 switch (enterprisePolicy.deviceOwner()) { in negativeStates()
165 "Unknown policy control: " + enterprisePolicy.deviceOwner()); in negativeStates()
215 if (enterprisePolicy.deviceOwner() == EnterprisePolicy.DeviceOwnerControl.NO) { in cannotSetPolicyStates()
DDeviceState.java1355 DeviceOwner deviceOwner = sTestApis.devicePolicy().getDeviceOwner();
1357 if (deviceOwner == null) {
1362 mOriginalDeviceOwner = deviceOwner;
1367 deviceOwner.remove();
1399 public RemoteDpc deviceOwner() {
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/policies/
DTestPolicy.java25 @EnterprisePolicy(profileOwner = COPE_PARENT, deviceOwner = NO)
DDisallowNetworkReset.java27 @EnterprisePolicy(deviceOwner = USER, profileOwner = NO)
DDisallowPrivateDnsConfig.java27 @EnterprisePolicy(deviceOwner = USER, profileOwner = NO)
DPreferentialNetworkService.java30 @EnterprisePolicy(deviceOwner = NO, profileOwner = PROFILE)
DLockTask.java35 @EnterprisePolicy(deviceOwner = USER, profileOwner = AFFILIATED_OR_NO_DO)
DUserControlDisabledPackages.java36 @EnterprisePolicy(deviceOwner = GLOBAL, profileOwner = NO)
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/annotations/enterprise/
DEnterprisePolicy.java76 DeviceOwnerControl deviceOwner(); in deviceOwner() method
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/devicepolicy/
DDevicePolicy.java275 DeviceOwner deviceOwner = getDeviceOwner(); in checkForTerminalDeviceOwnerFailures() local
276 if (deviceOwner != null) { in checkForTerminalDeviceOwnerFailures()
282 + " as a device owner is already set: " + deviceOwner); in checkForTerminalDeviceOwnerFailures()
/cts/common/device-side/bedstead/eventlib/src/test/java/com/android/eventlib/premade/
DEventLibDeviceAdminReceiverTest.java64 DeviceOwner deviceOwner = in enableDeviceOwner_logsEnabledEvent() local
73 deviceOwner.remove(); in enableDeviceOwner_logsEnabledEvent()
/cts/common/device-side/bedstead/deviceadminapp/src/test/java/com/android/bedstead/deviceadminapp/
DDeviceAdminAppTest.java60 try (DeviceOwner deviceOwner = sTestApis.devicePolicy().setDeviceOwner( in setAsDeviceOwner_isEnabled() argument
/cts/common/device-side/bedstead/harrier/src/test/java/com/android/bedstead/harrier/
DDeviceStateTest.java311 assertThat(sDeviceState.deviceOwner()).isNotNull(); in deviceOwner_deviceOwnerIsSet_returnsDeviceOwner()
317 assertThrows(IllegalStateException.class, sDeviceState::deviceOwner); in deviceOwner_deviceOwnerIsNotSet_throwsException()