/cts/hostsidetests/devicepolicy/app/DeviceAdmin/src/com.android.cts.deviceadmin/ |
D | DeviceOwnerPasswordTest.java | 45 dpm.setPasswordQuality(mAdminComponent, in testPasswordQuality_something() 48 dpm.getPasswordQuality(mAdminComponent)); in testPasswordQuality_something() 56 dpm.setPasswordMinimumLength(mAdminComponent, 10); in testPasswordQuality_something() 58 assertEquals(10, dpm.getPasswordMinimumLength(mAdminComponent)); in testPasswordQuality_something() 66 dpm.setPasswordMinimumLength(mAdminComponent, 4); in testPasswordQuality_something() 68 assertEquals(4, dpm.getPasswordMinimumLength( in testPasswordQuality_something() 78 dpm.setPasswordQuality(mAdminComponent, in testPasswordQuality_numeric() 81 dpm.getPasswordQuality(mAdminComponent)); in testPasswordQuality_numeric() 89 dpm.setPasswordMinimumLength(mAdminComponent, 10); in testPasswordQuality_numeric() 91 assertEquals(10, dpm.getPasswordMinimumLength(mAdminComponent)); in testPasswordQuality_numeric() [all …]
|
D | DeviceAdminTest.java | 42 dpm.setMaximumFailedPasswordsForWipe(mAdminComponent, 3); in testGetMaximumFailedPasswordsForWipe() 43 assertEquals(3, dpm.getMaximumFailedPasswordsForWipe(mAdminComponent)); in testGetMaximumFailedPasswordsForWipe() 45 dpm.setMaximumFailedPasswordsForWipe(mAdminComponent, 5); in testGetMaximumFailedPasswordsForWipe() 46 assertEquals(5, dpm.getMaximumFailedPasswordsForWipe(mAdminComponent)); in testGetMaximumFailedPasswordsForWipe() 52 dpm.setPasswordQuality(mAdminComponent, in testPasswordHistoryLength() 54 int originalValue = dpm.getPasswordHistoryLength(mAdminComponent); in testPasswordHistoryLength() 56 dpm.setPasswordHistoryLength(mAdminComponent, 3); in testPasswordHistoryLength() 57 assertEquals(3, dpm.getPasswordHistoryLength(mAdminComponent)); in testPasswordHistoryLength() 62 dpm.setPasswordHistoryLength(mAdminComponent, originalValue); in testPasswordHistoryLength() 67 long originalValue = dpm.getPasswordExpirationTimeout(mAdminComponent); in testPasswordExpirationTimeout() [all …]
|
D | BaseDeviceAdminTest.java | 32 public DevicePolicyManager dpm; field in BaseDeviceAdminTest 38 dpm = mContext.getSystemService(DevicePolicyManager.class); in setUp() 55 return dpm.isDeviceOwnerApp(mAdminComponent.getPackageName()); in isDeviceOwner() 67 for (int i = 0; i < 1000 && dpm.isAdminActive(mAdminComponent); i++) { in assertNotActiveAdmin() 70 assertFalse("Still active admin", dpm.isAdminActive(mAdminComponent)); in assertNotActiveAdmin() 78 dpm.setPasswordMinimumLength(mAdminComponent, 0); in resetComplexPasswordRestrictions() 79 dpm.setPasswordMinimumUpperCase(mAdminComponent, 0); in resetComplexPasswordRestrictions() 80 dpm.setPasswordMinimumLowerCase(mAdminComponent, 0); in resetComplexPasswordRestrictions() 81 dpm.setPasswordMinimumLetters(mAdminComponent, 0); in resetComplexPasswordRestrictions() 82 dpm.setPasswordMinimumNumeric(mAdminComponent, 0); in resetComplexPasswordRestrictions() [all …]
|
D | DeviceAdminPasswordTest.java | 39 assertTrue(dpm.resetPassword("1234", /* flags= */ 0)); in checkSetPassword_nycRestrictions_success() 44 assertFalse(dpm.resetPassword("1234", /* flags= */ 0)); in checkSetPassword_nycRestrictions_failure() 58 assertFalse(dpm.resetPassword("", /* flags= */ 0)); in checkClearPassword_nycRestrictions_failure() 71 final int currentQuality = dpm.getPasswordQuality(mAdminComponent); in waitUntilPasswordState() 72 dpm.setPasswordQuality(mAdminComponent, DevicePolicyManager.PASSWORD_QUALITY_SOMETHING); in waitUntilPasswordState() 75 boolean result = dpm.isActivePasswordSufficient(); in waitUntilPasswordState() 79 result = dpm.isActivePasswordSufficient(); in waitUntilPasswordState() 82 dpm.setPasswordQuality(mAdminComponent, currentQuality); in waitUntilPasswordState()
|
D | ClearDeviceAdminWithNoProtectionTest.java | 32 final DevicePolicyManager dpm = getContext().getSystemService(DevicePolicyManager.class); in testRemoveActiveAdmin() local 34 if (dpm.isAdminActive(cn)) { in testRemoveActiveAdmin() 35 dpm.removeActiveAdmin(cn); in testRemoveActiveAdmin() 36 for (int i = 0; i < 6000 && dpm.isAdminActive(cn); i++) { in testRemoveActiveAdmin() 40 assertFalse("Still active admin", dpm.isAdminActive(cn)); in testRemoveActiveAdmin()
|
D | ClearDeviceAdminTest.java | 27 if (dpm.isAdminActive(mAdminComponent)) { in testRemoveActiveAdmin() 28 dpm.removeActiveAdmin(mAdminComponent); in testRemoveActiveAdmin()
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | CrossProfileUtils.java | 59 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testAddParentCanAccessManagedFilters() local 61 dpm.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT, getIntentFilter(), in testAddParentCanAccessManagedFilters() 68 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testAddManagedCanAccessParentFilters() local 70 dpm.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT, getIntentFilter(), in testAddManagedCanAccessParentFilters() 86 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testRemoveAllFilters() local 88 dpm.clearCrossProfileIntentFilters(ADMIN_RECEIVER_COMPONENT); in testRemoveAllFilters() 92 DevicePolicyManager dpm = (DevicePolicyManager) in testDisallowCrossProfileCopyPaste() local 94 dpm.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowCrossProfileCopyPaste() 99 DevicePolicyManager dpm = (DevicePolicyManager) in testAllowCrossProfileCopyPaste() local 101 dpm.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in testAllowCrossProfileCopyPaste() [all …]
|
D | WipeDataReceiver.java | 39 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in onReceive() local 41 dpm.wipeData(0); in onReceive() 43 dpm.wipeData(0, TEST_WIPE_DATA_REASON); in onReceive()
|
D | SetPolicyActivity.java | 66 DevicePolicyManager dpm = (DevicePolicyManager) in handleIntent() local 73 dpm.addUserRestriction(BaseManagedProfileTest.ADMIN_RECEIVER_COMPONENT, restrictionKey); in handleIntent() 78 dpm.clearUserRestriction( in handleIntent() 84 dpm.addCrossProfileWidgetProvider(BaseManagedProfileTest.ADMIN_RECEIVER_COMPONENT, in handleIntent() 90 dpm.removeCrossProfileWidgetProvider(BaseManagedProfileTest.ADMIN_RECEIVER_COMPONENT, in handleIntent()
|
D | LockProfileReceiver.java | 37 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in onReceive() local 38 dpm.lockNow(DevicePolicyManager.FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY); in onReceive()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | Utils.java | 29 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in removeActiveAdmin() local 30 if (dpm.isAdminActive(cn)) { in removeActiveAdmin() 31 dpm.removeActiveAdmin(cn); in removeActiveAdmin() 37 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in assertNotActiveAdmin() local 39 for (int i = 0; i < 1000 && dpm.isAdminActive(cn); i++) { in assertNotActiveAdmin() 42 Assert.assertFalse(dpm.isAdminActive(cn)); in assertNotActiveAdmin()
|
D | SetPolicyActivity.java | 73 DevicePolicyManager dpm = (DevicePolicyManager) in handleIntent() local 80 dpm.addUserRestriction(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT, restrictionKey); in handleIntent() 85 dpm.clearUserRestriction( in handleIntent() 91 dpm.setAccountManagementDisabled(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT, in handleIntent() 97 dpm.setAccountManagementDisabled(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT, in handleIntent() 104 dpm.setApplicationRestrictionsManagingPackage( in handleIntent() 114 dpm.setDelegatedScopes(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT, in handleIntent()
|
/cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/ |
D | BaseProfileOwnerTest.java | 42 static void assertProfileOwner(DevicePolicyManager dpm) { in assertProfileOwner() argument 43 assertNotNull(dpm); in assertProfileOwner() 44 assertTrue(dpm.isAdminActive(getWho())); in assertProfileOwner() 45 assertTrue(dpm.isProfileOwnerApp(PACKAGE_NAME)); in assertProfileOwner()
|
D | ManagementTest.java | 26 DevicePolicyManager dpm = (DevicePolicyManager) in testProvisionManagedProfileNotAllowed() local 28 assertFalse(dpm.isProvisioningAllowed( in testProvisionManagedProfileNotAllowed()
|
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/ |
D | CertInstallerReceiver.java | 74 DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService( in onReceive() local 83 if (dpm.hasCaCertInstalled(null, certBuffer)) { in onReceive() 86 if (!dpm.installCaCert(null, certBuffer)) { in onReceive() 89 if (!dpm.hasCaCertInstalled(null, certBuffer)) { in onReceive() 100 if (!dpm.hasCaCertInstalled(null, certBuffer)) { in onReceive() 103 dpm.uninstallCaCert(null, certBuffer); in onReceive() 104 sendResult(context, !dpm.hasCaCertInstalled(null, certBuffer), null); in onReceive() 112 sendResult(context, containsCertificate(dpm.getInstalledCaCerts(null), certBuffer), in onReceive() 138 sendResult(context, dpm.installKeyPair(null, privatekey, certificate, alias), in onReceive()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
D | CompHelperActivity.java | 79 final DevicePolicyManager dpm = (DevicePolicyManager) getSystemService( in onCreate() local 85 dpm.setAlwaysOnVpnPackage(admin, getPackageName(), false /* lockdownEnabled */); in onCreate() 90 dpm.installCaCert(admin, TEST_CA.getBytes()); in onCreate() 92 dpm.setMaximumFailedPasswordsForWipe(admin, 100); in onCreate()
|
D | CompDeviceAdminTestReceiver.java | 40 final DevicePolicyManager dpm = in onProfileProvisioningComplete() local 42 dpm.setProfileEnabled(new ComponentName(context.getApplicationContext(), getClass())); in onProfileProvisioningComplete() 50 dpm.addCrossProfileIntentFilter(getWho(context), filter, in onProfileProvisioningComplete()
|
D | CrossProfileTestActivity.java | 72 … DevicePolicyManager dpm = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE); in isProfileOwner() local 73 … return dpm.isAdminActive(adminReceiver) && dpm.isProfileOwnerApp(adminReceiver.getPackageName()); in isProfileOwner()
|
D | DeviceAdminTestReceiver.java | 112 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in onEnabled() local 114 dpm.setAffiliationIds(admin, in onEnabled() 128 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in onEnabled() local 130 dpm.setAffiliationIds(admin, in onEnabled() 132 dpm.logoutUser(admin); in onEnabled() 137 …DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SER… in setupProfile() local 138 dpm.setProfileEnabled(new ComponentName(context.getApplicationContext(), getClass())); in setupProfile() 180 dpm.addCrossProfileIntentFilter(getWho(context), filter, in setupProfile() 189 dpm.addCrossProfileIntentFilter(getWho(context), filter, in setupProfile()
|
/cts/apps/EmptyDeviceOwner/src/com/android/cts/emptydeviceowner/ |
D | DeviceOwnerChangedReceiver.java | 33 DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); in onReceive() local 34 if (!dpm.isDeviceOwnerApp(context.getPackageName())) { in onReceive() 38 dpm.transferOwnership( in onReceive()
|
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/provisioning/ |
D | AffiliationTest.java | 42 DevicePolicyManager dpm = (DevicePolicyManager) in setAffiliationId() local 45 dpm.setAffiliationIds(admin, ids); in setAffiliationId() 46 assertEquals(ids, dpm.getAffiliationIds(admin)); in setAffiliationId()
|
D | UserRestrictionTest.java | 53 DevicePolicyManager dpm = getContext().getSystemService(DevicePolicyManager.class); in setUserRestriction() local 56 dpm.addUserRestriction(admin, restriction); in setUserRestriction() 58 dpm.clearUserRestriction(admin, restriction); in setUserRestriction()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/admin/tapjacking/ |
D | EmptyDeviceAdminReceiver.java | 29 DevicePolicyManager dpm = in onEnabled() local 31 dpm.removeActiveAdmin(new ComponentName(context, this.getClass())); in onEnabled()
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | SetPolicyActivity.java | 62 DevicePolicyManager dpm = (DevicePolicyManager) in handleIntent() local 69 dpm.addUserRestriction(admin, restrictionKey); in handleIntent() 74 dpm.clearUserRestriction(admin, restrictionKey); in handleIntent()
|
/cts/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/src/com/android/cts/transferowner/ |
D | DeviceAndProfileOwnerTransferOutgoingTest.java | 185 DevicePolicyManager dpm = mContext.getSystemService(DevicePolicyManager.class); in setUserRestriction() local 187 dpm.addUserRestriction(mOutgoingComponentName, restriction); in setUserRestriction() 189 dpm.clearUserRestriction(mOutgoingComponentName, restriction); in setUserRestriction() 195 DevicePolicyManager dpm = (DevicePolicyManager) in setAffiliationId() local 198 dpm.setAffiliationIds(admin, ids); in setAffiliationId() 199 assertEquals(ids, dpm.getAffiliationIds(admin)); in setAffiliationId()
|