Home
last modified time | relevance | path

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

/cts/common/device-side/bedstead/modules/enterprise/src/main/kotlin/com/android/bedstead/enterprise/
DDeviceOwnerComponent.kt57 private var deviceOwner: DevicePolicyController? = null variable
62 fun getDeviceOwner() = deviceOwner in getDeviceOwner()
79 deviceOwner = null in ensureHasNoDeviceOwner()
130 deviceOwner = currentDeviceOwner in ensureHasDeviceOwner()
182 deviceOwner = RemoteDpc.setAsDeviceOwner(dpcQueryMutable, in ensureHasDeviceOwner()
187 RemoteDpc.forDevicePolicyController(deviceOwner) in ensureHasDeviceOwner()
189 val deviceOwnerType = (deviceOwner as DeviceOwner).getType() in ensureHasDeviceOwner()
195 (deviceOwner as DeviceOwner).setType(type) in ensureHasDeviceOwner()
200 RemoteDpc.forDevicePolicyController(deviceOwner) in ensureHasDeviceOwner()
218 .forDevicePolicyController(deviceOwner) in ensureHasDeviceOwner()
[all …]
DEnterpriseComponent.kt139 EnsureHasDelegate.AdminType.DEVICE_OWNER -> deviceState.deviceOwner() in getDeviceAdmin()
181 EnsureHasNoDelegate.AdminType.DEVICE_OWNER -> deviceState.deviceOwner() in ensureHasNoDelegate()
DAnnotationLogicExtensions.kt41 mDeviceOwnerComponent.deviceOwner() in logic()
/cts/common/device-side/bedstead/remotedpc/src/test/java/com/android/bedstead/remotedpc/
DRemoteDpcTest.java91 assertThat(RemoteDpc.deviceOwner()).isNull(); in deviceOwner_noDeviceOwner_returnsNull()
101 DeviceOwner deviceOwner = in deviceOwner_nonRemoteDpcDeviceOwner_returnsNull() local
104 assertThat(RemoteDpc.deviceOwner()).isNull(); in deviceOwner_nonRemoteDpcDeviceOwner_returnsNull()
106 deviceOwner.remove(); in deviceOwner_nonRemoteDpcDeviceOwner_returnsNull()
113 assertThat(RemoteDpc.deviceOwner()).isNotNull(); in deviceOwner_remoteDpcDeviceOwner_returnsInstance()
287 DeviceOwner deviceOwner = TestApis.devicePolicy().setDeviceOwner( in any_nonRemoteDpcDeviceOwner_noProfileOwner_returnsNull() local
293 deviceOwner.remove(); in any_nonRemoteDpcDeviceOwner_noProfileOwner_returnsNull()
347 DeviceOwner deviceOwner = TestApis.devicePolicy().setDeviceOwner( in any_userHandle_nonRemoteDpcDeviceOwner_noProfileOwner_returnsNull() local
353 deviceOwner.remove(); in any_userHandle_nonRemoteDpcDeviceOwner_noProfileOwner_returnsNull()
361 RemoteDpc deviceOwner = RemoteDpc.deviceOwner(); in any_userHandle_remoteDpcDeviceOwner_returnsDeviceOwner() local
[all …]
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DDeviceOwnerTest.kt96 assertThat(devicePolicyManager.deviceOwner).isEqualTo(deviceState.dpc().packageName()) in <lambda>()
141 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() constant
142 deviceOwner?.remove() in <lambda>()
167 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() constant
168 deviceOwner?.remove() in <lambda>()
190 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() constant
191 deviceOwner?.remove() in <lambda>()
261 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() constant
262 deviceOwner?.remove() in <lambda>()
292 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() constant
[all …]
DAdbProvisioningTest.java74 DeviceOwner deviceOwner = TestApis.devicePolicy().getDeviceOwner(); in setDeviceOwnerUsingAdb_isLogged() local
75 if (deviceOwner != null) { in setDeviceOwnerUsingAdb_isLogged()
76 deviceOwner.remove(); in setDeviceOwnerUsingAdb_isLogged()
DProvisioningTest.kt361 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() constant
362 deviceOwner?.remove() in <lambda>()
381 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() constant
382 deviceOwner?.remove() in <lambda>()
440 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() constant
441 deviceOwner?.remove() in <lambda>()
472 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() constant
473 deviceOwner?.remove() in <lambda>()
496 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() constant
497 deviceOwner?.remove() in <lambda>()
[all …]
DNetworkResetTest.java136 sDeviceState.deviceOwner().devicePolicyManager() in factoryReset_noPolicyRestrictions_resetsToDefault()
139 sDeviceState.deviceOwner().devicePolicyManager() in factoryReset_noPolicyRestrictions_resetsToDefault()
DUserRestrictionsTest.java392 DeviceOwner deviceOwner = TestApis.devicePolicy().getDeviceOwner(); in skipTestForFinancedDevice() local
396 assumeFalse(deviceOwner != null && deviceOwner.getType() == DeviceOwnerType.FINANCED); in skipTestForFinancedDevice()
DDevicePolicyManagerTest.java89 sDeviceState.deviceOwner().componentName())); in removeActiveAdmin_adminPassedDoesNotBelongToCaller_throwsException()
98 sDeviceState.deviceOwner().componentName()); in removeActiveAdmin_adminPassedDoesNotBelongToCaller_manageDeviceAdminsPermission_noException()
DPasswordComplexityTest.java93 DeviceOwner deviceOwner = TestApis.devicePolicy().getDeviceOwner(); in skipRoleHolderAndFinancedDeviceOwnerTestIfFlagNotEnabled() local
94 boolean isFinancedDo = deviceOwner != null in skipRoleHolderAndFinancedDeviceOwnerTestIfFlagNotEnabled()
95 && deviceOwner.getType() == DeviceOwnerType.FINANCED; in skipRoleHolderAndFinancedDeviceOwnerTestIfFlagNotEnabled()
DPermissionGrantTest.java1171 DeviceOwner deviceOwner = TestApis.devicePolicy().getDeviceOwner(); in skipTestForFinancedDevice() local
1175 assumeFalse(deviceOwner != null && deviceOwner.getType() == DeviceOwnerType.FINANCED); in skipTestForFinancedDevice()
DDeviceManagementCoexistenceTest.java1339 sDeviceState.deviceOwner().remove(); in multiplePoliciesSet_dpcRemoved_removesPolicies()
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/devicepolicy/
DDeviceOwnerTest.java100 DeviceOwner deviceOwner = TestApis.devicePolicy() in remove_nonTestOnlyDpc_removesDeviceOwner() local
103 deviceOwner.remove(); in remove_nonTestOnlyDpc_removesDeviceOwner()
115 DeviceOwner deviceOwner = TestApis.devicePolicy() in setAndRemoveDeviceOwnerRepeatedly_doesNotThrowError() local
117 deviceOwner.remove(); in setAndRemoveDeviceOwnerRepeatedly_doesNotThrowError()
DDevicePolicyTest.java239 DeviceOwner deviceOwner = TestApis.devicePolicy().setDeviceOwner(DPC_COMPONENT_NAME); in setDeviceOwner_deviceOwnerIsSet() local
242 assertThat(TestApis.devicePolicy().getDeviceOwner()).isEqualTo(deviceOwner); in setDeviceOwner_deviceOwnerIsSet()
244 deviceOwner.remove(); in setDeviceOwner_deviceOwnerIsSet()
296 DeviceOwner deviceOwner = TestApis.devicePolicy().setDeviceOwner(DPC_COMPONENT_NAME); in setDeviceOwner_sPlus_userAlreadyOnDevice_deviceOwnerIsSet() local
301 deviceOwner.remove(); in setDeviceOwner_sPlus_userAlreadyOnDevice_deviceOwnerIsSet()
348 try (DeviceOwner deviceOwner = TestApis.devicePolicy().setDeviceOwner(DPC_COMPONENT_NAME)) { in deviceOwner_autoclose_removesDeviceOwner() argument
/cts/common/device-side/bedstead/remotedpc/src/main/java/com/android/bedstead/remotedpc/
DRemoteDpc.java67 public static RemoteDpc deviceOwner() { in deviceOwner() method in RemoteDpc
68 DeviceOwner deviceOwner = TestApis.devicePolicy().getDeviceOwner(); in deviceOwner() local
69 if (!isRemoteDpc(deviceOwner)) { in deviceOwner()
74 .isEqualTo(deviceOwner.componentName().getPackageName()) in deviceOwner()
76 return new RemoteDpc(remoteDpcTestApp, deviceOwner); in deviceOwner()
163 return deviceOwner(); in any()
224 DeviceOwner deviceOwner = TestApis.devicePolicy().setDeviceOwner(componentName, user); in setAsDeviceOwner() local
225 return new RemoteDpc(testApp, deviceOwner); in setAsDeviceOwner()
/cts/common/device-side/bedstead/deviceadminapp/src/test/java/com/android/bedstead/deviceadminapp/
DDeviceAdminAppTest.java61 try (DeviceOwner deviceOwner = TestApis.devicePolicy().setDeviceOwner( in setAsDeviceOwner_isEnabled() argument
/cts/common/device-side/bedstead/modules/enterprise/src/test/kotlin/com/android/bedstead/enterprise/
DEnterpriseAnnotationExecutorTest.kt148 assertThat(sDeviceState.deviceOwner()).isNotNull() in deviceOwner_deviceOwnerIsSet_returnsDeviceOwner()
212 val deviceOwner = devicePolicy().getDeviceOwner() in ensureHasDeviceOwnerAnnotation_noQuerySpecified_setsDefaultRemoteDpc() constant
213 assertThat(deviceOwner!!.pkg().packageName()) in ensureHasDeviceOwnerAnnotation_noQuerySpecified_setsDefaultRemoteDpc()
215 assertThat(deviceOwner.pkg().targetSdkVersion()).isIn( in ensureHasDeviceOwnerAnnotation_noQuerySpecified_setsDefaultRemoteDpc()
249 sDeviceState.deviceOwner() in deviceOwner_deviceOwnerIsNotSet_throwsException()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/devicepolicy/
DDevicePolicy.kt394 val deviceOwner = getDeviceOwner() in <lambda>() constant
395 if (deviceOwner != null) { in <lambda>()
399 … "Could not set device owner for user $user as a device owner is already set: $deviceOwner", in <lambda>()
/cts/common/device-side/bedstead/eventlib/src/test/java/com/android/eventlib/premade/
DEventLibDeviceAdminReceiverTest.java103 DeviceOwner deviceOwner = in enableDeviceOwner_logsEnabledEvent() local
112 deviceOwner.remove(); in enableDeviceOwner_logsEnabledEvent()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/packages/
DPackage.java265 DeviceOwner deviceOwner = TestApis.devicePolicy().getDeviceOwner(); in uninstall()
266 if (deviceOwner != null && deviceOwner.pkg().equals(this)) { in uninstall()
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/
DDeviceState.java1913 public RemoteDpc deviceOwner() {
1914 return mDeviceOwnerComponent.deviceOwner();
2414 RemotePolicyManager dpc = deviceOwner();
2451 RemotePolicyManager dpc = deviceOwner();