/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | ResetPasswordWithTokenTest.java | 55 assertFalse(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, in testBadTokenShouldFail() 64 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, in testChangePasswordWithToken() 68 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, in testChangePasswordWithToken() 70 mDevicePolicyManager.setPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT, 6); in testChangePasswordWithToken() 74 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, in testChangePasswordWithToken() 83 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, in testResetPasswordFailIfQualityNotMet() 85 mDevicePolicyManager.setPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT, 6); in testResetPasswordFailIfQualityNotMet() 87 assertFalse(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, in testResetPasswordFailIfQualityNotMet() 90 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, in testResetPasswordFailIfQualityNotMet() 98 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, in testPasswordMetricAfterResetPassword() [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 | PolicyTransparencyTest.java | 33 mDevicePolicyManager.setCameraDisabled(ADMIN_RECEIVER_COMPONENT, true); in testCameraDisabled() 35 Intent intent = mDevicePolicyManager.createAdminSupportIntent( in testCameraDisabled() 43 mDevicePolicyManager.setCameraDisabled(ADMIN_RECEIVER_COMPONENT, false); in testCameraDisabled() 44 intent = mDevicePolicyManager.createAdminSupportIntent( in testCameraDisabled() 50 mDevicePolicyManager.setScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT, true); in testScreenCaptureDisabled() 52 Intent intent = mDevicePolicyManager.createAdminSupportIntent( in testScreenCaptureDisabled() 60 mDevicePolicyManager.setScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT, false); in testScreenCaptureDisabled() 61 intent = mDevicePolicyManager.createAdminSupportIntent( in testScreenCaptureDisabled() 74 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); in runTestForRestriction() 76 Intent intent = mDevicePolicyManager.createAdminSupportIntent(restriction); in runTestForRestriction() [all …]
|
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 | ApplicationRestrictionsTest.java | 98 mDevicePolicyManager.setApplicationRestrictions( in tearDown() 100 mDevicePolicyManager.setApplicationRestrictions( in tearDown() 102 mDevicePolicyManager.setApplicationRestrictions( in tearDown() 110 mDevicePolicyManager.setApplicationRestrictions( in testNullComponentThrowsException() 119 mDevicePolicyManager.getApplicationRestrictions(null, APP_RESTRICTIONS_TARGET_PKG); in testNullComponentThrowsException() 130 mDevicePolicyManager.setApplicationRestrictions( in testSetApplicationRestrictions() 132 mDevicePolicyManager.setApplicationRestrictions( in testSetApplicationRestrictions() 136 assertBundle0(mDevicePolicyManager.getApplicationRestrictions( in testSetApplicationRestrictions() 138 assertBundle1(mDevicePolicyManager.getApplicationRestrictions( in testSetApplicationRestrictions() 145 mDevicePolicyManager.setApplicationRestrictions( in testSetApplicationRestrictions() [all …]
|
D | AllowedAccountManagementTest.java | 54 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in setUp() 61 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in tearDown() 69 assertEquals(0, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_setterAndGetter() 71 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_1, in testAccountManagementDisabled_setterAndGetter() 74 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_2, in testAccountManagementDisabled_setterAndGetter() 76 assertEquals(1, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_setterAndGetter() 78 mDevicePolicyManager.getAccountTypesWithManagementDisabled()[0]); in testAccountManagementDisabled_setterAndGetter() 80 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_1, in testAccountManagementDisabled_setterAndGetter() 82 assertEquals(0, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_setterAndGetter() 87 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_1, in testAccountManagementDisabled_profileAndDeviceOwnerCanAddAccount() [all …]
|
D | TrustAgentInfoTest.java | 41 mDevicePolicyManager.setTrustAgentConfiguration(ADMIN_RECEIVER_COMPONENT, in tearDown() 43 assertNull(mDevicePolicyManager.getTrustAgentConfiguration( in tearDown() 45 mDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, in tearDown() 52 mDevicePolicyManager.setTrustAgentConfiguration(ADMIN_RECEIVER_COMPONENT, in testSetAndGetTrustAgentConfiguration() 56 mDevicePolicyManager.getTrustAgentConfiguration( in testSetAndGetTrustAgentConfiguration() 60 configs = mDevicePolicyManager in testSetAndGetTrustAgentConfiguration() 64 configs = mDevicePolicyManager in testSetAndGetTrustAgentConfiguration() 68 mDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, in testSetAndGetTrustAgentConfiguration() 71 configs = mDevicePolicyManager in testSetAndGetTrustAgentConfiguration() 74 configs = mDevicePolicyManager in testSetAndGetTrustAgentConfiguration()
|
D | AlwaysOnVpnTest.java | 50 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in setUp() 56 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, null, false); in tearDown() 57 mDevicePolicyManager.setApplicationRestrictions(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, in tearDown() 63 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in testAlwaysOnVpn() 70 mDevicePolicyManager.addUserRestriction( in testDisallowConfigVpn() 76 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowConfigVpn() 84 mDevicePolicyManager.setApplicationRestrictions(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, in testAllowedApps() 93 mDevicePolicyManager.setApplicationRestrictions(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, in testDisallowedApps() 103 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, mPackageName, in testSetNonVpnAlwaysOn() 109 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); in testSetNonVpnAlwaysOn()
|
D | AudioRestrictionTest.java | 35 return mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT); 56 mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT); in testDisallowAdjustVolume_muted() 60 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, false); in testDisallowAdjustVolume_muted() 65 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowAdjustVolume_muted() 70 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, false); in testDisallowAdjustVolume_muted() 72 assertTrue(mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT)); in testDisallowAdjustVolume_muted() 74 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowAdjustVolume_muted() 76 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, initVolumeMuted); in testDisallowAdjustVolume_muted() 90 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowAdjustVolume() 99 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowAdjustVolume() [all …]
|
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/ |
D | DeviceWideLoggingFeaturesTest.java | 33 private DevicePolicyManager mDevicePolicyManager; field in DeviceWideLoggingFeaturesTest 39 mDevicePolicyManager = (DevicePolicyManager) 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 …]
|
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/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 | 61 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), false); in tearDown() 62 mDevicePolicyManager.setNetworkLoggingEnabled(getWho(), false); in tearDown() 63 mDevicePolicyManager.uninstallCaCert(getWho(), TEST_CA.getBytes()); in tearDown() 73 final long previousTimestamp = mDevicePolicyManager.getLastSecurityLogRetrievalTime(); in testRetrieveSecurityLogs() 75 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), true); in testRetrieveSecurityLogs() 78 mDevicePolicyManager.retrieveSecurityLogs(getWho()); in testRetrieveSecurityLogs() 81 final long firstTimestamp = mDevicePolicyManager.getLastSecurityLogRetrievalTime(); in testRetrieveSecurityLogs() 89 mDevicePolicyManager.retrievePreRebootSecurityLogs(getWho()) != null; in testRetrieveSecurityLogs() 92 final long secondTimestamp = mDevicePolicyManager.getLastSecurityLogRetrievalTime(); in testRetrieveSecurityLogs() 111 final long previousTimestamp = mDevicePolicyManager.getLastBugReportRequestTime(); in testRequestBugreport() [all …]
|
D | AffiliationTest.java | 41 private DevicePolicyManager mDevicePolicyManager; field in AffiliationTest 47 mDevicePolicyManager = (DevicePolicyManager) in setUp() 55 mDevicePolicyManager.setAffiliationIds(mAdminComponent, null); in testSetAffiliationId_null() 65 mDevicePolicyManager.setAffiliationIds(mAdminComponent, Collections.singleton(null)); in testSetAffiliationId_containsEmptyString() 91 mDevicePolicyManager.setLockTaskPackages(mAdminComponent, packages); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 92 assertArrayEquals(packages, mDevicePolicyManager.getLockTaskPackages(mAdminComponent)); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 93 assertTrue(mDevicePolicyManager.isLockTaskPermitted("package1")); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 94 assertFalse(mDevicePolicyManager.isLockTaskPermitted("package3")); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 97 mDevicePolicyManager.getAffiliationIds(mAdminComponent); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() 102 assertFalse(mDevicePolicyManager.isLockTaskPermitted("package1")); in testSetLockTaskPackagesClearedIfUserBecomesUnaffiliated() [all …]
|
D | BaseAffiliatedProfileOwnerTest.java | 31 protected DevicePolicyManager mDevicePolicyManager; field in BaseAffiliatedProfileOwnerTest 37 mDevicePolicyManager = mContext.getSystemService(DevicePolicyManager.class); in setUp() 42 assertNotNull(mDevicePolicyManager); in assertDeviceOrAffiliatedProfileOwner() 43 assertTrue(mDevicePolicyManager.isAdminActive(getWho())); in assertDeviceOrAffiliatedProfileOwner() 44 boolean isDeviceOwner = mDevicePolicyManager.isDeviceOwnerApp(mContext.getPackageName()); in assertDeviceOrAffiliatedProfileOwner() 45 boolean isAffiliatedProfileOwner = mDevicePolicyManager.isProfileOwnerApp( in assertDeviceOrAffiliatedProfileOwner() 47 && mDevicePolicyManager.isAffiliatedUser(); in assertDeviceOrAffiliatedProfileOwner()
|
D | BackupServicePoliciesTest.java | 26 assertFalse(mDevicePolicyManager.isBackupServiceEnabled(getWho())); in testEnablingAndDisablingBackupService() 27 mDevicePolicyManager.setBackupServiceEnabled(getWho(), true); in testEnablingAndDisablingBackupService() 28 assertTrue(mDevicePolicyManager.isBackupServiceEnabled(getWho())); in testEnablingAndDisablingBackupService() 29 mDevicePolicyManager.setBackupServiceEnabled(getWho(), false); in testEnablingAndDisablingBackupService() 30 assertFalse(mDevicePolicyManager.isBackupServiceEnabled(getWho())); in testEnablingAndDisablingBackupService()
|
/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 | CameraPolicyTest.java | 38 private DevicePolicyManager mDevicePolicyManager; field in CameraPolicyTest 56 mDevicePolicyManager = (DevicePolicyManager) getContext() in setUp() 73 mDevicePolicyManager.setCameraDisabled(mManagedProfileAdminComponent, true); in testDisableCameraInManagedProfile() 74 assertTrue(mDevicePolicyManager.getCameraDisabled(mManagedProfileAdminComponent)); in testDisableCameraInManagedProfile() 75 assertTrue(mDevicePolicyManager.getCameraDisabled(null)); in testDisableCameraInManagedProfile() 80 mDevicePolicyManager.setCameraDisabled(mManagedProfileAdminComponent, false); in testEnableCameraInManagedProfile() 81 assertFalse(mDevicePolicyManager.getCameraDisabled(mManagedProfileAdminComponent)); in testEnableCameraInManagedProfile() 82 assertFalse(mDevicePolicyManager.getCameraDisabled(null)); in testEnableCameraInManagedProfile() 87 mDevicePolicyManager.setCameraDisabled(mPrimaryAdminComponent, true); in testDisableCameraInPrimaryProfile() 88 assertTrue(mDevicePolicyManager.getCameraDisabled(mPrimaryAdminComponent)); in testDisableCameraInPrimaryProfile() [all …]
|
D | BaseManagedProfileTest.java | 38 protected DevicePolicyManager mDevicePolicyManager; field in BaseManagedProfileTest 47 mDevicePolicyManager = (DevicePolicyManager) in setUp() 50 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in setUp() 51 assertNotNull(mDevicePolicyManager); in setUp() 53 assertTrue(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)); in setUp() 54 assertTrue(mDevicePolicyManager.isProfileOwnerApp( in setUp() 56 assertTrue(mDevicePolicyManager.isManagedProfile(ADMIN_RECEIVER_COMPONENT)); in setUp() 60 return isParent ? mParentDevicePolicyManager : mDevicePolicyManager; in getDevicePolicyManager()
|
D | ResetPasswordWithTokenTest.java | 50 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, PASSWORD0, in testSetupWorkProfile() 53 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, in testSetupWorkProfile() 55 mDevicePolicyManager.setPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT, 6); in testSetupWorkProfile() 61 assertTrue(mDevicePolicyManager.isResetPasswordTokenActive(ADMIN_RECEIVER_COMPONENT)); in testResetPasswordBeforeUnlock() 62 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, PASSWORD1, in testResetPasswordBeforeUnlock() 65 mDevicePolicyManager.isActivePasswordSufficient(); in testResetPasswordBeforeUnlock() 71 assertTrue(mDevicePolicyManager.setResetPasswordToken(ADMIN_RECEIVER_COMPONENT, token)); in testSetResetPasswordToken() 72 assertTrue(mDevicePolicyManager.isResetPasswordTokenActive(ADMIN_RECEIVER_COMPONENT)); in testSetResetPasswordToken()
|
/cts/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/src/com/android/cts/transferowner/ |
D | TransferProfileOwnerOutgoingTest.java | 43 mDevicePolicyManager.getParentProfileInstance(mOutgoingComponentName); in testTransferWithPoliciesOutgoing() 44 mDevicePolicyManager.setCameraDisabled(mOutgoingComponentName, true); in testTransferWithPoliciesOutgoing() 45 mDevicePolicyManager.setPasswordMinimumLength(mOutgoingComponentName, passwordLength); in testTransferWithPoliciesOutgoing() 46 mDevicePolicyManager.setCrossProfileCallerIdDisabled(mOutgoingComponentName, true); in testTransferWithPoliciesOutgoing() 51 mDevicePolicyManager.transferOwnership(mOutgoingComponentName, INCOMING_COMPONENT_NAME, b); in testTransferWithPoliciesOutgoing() 57 mDevicePolicyManager.transferOwnership(mOutgoingComponentName, INCOMING_COMPONENT_NAME, b); in testTransferOwnership() 58 assertTrue(mDevicePolicyManager.isAdminActive(INCOMING_COMPONENT_NAME)); in testTransferOwnership() 59 … assertTrue(mDevicePolicyManager.isProfileOwnerApp(INCOMING_COMPONENT_NAME.getPackageName())); in testTransferOwnership() 61 mDevicePolicyManager.isProfileOwnerApp(mOutgoingComponentName.getPackageName())); in testTransferOwnership() 62 assertFalse(mDevicePolicyManager.isAdminActive(mOutgoingComponentName)); in testTransferOwnership() [all …]
|
D | TransferDeviceOwnerOutgoingTest.java | 44 mDevicePolicyManager.setCameraDisabled(mOutgoingComponentName, true); in testTransferWithPoliciesOutgoing() 45 mDevicePolicyManager.setPasswordMinimumLength(mOutgoingComponentName, passwordLength); in testTransferWithPoliciesOutgoing() 46 mDevicePolicyManager.setKeepUninstalledPackages(mOutgoingComponentName, in testTransferWithPoliciesOutgoing() 48 mDevicePolicyManager.setSystemUpdatePolicy(mOutgoingComponentName, in testTransferWithPoliciesOutgoing() 52 mDevicePolicyManager.transferOwnership(mOutgoingComponentName, INCOMING_COMPONENT_NAME, b); in testTransferWithPoliciesOutgoing() 58 mDevicePolicyManager.transferOwnership(mOutgoingComponentName, INCOMING_COMPONENT_NAME, b); in testTransferOwnership() 59 assertTrue(mDevicePolicyManager.isAdminActive(INCOMING_COMPONENT_NAME)); in testTransferOwnership() 60 assertTrue(mDevicePolicyManager.isDeviceOwnerApp(INCOMING_COMPONENT_NAME.getPackageName())); in testTransferOwnership() 62 mDevicePolicyManager.isDeviceOwnerApp(mOutgoingComponentName.getPackageName())); in testTransferOwnership() 63 assertFalse(mDevicePolicyManager.isAdminActive(mOutgoingComponentName)); in testTransferOwnership() [all …]
|
/cts/tests/admin/src/android/admin/cts/ |
D | DevicePolicyManagerTest.java | 62 private DevicePolicyManager mDevicePolicyManager; field in DevicePolicyManagerTest 91 mDevicePolicyManager = (DevicePolicyManager) in setUp() 107 List<ComponentName> activeAdmins = mDevicePolicyManager.getActiveAdmins(); in testGetActiveAdmins() 110 assertTrue(mDevicePolicyManager.isAdminActive(mComponent)); in testGetActiveAdmins() 118 int originalValue = mDevicePolicyManager.getKeyguardDisabledFeatures(mComponent); in testKeyguardDisabledFeatures() 122 mDevicePolicyManager.setKeyguardDisabledFeatures(mComponent, which); in testKeyguardDisabledFeatures() 123 assertEquals(which, mDevicePolicyManager.getKeyguardDisabledFeatures(mComponent)); in testKeyguardDisabledFeatures() 126 mDevicePolicyManager.setKeyguardDisabledFeatures(mComponent, originalValue); in testKeyguardDisabledFeatures() 136 mDevicePolicyManager.requestBugreport(mComponent); in testRequestRemoteBugreport_failIfNotDeviceOwner() 149 mDevicePolicyManager.setSecurityLoggingEnabled(mComponent, true); in testSetSecurityLoggingEnabled_failIfNotDeviceOwner() [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/tests/tests/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/ |
D | SilentPackageInstallTest.java | 42 mDevicePolicyManager.setUninstallBlocked(getWho(), TEST_APP_PKG, true); in testUninstallBlocked() 43 assertTrue(mDevicePolicyManager.isUninstallBlocked(getWho(), TEST_APP_PKG)); in testUninstallBlocked() 44 assertTrue(mDevicePolicyManager.isUninstallBlocked(null, TEST_APP_PKG)); in testUninstallBlocked() 48 mDevicePolicyManager.setUninstallBlocked(getWho(), TEST_APP_PKG, false); in testUninstallBlocked() 49 assertFalse(mDevicePolicyManager.isUninstallBlocked(getWho(), TEST_APP_PKG)); in testUninstallBlocked() 50 assertFalse(mDevicePolicyManager.isUninstallBlocked(null, TEST_APP_PKG)); in testUninstallBlocked()
|