/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/DeviceOwner/src/com/android/cts/deviceowner/ |
BackupServiceEnabledTest.java | 26 assertFalse(mDevicePolicyManager.isBackupServiceEnabled(getWho())); 27 mDevicePolicyManager.setBackupServiceEnabled(getWho(), true); 28 assertTrue(mDevicePolicyManager.isBackupServiceEnabled(getWho())); 29 mDevicePolicyManager.setBackupServiceEnabled(getWho(), false); 30 assertFalse(mDevicePolicyManager.isBackupServiceEnabled(getWho()));
|
PreDeviceOwnerTest.java | 28 protected DevicePolicyManager mDevicePolicyManager; 34 mDevicePolicyManager = (DevicePolicyManager) 39 assertFalse(mDevicePolicyManager.isProvisioningAllowed(DevicePolicyManager.ACTION_PROVISION_MANAGED_DEVICE)); 43 assertTrue(mDevicePolicyManager
|
AdminActionBookkeepingTest.java | 62 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), false); 63 mDevicePolicyManager.setNetworkLoggingEnabled(getWho(), false); 64 mDevicePolicyManager.uninstallCaCert(getWho(), TEST_CA.getBytes()); 74 final long previousTimestamp = mDevicePolicyManager.getLastSecurityLogRetrievalTime(); 76 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), true); 79 mDevicePolicyManager.retrieveSecurityLogs(getWho()); 82 final long firstTimestamp = mDevicePolicyManager.getLastSecurityLogRetrievalTime(); 90 mDevicePolicyManager.retrievePreRebootSecurityLogs(getWho()) != null; 93 final long secondTimestamp = mDevicePolicyManager.getLastSecurityLogRetrievalTime(); 112 final long previousTimestamp = mDevicePolicyManager.getLastBugReportRequestTime() [all...] |
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...] |
SecurityLoggingTest.java | 34 mDevicePolicyManager.retrieveSecurityLogs(getWho()); 46 mDevicePolicyManager.retrievePreRebootSecurityLogs(getWho()); 58 List<SecurityEvent> events = mDevicePolicyManager.retrieveSecurityLogs(getWho()); 99 assertFalse(mDevicePolicyManager.isSecurityLoggingEnabled(getWho())); 100 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), true); 101 assertTrue(mDevicePolicyManager.isSecurityLoggingEnabled(getWho())); 109 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), false); 110 assertFalse(mDevicePolicyManager.isSecurityLoggingEnabled(getWho())); 118 List<SecurityEvent> logs = mDevicePolicyManager.retrieveSecurityLogs(getWho()); 121 assertNull(mDevicePolicyManager.retrieveSecurityLogs(getWho())) [all...] |
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
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...] |
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...] |
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));
|
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...] |
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...] |
ClearProfileOwnerNegativeTest.java | 26 private DevicePolicyManager mDevicePolicyManager; 30 mDevicePolicyManager = (DevicePolicyManager) 32 if (mDevicePolicyManager.isProfileOwnerApp(BaseDeviceAdminTest.PACKAGE_NAME)) { 34 mDevicePolicyManager.clearProfileOwner(BaseDeviceAdminTest.ADMIN_RECEIVER_COMPONENT);
|
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...] |
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...] |
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
OrganizationInfoTest.java | 27 int defaultColor = mDevicePolicyManager.getOrganizationColor(ADMIN_RECEIVER_COMPONENT); 33 int previousColor = mDevicePolicyManager.getOrganizationColor(ADMIN_RECEIVER_COMPONENT); 46 mDevicePolicyManager.setOrganizationColor(ADMIN_RECEIVER_COMPONENT, color); 48 mDevicePolicyManager.getOrganizationColor(ADMIN_RECEIVER_COMPONENT)); 52 mDevicePolicyManager.setOrganizationColor(ADMIN_RECEIVER_COMPONENT, previousColor); 58 mDevicePolicyManager.setOrganizationColor(null, Color.GRAY); 64 int color = mDevicePolicyManager.getOrganizationColor(null); 71 CharSequence organizationName = mDevicePolicyManager.getOrganizationName( 77 CharSequence previousOrganizationName = mDevicePolicyManager.getOrganizationName( 82 mDevicePolicyManager.setOrganizationName(ADMIN_RECEIVER_COMPONENT, name) [all...] |
PreManagedProfileTest.java | 25 protected DevicePolicyManager mDevicePolicyManager; 31 mDevicePolicyManager = (DevicePolicyManager) mContext 36 assertTrue(mDevicePolicyManager 41 assertFalse(mDevicePolicyManager
|
WipeDataTest.java | 34 assertTrue(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)); 35 assertTrue(mDevicePolicyManager.isProfileOwnerApp(ADMIN_RECEIVER_COMPONENT.getPackageName())); 39 mDevicePolicyManager.wipeData(0);
|
CameraPolicyTest.java | 38 private DevicePolicyManager mDevicePolicyManager; 56 mDevicePolicyManager = (DevicePolicyManager) getContext() 73 mDevicePolicyManager.setCameraDisabled(mManagedProfileAdminComponent, true); 74 assertTrue(mDevicePolicyManager.getCameraDisabled(mManagedProfileAdminComponent)); 75 assertTrue(mDevicePolicyManager.getCameraDisabled(null)); 80 mDevicePolicyManager.setCameraDisabled(mManagedProfileAdminComponent, false); 81 assertFalse(mDevicePolicyManager.getCameraDisabled(mManagedProfileAdminComponent)); 82 assertFalse(mDevicePolicyManager.getCameraDisabled(null)); 87 mDevicePolicyManager.setCameraDisabled(mPrimaryAdminComponent, true); 88 assertTrue(mDevicePolicyManager.getCameraDisabled(mPrimaryAdminComponent)) [all...] |
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);
|
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;
|
/cts/tests/tests/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/ |
SilentPackageInstallTest.java | 42 mDevicePolicyManager.setUninstallBlocked(getWho(), TEST_APP_PKG, true); 43 assertTrue(mDevicePolicyManager.isUninstallBlocked(getWho(), TEST_APP_PKG)); 44 assertTrue(mDevicePolicyManager.isUninstallBlocked(null, TEST_APP_PKG)); 48 mDevicePolicyManager.setUninstallBlocked(getWho(), TEST_APP_PKG, false); 49 assertFalse(mDevicePolicyManager.isUninstallBlocked(getWho(), TEST_APP_PKG)); 50 assertFalse(mDevicePolicyManager.isUninstallBlocked(null, TEST_APP_PKG));
|
/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));
|
/cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/ |
WifiTest.java | 21 mDevicePolicyManager.getWifiMacAddress(getWho());
|
/packages/apps/Settings/src/com/android/settings/applications/ |
AppWithAdminGrantedPermissionsLister.java | 30 private final DevicePolicyManagerWrapper mDevicePolicyManager; 38 mDevicePolicyManager = devicePolicyManager; 44 mDevicePolicyManager, mPm, mPackageManagerService, info);
|