/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/ |
DeviceWideLoggingFeaturesTest.java | 33 private DevicePolicyManager mDevicePolicyManager; 39 mDevicePolicyManager = (DevicePolicyManager) 50 mDevicePolicyManager.retrieveSecurityLogs(mAdminComponent); 56 mDevicePolicyManager.retrievePreRebootSecurityLogs(mAdminComponent); 62 mDevicePolicyManager.retrieveNetworkLogs(mAdminComponent, NETWORK_LOGGING_BATCH_TOKEN); 69 mDevicePolicyManager.retrieveSecurityLogs(mAdminComponent); 70 mDevicePolicyManager.retrievePreRebootSecurityLogs(mAdminComponent); 71 mDevicePolicyManager.retrieveNetworkLogs(mAdminComponent, NETWORK_LOGGING_BATCH_TOKEN); 76 mDevicePolicyManager.requestBugreport(mAdminComponent); 83 mDevicePolicyManager.requestBugreport(mAdminComponent) [all...] |
ManagementTest.java | 28 private DevicePolicyManager mDevicePolicyManager; 33 mDevicePolicyManager = (DevicePolicyManager) 38 assertNotNull(mDevicePolicyManager); 39 assertTrue(mDevicePolicyManager.isAdminActive( 41 assertTrue(mDevicePolicyManager.isProfileOwnerApp(getContext().getPackageName())); 42 assertTrue(mDevicePolicyManager.isManagedProfile( 47 assertNotNull(mDevicePolicyManager); 48 assertTrue(mDevicePolicyManager.isAdminActive( 50 assertTrue(mDevicePolicyManager.isDeviceOwnerApp(getContext().getPackageName())); 51 assertFalse(mDevicePolicyManager.isManagedProfile [all...] |
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
PolicyTransparencyTest.java | 33 mDevicePolicyManager.setCameraDisabled(ADMIN_RECEIVER_COMPONENT, true); 35 Intent intent = mDevicePolicyManager.createAdminSupportIntent( 43 mDevicePolicyManager.setCameraDisabled(ADMIN_RECEIVER_COMPONENT, false); 44 intent = mDevicePolicyManager.createAdminSupportIntent( 50 mDevicePolicyManager.setScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT, true); 52 Intent intent = mDevicePolicyManager.createAdminSupportIntent( 60 mDevicePolicyManager.setScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT, false); 61 intent = mDevicePolicyManager.createAdminSupportIntent( 74 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, restriction); 76 Intent intent = mDevicePolicyManager.createAdminSupportIntent(restriction) [all...] |
ResetPasswordWithTokenTest.java | 55 assertFalse(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, 64 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, 68 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, 70 mDevicePolicyManager.setPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT, 6); 74 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, 83 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, 85 mDevicePolicyManager.setPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT, 6); 87 assertFalse(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, 90 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, 98 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT [all...] |
AlwaysOnVpnUnsupportedTest.java | 36 mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); 40 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, null, false); 42 mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); 47 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, true); 49 VPN_PACKAGE, mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); 55 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, true); 60 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT));
|
AlwaysOnVpnTest.java | 50 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); 56 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, null, false); 57 mDevicePolicyManager.setApplicationRestrictions(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, 63 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); 70 mDevicePolicyManager.addUserRestriction( 76 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, 84 mDevicePolicyManager.setApplicationRestrictions(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, 93 mDevicePolicyManager.setApplicationRestrictions(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, 103 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, mPackageName, 109 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)) [all...] |
DpcAllowedAccountManagementTest.java | 59 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, 66 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, 74 assertEquals(0, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); 76 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_1, 79 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_2, 81 assertEquals(1, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); 83 mDevicePolicyManager.getAccountTypesWithManagementDisabled()[0]); 85 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_1, 87 assertEquals(0, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); 92 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_1 [all...] |
TrustAgentInfoTest.java | 41 mDevicePolicyManager.setTrustAgentConfiguration(ADMIN_RECEIVER_COMPONENT, 43 assertNull(mDevicePolicyManager.getTrustAgentConfiguration( 45 mDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, 52 mDevicePolicyManager.setTrustAgentConfiguration(ADMIN_RECEIVER_COMPONENT, 56 mDevicePolicyManager.getTrustAgentConfiguration( 60 configs = mDevicePolicyManager 64 configs = mDevicePolicyManager 68 mDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, 71 configs = mDevicePolicyManager 74 configs = mDevicePolicyManager [all...] |
AudioRestrictionTest.java | 35 return mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT); 56 mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT); 60 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, false); 65 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, 70 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, false); 72 assertTrue(mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT)); 74 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, 76 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, initVolumeMuted); 90 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, 99 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT [all...] |
RequiredStrongAuthTimeoutTest.java | 35 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(null), 39 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(ADMIN), 0); 42 mDevicePolicyManager.setRequiredStrongAuthTimeout(ADMIN, 44 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(ADMIN), 46 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(null), 50 mDevicePolicyManager.setRequiredStrongAuthTimeout(ADMIN, 0); 51 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(ADMIN), 0); 52 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(null), 56 mDevicePolicyManager.setRequiredStrongAuthTimeout(ADMIN, 58 assertEquals(mDevicePolicyManager.getRequiredStrongAuthTimeout(ADMIN) [all...] |
AlwaysOnVpnMultiStageTest.java | 47 assertEquals(VPN_PACKAGE, mDevicePolicyManager.getAlwaysOnVpnPackage( 63 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); 68 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); 72 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE, 79 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); 83 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, null, false);
|
CaCertManagementTest.java | 47 List<byte[]> caCerts = mDevicePolicyManager.getInstalledCaCerts(mAdmin); 59 assertTrue(mDevicePolicyManager.installCaCert(mAdmin, FAKE_RSA_1.caCertificate)); 63 mDevicePolicyManager.uninstallCaCert(mAdmin, FAKE_RSA_1.caCertificate); 73 assertTrue(mDevicePolicyManager.installCaCert(mAdmin, FAKE_RSA_1.caCertificate)); 74 assertTrue(mDevicePolicyManager.installCaCert(mAdmin, FAKE_DSA_1.caCertificate)); 76 mDevicePolicyManager.uninstallCaCert(mAdmin, FAKE_DSA_1.caCertificate); 80 mDevicePolicyManager.uninstallCaCert(mAdmin, FAKE_RSA_1.caCertificate); 89 assertTrue(mDevicePolicyManager.installCaCert(mAdmin, FAKE_RSA_1.caCertificate)); 90 assertTrue(mDevicePolicyManager.installCaCert(mAdmin, FAKE_DSA_1.caCertificate)); 92 mDevicePolicyManager.uninstallAllUserCaCerts(mAdmin) [all...] |
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
BaseManagedProfileTest.java | 39 protected DevicePolicyManager mDevicePolicyManager; 48 mDevicePolicyManager = (DevicePolicyManager) 51 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); 52 assertNotNull(mDevicePolicyManager); 54 assertTrue(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)); 55 assertTrue(mDevicePolicyManager.isProfileOwnerApp( 57 assertTrue(mDevicePolicyManager.isManagedProfile(ADMIN_RECEIVER_COMPONENT)); 61 return isParent ? mParentDevicePolicyManager : mDevicePolicyManager;
|
ResetPasswordWithTokenTest.java | 51 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, PASSWORD0, 54 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, 56 mDevicePolicyManager.setPasswordMinimumLength(ADMIN_RECEIVER_COMPONENT, 6); 64 assertTrue(mDevicePolicyManager.isResetPasswordTokenActive(ADMIN_RECEIVER_COMPONENT)); 65 assertTrue(mDevicePolicyManager.resetPasswordWithToken(ADMIN_RECEIVER_COMPONENT, PASSWORD1, 68 mDevicePolicyManager.isActivePasswordSufficient(); 74 assertTrue(mDevicePolicyManager.setResetPasswordToken(ADMIN_RECEIVER_COMPONENT, token)); 75 assertTrue(mDevicePolicyManager.isResetPasswordTokenActive(ADMIN_RECEIVER_COMPONENT)); 79 mDevicePolicyManager.lockNow(DevicePolicyManager.FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY);
|
WipeDataTest.java | 34 assertTrue(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)); 35 assertTrue(mDevicePolicyManager.isProfileOwnerApp(ADMIN_RECEIVER_COMPONENT.getPackageName())); 39 mDevicePolicyManager.wipeData(0);
|
/cts/tests/admin/src/android/admin/cts/ |
DevicePolicyManagerTest.java | 47 private DevicePolicyManager mDevicePolicyManager; 75 mDevicePolicyManager = (DevicePolicyManager) 89 List<ComponentName> activeAdmins = mDevicePolicyManager.getActiveAdmins(); 92 assertTrue(mDevicePolicyManager.isAdminActive(mComponent)); 100 int originalValue = mDevicePolicyManager.getKeyguardDisabledFeatures(mComponent); 104 mDevicePolicyManager.setKeyguardDisabledFeatures(mComponent, which); 105 assertEquals(which, mDevicePolicyManager.getKeyguardDisabledFeatures(mComponent)); 108 mDevicePolicyManager.setKeyguardDisabledFeatures(mComponent, originalValue); 118 mDevicePolicyManager.requestBugreport(mComponent); 131 mDevicePolicyManager.setSecurityLoggingEnabled(mComponent, true) [all...] |
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/userrestrictions/ |
ProfileGlobalRestrictionsTest.java | 29 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, ENSURE_VERIFY_APPS); 33 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, ENSURE_VERIFY_APPS);
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
PreDeviceOwnerTest.java | 28 protected DevicePolicyManager mDevicePolicyManager; 34 mDevicePolicyManager = (DevicePolicyManager) 39 assertFalse(mDevicePolicyManager.isProvisioningAllowed(DevicePolicyManager.ACTION_PROVISION_MANAGED_DEVICE)); 43 assertTrue(mDevicePolicyManager
|
AffiliationTest.java | 41 private DevicePolicyManager mDevicePolicyManager; 47 mDevicePolicyManager = (DevicePolicyManager) 55 mDevicePolicyManager.setAffiliationIds(mAdminComponent, null); 65 mDevicePolicyManager.setAffiliationIds(mAdminComponent, Collections.singleton(null)); 91 mDevicePolicyManager.setLockTaskPackages(mAdminComponent, packages); 92 assertArrayEquals(packages, mDevicePolicyManager.getLockTaskPackages(mAdminComponent)); 93 assertTrue(mDevicePolicyManager.isLockTaskPermitted("package1")); 94 assertFalse(mDevicePolicyManager.isLockTaskPermitted("package3")); 97 mDevicePolicyManager.getAffiliationIds(mAdminComponent); 102 assertFalse(mDevicePolicyManager.isLockTaskPermitted("package1")) [all...] |
/frameworks/base/cmds/dpm/src/com/android/commands/dpm/ |
Dpm.java | 49 private IDevicePolicyManager mDevicePolicyManager; 83 mDevicePolicyManager = IDevicePolicyManager.Stub.asInterface( 85 if (mDevicePolicyManager == null) { 138 mDevicePolicyManager.setActiveAdmin(mComponent, true /*refreshing*/, mUserId); 145 mDevicePolicyManager.setActiveAdmin(mComponent, true /*refreshing*/, mUserId); 148 if (!mDevicePolicyManager.setDeviceOwner(mComponent, mName, mUserId)) { 154 mDevicePolicyManager.removeActiveAdmin(mComponent, UserHandle.USER_SYSTEM); 158 mDevicePolicyManager.setUserProvisioningState( 167 mDevicePolicyManager.forceRemoveActiveAdmin(mComponent, mUserId); 173 mDevicePolicyManager.setActiveAdmin(mComponent, true /*refreshing*/, mUserId) [all...] |
/cts/hostsidetests/devicepolicy/app/PackageInstaller/src/com/android/cts/packageinstaller/ |
ClearDeviceOwnerTest.java | 39 private DevicePolicyManager mDevicePolicyManager; 45 mDevicePolicyManager = (DevicePolicyManager) 47 assertNotNull(mDevicePolicyManager); 49 assertTrue(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)); 50 assertTrue("App is not device owner", mDevicePolicyManager.isDeviceOwnerApp(PACKAGE_NAME)); 55 mDevicePolicyManager.clearDeviceOwnerApp(PACKAGE_NAME); 56 assertFalse(mDevicePolicyManager.isDeviceOwnerApp(PACKAGE_NAME)); 68 for (int i = 0; i < 1000 && mDevicePolicyManager.isAdminActive(cn); i++) { 71 assertFalse(mDevicePolicyManager.isAdminActive(cn));
|
/packages/apps/Settings/src/com/android/settings/applications/ |
AppWithAdminGrantedPermissionsLister.java | 30 private final DevicePolicyManagerWrapper mDevicePolicyManager; 38 mDevicePolicyManager = devicePolicyManager; 44 mDevicePolicyManager, mPm, mPackageManagerService, info);
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/finalization/ |
UserProvisioningStateHelper.java | 47 private final DevicePolicyManager mDevicePolicyManager; 62 mDevicePolicyManager = (DevicePolicyManager) mContext.getSystemService( 148 final int currentState = mDevicePolicyManager.getUserProvisioningState(); 154 mDevicePolicyManager.setUserProvisioningState(state, userId);
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
VpnTestActivity.java | 56 private DevicePolicyManager mDevicePolicyManager; 67 mDevicePolicyManager = (DevicePolicyManager) getSystemService( 69 mDevicePolicyManager.addUserRestriction(mAdminReceiverComponent, 77 mDevicePolicyManager.clearUserRestriction(mAdminReceiverComponent,
|
RecentsRedactionActivity.java | 43 private DevicePolicyManager mDevicePolicyManager; 61 mDevicePolicyManager.lockNow(); 65 mDevicePolicyManager = (DevicePolicyManager) 98 mDevicePolicyManager.setPasswordQuality(mAdmin, 100 return mDevicePolicyManager.isActivePasswordSufficient(); 102 mDevicePolicyManager.setPasswordQuality(mAdmin,
|