Home
last modified time | relevance | path

Searched refs:dpc (Results 1 – 25 of 309) sorted by relevance

12345678910>>...13

/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DPasswordTest.kt71 deviceState.dpc().devicePolicyManager() in <lambda>()
72 .setPasswordExpirationTimeout(deviceState.dpc().componentName(), TIMEOUT) in <lambda>()
82 val originalTimeout = deviceState.dpc().devicePolicyManager() in <lambda>()
83 .getPasswordExpirationTimeout(deviceState.dpc().componentName()) in <lambda>()
85 deviceState.dpc().devicePolicyManager() in <lambda>()
86 .setPasswordExpirationTimeout(deviceState.dpc().componentName(), TIMEOUT) in <lambda>()
91 deviceState.dpc().devicePolicyManager() in <lambda>()
93 deviceState.dpc().componentName(), originalTimeout in <lambda>()
102 val originalTimeout = deviceState.dpc().devicePolicyManager() in <lambda>()
103 .getPasswordExpirationTimeout(deviceState.dpc().componentName()) in <lambda>()
[all …]
DTimeTest.java69 boolean originalValue = sDeviceState.dpc().devicePolicyManager().getAutoTimeRequired(); in setAutoTimeRequired_false_setsAutoTimeNotRequired()
72 sDeviceState.dpc().devicePolicyManager().setAutoTimeRequired( in setAutoTimeRequired_false_setsAutoTimeNotRequired()
73 sDeviceState.dpc().componentName(), false); in setAutoTimeRequired_false_setsAutoTimeNotRequired()
78 sDeviceState.dpc().devicePolicyManager().setAutoTimeRequired( in setAutoTimeRequired_false_setsAutoTimeNotRequired()
79 sDeviceState.dpc().componentName(), originalValue); in setAutoTimeRequired_false_setsAutoTimeNotRequired()
86 boolean originalValue = sDeviceState.dpc().devicePolicyManager().getAutoTimeRequired(); in setAutoTimeRequired_true_setsAutoTimeRequired()
89 sDeviceState.dpc().devicePolicyManager().setAutoTimeRequired( in setAutoTimeRequired_true_setsAutoTimeRequired()
90 sDeviceState.dpc().componentName(), true); in setAutoTimeRequired_true_setsAutoTimeRequired()
94 sDeviceState.dpc().devicePolicyManager().setAutoTimeRequired( in setAutoTimeRequired_true_setsAutoTimeRequired()
95 sDeviceState.dpc().componentName(), originalValue); in setAutoTimeRequired_true_setsAutoTimeRequired()
[all …]
DResetPasswordWithTokenTest.java101 assertThat(sDeviceState.dpc().devicePolicyManager().isResetPasswordTokenActive( in setResetPasswordToken_validToken_passwordTokenSet()
102 sDeviceState.dpc().componentName()) || !possible).isTrue(); in setResetPasswordToken_validToken_passwordTokenSet()
105 …sDeviceState.dpc().devicePolicyManager().clearResetPasswordToken(sDeviceState.dpc().componentName(… in setResetPasswordToken_validToken_passwordTokenSet()
114 assertThat(sDeviceState.dpc().devicePolicyManager().resetPasswordWithToken( in resetPasswordWithToken_validPasswordAndToken_success()
115 … sDeviceState.dpc().componentName(), VALID_PIN, TOKEN, /* flags = */ 0)).isTrue(); in resetPasswordWithToken_validPasswordAndToken_success()
125 assertThat(sDeviceState.dpc().devicePolicyManager().resetPasswordWithToken( in resetPasswordWithToken_badToken_failure()
126 … sDeviceState.dpc().componentName(), VALID_PIN, BAD_TOKEN, /* flags = */ 0)).isFalse(); in resetPasswordWithToken_badToken_failure()
133 sDeviceState.dpc().devicePolicyManager().resetPasswordWithToken( in resetPasswordWithToken_noPassword_deviceIsNotSecure()
134 sDeviceState.dpc().componentName(), /* password = */ null, TOKEN, /* flags = */ 0); in resetPasswordWithToken_noPassword_deviceIsNotSecure()
145 sDeviceState.dpc().devicePolicyManager().resetPasswordWithToken( in resetPasswordWithToken_password_deviceIsSecure()
[all …]
DKeyguardTest.java86 assertThrows(SecurityException.class, () -> sDeviceState.dpc() in setKeyguardDisabledFeatures_disableSecureCamera_notPermitted_throwsException()
88 sDeviceState.dpc().componentName(), KEYGUARD_DISABLE_SECURE_CAMERA)); in setKeyguardDisabledFeatures_disableSecureCamera_notPermitted_throwsException()
99 int originalFeatures = sDeviceState.dpc().devicePolicyManager().getKeyguardDisabledFeatures( in setKeyguardDisabledFeatures_disableSecureCamera_featureIsSet()
100 sDeviceState.dpc().componentName()); in setKeyguardDisabledFeatures_disableSecureCamera_featureIsSet()
103 sDeviceState.dpc().devicePolicyManager().setKeyguardDisabledFeatures( in setKeyguardDisabledFeatures_disableSecureCamera_featureIsSet()
104 sDeviceState.dpc().componentName(), KEYGUARD_DISABLE_SECURE_CAMERA); in setKeyguardDisabledFeatures_disableSecureCamera_featureIsSet()
109 sDeviceState.dpc().devicePolicyManager().setKeyguardDisabledFeatures( in setKeyguardDisabledFeatures_disableSecureCamera_featureIsSet()
110 sDeviceState.dpc().componentName(), originalFeatures); in setKeyguardDisabledFeatures_disableSecureCamera_featureIsSet()
122 int originalFeatures = sDeviceState.dpc().devicePolicyManager().getKeyguardDisabledFeatures( in setKeyguardDisabledFeatures_disableSecureCamera_doesNotApply_featureIsNotSet()
123 sDeviceState.dpc().componentName()); in setKeyguardDisabledFeatures_disableSecureCamera_doesNotApply_featureIsNotSet()
[all …]
DLockTaskTest.kt102 deviceState.dpc().devicePolicyManager().setLockTaskPackages( in <lambda>()
103 deviceState.dpc().componentName(), arrayOf(PACKAGE_NAME) in <lambda>()
107 deviceState.dpc().devicePolicyManager() in <lambda>()
108 .getLockTaskPackages(deviceState.dpc().componentName()) in <lambda>()
111 deviceState.dpc().devicePolicyManager() in <lambda>()
112 .setLockTaskPackages(deviceState.dpc().componentName(), arrayOf()) in <lambda>()
113 deviceState.dpc().devicePolicyManager().setLockTaskFeatures( in <lambda>()
114 deviceState.dpc().componentName(), LOCK_TASK_FEATURE_NONE in <lambda>()
129 deviceState.dpc().devicePolicyManager().setLockTaskPackages( in <lambda>()
130 deviceState.dpc().componentName(), arrayOf(testApp.packageName()) in <lambda>()
[all …]
DPermissionGrantTest.java188 int existingGrantState = sDeviceState.dpc().devicePolicyManager() in denyPermission_setsGrantState()
189 .getPermissionGrantState(sDeviceState.dpc().componentName(), in denyPermission_setsGrantState()
192 boolean wasSet = sDeviceState.dpc().devicePolicyManager() in denyPermission_setsGrantState()
194 sDeviceState.dpc().componentName(), sTestApp.packageName(), in denyPermission_setsGrantState()
200 .that(sDeviceState.dpc().devicePolicyManager().getPermissionGrantState( in denyPermission_setsGrantState()
201 sDeviceState.dpc().componentName(), sTestApp.packageName(), in denyPermission_setsGrantState()
205 sDeviceState.dpc().devicePolicyManager().setPermissionGrantState( in denyPermission_setsGrantState()
206 sDeviceState.dpc().componentName(), sTestApp.packageName(), in denyPermission_setsGrantState()
213 int existingGrantState = sDeviceState.dpc().devicePolicyManager() in grantPermission_setsGrantState()
214 .getPermissionGrantState(sDeviceState.dpc().componentName(), in grantPermission_setsGrantState()
[all …]
DApplicationHiddenTest.java99 SYSTEM_PACKAGE.installExisting(sDeviceState.dpc().user()); in ensureSystemPackageInstalled()
108 sDeviceState.dpc().devicePolicyManager().setApplicationHidden( in isApplicationHidden_systemApp_isHidden_returnsTrue()
109 sDeviceState.dpc().componentName(), SYSTEM_PACKAGE.packageName(), in isApplicationHidden_systemApp_isHidden_returnsTrue()
112 assertThat(sDeviceState.dpc().devicePolicyManager().isApplicationHidden( in isApplicationHidden_systemApp_isHidden_returnsTrue()
113 sDeviceState.dpc().componentName(), SYSTEM_PACKAGE.packageName())).isTrue(); in isApplicationHidden_systemApp_isHidden_returnsTrue()
115 sDeviceState.dpc().devicePolicyManager().setApplicationHidden( in isApplicationHidden_systemApp_isHidden_returnsTrue()
116 sDeviceState.dpc().componentName(), SYSTEM_PACKAGE.packageName(), in isApplicationHidden_systemApp_isHidden_returnsTrue()
124 sDeviceState.dpc().devicePolicyManager().setApplicationHidden( in isApplicationHidden_systemApp_isNotHidden_returnsFalse()
125 sDeviceState.dpc().componentName(), SYSTEM_PACKAGE.packageName(), in isApplicationHidden_systemApp_isNotHidden_returnsFalse()
128 assertThat(sDeviceState.dpc().devicePolicyManager().isApplicationHidden( in isApplicationHidden_systemApp_isNotHidden_returnsFalse()
[all …]
DScreenCaptureDisabledTest.java101 sDeviceState.dpc().devicePolicyManager() in setScreenCaptureDisabled_false_works()
102 .setScreenCaptureDisabled(sDeviceState.dpc().componentName(), false); in setScreenCaptureDisabled_false_works()
113 sDeviceState.dpc().devicePolicyManager().setScreenCaptureDisabled( in setScreenCaptureDisabled_false_checkWithDPC_works()
114 sDeviceState.dpc().componentName(), false); in setScreenCaptureDisabled_false_checkWithDPC_works()
116 assertThat(sDeviceState.dpc().devicePolicyManager().getScreenCaptureDisabled( in setScreenCaptureDisabled_false_checkWithDPC_works()
117 sDeviceState.dpc().componentName())).isFalse(); in setScreenCaptureDisabled_false_checkWithDPC_works()
119 sDeviceState.dpc().devicePolicyManager().setScreenCaptureDisabled( in setScreenCaptureDisabled_false_checkWithDPC_works()
120 sDeviceState.dpc().componentName(), false); in setScreenCaptureDisabled_false_checkWithDPC_works()
129 () -> sDeviceState.dpc().devicePolicyManager() in setScreenCaptureDisabled_false_throwsSecurityException()
130 .setScreenCaptureDisabled(sDeviceState.dpc().componentName(), false)); in setScreenCaptureDisabled_false_throwsSecurityException()
[all …]
DNetworkLoggingTest.kt60 deviceState.dpc().devicePolicyManager() in <lambda>()
61 .isNetworkLoggingEnabled(deviceState.dpc().componentName()) in <lambda>()
73 deviceState.dpc().devicePolicyManager().setNetworkLoggingEnabled( in <lambda>()
74 deviceState.dpc().componentName(), true in <lambda>()
77 deviceState.dpc().devicePolicyManager().isNetworkLoggingEnabled( in <lambda>()
78 deviceState.dpc().componentName() in <lambda>()
82 deviceState.dpc().devicePolicyManager().setNetworkLoggingEnabled( in <lambda>()
83 deviceState.dpc().componentName(), false in <lambda>()
94 deviceState.dpc().devicePolicyManager().setNetworkLoggingEnabled( in <lambda>()
95 deviceState.dpc().componentName(), false in <lambda>()
[all …]
DDeviceManagementCoexistenceTest.java167 boolean originalValue = sDeviceState.dpc().devicePolicyManager() in getDevicePolicyState_autoTimezoneSet_returnsPolicy()
168 .getAutoTimeZoneEnabled(sDeviceState.dpc().componentName()); in getDevicePolicyState_autoTimezoneSet_returnsPolicy()
170 sDeviceState.dpc().devicePolicyManager().setAutoTimeZoneEnabled( in getDevicePolicyState_autoTimezoneSet_returnsPolicy()
171 sDeviceState.dpc().componentName(), true); in getDevicePolicyState_autoTimezoneSet_returnsPolicy()
179 sDeviceState.dpc().devicePolicyManager().setAutoTimeZoneEnabled( in getDevicePolicyState_autoTimezoneSet_returnsPolicy()
180 sDeviceState.dpc().componentName(), originalValue); in getDevicePolicyState_autoTimezoneSet_returnsPolicy()
190 int existingGrantState = sDeviceState.dpc().devicePolicyManager() in getDevicePolicyState_permissionGrantStateSet_returnsPolicy()
191 .getPermissionGrantState(sDeviceState.dpc().componentName(), in getDevicePolicyState_permissionGrantStateSet_returnsPolicy()
194 sDeviceState.dpc().devicePolicyManager() in getDevicePolicyState_permissionGrantStateSet_returnsPolicy()
196 sDeviceState.dpc().componentName(), sTestApp.packageName(), in getDevicePolicyState_permissionGrantStateSet_returnsPolicy()
[all …]
DDelegationScopesTest.java87 sDeviceState.dpc().devicePolicyManager().setDelegatedScopes( in getDelegatedScopes_returnsFromSetDelegatedScopes()
88 sDeviceState.dpc().componentName(), in getDelegatedScopes_returnsFromSetDelegatedScopes()
91 assertThat(sDeviceState.dpc().devicePolicyManager() in getDelegatedScopes_returnsFromSetDelegatedScopes()
93 sDeviceState.dpc().componentName(), in getDelegatedScopes_returnsFromSetDelegatedScopes()
106 sDeviceState.dpc().devicePolicyManager().setDelegatedScopes( in getDelegatedScopes_fromApp_returnsFromSetDelegatedScopes()
107 sDeviceState.dpc().componentName(), in getDelegatedScopes_fromApp_returnsFromSetDelegatedScopes()
124 sDeviceState.dpc().devicePolicyManager().setDelegatedScopes( in getDelegatedScopes_fromApp_passComponentName_throwsException()
125 sDeviceState.dpc().componentName(), in getDelegatedScopes_fromApp_passComponentName_throwsException()
131 sDeviceState.dpc().componentName(), testApp.packageName())); in getDelegatedScopes_fromApp_passComponentName_throwsException()
143 sDeviceState.dpc().devicePolicyManager().setDelegatedScopes( in getDelegatedScopes_fromApp_differentPackage_throwsException()
[all …]
DTrustAgentInfoTest.java74 sDeviceState.dpc().devicePolicyManager().setTrustAgentConfiguration( in setTrustAgentConfiguration_isSet()
75 sDeviceState.dpc().componentName(), TRUST_AGENT_COMPONENT, sConfig); in setTrustAgentConfiguration_isSet()
78 sDeviceState.dpc().devicePolicyManager().getTrustAgentConfiguration( in setTrustAgentConfiguration_isSet()
79 sDeviceState.dpc().componentName(), TRUST_AGENT_COMPONENT); in setTrustAgentConfiguration_isSet()
85 sDeviceState.dpc().devicePolicyManager().setTrustAgentConfiguration( in setTrustAgentConfiguration_isSet()
86 sDeviceState.dpc().componentName(), TRUST_AGENT_COMPONENT, null); in setTrustAgentConfiguration_isSet()
97 sDeviceState.dpc().devicePolicyManager().setTrustAgentConfiguration( in setTrustAgentConfiguration_componentNotConfigured_isNotSet()
98 sDeviceState.dpc().componentName(), TRUST_AGENT_COMPONENT, in setTrustAgentConfiguration_componentNotConfigured_isNotSet()
104 sDeviceState.dpc().devicePolicyManager().setTrustAgentConfiguration( in setTrustAgentConfiguration_componentNotConfigured_isNotSet()
105 sDeviceState.dpc().componentName(), TRUST_AGENT_COMPONENT, null); in setTrustAgentConfiguration_componentNotConfigured_isNotSet()
[all …]
DApplicationRestrictionsTest.java86 sDeviceState.dpc().devicePolicyManager() in setApplicationRestrictions_applicationRestrictionsAreSet()
88 sDeviceState.dpc().componentName(), sTestApp.packageName()); in setApplicationRestrictions_applicationRestrictionsAreSet()
93 sDeviceState.dpc().devicePolicyManager() in setApplicationRestrictions_applicationRestrictionsAreSet()
95 sDeviceState.dpc().componentName(), sTestApp.packageName(), in setApplicationRestrictions_applicationRestrictionsAreSet()
102 sDeviceState.dpc().devicePolicyManager().setApplicationRestrictions( in setApplicationRestrictions_applicationRestrictionsAreSet()
103 sDeviceState.dpc().componentName(), in setApplicationRestrictions_applicationRestrictionsAreSet()
113 sDeviceState.dpc().devicePolicyManager() in setApplicationRestrictions_applicationRestrictionsAlreadySet_setsNewRestrictions()
115 sDeviceState.dpc().componentName(), sTestApp.packageName()); in setApplicationRestrictions_applicationRestrictionsAlreadySet_setsNewRestrictions()
120 sDeviceState.dpc().devicePolicyManager() in setApplicationRestrictions_applicationRestrictionsAlreadySet_setsNewRestrictions()
122 sDeviceState.dpc().componentName(), sTestApp.packageName(), in setApplicationRestrictions_applicationRestrictionsAlreadySet_setsNewRestrictions()
[all …]
DStorageEncryptionTest.java49 assertThat(sDeviceState.dpc().devicePolicyManager().setStorageEncryption( in setStorageEncryption_runOnSystemUser_enable_isEnabled()
50 sDeviceState.dpc().componentName(), /* encrypt= */ true)) in setStorageEncryption_runOnSystemUser_enable_isEnabled()
53 assertThat(sDeviceState.dpc().devicePolicyManager().getStorageEncryption( in setStorageEncryption_runOnSystemUser_enable_isEnabled()
54 sDeviceState.dpc().componentName())).isTrue(); in setStorageEncryption_runOnSystemUser_enable_isEnabled()
56 sDeviceState.dpc().devicePolicyManager().setStorageEncryption( in setStorageEncryption_runOnSystemUser_enable_isEnabled()
57 sDeviceState.dpc().componentName(), /* encrypt= */ false); in setStorageEncryption_runOnSystemUser_enable_isEnabled()
65 assertThat(sDeviceState.dpc().devicePolicyManager().setStorageEncryption( in setStorageEncryption_runOnNonSystemUser_enable_isNotSupported()
66 sDeviceState.dpc().componentName(), /* encrypt= */ true)) in setStorageEncryption_runOnNonSystemUser_enable_isNotSupported()
69 assertThat(sDeviceState.dpc().devicePolicyManager().getStorageEncryption( in setStorageEncryption_runOnNonSystemUser_enable_isNotSupported()
70 sDeviceState.dpc().componentName())).isFalse(); in setStorageEncryption_runOnNonSystemUser_enable_isNotSupported()
[all …]
DCameraTest.java102 sDeviceState.dpc().devicePolicyManager() in setCameraDisabledTrue_policyDoesNotApply_cameraNotDisabled()
103 .setCameraDisabled(sDeviceState.dpc().componentName(), true); in setCameraDisabledTrue_policyDoesNotApply_cameraNotDisabled()
108 sDeviceState.dpc().devicePolicyManager() in setCameraDisabledTrue_policyDoesNotApply_cameraNotDisabled()
109 .setCameraDisabled(sDeviceState.dpc().componentName(), false); in setCameraDisabledTrue_policyDoesNotApply_cameraNotDisabled()
118 sDeviceState.dpc().devicePolicyManager() in setCameraDisabledTrue_cameraDisabledLocally()
119 .setCameraDisabled(sDeviceState.dpc().componentName(), true); in setCameraDisabledTrue_cameraDisabledLocally()
124 sDeviceState.dpc().devicePolicyManager() in setCameraDisabledTrue_cameraDisabledLocally()
125 .setCameraDisabled(sDeviceState.dpc().componentName(), false); in setCameraDisabledTrue_cameraDisabledLocally()
133 sDeviceState.dpc().devicePolicyManager() in setCameraDisabledFalse_cameraEnabledLocally()
134 .setCameraDisabled(sDeviceState.dpc().componentName(), false); in setCameraDisabledFalse_cameraEnabledLocally()
[all …]
DWifiTest.java127 () -> sDeviceState.dpc().devicePolicyManager().addUserRestriction( in setUserRestriction_disallowConfigWifi_cannotSet_throwsException()
128 sDeviceState.dpc().componentName(), DISALLOW_CONFIG_WIFI)); in setUserRestriction_disallowConfigWifi_cannotSet_throwsException()
136 sDeviceState.dpc().devicePolicyManager().addUserRestriction( in setUserRestriction_disallowConfigWifi_isSet()
137 sDeviceState.dpc().componentName(), DISALLOW_CONFIG_WIFI); in setUserRestriction_disallowConfigWifi_isSet()
143 sDeviceState.dpc().devicePolicyManager().clearUserRestriction( in setUserRestriction_disallowConfigWifi_isSet()
144 sDeviceState.dpc().componentName(), DISALLOW_CONFIG_WIFI); in setUserRestriction_disallowConfigWifi_isSet()
153 sDeviceState.dpc().devicePolicyManager().addUserRestriction( in setUserRestriction_disallowConfigWifi_isNotSet()
154 sDeviceState.dpc().componentName(), DISALLOW_CONFIG_WIFI); in setUserRestriction_disallowConfigWifi_isNotSet()
160 sDeviceState.dpc().devicePolicyManager().clearUserRestriction( in setUserRestriction_disallowConfigWifi_isNotSet()
161 sDeviceState.dpc().componentName(), DISALLOW_CONFIG_WIFI); in setUserRestriction_disallowConfigWifi_isNotSet()
[all …]
DPasswordComplexityTest.java97 if (isFinancedDo || sDeviceState.dpc() == sDeviceState.dpmRoleHolder()) { in skipRoleHolderAndFinancedDeviceOwnerTestIfFlagNotEnabled()
112 () -> sDeviceState.dpc().devicePolicyManager().getRequiredPasswordComplexity()); in getRequiredPasswordComplexity_notPermitted_throwsException()
120 () -> sDeviceState.dpc().devicePolicyManager() in setRequiredPasswordComplexity_notPermitted_throwsException()
131 int originalRequiredPasswordComplexity = sDeviceState.dpc().devicePolicyManager() in setRequiredPasswordComplexity_requiredComplexityIsSet()
134 sDeviceState.dpc().devicePolicyManager() in setRequiredPasswordComplexity_requiredComplexityIsSet()
137 assertThat(sDeviceState.dpc().devicePolicyManager() in setRequiredPasswordComplexity_requiredComplexityIsSet()
140 sDeviceState.dpc().devicePolicyManager().setRequiredPasswordComplexity( in setRequiredPasswordComplexity_requiredComplexityIsSet()
150 sDeviceState.dpc().devicePolicyManager().getPasswordComplexity()); in getPasswordComplexity_noPermission_throwsSecurityException()
157 assertThat(sDeviceState.dpc().devicePolicyManager().getPasswordComplexity()) in getPasswordComplexity_noPassword_returnsPasswordComplexityNone()
167 sDeviceState.dpc().user().setPattern("1234"); in getPasswordComplexity_patternLength4_returnsPasswordComplexityLow()
[all …]
DAccountManagementTest.java108 assertThat(sDeviceState.dpc().devicePolicyManager().getAccountTypesWithManagementDisabled()) in getAccountTypesWithManagementDisabled_emptyByDefault()
117 sDeviceState.dpc().devicePolicyManager().setAccountManagementDisabled( in setAccountTypesWithManagementDisabled_invalidAdmin_throwsException()
118 sDeviceState.dpc().componentName(), in setAccountTypesWithManagementDisabled_invalidAdmin_throwsException()
129 sDeviceState.dpc().devicePolicyManager().setAccountManagementDisabled( in setAccountManagementDisabled_disableAccountType_works()
130 sDeviceState.dpc().componentName(), in setAccountManagementDisabled_disableAccountType_works()
134 assertThat(sDeviceState.dpc().devicePolicyManager() in setAccountManagementDisabled_disableAccountType_works()
138 sDeviceState.dpc().devicePolicyManager().setAccountManagementDisabled( in setAccountManagementDisabled_disableAccountType_works()
139 sDeviceState.dpc().componentName(), in setAccountManagementDisabled_disableAccountType_works()
147 sDeviceState.dpc().devicePolicyManager().setAccountManagementDisabled( in setAccountManagementDisabled_addSameAccountTypeTwice_presentOnlyOnce()
148 sDeviceState.dpc().componentName(), in setAccountManagementDisabled_addSameAccountTypeTwice_presentOnlyOnce()
[all …]
DTelephonyTest.java93 () -> sDeviceState.dpc().devicePolicyManager().addUserRestriction( in setUserRestriction_disallowConfigCellBroadcasts_cannotSet_throwsException()
94 sDeviceState.dpc().componentName(), DISALLOW_CONFIG_CELL_BROADCASTS)); in setUserRestriction_disallowConfigCellBroadcasts_cannotSet_throwsException()
102 sDeviceState.dpc().devicePolicyManager().addUserRestriction( in setUserRestriction_disallowConfigCellBroadcasts_isSet()
103 sDeviceState.dpc().componentName(), DISALLOW_CONFIG_CELL_BROADCASTS); in setUserRestriction_disallowConfigCellBroadcasts_isSet()
108 sDeviceState.dpc().devicePolicyManager().clearUserRestriction( in setUserRestriction_disallowConfigCellBroadcasts_isSet()
109 sDeviceState.dpc().componentName(), DISALLOW_CONFIG_CELL_BROADCASTS); in setUserRestriction_disallowConfigCellBroadcasts_isSet()
118 sDeviceState.dpc().devicePolicyManager().addUserRestriction( in setUserRestriction_disallowConfigCellBroadcasts_isNotSet()
119 sDeviceState.dpc().componentName(), DISALLOW_CONFIG_CELL_BROADCASTS); in setUserRestriction_disallowConfigCellBroadcasts_isNotSet()
125 sDeviceState.dpc().devicePolicyManager().clearUserRestriction( in setUserRestriction_disallowConfigCellBroadcasts_isNotSet()
126 sDeviceState.dpc().componentName(), DISALLOW_CONFIG_CELL_BROADCASTS); in setUserRestriction_disallowConfigCellBroadcasts_isNotSet()
[all …]
DSecurityLoggingTest.kt69 deviceState.dpc().devicePolicyManager().setSecurityLoggingEnabled( in <lambda>()
70 deviceState.dpc().componentName(), in <lambda>()
83 val originalSecurityLoggingEnabled = deviceState.dpc() in <lambda>()
84 .devicePolicyManager().isSecurityLoggingEnabled(deviceState.dpc().componentName()) in <lambda>()
86 deviceState.dpc().devicePolicyManager().setSecurityLoggingEnabled( in <lambda>()
87 deviceState.dpc().componentName(), in <lambda>()
91 deviceState.dpc().devicePolicyManager().isSecurityLoggingEnabled( in <lambda>()
92 deviceState.dpc().componentName() in <lambda>()
96 deviceState.dpc().devicePolicyManager().setSecurityLoggingEnabled( in <lambda>()
97 deviceState.dpc().componentName(), in <lambda>()
[all …]
DUserRestrictionsTest.java180 assertThat(sDeviceState.dpc().devicePolicyManager() in getUserRestrictions_allDefaultUserRestrictions_returnFalse()
181 .getUserRestrictions(sDeviceState.dpc().componentName()) in getUserRestrictions_allDefaultUserRestrictions_returnFalse()
190 boolean hasRestrictionOriginally = sDeviceState.dpc() in getUserRestrictions_containsAddedRestriction()
194 sDeviceState.dpc().devicePolicyManager().addUserRestriction( in getUserRestrictions_containsAddedRestriction()
195 sDeviceState.dpc().componentName(), restriction); in getUserRestrictions_containsAddedRestriction()
197 assertThat(sDeviceState.dpc().devicePolicyManager() in getUserRestrictions_containsAddedRestriction()
198 .getUserRestrictions(sDeviceState.dpc().componentName()) in getUserRestrictions_containsAddedRestriction()
203 sDeviceState.dpc().devicePolicyManager().clearUserRestriction( in getUserRestrictions_containsAddedRestriction()
204 sDeviceState.dpc().componentName(), restriction); in getUserRestrictions_containsAddedRestriction()
213 boolean hasRestrictionOriginally = sDeviceState.dpc() in hasUserRestriction_containsAddedRestriction()
[all …]
DCaCertManagementTest.java145 assertThat(sDeviceState.dpc().devicePolicyManager().getInstalledCaCerts( in getInstalledCaCerts_doesNotReturnNull()
146 sDeviceState.dpc().componentName())).isNotNull(); in getInstalledCaCerts_doesNotReturnNull()
152 sDeviceState.dpc().devicePolicyManager().getInstalledCaCerts( in getInstalledCaCerts_invalidAdmin_throwsException()
153 sDeviceState.dpc().componentName())); in getInstalledCaCerts_invalidAdmin_throwsException()
158 RemoteDevicePolicyManager remoteDpm = sDeviceState.dpc().devicePolicyManager(); in installCaCert_caCertIsInstalled()
160 remoteDpm.uninstallAllUserCaCerts(sDeviceState.dpc().componentName()); in installCaCert_caCertIsInstalled()
163 sDeviceState.dpc().componentName(), CA_CERT_1); in installCaCert_caCertIsInstalled()
168 remoteDpm.uninstallAllUserCaCerts(sDeviceState.dpc().componentName()); in installCaCert_caCertIsInstalled()
175 () -> sDeviceState.dpc().devicePolicyManager().installCaCert( in installCaCert_invalidAdmin_throwsException()
176 sDeviceState.dpc().componentName(), CA_CERT_1)); in installCaCert_invalidAdmin_throwsException()
[all …]
DKeyManagementTest.java129 assertThat(sDeviceState.dpc().devicePolicyManager() in installKeyPair_validRsaKeyPair_success()
130 .installKeyPair(sDeviceState.dpc().componentName(), PRIVATE_KEY, CERTIFICATE, in installKeyPair_validRsaKeyPair_success()
134 sDeviceState.dpc().devicePolicyManager() in installKeyPair_validRsaKeyPair_success()
135 .removeKeyPair(sDeviceState.dpc().componentName(), RSA_ALIAS); in installKeyPair_validRsaKeyPair_success()
143 () -> sDeviceState.dpc().devicePolicyManager().installKeyPair( in installKeyPair_nullPrivateKey_throwException()
144 sDeviceState.dpc().componentName(), in installKeyPair_nullPrivateKey_throwException()
152 () -> sDeviceState.dpc().devicePolicyManager().installKeyPair( in installKeyPair_nullCertificate_throwException()
153 sDeviceState.dpc().componentName(), in installKeyPair_nullCertificate_throwException()
161 () -> sDeviceState.dpc().devicePolicyManager().installKeyPair( in installKeyPair_nullAdminComponent_throwException()
171 sDeviceState.dpc().devicePolicyManager().installKeyPair( in installKeyPair_withAutomatedAccess_aliasIsGranted()
[all …]
DBlockUninstallTest.java92 sDeviceState.dpc().devicePolicyManager().setUninstallBlocked( in setUninstallBlocked_notAllowed_throwsException()
93 sDeviceState.dpc().componentName(), in setUninstallBlocked_notAllowed_throwsException()
103 sTestApp.install(sDeviceState.dpc().user()); in setUninstallBlocked_true_isUninstallBlockedIsTrue()
105 sDeviceState.dpc().devicePolicyManager().setUninstallBlocked( in setUninstallBlocked_true_isUninstallBlockedIsTrue()
106 sDeviceState.dpc().componentName(), in setUninstallBlocked_true_isUninstallBlockedIsTrue()
110 assertThat(sDeviceState.dpc().devicePolicyManager().isUninstallBlocked( in setUninstallBlocked_true_isUninstallBlockedIsTrue()
111 sDeviceState.dpc().componentName(), sTestApp.packageName() in setUninstallBlocked_true_isUninstallBlockedIsTrue()
116 sDeviceState.dpc().devicePolicyManager().setUninstallBlocked( in setUninstallBlocked_true_isUninstallBlockedIsTrue()
117 sDeviceState.dpc().componentName(), in setUninstallBlocked_true_isUninstallBlockedIsTrue()
128 sTestApp.install(sDeviceState.dpc().user()); in setUninstallBlocked_true_isUninstallBlockedIsFalse()
[all …]
DPackageSuspensionTest.java56 mAdmin = sDeviceState.dpc().componentName(); in setup()
66 sDeviceState.dpc().devicePolicyManager().setPackagesSuspended( in isPackageSuspended_packageIsSuspended_returnsTrue()
70 sDeviceState.dpc().devicePolicyManager().isPackageSuspended(mAdmin, testApp) in isPackageSuspended_packageIsSuspended_returnsTrue()
73 sDeviceState.dpc().devicePolicyManager().setPackagesSuspended( in isPackageSuspended_packageIsSuspended_returnsTrue()
84 sDeviceState.dpc().devicePolicyManager().setPackagesSuspended( in isPackageSuspended_packageIsNotSuspended_returnFalse()
87 assertThat(sDeviceState.dpc().devicePolicyManager().isPackageSuspended(mAdmin, testApp)) in isPackageSuspended_packageIsNotSuspended_returnFalse()
98 assertThat(sDeviceState.dpc().devicePolicyManager().setPackagesSuspended( in setPackagesSuspended_suspendSuccessful()
101 assertThat(sDeviceState.dpc().devicePolicyManager().isPackageSuspended( in setPackagesSuspended_suspendSuccessful()
105 sDeviceState.dpc().devicePolicyManager().setPackagesSuspended( in setPackagesSuspended_suspendSuccessful()
119 sDeviceState.dpc().devicePolicyManager().setPackagesSuspended( in setPackagesSuspended_suspendAlreadySuspendedPackage_returnsEmpty()
[all …]

12345678910>>...13