/cts/hostsidetests/devicepolicy/app/DeviceAdmin/src/com.android.cts.deviceadmin/ |
BaseDeviceAdminTest.java | 32 public DevicePolicyManager dpm; field in class:BaseDeviceAdminTest 38 dpm = mContext.getSystemService(DevicePolicyManager.class); 55 return dpm.isDeviceOwnerApp(mAdminComponent.getPackageName()); 67 for (int i = 0; i < 1000 && dpm.isAdminActive(mAdminComponent); i++) { 70 assertFalse("Still active admin", dpm.isAdminActive(mAdminComponent)); 78 dpm.setPasswordMinimumLength(mAdminComponent, 0); 79 dpm.setPasswordMinimumUpperCase(mAdminComponent, 0); 80 dpm.setPasswordMinimumLowerCase(mAdminComponent, 0); 81 dpm.setPasswordMinimumLetters(mAdminComponent, 0); 82 dpm.setPasswordMinimumNumeric(mAdminComponent, 0) [all...] |
DeviceOwnerPasswordTest.java | 45 dpm.setPasswordQuality(mAdminComponent, 48 dpm.getPasswordQuality(mAdminComponent)); 56 dpm.setPasswordMinimumLength(mAdminComponent, 10); 58 assertEquals(10, dpm.getPasswordMinimumLength(mAdminComponent)); 66 dpm.setPasswordMinimumLength(mAdminComponent, 4); 68 assertEquals(4, dpm.getPasswordMinimumLength( 78 dpm.setPasswordQuality(mAdminComponent, 81 dpm.getPasswordQuality(mAdminComponent)); 89 dpm.setPasswordMinimumLength(mAdminComponent, 10); 91 assertEquals(10, dpm.getPasswordMinimumLength(mAdminComponent)) [all...] |
ClearDeviceAdminWithNoProtectionTest.java | 32 final DevicePolicyManager dpm = getContext().getSystemService(DevicePolicyManager.class); local 34 if (dpm.isAdminActive(cn)) { 35 dpm.removeActiveAdmin(cn); 36 for (int i = 0; i < 6000 && dpm.isAdminActive(cn); i++) { 40 assertFalse("Still active admin", dpm.isAdminActive(cn));
|
DeviceAdminTest.java | 42 dpm.setMaximumFailedPasswordsForWipe(mAdminComponent, 3); 43 assertEquals(3, dpm.getMaximumFailedPasswordsForWipe(mAdminComponent)); 45 dpm.setMaximumFailedPasswordsForWipe(mAdminComponent, 5); 46 assertEquals(5, dpm.getMaximumFailedPasswordsForWipe(mAdminComponent)); 52 dpm.setPasswordQuality(mAdminComponent, 54 int originalValue = dpm.getPasswordHistoryLength(mAdminComponent); 56 dpm.setPasswordHistoryLength(mAdminComponent, 3); 57 assertEquals(3, dpm.getPasswordHistoryLength(mAdminComponent)); 62 dpm.setPasswordHistoryLength(mAdminComponent, originalValue); 67 long originalValue = dpm.getPasswordExpirationTimeout(mAdminComponent) [all...] |
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
Utils.java | 29 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); local 30 if (dpm.isAdminActive(cn)) { 31 dpm.removeActiveAdmin(cn); 37 final DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class); local 39 for (int i = 0; i < 1000 && dpm.isAdminActive(cn); i++) { 42 Assert.assertFalse(dpm.isAdminActive(cn));
|
SetPolicyActivity.java | 73 DevicePolicyManager dpm = (DevicePolicyManager) local 80 dpm.addUserRestriction(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT, restrictionKey); 85 dpm.clearUserRestriction( 91 dpm.setAccountManagementDisabled(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT, 97 dpm.setAccountManagementDisabled(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT, 104 dpm.setApplicationRestrictionsManagingPackage( 114 dpm.setDelegatedScopes(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT,
|
/cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/ |
ManagementTest.java | 26 DevicePolicyManager dpm = (DevicePolicyManager) local 28 assertFalse(dpm.isProvisioningAllowed(
|
BaseProfileOwnerTest.java | 42 static void assertProfileOwner(DevicePolicyManager dpm) { 43 assertNotNull(dpm); 44 assertTrue(dpm.isAdminActive(getWho())); 45 assertTrue(dpm.isProfileOwnerApp(PACKAGE_NAME));
|
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/provisioning/ |
UserRestrictionTest.java | 53 DevicePolicyManager dpm = getContext().getSystemService(DevicePolicyManager.class); local 56 dpm.addUserRestriction(admin, restriction); 58 dpm.clearUserRestriction(admin, restriction);
|
AffiliationTest.java | 42 DevicePolicyManager dpm = (DevicePolicyManager) local 45 dpm.setAffiliationIds(admin, ids); 46 assertEquals(ids, dpm.getAffiliationIds(admin));
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
CompHelperActivity.java | 79 final DevicePolicyManager dpm = (DevicePolicyManager) getSystemService( local 85 dpm.setAlwaysOnVpnPackage(admin, getPackageName(), false /* lockdownEnabled */); 90 dpm.installCaCert(admin, TEST_CA.getBytes()); 92 dpm.setMaximumFailedPasswordsForWipe(admin, 100);
|
CompDeviceAdminTestReceiver.java | 40 final DevicePolicyManager dpm = local 42 dpm.setProfileEnabled(new ComponentName(context.getApplicationContext(), getClass())); 50 dpm.addCrossProfileIntentFilter(getWho(context), filter,
|
CrossProfileTestActivity.java | 72 DevicePolicyManager dpm = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE); local 73 return dpm.isAdminActive(adminReceiver) && dpm.isProfileOwnerApp(adminReceiver.getPackageName());
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/admin/tapjacking/ |
EmptyDeviceAdminReceiver.java | 29 DevicePolicyManager dpm = local 31 dpm.removeActiveAdmin(new ComponentName(context, this.getClass()));
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
CrossProfileUtils.java | 59 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( local 61 dpm.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT, getIntentFilter(), 68 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( local 70 dpm.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT, getIntentFilter(), 86 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( local 88 dpm.clearCrossProfileIntentFilters(ADMIN_RECEIVER_COMPONENT); 92 DevicePolicyManager dpm = (DevicePolicyManager) local 94 dpm.addUserRestriction(ADMIN_RECEIVER_COMPONENT, 99 DevicePolicyManager dpm = (DevicePolicyManager) local 101 dpm.clearUserRestriction(ADMIN_RECEIVER_COMPONENT 108 DevicePolicyManager dpm = (DevicePolicyManager) local [all...] |
SetPolicyActivity.java | 66 DevicePolicyManager dpm = (DevicePolicyManager) local 73 dpm.addUserRestriction(BaseManagedProfileTest.ADMIN_RECEIVER_COMPONENT, restrictionKey); 78 dpm.clearUserRestriction( 84 dpm.addCrossProfileWidgetProvider(BaseManagedProfileTest.ADMIN_RECEIVER_COMPONENT, 90 dpm.removeCrossProfileWidgetProvider(BaseManagedProfileTest.ADMIN_RECEIVER_COMPONENT,
|
/packages/apps/Email/provider_src/com/android/email/ |
SecurityPolicy.java | 211 * Get the dpm. This mainly allows us to make some utility calls without it, for testing. 222 * clear the aggregate policy (so it can be recomputed) and set the policies in the DPM 329 DevicePolicyManager dpm = getDPM(); local 333 if (dpm.getPasswordMinimumLength(mAdminName) < policy.mPasswordMinLength) { 338 if (dpm.getPasswordQuality(mAdminName) < policy.getDPManagerPasswordQuality()) { 341 if (!dpm.isActivePasswordSufficient()) { 346 // Note, we use seconds, dpm uses milliseconds 347 if (dpm.getMaximumTimeToLock(mAdminName) > policy.mMaxScreenLockTime * 1000) { 353 long currentTimeout = dpm.getPasswordExpirationTimeout(mAdminName); 359 long expirationDate = dpm.getPasswordExpiration(mAdminName) 406 DevicePolicyManager dpm = getDPM(); local 680 DevicePolicyManager dpm = getDPM(); local 697 DevicePolicyManager dpm = getDPM(); local [all...] |
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/ |
DevicePolicyManagerTest.java | 130 public DevicePolicyManager dpm; field in class:DevicePolicyManagerTest 204 dpm = new DevicePolicyManagerTestable(mContext, dpms); 249 runAsCaller(mServiceContext, dpms, dpm -> { 251 dpm.setActiveAdmin(admin, /*replace=*/ false); 253 assertTrue(dpm.setProfileOwner(admin, "owner-name", DpmMockContext.CALLER_USER_HANDLE)); 255 assertEquals(admin, dpm.getProfileOwnerAsUser(DpmMockContext.CALLER_USER_HANDLE)); 280 () -> dpm.setActiveAdmin(admin1, false)); 286 () -> dpm.setActiveAdmin(admin1, false, DpmMockContext.CALLER_USER_HANDLE + 1)); 303 dpm.setActiveAdmin(admin1, /* replace =*/ false); 327 assertTrue(dpm.isAdminActive(admin1)) [all...] |
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/e2eui/ |
DpcPostProvisioningActivity.java | 27 DevicePolicyManager dpm = local 30 boolean testResult = E2eUiTestUtils.verifyProfile(this, getIntent(), dpm);
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
BaseDeviceOwnerTest.java | 102 static void assertDeviceOwner(DevicePolicyManager dpm) { 103 assertNotNull(dpm); 104 assertTrue(dpm.isAdminActive(getWho())); 105 assertTrue(dpm.isDeviceOwnerApp(PACKAGE_NAME)); 106 assertFalse(dpm.isManagedProfile(getWho()));
|
SetPolicyActivity.java | 62 DevicePolicyManager dpm = (DevicePolicyManager) local 69 dpm.addUserRestriction(admin, restrictionKey); 74 dpm.clearUserRestriction(admin, restrictionKey);
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/ |
ManagedProfileSettingsTask.java | 71 DevicePolicyManager dpm = (DevicePolicyManager) mContext.getSystemService( local 73 dpm.setOrganizationColorForUser(mProvisioningParams.mainColor, userId);
|
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/ |
SimpleIntentReceiverActivity.java | 40 DevicePolicyManager dpm = local 42 boolean inManagedProfile = dpm.isProfileOwnerApp("com.android.cts.managedprofile");
|
/packages/apps/Bluetooth/src/com/android/bluetooth/util/ |
DevicePolicyUtils.java | 31 final DevicePolicyManager dpm = (DevicePolicyManager) context local 43 return dpm.getBluetoothContactSharingDisabled(new UserHandle(ui.id));
|
/packages/apps/Settings/src/com/android/settings/network/ |
ProxyPreferenceController.java | 47 final DevicePolicyManager dpm = (DevicePolicyManager) local 49 pref.setEnabled(dpm.getGlobalProxyAdmin() == null);
|