/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() 49 assertFalse(dpm.isActivePasswordSufficient()); in testPasswordQuality_something() 56 dpm.setPasswordMinimumLength(mAdminComponent, 10); in testPasswordQuality_something() 58 assertEquals(10, dpm.getPasswordMinimumLength(mAdminComponent)); in testPasswordQuality_something() 59 assertFalse(dpm.isActivePasswordSufficient()); in testPasswordQuality_something() 65 dpm.setPasswordMinimumLength(mAdminComponent, 4); in testPasswordQuality_something() 67 assertEquals(4, dpm.getPasswordMinimumLength( in testPasswordQuality_something() 69 assertTrue(dpm.isActivePasswordSufficient()); in testPasswordQuality_something() 77 dpm.setPasswordQuality(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 dpm.setPasswordMinimumLength(mAdminComponent, 1); in assertHasPassword() 73 assertTrue("No password set", dpm.isActivePasswordSufficient()); in assertHasPassword() 75 dpm.setPasswordMinimumLength(mAdminComponent, 0); in assertHasPassword() 80 dpm.setPasswordMinimumLength(mAdminComponent, 1); in assertNoPassword() 82 assertFalse("Password is set", dpm.isActivePasswordSufficient()); in assertNoPassword() 84 dpm.setPasswordMinimumLength(mAdminComponent, 0); in assertNoPassword()
|
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 < 1000 && 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 | 55 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testAddParentCanAccessManagedFilters() local 57 dpm.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT, getIntentFilter(), in testAddParentCanAccessManagedFilters() 64 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testAddManagedCanAccessParentFilters() local 66 dpm.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT, getIntentFilter(), in testAddManagedCanAccessParentFilters() 80 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testRemoveAllFilters() local 82 dpm.clearCrossProfileIntentFilters(ADMIN_RECEIVER_COMPONENT); in testRemoveAllFilters() 86 DevicePolicyManager dpm = (DevicePolicyManager) in testDisallowCrossProfileCopyPaste() local 88 dpm.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowCrossProfileCopyPaste() 93 DevicePolicyManager dpm = (DevicePolicyManager) in testAllowCrossProfileCopyPaste() local 95 dpm.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in testAllowCrossProfileCopyPaste() [all …]
|
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 | PasswordMinimumRestrictionsTest.java | 185 private void invokeSetMethod(String methodName, DevicePolicyManager dpm, in invokeSetMethod() argument 189 setMethod.invoke(dpm, componentName, length); in invokeSetMethod() 195 private int invokeGetMethod(String methodName, DevicePolicyManager dpm, in invokeGetMethod() argument 199 return (int) getMethod.invoke(dpm, componentName); in invokeGetMethod()
|
/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 | 68 DevicePolicyManager dpm = (DevicePolicyManager) in handleIntent() local 75 dpm.addUserRestriction(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT, restrictionKey); in handleIntent() 80 dpm.clearUserRestriction( in handleIntent() 86 dpm.setAccountManagementDisabled(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT, in handleIntent() 92 dpm.setAccountManagementDisabled(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT, in handleIntent() 99 dpm.setApplicationRestrictionsManagingPackage( in handleIntent()
|
/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/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()
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | BaseDeviceOwnerTest.java | 61 static void assertDeviceOwner(DevicePolicyManager dpm) { in assertDeviceOwner() argument 62 assertNotNull(dpm); in assertDeviceOwner() 63 assertTrue(dpm.isAdminActive(getWho())); in assertDeviceOwner() 64 assertTrue(dpm.isDeviceOwnerApp(PACKAGE_NAME)); in assertDeviceOwner()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
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 | 77 …DevicePolicyManager dpm = (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SER… in setupProfile() local 78 dpm.setProfileEnabled(new ComponentName(context.getApplicationContext(), getClass())); in setupProfile() 115 dpm.addCrossProfileIntentFilter(getWho(context), filter, in setupProfile() 123 dpm.addCrossProfileIntentFilter(getWho(context), filter, in setupProfile()
|
D | DeviceOwnerRequestingBugreportTestActivity.java | 70 DevicePolicyManager dpm = (DevicePolicyManager) getSystemService( in onCreate() local 72 if (dpm.isDeviceOwnerApp(getPackageName())) { in onCreate()
|
D | DeviceOwnerPositiveTestActivity.java | 78 DevicePolicyManager dpm = (DevicePolicyManager) getSystemService( in onCreate() local 80 if (dpm.isDeviceOwnerApp(getPackageName())) { in onCreate()
|
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/ |
D | SimpleIntentReceiverActivity.java | 40 DevicePolicyManager dpm = in onCreate() local 42 boolean inManagedProfile = dpm.isProfileOwnerApp("com.android.cts.managedprofile"); in onCreate()
|