Home
last modified time | relevance | path

Searched refs:mAdminComponent (Results 1 – 8 of 8) sorted by relevance

/cts/hostsidetests/devicepolicy/app/DeviceAdmin/src/com.android.cts.deviceadmin/
DDeviceAdminWithEnterprisePoliciesBlockedTest.java27 boolean originalValue = dpm.getCameraDisabled(mAdminComponent); in testCameraDisabled()
28 assertSecurityException(() -> dpm.setCameraDisabled(mAdminComponent, true)); in testCameraDisabled()
29 assertEquals(originalValue, dpm.getCameraDisabled(mAdminComponent)); in testCameraDisabled()
33 int originalValue = dpm.getKeyguardDisabledFeatures(mAdminComponent); in testKeyguardDisabledFeatures()
34 assertSecurityException(() -> dpm.setKeyguardDisabledFeatures(mAdminComponent, in testKeyguardDisabledFeatures()
36 assertEquals(originalValue, dpm.getKeyguardDisabledFeatures(mAdminComponent)); in testKeyguardDisabledFeatures()
48 int originalValue = dpm.getPasswordHistoryLength(mAdminComponent); in testPasswordHistoryLength()
49 assertSecurityException(() -> dpm.setPasswordHistoryLength(mAdminComponent, 3)); in testPasswordHistoryLength()
50 assertEquals(originalValue, dpm.getPasswordHistoryLength(mAdminComponent)); in testPasswordHistoryLength()
54 int originalValue = dpm.getPasswordMinimumLength(mAdminComponent); in testPasswordMinimumLength()
[all …]
DDeviceOwnerPasswordTest.java47 dpm.setPasswordQuality(mAdminComponent, in testPasswordQuality_something()
50 dpm.getPasswordQuality(mAdminComponent)); in testPasswordQuality_something()
58 dpm.setPasswordMinimumLength(mAdminComponent, 10); in testPasswordQuality_something()
60 assertEquals(10, dpm.getPasswordMinimumLength(mAdminComponent)); in testPasswordQuality_something()
68 dpm.setPasswordMinimumLength(mAdminComponent, 4); in testPasswordQuality_something()
71 mAdminComponent)); in testPasswordQuality_something()
80 dpm.setPasswordQuality(mAdminComponent, in testPasswordQuality_numeric()
83 dpm.getPasswordQuality(mAdminComponent)); in testPasswordQuality_numeric()
91 dpm.setPasswordMinimumLength(mAdminComponent, 10); in testPasswordQuality_numeric()
93 assertEquals(10, dpm.getPasswordMinimumLength(mAdminComponent)); in testPasswordQuality_numeric()
[all …]
DDeviceAdminTest.java47 dpm.setMaximumFailedPasswordsForWipe(mAdminComponent, 3); in testGetMaximumFailedPasswordsForWipe()
48 assertEquals(3, dpm.getMaximumFailedPasswordsForWipe(mAdminComponent)); in testGetMaximumFailedPasswordsForWipe()
50 dpm.setMaximumFailedPasswordsForWipe(mAdminComponent, 5); in testGetMaximumFailedPasswordsForWipe()
51 assertEquals(5, dpm.getMaximumFailedPasswordsForWipe(mAdminComponent)); in testGetMaximumFailedPasswordsForWipe()
60 dpm.setPasswordQuality(mAdminComponent, in testPasswordHistoryLength()
62 int originalValue = dpm.getPasswordHistoryLength(mAdminComponent); in testPasswordHistoryLength()
64 dpm.setPasswordHistoryLength(mAdminComponent, 3); in testPasswordHistoryLength()
65 assertEquals(3, dpm.getPasswordHistoryLength(mAdminComponent)); in testPasswordHistoryLength()
70 dpm.setPasswordHistoryLength(mAdminComponent, originalValue); in testPasswordHistoryLength()
78 long originalValue = dpm.getPasswordExpirationTimeout(mAdminComponent); in testPasswordExpirationTimeout()
[all …]
DBaseDeviceAdminTest.java31 protected ComponentName mAdminComponent; field in BaseDeviceAdminTest
42 mAdminComponent = new ComponentName(mContext, AdminReceiver.class); in setUp()
59 return dpm.isDeviceOwnerApp(mAdminComponent.getPackageName()); in isDeviceOwner()
71 for (int i = 0; i < 1000 && dpm.isAdminActive(mAdminComponent); i++) { in assertNotActiveAdmin()
74 assertFalse("Still active admin", dpm.isAdminActive(mAdminComponent)); in assertNotActiveAdmin()
82 dpm.setPasswordMinimumLength(mAdminComponent, 0); in resetComplexPasswordRestrictions()
83 dpm.setPasswordMinimumUpperCase(mAdminComponent, 0); in resetComplexPasswordRestrictions()
84 dpm.setPasswordMinimumLowerCase(mAdminComponent, 0); in resetComplexPasswordRestrictions()
85 dpm.setPasswordMinimumLetters(mAdminComponent, 0); in resetComplexPasswordRestrictions()
86 dpm.setPasswordMinimumNumeric(mAdminComponent, 0); in resetComplexPasswordRestrictions()
[all …]
DDeviceAdminPasswordTest.java71 final int currentQuality = dpm.getPasswordQuality(mAdminComponent); in waitUntilPasswordState()
72 dpm.setPasswordQuality(mAdminComponent, DevicePolicyManager.PASSWORD_QUALITY_SOMETHING); in waitUntilPasswordState()
82 dpm.setPasswordQuality(mAdminComponent, currentQuality); in waitUntilPasswordState()
DClearDeviceAdminTest.java27 if (dpm.isAdminActive(mAdminComponent)) { in testRemoveActiveAdmin()
28 dpm.removeActiveAdmin(mAdminComponent); in testRemoveActiveAdmin()
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/
DDeviceWideLoggingFeaturesTest.java34 private ComponentName mAdminComponent; field in DeviceWideLoggingFeaturesTest
41 mAdminComponent = AdminReceiver.getComponentName(mContext); in setUp()
50 mDevicePolicyManager.retrieveSecurityLogs(mAdminComponent); in testRetrievingLogsThrowsSecurityException()
56 mDevicePolicyManager.retrievePreRebootSecurityLogs(mAdminComponent); in testRetrievingLogsThrowsSecurityException()
62 mDevicePolicyManager.retrieveNetworkLogs(mAdminComponent, NETWORK_LOGGING_BATCH_TOKEN); in testRetrievingLogsThrowsSecurityException()
69 mDevicePolicyManager.retrieveSecurityLogs(mAdminComponent); in testRetrievingLogsDoesNotThrowException()
70 mDevicePolicyManager.retrievePreRebootSecurityLogs(mAdminComponent); in testRetrievingLogsDoesNotThrowException()
71 mDevicePolicyManager.retrieveNetworkLogs(mAdminComponent, NETWORK_LOGGING_BATCH_TOKEN); in testRetrievingLogsDoesNotThrowException()
76 mDevicePolicyManager.requestBugreport(mAdminComponent); in testRequestBugreportThrowsSecurityException()
83 mDevicePolicyManager.requestBugreport(mAdminComponent); in testRequestBugreportDoesNotThrowException()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DAffiliationTest.java40 private ComponentName mAdminComponent; field in AffiliationTest
47 mAdminComponent = BasicAdminReceiver.getComponentName(context); in setUp()
53 mDevicePolicyManager.setAffiliationIds(mAdminComponent, null); in testSetAffiliationId_null()
63 mDevicePolicyManager.setAffiliationIds(mAdminComponent, Collections.singleton(null)); in testSetAffiliationId_containsEmptyString()
81 mDevicePolicyManager.setAffiliationIds(mAdminComponent, ids); in setAffiliationIds()
82 assertEquals(ids, mDevicePolicyManager.getAffiliationIds(mAdminComponent)); in setAffiliationIds()