Home
last modified time | relevance | path

Searched refs:ADMIN_RECEIVER_COMPONENT (Results 1 – 25 of 96) sorted by relevance

1234

/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DPasswordRequirementsTest.java41 ADMIN_RECEIVER_COMPONENT, PASSWORD_QUALITY_SOMETHING); in testPasswordConstraintsDoesntThrowAndPreservesValuesPreR()
43 mDevicePolicyManager.setPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT, TEST_VALUE); in testPasswordConstraintsDoesntThrowAndPreservesValuesPreR()
44 mDevicePolicyManager.setPasswordMinimumNumeric(ADMIN_RECEIVER_COMPONENT, TEST_VALUE); in testPasswordConstraintsDoesntThrowAndPreservesValuesPreR()
45 mDevicePolicyManager.setPasswordMinimumLetters(ADMIN_RECEIVER_COMPONENT, TEST_VALUE); in testPasswordConstraintsDoesntThrowAndPreservesValuesPreR()
46 mDevicePolicyManager.setPasswordMinimumUpperCase(ADMIN_RECEIVER_COMPONENT, TEST_VALUE); in testPasswordConstraintsDoesntThrowAndPreservesValuesPreR()
47 mDevicePolicyManager.setPasswordMinimumLowerCase(ADMIN_RECEIVER_COMPONENT, TEST_VALUE); in testPasswordConstraintsDoesntThrowAndPreservesValuesPreR()
48 mDevicePolicyManager.setPasswordMinimumNonLetter(ADMIN_RECEIVER_COMPONENT, TEST_VALUE); in testPasswordConstraintsDoesntThrowAndPreservesValuesPreR()
49 mDevicePolicyManager.setPasswordMinimumSymbols(ADMIN_RECEIVER_COMPONENT, TEST_VALUE); in testPasswordConstraintsDoesntThrowAndPreservesValuesPreR()
53 ADMIN_RECEIVER_COMPONENT, PASSWORD_QUALITY_UNSPECIFIED); in testPasswordConstraintsDoesntThrowAndPreservesValuesPreR()
55 mDevicePolicyManager.getPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT)); in testPasswordConstraintsDoesntThrowAndPreservesValuesPreR()
[all …]
DDevicePolicyLoggingTest.java54 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, in testPasswordMethodsLogged()
56 mDevicePolicyManager.setPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT, 13); in testPasswordMethodsLogged()
57 mDevicePolicyManager.setPasswordMinimumNumeric(ADMIN_RECEIVER_COMPONENT, 14); in testPasswordMethodsLogged()
58 mDevicePolicyManager.setPasswordMinimumNonLetter(ADMIN_RECEIVER_COMPONENT, 15); in testPasswordMethodsLogged()
59 mDevicePolicyManager.setPasswordMinimumLetters(ADMIN_RECEIVER_COMPONENT, 16); in testPasswordMethodsLogged()
60 mDevicePolicyManager.setPasswordMinimumLowerCase(ADMIN_RECEIVER_COMPONENT, 17); in testPasswordMethodsLogged()
61 mDevicePolicyManager.setPasswordMinimumUpperCase(ADMIN_RECEIVER_COMPONENT, 18); in testPasswordMethodsLogged()
62 mDevicePolicyManager.setPasswordMinimumSymbols(ADMIN_RECEIVER_COMPONENT, 19); in testPasswordMethodsLogged()
63 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, in testPasswordMethodsLogged()
74 ADMIN_RECEIVER_COMPONENT, KEYGUARD_DISABLE_FEATURES_NONE); in testSetKeyguardDisabledFeaturesLogged()
[all …]
DResetPasswordWithTokenTest.java64 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, in tearDown()
75 assertFalse(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, in testBadTokenShouldFail()
84 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, in testChangePasswordWithToken()
88 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, PASSWORD_QUALITY_NUMERIC); in testChangePasswordWithToken()
89 mDevicePolicyManager.setPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT, 6); in testChangePasswordWithToken()
93 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, in testChangePasswordWithToken()
102 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, PASSWORD_QUALITY_NUMERIC); in testResetPasswordFailIfQualityNotMet()
103 mDevicePolicyManager.setPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT, 6); in testResetPasswordFailIfQualityNotMet()
105 assertFalse(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, in testResetPasswordFailIfQualityNotMet()
108 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, in testResetPasswordFailIfQualityNotMet()
[all …]
DTimeManagementTest.java43 mDevicePolicyManager.setAutoTimeZoneEnabled(ADMIN_RECEIVER_COMPONENT, true); in testSetAutoTimeZoneEnabled()
45 assertThat(mDevicePolicyManager.getAutoTimeZoneEnabled(ADMIN_RECEIVER_COMPONENT)).isTrue(); in testSetAutoTimeZoneEnabled()
47 mDevicePolicyManager.setAutoTimeZoneEnabled(ADMIN_RECEIVER_COMPONENT, false); in testSetAutoTimeZoneEnabled()
49 assertThat(mDevicePolicyManager.getAutoTimeZoneEnabled(ADMIN_RECEIVER_COMPONENT)).isFalse(); in testSetAutoTimeZoneEnabled()
53 mDevicePolicyManager.setAutoTimeEnabled(ADMIN_RECEIVER_COMPONENT, false); in testSetTime()
57 assertThat(mDevicePolicyManager.setTime(ADMIN_RECEIVER_COMPONENT, in testSetTime()
62 mDevicePolicyManager.setAutoTimeEnabled(ADMIN_RECEIVER_COMPONENT, true); in testSetTime_failWhenAutoTimeEnabled()
64 assertThat(mDevicePolicyManager.setTime(ADMIN_RECEIVER_COMPONENT, 0)).isFalse(); in testSetTime_failWhenAutoTimeEnabled()
68 mDevicePolicyManager.setAutoTimeZoneEnabled(ADMIN_RECEIVER_COMPONENT, false); in testSetTimeZone()
71 mDevicePolicyManager.setTimeZone(ADMIN_RECEIVER_COMPONENT, "Singapore")).isTrue(); in testSetTimeZone()
[all …]
DKeyguardDisabledFeaturesTest.java26 mDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, in testSetKeyguardDisabledFeatures()
31 ADMIN_RECEIVER_COMPONENT)).isEqualTo( in testSetKeyguardDisabledFeatures()
35 mDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, in testSetKeyguardDisabledFeatures()
40 ADMIN_RECEIVER_COMPONENT)).isEqualTo( in testSetKeyguardDisabledFeatures()
47 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in testSetKeyguardDisabledFeatures_onParentSilentIgnoreWhenCallerIsNotOrgOwnedPO()
49 parentDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, in testSetKeyguardDisabledFeatures_onParentSilentIgnoreWhenCallerIsNotOrgOwnedPO()
53 ADMIN_RECEIVER_COMPONENT)).isEqualTo(0); in testSetKeyguardDisabledFeatures_onParentSilentIgnoreWhenCallerIsNotOrgOwnedPO()
58 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in testSetKeyguardDisabledFeatures_onParent()
60 parentDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, in testSetKeyguardDisabledFeatures_onParent()
65 ADMIN_RECEIVER_COMPONENT)).isEqualTo( in testSetKeyguardDisabledFeatures_onParent()
[all …]
DInputMethodsTest.java35 mDevicePolicyManager.setPermittedInputMethods(ADMIN_RECEIVER_COMPONENT, null); in testPermittedInputMethods()
37 mDevicePolicyManager.getPermittedInputMethods(ADMIN_RECEIVER_COMPONENT)).isNull(); in testPermittedInputMethods()
40 mDevicePolicyManager.setPermittedInputMethods(ADMIN_RECEIVER_COMPONENT, new ArrayList<>()); in testPermittedInputMethods()
42 mDevicePolicyManager.getPermittedInputMethods(ADMIN_RECEIVER_COMPONENT)).isEmpty(); in testPermittedInputMethods()
46 mDevicePolicyManager.setPermittedInputMethods(ADMIN_RECEIVER_COMPONENT, packages); in testPermittedInputMethods()
48 mDevicePolicyManager.getPermittedInputMethods(ADMIN_RECEIVER_COMPONENT)) in testPermittedInputMethods()
54 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in testPermittedInputMethodsOnParent()
56 parentDevicePolicyManager.setPermittedInputMethods(ADMIN_RECEIVER_COMPONENT, null); in testPermittedInputMethodsOnParent()
58 ADMIN_RECEIVER_COMPONENT)).isNull(); in testPermittedInputMethodsOnParent()
61 parentDevicePolicyManager.setPermittedInputMethods(ADMIN_RECEIVER_COMPONENT, in testPermittedInputMethodsOnParent()
[all …]
DScreenCaptureDisabledTest.java35 mDevicePolicyManager.setScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT, false); in testSetScreenCaptureDisabled_false()
37 ADMIN_RECEIVER_COMPONENT.flattenToShortString()) in testSetScreenCaptureDisabled_false()
38 .that(mDevicePolicyManager.getScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT)) in testSetScreenCaptureDisabled_false()
45 mDevicePolicyManager.setScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT, true); in testSetScreenCaptureDisabled_true()
47 ADMIN_RECEIVER_COMPONENT.flattenToShortString()) in testSetScreenCaptureDisabled_true()
48 .that(mDevicePolicyManager.getScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT)) in testSetScreenCaptureDisabled_true()
56 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in testSetScreenCaptureDisabledOnParent_false()
57 parentDevicePolicyManager.setScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT, false); in testSetScreenCaptureDisabledOnParent_false()
59 ADMIN_RECEIVER_COMPONENT.flattenToShortString()) in testSetScreenCaptureDisabledOnParent_false()
61 .getScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT)) in testSetScreenCaptureDisabledOnParent_false()
[all …]
DPasswordMinimumRestrictionsTest.java53 mParentDpm = mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in setUp()
55 mDevicePolicyManager.getPasswordQuality(ADMIN_RECEIVER_COMPONENT); in setUp()
56 mParentPreviousPasswordQuality = mParentDpm.getPasswordQuality(ADMIN_RECEIVER_COMPONENT); in setUp()
57 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, PASSWORD_QUALITY_COMPLEX); in setUp()
58 mParentDpm.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, PASSWORD_QUALITY_COMPLEX); in setUp()
61 .add(invokeGetMethod(method, mDevicePolicyManager, ADMIN_RECEIVER_COMPONENT)); in setUp()
63 .add(invokeGetMethod(method, mParentDpm, ADMIN_RECEIVER_COMPONENT)); in setUp()
70 invokeSetMethod(METHOD_LIST[i], mDevicePolicyManager, ADMIN_RECEIVER_COMPONENT, in tearDown()
72 invokeSetMethod(METHOD_LIST[i], mParentDpm, ADMIN_RECEIVER_COMPONENT, in tearDown()
75 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, in tearDown()
[all …]
DApplicationRestrictionsTest.java99 ADMIN_RECEIVER_COMPONENT, APP_RESTRICTIONS_TARGET_PKG, new Bundle()); in tearDown()
101 ADMIN_RECEIVER_COMPONENT, OTHER_PACKAGE, new Bundle()); in tearDown()
103 ADMIN_RECEIVER_COMPONENT, mContext.getPackageName(), new Bundle()); in tearDown()
131 ADMIN_RECEIVER_COMPONENT, APP_RESTRICTIONS_TARGET_PKG, BUNDLE_0); in testSetApplicationRestrictions()
133 ADMIN_RECEIVER_COMPONENT, OTHER_PACKAGE, BUNDLE_1); in testSetApplicationRestrictions()
137 ADMIN_RECEIVER_COMPONENT, APP_RESTRICTIONS_TARGET_PKG)); in testSetApplicationRestrictions()
139 ADMIN_RECEIVER_COMPONENT, OTHER_PACKAGE)); in testSetApplicationRestrictions()
146 ADMIN_RECEIVER_COMPONENT, APP_RESTRICTIONS_TARGET_PKG, BUNDLE_1); in testSetApplicationRestrictions()
148 ADMIN_RECEIVER_COMPONENT, APP_RESTRICTIONS_TARGET_PKG)); in testSetApplicationRestrictions()
152 ADMIN_RECEIVER_COMPONENT, APP_RESTRICTIONS_TARGET_PKG, new Bundle()); in testSetApplicationRestrictions()
[all …]
DApplicationHiddenParentTest.java40 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in setUp()
44 …assertThat(mDevicePolicyManager.isProfileOwnerApp(ADMIN_RECEIVER_COMPONENT.getPackageName())).isTr… in setUp()
50 mParentDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, in tearDown()
59 assertThat(mParentDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden_systemPackage()
61 assertThat(mParentDevicePolicyManager.isApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden_systemPackage()
66 assertThat(mParentDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden_systemPackage()
68 assertThat(mParentDevicePolicyManager.isApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden_systemPackage()
75 mParentDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden_nonSystemPackage()
77 mParentDevicePolicyManager.isApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden_nonSystemPackage()
81 mParentDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden_nonSystemPackage()
[all …]
DApplicationHiddenTest.java62 mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, PACKAGE_TO_HIDE, false); in tearDown()
67 assertWithMessage("setApplicationHidden(%s, %s, true)", ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden()
69 .that(mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden()
72 assertWithMessage("isApplicationHidden(%s, %s)", ADMIN_RECEIVER_COMPONENT, PACKAGE_TO_HIDE) in testSetApplicationHidden()
74 .isApplicationHidden(ADMIN_RECEIVER_COMPONENT, PACKAGE_TO_HIDE)) in testSetApplicationHidden()
77 assertWithMessage("setApplicationHidden(%s, %s, false)", ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden()
79 .that(mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden()
82 assertWithMessage("isApplicationHidden(%s, %s)", ADMIN_RECEIVER_COMPONENT, PACKAGE_TO_HIDE) in testSetApplicationHidden()
84 .isApplicationHidden(ADMIN_RECEIVER_COMPONENT, PACKAGE_TO_HIDE)) in testSetApplicationHidden()
90 assertWithMessage("setApplicationHidden(%s, %s, true)", ADMIN_RECEIVER_COMPONENT, in testCannotHideActiveAdmin()
[all …]
DDelegatedCertInstallerHelper.java55 mDpm.setDelegatedScopes(ADMIN_RECEIVER_COMPONENT, CERT_INSTALLER_PACKAGE, in testManualSetCertInstallerDelegate()
57 assertTrue(mDpm.getDelegatePackages(ADMIN_RECEIVER_COMPONENT, in testManualSetCertInstallerDelegate()
59 assertTrue(mDpm.getDelegatePackages(ADMIN_RECEIVER_COMPONENT, in testManualSetCertInstallerDelegate()
64 mDpm.setDelegatedScopes(ADMIN_RECEIVER_COMPONENT, CERT_INSTALLER_PACKAGE, Arrays.asList()); in testManualClearCertInstallerDelegate()
65 assertFalse(mDpm.getDelegatePackages(ADMIN_RECEIVER_COMPONENT, in testManualClearCertInstallerDelegate()
67 assertFalse(mDpm.getDelegatePackages(ADMIN_RECEIVER_COMPONENT, in testManualClearCertInstallerDelegate()
72 KeyGenerationUtils.generateRsaKey(mDpm, ADMIN_RECEIVER_COMPONENT, PRE_SELECTED_ALIAS); in testManualGenerateKeyAndGrantAccess()
73 assertTrue(mDpm.grantKeyPairToApp(ADMIN_RECEIVER_COMPONENT, PRE_SELECTED_ALIAS, in testManualGenerateKeyAndGrantAccess()
78 assertTrue(mDpm.revokeKeyPairFromApp(ADMIN_RECEIVER_COMPONENT, PRE_SELECTED_ALIAS, in testManualRemoveKeyGrant()
83 assertTrue(mDpm.removeKeyPair(ADMIN_RECEIVER_COMPONENT, PRE_SELECTED_ALIAS)); in testManualClearGeneratedKey()
DDelegatedCertInstallerTest.java114 mDpm.uninstallCaCert(ADMIN_RECEIVER_COMPONENT, TestCertificates.TEST_CA.getBytes()); in tearDown()
117 mDpm.setCertInstallerPackage(ADMIN_RECEIVER_COMPONENT, null); in tearDown()
128 mDpm.setCertInstallerPackage(ADMIN_RECEIVER_COMPONENT, CERT_INSTALLER_PACKAGE); in testCaCertsOperations()
130 mDpm.getCertInstallerPackage(ADMIN_RECEIVER_COMPONENT)); in testCaCertsOperations()
139 ADMIN_RECEIVER_COMPONENT, cert)); in testCaCertsOperations()
154 ADMIN_RECEIVER_COMPONENT, cert)); in testCaCertsOperations()
162 mDpm.setCertInstallerPackage(ADMIN_RECEIVER_COMPONENT, null); in testCaCertsOperations()
172 mDpm.setCertInstallerPackage(ADMIN_RECEIVER_COMPONENT, null); in testInstallKeyPair()
179 mDpm.setCertInstallerPackage(ADMIN_RECEIVER_COMPONENT, CERT_INSTALLER_PACKAGE); in testInstallKeyPair()
181 mDpm.getCertInstallerPackage(ADMIN_RECEIVER_COMPONENT)); in testInstallKeyPair()
[all …]
DAlwaysOnVpnUnsupportedTest.java36 mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in testAssertNoAlwaysOnVpn()
40 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, null, false); in testClearAlwaysOnVpn()
42 mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in testClearAlwaysOnVpn()
47 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, true); in testSetSupportedVpnAlwaysOn()
49 VPN_PACKAGE, mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in testSetSupportedVpnAlwaysOn()
55 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, true); in testSetUnsupportedVpnAlwaysOn()
60 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in testSetUnsupportedVpnAlwaysOn()
DUserRestrictionsParentTest.java19 import static com.android.cts.deviceandprofileowner.BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT;
105 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in testAddUserRestrictionDisallowConfigDateTime_onParent()
108 parentDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testAddUserRestrictionDisallowConfigDateTime_onParent()
130 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in testAddUserRestrictionDisallowAddUser_onParent()
133 parentDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testAddUserRestrictionDisallowAddUser_onParent()
143 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in testClearUserRestrictionDisallowAddUser()
145 parentDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in testClearUserRestrictionDisallowAddUser()
151 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in testAddUserRestrictionCameraDisabled_onParent()
152 parentDevicePolicyManager.setCameraDisabled(ADMIN_RECEIVER_COMPONENT, true); in testAddUserRestrictionCameraDisabled_onParent()
154 parentDevicePolicyManager.getCameraDisabled(ADMIN_RECEIVER_COMPONENT); in testAddUserRestrictionCameraDisabled_onParent()
[all …]
DAffiliationTest.java19 import static com.android.cts.deviceandprofileowner.BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT;
72 mDevicePolicyManager.setLockTaskPackages(ADMIN_RECEIVER_COMPONENT, packages); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated()
74 mDevicePolicyManager.getLockTaskPackages(ADMIN_RECEIVER_COMPONENT)); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated()
79 mDevicePolicyManager.getAffiliationIds(ADMIN_RECEIVER_COMPONENT); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated()
89 mDevicePolicyManager.getLockTaskPackages(ADMIN_RECEIVER_COMPONENT).length); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated()
92 mDevicePolicyManager.setAffiliationIds(ADMIN_RECEIVER_COMPONENT, in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated()
98 mDevicePolicyManager.setAffiliationIds(ADMIN_RECEIVER_COMPONENT, ids); in setAffiliationIds()
99 assertEquals(ids, mDevicePolicyManager.getAffiliationIds(ADMIN_RECEIVER_COMPONENT)); in setAffiliationIds()
104 mDevicePolicyManager.setLockTaskPackages(ADMIN_RECEIVER_COMPONENT, new String[0]); in checkLockTaskMethodsThrow()
109 mDevicePolicyManager.getLockTaskPackages(ADMIN_RECEIVER_COMPONENT); in checkLockTaskMethodsThrow()
DOrgOwnedProfileOwnerParentTest.java23 import static com.android.cts.deviceandprofileowner.BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT;
58 devicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in setUp()
61 assertTrue(devicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)); in setUp()
63 devicePolicyManager.isProfileOwnerApp(ADMIN_RECEIVER_COMPONENT.getPackageName())); in setUp()
64 assertTrue(devicePolicyManager.isManagedProfile(ADMIN_RECEIVER_COMPONENT)); in setUp()
122 mParentDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in testAddGetAndClearUserRestriction_onParent()
125 ADMIN_RECEIVER_COMPONENT); in testAddGetAndClearUserRestriction_onParent()
128 mParentDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in testAddGetAndClearUserRestriction_onParent()
130 restrictions = mParentDevicePolicyManager.getUserRestrictions(ADMIN_RECEIVER_COMPONENT); in testAddGetAndClearUserRestriction_onParent()
143 () -> mParentDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testUnableToAddBaseUserRestriction()
[all …]
DPolicyTransparencyTest.java33 mDevicePolicyManager.setCameraDisabled(ADMIN_RECEIVER_COMPONENT, true); in testCameraDisabled()
38 assertEquals(ADMIN_RECEIVER_COMPONENT, in testCameraDisabled()
43 mDevicePolicyManager.setCameraDisabled(ADMIN_RECEIVER_COMPONENT, false); in testCameraDisabled()
50 mDevicePolicyManager.setScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT, true); in testScreenCaptureDisabled()
55 assertEquals(ADMIN_RECEIVER_COMPONENT, in testScreenCaptureDisabled()
60 mDevicePolicyManager.setScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT, false); in testScreenCaptureDisabled()
74 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in runTestForRestriction()
78 assertEquals(ADMIN_RECEIVER_COMPONENT, in runTestForRestriction()
82 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in runTestForRestriction()
DUnavailableSecureLockScreenTest.java43 … assertFalse(mDevicePolicyManager.setResetPasswordToken(ADMIN_RECEIVER_COMPONENT, TOKEN)); in testResetWithTokenAndPasswordSufficiency()
44 assertFalse(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, in testResetWithTokenAndPasswordSufficiency()
49 ADMIN_RECEIVER_COMPONENT, DevicePolicyManager.PASSWORD_QUALITY_SOMETHING); in testResetWithTokenAndPasswordSufficiency()
56 ADMIN_RECEIVER_COMPONENT, DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED); in testResetWithTokenAndPasswordSufficiency()
61 mDevicePolicyManager.clearResetPasswordToken(ADMIN_RECEIVER_COMPONENT); in testResetWithTokenAndPasswordSufficiency()
63 ADMIN_RECEIVER_COMPONENT, DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED); in testResetWithTokenAndPasswordSufficiency()
DAlwaysOnVpnMultiStageTest.java60 mDevicePolicyManager.getAlwaysOnVpnLockdownWhitelist(ADMIN_RECEIVER_COMPONENT); in testAlwaysOnSetAfterReboot()
62 mDevicePolicyManager.isAlwaysOnVpnLockdownEnabled(ADMIN_RECEIVER_COMPONENT)); in testAlwaysOnSetAfterReboot()
71 ADMIN_RECEIVER_COMPONENT)); in testNetworkBlocked()
90 if (mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT) == null) { in testAlwaysOnVpnDisabled()
97 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in testAlwaysOnVpnDisabled()
102 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in testSetNonExistingPackage()
106 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, in testSetNonExistingPackage()
113 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in testSetNonExistingPackage()
117 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, null, false); in testCleanup()
DAlwaysOnVpnTest.java59 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in setUp()
65 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, null, false); in tearDown()
66 mDevicePolicyManager.setApplicationRestrictions(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, in tearDown()
73 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in testAlwaysOnVpn()
83 ADMIN_RECEIVER_COMPONENT, UserManager.DISALLOW_CONFIG_VPN); in testDisallowConfigVpn()
88 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowConfigVpn()
96 mDevicePolicyManager.setApplicationRestrictions(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, in testAllowedApps()
106 mDevicePolicyManager.setApplicationRestrictions(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, in testDisallowedApps()
121 ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, restrictions); in testVpnLockdownUpdateAllowlist()
162 ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, restrictions); in testVpnLockdownAllowlistVpnComesUp()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DDevicePolicyManagerParentSupportTest.java52 ADMIN_RECEIVER_COMPONENT, passwordHistoryLength); in testSetAndGetPasswordHistoryLength_onParent()
54 mParentDevicePolicyManager.getPasswordHistoryLength(ADMIN_RECEIVER_COMPONENT); in testSetAndGetPasswordHistoryLength_onParent()
77 ADMIN_RECEIVER_COMPONENT, passwordExpirationTimeout); in testSetAndGetPasswordExpirationTimeout_onParent()
79 mParentDevicePolicyManager.getPasswordExpirationTimeout(ADMIN_RECEIVER_COMPONENT); in testSetAndGetPasswordExpirationTimeout_onParent()
92 ADMIN_RECEIVER_COMPONENT, passwordExpirationTimeout); in testGetPasswordExpiration_onParent()
94 mParentDevicePolicyManager.getPasswordExpiration(ADMIN_RECEIVER_COMPONENT); in testGetPasswordExpiration_onParent()
133 mParentDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, quality); in setPasswordQuality()
138 ADMIN_RECEIVER_COMPONENT, PASSWORD_QUALITY_UNSPECIFIED); in testIsActivePasswordSufficient_onParent_respectsProfileQualityWhenUnified()
141 ADMIN_RECEIVER_COMPONENT, PASSWORD_QUALITY_NUMERIC_COMPLEX); in testIsActivePasswordSufficient_onParent_respectsProfileQualityWhenUnified()
146 ADMIN_RECEIVER_COMPONENT, PASSWORD_QUALITY_UNSPECIFIED); in testIsActivePasswordSufficient_onParent_respectsProfileQualityWhenUnified()
[all …]
DCrossProfileTest.java116 assertThat(mDevicePolicyManager.getCrossProfilePackages(ADMIN_RECEIVER_COMPONENT)) in testGetCrossProfilePackages_notSet_returnsEmpty()
122 ADMIN_RECEIVER_COMPONENT, TEST_CROSS_PROFILE_PACKAGES); in testGetCrossProfilePackages_whenSet_returnsEqual()
123 assertThat(mDevicePolicyManager.getCrossProfilePackages(ADMIN_RECEIVER_COMPONENT)) in testGetCrossProfilePackages_whenSet_returnsEqual()
131 mDevicePolicyManager.setCrossProfilePackages(ADMIN_RECEIVER_COMPONENT, packages1); in testGetCrossProfilePackages_whenSetTwice_returnsLatestNotConcatenated()
132 mDevicePolicyManager.setCrossProfilePackages(ADMIN_RECEIVER_COMPONENT, packages2); in testGetCrossProfilePackages_whenSetTwice_returnsLatestNotConcatenated()
134 assertThat(mDevicePolicyManager.getCrossProfilePackages(ADMIN_RECEIVER_COMPONENT)) in testGetCrossProfilePackages_whenSetTwice_returnsLatestNotConcatenated()
149 ADMIN_RECEIVER_COMPONENT, Sets.newHashSet("com.android.cts.testapps.testapp1")); in testSetCrossProfilePackages_noAsserts()
155 ADMIN_RECEIVER_COMPONENT, ALL_CROSS_PROFILE_PACKAGES); in testSetCrossProfilePackages_firstTime_doesNotResetAnyAppOps()
161 ADMIN_RECEIVER_COMPONENT, ALL_CROSS_PROFILE_PACKAGES); in testSetCrossProfilePackages_unchanged_doesNotResetAnyAppOps()
165 ADMIN_RECEIVER_COMPONENT, ALL_CROSS_PROFILE_PACKAGES); in testSetCrossProfilePackages_unchanged_doesNotResetAnyAppOps()
[all …]
DOrganizationInfoTest.java27 int defaultColor = mDevicePolicyManager.getOrganizationColor(ADMIN_RECEIVER_COMPONENT); in testDefaultOrganizationColor()
33 int previousColor = mDevicePolicyManager.getOrganizationColor(ADMIN_RECEIVER_COMPONENT); in testSetOrganizationColor()
46 mDevicePolicyManager.setOrganizationColor(ADMIN_RECEIVER_COMPONENT, color); in testSetOrganizationColor()
48 mDevicePolicyManager.getOrganizationColor(ADMIN_RECEIVER_COMPONENT)); in testSetOrganizationColor()
52 mDevicePolicyManager.setOrganizationColor(ADMIN_RECEIVER_COMPONENT, previousColor); in testSetOrganizationColor()
72 ADMIN_RECEIVER_COMPONENT); in testDefaultOrganizationNameIsNull()
78 ADMIN_RECEIVER_COMPONENT); in testSetOrganizationName()
82 mDevicePolicyManager.setOrganizationName(ADMIN_RECEIVER_COMPONENT, name); in testSetOrganizationName()
84 ADMIN_RECEIVER_COMPONENT); in testSetOrganizationName()
87 mDevicePolicyManager.setOrganizationName(ADMIN_RECEIVER_COMPONENT, in testSetOrganizationName()
DResetPasswordWithTokenTest.java52 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, PASSWORD0, in testSetupWorkProfile()
59 assertTrue(mDevicePolicyManager.isResetPasswordTokenActive(ADMIN_RECEIVER_COMPONENT)); in testResetPasswordBeforeUnlock()
60 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, PASSWORD1, in testResetPasswordBeforeUnlock()
63 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, in testResetPasswordBeforeUnlock()
65 mDevicePolicyManager.setPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT, 6); in testResetPasswordBeforeUnlock()
75 assertTrue(mDevicePolicyManager.isResetPasswordTokenActive(ADMIN_RECEIVER_COMPONENT)); in testClearPasswordBeforeUnlock()
76 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, null, in testClearPasswordBeforeUnlock()
94 assertTrue(mDevicePolicyManager.setResetPasswordToken(ADMIN_RECEIVER_COMPONENT, token)); in testSetResetPasswordToken()
95 assertTrue(mDevicePolicyManager.isResetPasswordTokenActive(ADMIN_RECEIVER_COMPONENT)); in testSetResetPasswordToken()

1234