/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | DevicePolicyLoggingTest.java | 51 mDevicePolicyManager.setKeyguardDisabledFeatures( in testSetKeyguardDisabledFeaturesLogged() 53 mDevicePolicyManager.setKeyguardDisabledFeatures( in testSetKeyguardDisabledFeaturesLogged() 55 mDevicePolicyManager.setKeyguardDisabledFeatures( in testSetKeyguardDisabledFeaturesLogged() 57 mDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, in testSetKeyguardDisabledFeaturesLogged() 62 mDevicePolicyManager.setKeyguardDisabledFeatures( in testSetKeyguardDisabledSecureCameraLogged() 67 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testSetUserRestrictionLogged() 69 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in testSetUserRestrictionLogged() 72 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testSetUserRestrictionLogged() 74 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in testSetUserRestrictionLogged() 77 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testSetUserRestrictionLogged() [all …]
|
D | RequiredStrongAuthTimeoutTest.java | 35 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(null), in testSetRequiredStrongAuthTimeout() 39 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(ADMIN), 0); in testSetRequiredStrongAuthTimeout() 42 mDevicePolicyManager.setRequiredStrongAuthTimeout(ADMIN, in testSetRequiredStrongAuthTimeout() 44 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(ADMIN), in testSetRequiredStrongAuthTimeout() 46 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(null), in testSetRequiredStrongAuthTimeout() 50 mDevicePolicyManager.setRequiredStrongAuthTimeout(ADMIN, 0); in testSetRequiredStrongAuthTimeout() 51 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(ADMIN), 0); in testSetRequiredStrongAuthTimeout() 52 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(null), in testSetRequiredStrongAuthTimeout() 56 mDevicePolicyManager.setRequiredStrongAuthTimeout(ADMIN, in testSetRequiredStrongAuthTimeout() 58 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(ADMIN), in testSetRequiredStrongAuthTimeout() [all …]
|
D | AffiliationTest.java | 44 private DevicePolicyManager mDevicePolicyManager; field in AffiliationTest 49 mDevicePolicyManager = (DevicePolicyManager) in setUp() 72 mDevicePolicyManager.setLockTaskPackages(ADMIN_RECEIVER_COMPONENT, packages); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 74 mDevicePolicyManager.getLockTaskPackages(ADMIN_RECEIVER_COMPONENT)); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 75 assertTrue(mDevicePolicyManager.isLockTaskPermitted("package1")); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 76 assertFalse(mDevicePolicyManager.isLockTaskPermitted("package3")); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 79 mDevicePolicyManager.getAffiliationIds(ADMIN_RECEIVER_COMPONENT); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 84 assertFalse(mDevicePolicyManager.isLockTaskPermitted("package1")); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 89 mDevicePolicyManager.getLockTaskPackages(ADMIN_RECEIVER_COMPONENT).length); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 90 assertFalse(mDevicePolicyManager.isLockTaskPermitted("package1")); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() [all …]
|
D | KeyguardDisabledFeaturesTest.java | 26 mDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, in testSetKeyguardDisabledFeatures() 30 assertThat(mDevicePolicyManager.getKeyguardDisabledFeatures( in testSetKeyguardDisabledFeatures() 34 removeKeyguardDisableFeatures(mDevicePolicyManager); in testSetKeyguardDisabledFeatures() 35 mDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, in testSetKeyguardDisabledFeatures() 39 assertThat(mDevicePolicyManager.getKeyguardDisabledFeatures( in testSetKeyguardDisabledFeatures() 42 removeKeyguardDisableFeatures(mDevicePolicyManager); in testSetKeyguardDisabledFeatures() 47 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in testSetKeyguardDisabledFeatures_onParentSilentIgnoreWhenCallerIsNotOrgOwnedPO() 52 assertThat(mDevicePolicyManager.getKeyguardDisabledFeatures( in testSetKeyguardDisabledFeatures_onParentSilentIgnoreWhenCallerIsNotOrgOwnedPO() 58 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in testSetKeyguardDisabledFeatures_onParent()
|
D | InputMethodsTest.java | 35 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() 69 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in testPermittedInputMethodsOnParentThrowsIfPackageListIsNotEmptyOrNull() 79 mDevicePolicyManager.setPermittedInputMethods(badAdmin, null); in testPermittedInputMethodsThrowsIfWrongAdmin() 84 mDevicePolicyManager.getPermittedInputMethods(badAdmin); in testPermittedInputMethodsThrowsIfWrongAdmin()
|
D | CommonCriteriaModeTest.java | 23 assertFalse(mDevicePolicyManager.isCommonCriteriaModeEnabled(ADMIN_RECEIVER_COMPONENT)); in testSettingCommonCriteriaMode() 24 assertFalse(mDevicePolicyManager.isCommonCriteriaModeEnabled(null)); in testSettingCommonCriteriaMode() 26 mDevicePolicyManager.setCommonCriteriaModeEnabled(ADMIN_RECEIVER_COMPONENT, true); in testSettingCommonCriteriaMode() 27 assertTrue(mDevicePolicyManager.isCommonCriteriaModeEnabled(ADMIN_RECEIVER_COMPONENT)); in testSettingCommonCriteriaMode() 28 assertTrue(mDevicePolicyManager.isCommonCriteriaModeEnabled(null)); in testSettingCommonCriteriaMode() 30 mDevicePolicyManager.setCommonCriteriaModeEnabled(ADMIN_RECEIVER_COMPONENT, false); in testSettingCommonCriteriaMode()
|
D | AlwaysOnVpnUnsupportedTest.java | 36 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()
|
D | DelegatedCertInstallerHelper.java | 42 assertTrue(mDevicePolicyManager.getDelegatePackages(ADMIN_RECEIVER_COMPONENT, in testManualSetCertInstallerDelegate() 44 assertTrue(mDevicePolicyManager.getDelegatePackages(ADMIN_RECEIVER_COMPONENT, in testManualSetCertInstallerDelegate() 50 assertFalse(mDevicePolicyManager.getDelegatePackages(ADMIN_RECEIVER_COMPONENT, in testManualClearCertInstallerDelegate() 52 assertFalse(mDevicePolicyManager.getDelegatePackages(ADMIN_RECEIVER_COMPONENT, in testManualClearCertInstallerDelegate() 57 KeyGenerationUtils.generateRsaKey(mDevicePolicyManager, ADMIN_RECEIVER_COMPONENT, in testManualGenerateKeyAndGrantAccess() 59 assertTrue(mDevicePolicyManager.grantKeyPairToApp(ADMIN_RECEIVER_COMPONENT, in testManualGenerateKeyAndGrantAccess() 64 assertTrue(mDevicePolicyManager.revokeKeyPairFromApp(ADMIN_RECEIVER_COMPONENT, in testManualRemoveKeyGrant() 69 assertTrue(mDevicePolicyManager in testManualClearGeneratedKey()
|
D | DelegatedCertInstallerTest.java | 113 mDevicePolicyManager.uninstallCaCert(ADMIN_RECEIVER_COMPONENT, in tearDown() 117 mDevicePolicyManager.setCertInstallerPackage(ADMIN_RECEIVER_COMPONENT, null); in tearDown() 128 mDevicePolicyManager.setCertInstallerPackage(ADMIN_RECEIVER_COMPONENT, in testCaCertsOperations() 131 mDevicePolicyManager.getCertInstallerPackage(ADMIN_RECEIVER_COMPONENT)); in testCaCertsOperations() 139 assertTrue("Certificate is not installed properly", mDevicePolicyManager.hasCaCertInstalled( in testCaCertsOperations() 154 assertFalse("Certificate is not removed properly", mDevicePolicyManager.hasCaCertInstalled( in testCaCertsOperations() 163 mDevicePolicyManager.setCertInstallerPackage(ADMIN_RECEIVER_COMPONENT, null); in testCaCertsOperations() 173 mDevicePolicyManager.setCertInstallerPackage(ADMIN_RECEIVER_COMPONENT, null); in testInstallKeyPair() 180 mDevicePolicyManager.setCertInstallerPackage(ADMIN_RECEIVER_COMPONENT, in testInstallKeyPair() 183 mDevicePolicyManager.getCertInstallerPackage(ADMIN_RECEIVER_COMPONENT)); in testInstallKeyPair() [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | UserSessionTest.java | 26 mDevicePolicyManager.setLogoutEnabled(getWho(), true); in testSetLogoutEnabled() 27 assertTrue(mDevicePolicyManager.isLogoutEnabled()); in testSetLogoutEnabled() 31 mDevicePolicyManager.setLogoutEnabled(getWho(), false); in testSetLogoutDisabled() 32 assertFalse(mDevicePolicyManager.isLogoutEnabled()); in testSetLogoutDisabled() 36 mDevicePolicyManager.setStartUserSessionMessage(getWho(), START_SESSION_MESSAGE); in testSetStartUserSessionMessage() 38 mDevicePolicyManager.getStartUserSessionMessage(getWho())); in testSetStartUserSessionMessage() 42 mDevicePolicyManager.setEndUserSessionMessage(getWho(), END_SESSION_MESSAGE); in testSetEndUserSessionMessage() 43 assertEquals(END_SESSION_MESSAGE, mDevicePolicyManager.getEndUserSessionMessage(getWho())); in testSetEndUserSessionMessage() 47 mDevicePolicyManager.setStartUserSessionMessage(getWho(), START_SESSION_MESSAGE); in testClearStartUserSessionMessage() 48 mDevicePolicyManager.setStartUserSessionMessage(getWho(), null); in testClearStartUserSessionMessage() [all …]
|
D | AdminActionBookkeepingTest.java | 45 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), false); in tearDown() 46 mDevicePolicyManager.setNetworkLoggingEnabled(getWho(), false); in tearDown() 47 mDevicePolicyManager.uninstallCaCert(getWho(), TestCertificates.TEST_CA.getBytes()); in tearDown() 59 final long previousTimestamp = mDevicePolicyManager.getLastSecurityLogRetrievalTime(); in testRetrieveSecurityLogs() 61 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), true); in testRetrieveSecurityLogs() 64 mDevicePolicyManager.retrieveSecurityLogs(getWho()); in testRetrieveSecurityLogs() 67 final long firstTimestamp = mDevicePolicyManager.getLastSecurityLogRetrievalTime(); in testRetrieveSecurityLogs() 74 mDevicePolicyManager.retrievePreRebootSecurityLogs(getWho()) != null; in testRetrieveSecurityLogs() 77 final long secondTimestamp = mDevicePolicyManager.getLastSecurityLogRetrievalTime(); in testRetrieveSecurityLogs() 97 final long previousTimestamp = mDevicePolicyManager.getLastSecurityLogRetrievalTime(); in testGetLastNetworkLogRetrievalTime() [all …]
|
D | DevicePolicyLoggingTest.java | 33 mDevicePolicyManager.setKeyguardDisabled(getWho(), true); in testSetKeyguardDisabledLogged() 34 mDevicePolicyManager.setKeyguardDisabled(getWho(), false); in testSetKeyguardDisabledLogged() 38 mDevicePolicyManager.setStatusBarDisabled(getWho(), true); in testSetStatusBarDisabledLogged() 39 mDevicePolicyManager.setStatusBarDisabled(getWho(), false); in testSetStatusBarDisabledLogged() 53 mDevicePolicyManager.setGlobalSetting(getWho(), AUTO_TIME, "1"); in testSetGlobalSettingLogged() 54 mDevicePolicyManager.setGlobalSetting(getWho(), AUTO_TIME_ZONE, "1"); in testSetGlobalSettingLogged() 55 mDevicePolicyManager.setGlobalSetting(getWho(), DATA_ROAMING, "1"); in testSetGlobalSettingLogged() 56 mDevicePolicyManager.setGlobalSetting(getWho(), USB_MASS_STORAGE_ENABLED, "1"); in testSetGlobalSettingLogged() 58 mDevicePolicyManager.setGlobalSetting(getWho(), AUTO_TIME, autoTimeOriginalValue); in testSetGlobalSettingLogged() 59 mDevicePolicyManager.setGlobalSetting( in testSetGlobalSettingLogged() [all …]
|
D | BaseAffiliatedProfileOwnerTest.java | 37 protected DevicePolicyManager mDevicePolicyManager; field in BaseAffiliatedProfileOwnerTest 44 mDevicePolicyManager = TestAppSystemServiceFactory.getDevicePolicyManager(mContext, in setUp() 50 assertNotNull(mDevicePolicyManager); in assertDeviceOrAffiliatedProfileOwner() 51 assertTrue(mDevicePolicyManager.isAdminActive(getWho())); in assertDeviceOrAffiliatedProfileOwner() 52 boolean isDeviceOwner = mDevicePolicyManager.isDeviceOwnerApp(mContext.getPackageName()); in assertDeviceOrAffiliatedProfileOwner() 53 boolean isAffiliatedProfileOwner = mDevicePolicyManager.isProfileOwnerApp( in assertDeviceOrAffiliatedProfileOwner() 55 && mDevicePolicyManager.isAffiliatedUser(); in assertDeviceOrAffiliatedProfileOwner()
|
D | PrivateDnsPolicyTest.java | 47 mDevicePolicyManager.setGlobalPrivateDnsModeOpportunistic(getWho()); in tearDown() 64 mDevicePolicyManager.addUserRestriction(getWho(), restriction); in setUserRestriction() 66 mDevicePolicyManager.clearUserRestriction(getWho(), restriction); in setUserRestriction() 75 int resultCode = mDevicePolicyManager.setGlobalPrivateDnsModeOpportunistic(getWho()); in callSetGlobalPrivateDnsOpportunisticModeExpectingResult() 91 int resultCode = mDevicePolicyManager.setGlobalPrivateDnsModeSpecifiedHost( in callSetGlobalPrivateDnsHostModeExpectingResult() 109 mDevicePolicyManager.getGlobalPrivateDnsMode(getWho())).isEqualTo( in testSetOpportunisticMode() 111 assertThat(mDevicePolicyManager.getGlobalPrivateDnsHost(getWho())).isNull(); in testSetOpportunisticMode() 122 mDevicePolicyManager.getGlobalPrivateDnsMode(getWho())).isEqualTo( in testSetSpecificHostMode() 125 mDevicePolicyManager.getGlobalPrivateDnsHost(getWho())).isEqualTo( in testSetSpecificHostMode() 132 () -> mDevicePolicyManager.setGlobalPrivateDnsModeSpecifiedHost(getWho(), null)); in testSetModeWithIncorrectHost() [all …]
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | OrganizationInfoTest.java | 27 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() 58 mDevicePolicyManager.setOrganizationColor(null, Color.GRAY); in testSetOrGetOrganizationColorWithNullAdminFails() 64 int color = mDevicePolicyManager.getOrganizationColor(null); in testSetOrGetOrganizationColorWithNullAdminFails() 71 CharSequence organizationName = mDevicePolicyManager.getOrganizationName( in testDefaultOrganizationNameIsNull() 77 CharSequence previousOrganizationName = mDevicePolicyManager.getOrganizationName( in testSetOrganizationName() 82 mDevicePolicyManager.setOrganizationName(ADMIN_RECEIVER_COMPONENT, name); in testSetOrganizationName() [all …]
|
D | ResetPasswordWithTokenTest.java | 52 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() 67 mDevicePolicyManager.isActivePasswordSufficient(); in testResetPasswordBeforeUnlock() 75 assertTrue(mDevicePolicyManager.isResetPasswordTokenActive(ADMIN_RECEIVER_COMPONENT)); in testClearPasswordBeforeUnlock() 76 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, null, in testClearPasswordBeforeUnlock() 90 assertTrue(mDevicePolicyManager.isActivePasswordSufficient()); in testClearPasswordBeforeUnlock() 94 assertTrue(mDevicePolicyManager.setResetPasswordToken(ADMIN_RECEIVER_COMPONENT, token)); in testSetResetPasswordToken() [all …]
|
D | CrossProfileTest.java | 103 mDevicePolicyManager.setCrossProfilePackages( in testSetCrossProfilePackages_notProfileOwner_throwsSecurityException() 111 mDevicePolicyManager.getCrossProfilePackages(NON_ADMIN_RECEIVER); in testGetCrossProfilePackages_notProfileOwner_throwsSecurityException() 117 assertThat(mDevicePolicyManager.getCrossProfilePackages(ADMIN_RECEIVER_COMPONENT)) in testGetCrossProfilePackages_notSet_returnsEmpty() 122 mDevicePolicyManager.setCrossProfilePackages( in testGetCrossProfilePackages_whenSet_returnsEqual() 124 assertThat(mDevicePolicyManager.getCrossProfilePackages(ADMIN_RECEIVER_COMPONENT)) in testGetCrossProfilePackages_whenSet_returnsEqual() 132 mDevicePolicyManager.setCrossProfilePackages(ADMIN_RECEIVER_COMPONENT, packages1); in testGetCrossProfilePackages_whenSetTwice_returnsLatestNotConcatenated() 133 mDevicePolicyManager.setCrossProfilePackages(ADMIN_RECEIVER_COMPONENT, packages2); in testGetCrossProfilePackages_whenSetTwice_returnsLatestNotConcatenated() 135 assertThat(mDevicePolicyManager.getCrossProfilePackages(ADMIN_RECEIVER_COMPONENT)) in testGetCrossProfilePackages_whenSetTwice_returnsLatestNotConcatenated() 149 mDevicePolicyManager.setCrossProfilePackages( in testSetCrossProfilePackages_noAsserts() 155 mDevicePolicyManager.setCrossProfilePackages( in testSetCrossProfilePackages_firstTime_doesNotResetAnyAppOps() [all …]
|
D | BaseManagedProfileTest.java | 39 protected DevicePolicyManager mDevicePolicyManager; field in BaseManagedProfileTest 49 mDevicePolicyManager = (DevicePolicyManager) in setUp() 52 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in setUp() 53 assertNotNull(mDevicePolicyManager); in setUp() 55 assertTrue(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)); in setUp() 56 assertTrue(mDevicePolicyManager.isProfileOwnerApp( in setUp() 58 assertTrue(mDevicePolicyManager.isManagedProfile(ADMIN_RECEIVER_COMPONENT)); in setUp() 65 return isParent ? mParentDevicePolicyManager : mDevicePolicyManager; in getDevicePolicyManager()
|
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/ |
D | ManagementTest.java | 29 private DevicePolicyManager mDevicePolicyManager; field in ManagementTest 34 mDevicePolicyManager = (DevicePolicyManager) in setUp() 39 assertNotNull(mDevicePolicyManager); in testIsManagedProfile() 40 assertTrue(mDevicePolicyManager.isAdminActive( in testIsManagedProfile() 42 assertTrue(mDevicePolicyManager.isProfileOwnerApp(getContext().getPackageName())); in testIsManagedProfile() 43 assertTrue(mDevicePolicyManager.isManagedProfile( in testIsManagedProfile() 48 assertNotNull(mDevicePolicyManager); in testIsDeviceOwner() 49 assertTrue(mDevicePolicyManager.isAdminActive( in testIsDeviceOwner() 51 assertTrue(mDevicePolicyManager.isDeviceOwnerApp(getContext().getPackageName())); in testIsDeviceOwner() 52 assertFalse(mDevicePolicyManager.isManagedProfile( in testIsDeviceOwner() [all …]
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | SupportMessageTest.java | 62 private RemoteDevicePolicyManager mDevicePolicyManager; field in SupportMessageTest 69 mDevicePolicyManager = dpc.devicePolicyManager(); in setUp() 75 mDevicePolicyManager.setShortSupportMessage(mAdmin, /* charSequence= */ null); in tearDown() 76 mDevicePolicyManager.setLongSupportMessage(mAdmin, /* charSequence= */ null); in tearDown() 85 mDevicePolicyManager.setShortSupportMessage(mAdmin, VALID_SHORT_MSG); in setShortSupportMessage_validText_works() 87 assertThat(mDevicePolicyManager.getShortSupportMessage(mAdmin).toString()) in setShortSupportMessage_validText_works() 94 mDevicePolicyManager.setLongSupportMessage(mAdmin, VALID_LONG_MSG); in setLongSupportMessage_validText_works() 96 assertThat(mDevicePolicyManager.getLongSupportMessage(mAdmin).toString()) in setLongSupportMessage_validText_works() 103 mDevicePolicyManager.setShortSupportMessage(mAdmin, EMPTY_MSG); in setShortSupportMessage_emptyText_works() 105 assertThat(mDevicePolicyManager.getShortSupportMessage(mAdmin).toString()) in setShortSupportMessage_emptyText_works() [all …]
|
D | WifiSsidRestrictionTest.java | 53 private RemoteDevicePolicyManager mDevicePolicyManager; field in WifiSsidRestrictionTest 58 mDevicePolicyManager = dpc.devicePolicyManager(); in setUp() 72 mDevicePolicyManager.setWifiSsidPolicy(policy); in setWifiSsidPolicy_validAllowlist_works() 74 assertThat(mDevicePolicyManager.getWifiSsidPolicy().getSsids()).isEqualTo(ssids); in setWifiSsidPolicy_validAllowlist_works() 75 assertThat(mDevicePolicyManager.getWifiSsidPolicy().getPolicyType()).isEqualTo( in setWifiSsidPolicy_validAllowlist_works() 78 mDevicePolicyManager.setWifiSsidPolicy(null); in setWifiSsidPolicy_validAllowlist_works() 94 mDevicePolicyManager.setWifiSsidPolicy(policy); in setWifiSsidPolicy_validDenylist_works() 96 assertThat(mDevicePolicyManager.getWifiSsidPolicy().getSsids()).isEqualTo(ssids); in setWifiSsidPolicy_validDenylist_works() 97 assertThat(mDevicePolicyManager.getWifiSsidPolicy().getPolicyType()).isEqualTo( in setWifiSsidPolicy_validDenylist_works() 100 mDevicePolicyManager.setWifiSsidPolicy(null); in setWifiSsidPolicy_validDenylist_works() [all …]
|
/cts/hostsidetests/devicepolicy/app/PackageInstaller/src/com/android/cts/packageinstaller/ |
D | ClearDeviceOwnerTest.java | 39 private DevicePolicyManager mDevicePolicyManager; field in ClearDeviceOwnerTest 45 mDevicePolicyManager = (DevicePolicyManager) in setUp() 47 assertNotNull(mDevicePolicyManager); in setUp() 49 assertTrue(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)); in setUp() 50 assertTrue("App is not device owner", mDevicePolicyManager.isDeviceOwnerApp(PACKAGE_NAME)); in setUp() 55 mDevicePolicyManager.clearDeviceOwnerApp(PACKAGE_NAME); in tearDown() 56 assertFalse(mDevicePolicyManager.isDeviceOwnerApp(PACKAGE_NAME)); in tearDown() 68 for (int i = 0; i < 1000 && mDevicePolicyManager.isAdminActive(cn); i++) { in waitForActiveAdminRemoved() 71 assertFalse(mDevicePolicyManager.isAdminActive(cn)); in waitForActiveAdminRemoved()
|
/cts/hostsidetests/appcloning/test-apps/AppCloningContactsSharingApps/ManagedProfileOwnerApp/src/com/android/cts/managedprofile/owner/app/ |
D | ManagedProfileOwnerAppTest.java | 38 protected DevicePolicyManager mDevicePolicyManager; field in ManagedProfileOwnerAppTest 51 mDevicePolicyManager = (DevicePolicyManager) in setUp() 54 assertThat(mDevicePolicyManager).isNotNull(); in setUp() 55 assertThat(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)).isTrue(); in setUp() 56 assertThat(mDevicePolicyManager.isProfileOwnerApp( in setUp() 58 assertThat(mDevicePolicyManager.isManagedProfile(ADMIN_RECEIVER_COMPONENT)).isTrue(); in setUp() 64 mDevicePolicyManager.setManagedProfileContactsAccessPolicy(policy); in testSetDisallowWorkContactsAccessPolicy() 65 assertThat(mDevicePolicyManager.getManagedProfileContactsAccessPolicy()) in testSetDisallowWorkContactsAccessPolicy() 72 mDevicePolicyManager.setManagedProfileContactsAccessPolicy(policy); in testEnableWorkContactsAccess() 73 assertThat(mDevicePolicyManager.getManagedProfileContactsAccessPolicy()) in testEnableWorkContactsAccess()
|
/cts/hostsidetests/devicepolicy/app/TransferOwnerIncomingApp/src/com/android/cts/transferowner/ |
D | TransferProfileOwnerIncomingTest.java | 34 assertTrue(mDevicePolicyManager.isAdminActive(mIncomingComponentName)); in testTransferPoliciesAreRetainedAfterTransfer() 35 assertTrue(mDevicePolicyManager.isProfileOwnerApp(mIncomingComponentName.getPackageName())); in testTransferPoliciesAreRetainedAfterTransfer() 36 assertTrue(mDevicePolicyManager.getCameraDisabled(mIncomingComponentName)); in testTransferPoliciesAreRetainedAfterTransfer() 37 assertTrue(mDevicePolicyManager.getCrossProfileCallerIdDisabled(mIncomingComponentName)); in testTransferPoliciesAreRetainedAfterTransfer() 40 mDevicePolicyManager.getPasswordQuality(mIncomingComponentName)); in testTransferPoliciesAreRetainedAfterTransfer() 43 mDevicePolicyManager.getPasswordMinimumLength(mIncomingComponentName)); in testTransferPoliciesAreRetainedAfterTransfer() 47 mDevicePolicyManager.getParentProfileInstance(mIncomingComponentName); in testTransferPoliciesAreRetainedAfterTransfer()
|
D | TransferDeviceOwnerIncomingTest.java | 36 assertTrue(mDevicePolicyManager.isAdminActive(mIncomingComponentName)); in testTransferPoliciesAreRetainedAfterTransfer() 37 assertTrue(mDevicePolicyManager.isDeviceOwnerApp(mIncomingComponentName.getPackageName())); in testTransferPoliciesAreRetainedAfterTransfer() 38 assertTrue(mDevicePolicyManager.getCameraDisabled(mIncomingComponentName)); in testTransferPoliciesAreRetainedAfterTransfer() 40 mDevicePolicyManager.getKeepUninstalledPackages(mIncomingComponentName)); in testTransferPoliciesAreRetainedAfterTransfer() 43 mDevicePolicyManager.getPasswordQuality(mIncomingComponentName)); in testTransferPoliciesAreRetainedAfterTransfer() 44 assertEquals(123, mDevicePolicyManager.getPasswordMinimumLength(mIncomingComponentName)); in testTransferPoliciesAreRetainedAfterTransfer() 46 mDevicePolicyManager.getSystemUpdatePolicy()); in testTransferPoliciesAreRetainedAfterTransfer() 48 mDevicePolicyManager.getParentProfileInstance(mIncomingComponentName); in testTransferPoliciesAreRetainedAfterTransfer()
|