/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | OrganizationInfoTest.java | 27 int defaultColor = mDevicePolicyManager.getOrganizationColor(ADMIN_RECEIVER_COMPONENT); in testDefaultOrganizationColor() 33 int previousColor = mDevicePolicyManager.getOrganizationColor(ADMIN_RECEIVER_COMPONENT); in testSetOrganizationColor() 46 mDevicePolicyManager.setOrganizationColor(ADMIN_RECEIVER_COMPONENT, color); in testSetOrganizationColor() 48 mDevicePolicyManager.getOrganizationColor(ADMIN_RECEIVER_COMPONENT)); in testSetOrganizationColor() 52 mDevicePolicyManager.setOrganizationColor(ADMIN_RECEIVER_COMPONENT, previousColor); in testSetOrganizationColor() 58 mDevicePolicyManager.setOrganizationColor(null, Color.GRAY); in testSetOrGetOrganizationColorWithNullAdminFails() 64 int color = mDevicePolicyManager.getOrganizationColor(null); in testSetOrGetOrganizationColorWithNullAdminFails() 71 CharSequence organizationName = mDevicePolicyManager.getOrganizationName( in testDefaultOrganizationNameIsNull() 77 CharSequence previousOrganizationName = mDevicePolicyManager.getOrganizationName( in testSetOrganizationName() 82 mDevicePolicyManager.setOrganizationName(ADMIN_RECEIVER_COMPONENT, name); in testSetOrganizationName() [all …]
|
D | CameraPolicyTest.java | 38 private DevicePolicyManager mDevicePolicyManager; field in CameraPolicyTest 56 mDevicePolicyManager = (DevicePolicyManager) getContext() in setUp() 73 mDevicePolicyManager.setCameraDisabled(mManagedProfileAdminComponent, true); in testDisableCameraInManagedProfile() 74 assertTrue(mDevicePolicyManager.getCameraDisabled(mManagedProfileAdminComponent)); in testDisableCameraInManagedProfile() 75 assertTrue(mDevicePolicyManager.getCameraDisabled(null)); in testDisableCameraInManagedProfile() 80 mDevicePolicyManager.setCameraDisabled(mManagedProfileAdminComponent, false); in testEnableCameraInManagedProfile() 81 assertFalse(mDevicePolicyManager.getCameraDisabled(mManagedProfileAdminComponent)); in testEnableCameraInManagedProfile() 82 assertFalse(mDevicePolicyManager.getCameraDisabled(null)); in testEnableCameraInManagedProfile() 87 mDevicePolicyManager.setCameraDisabled(mPrimaryAdminComponent, true); in testDisableCameraInPrimaryProfile() 88 assertTrue(mDevicePolicyManager.getCameraDisabled(mPrimaryAdminComponent)); in testDisableCameraInPrimaryProfile() [all …]
|
D | BaseManagedProfileTest.java | 39 protected DevicePolicyManager mDevicePolicyManager; field in BaseManagedProfileTest 48 mDevicePolicyManager = (DevicePolicyManager) in setUp() 51 mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in setUp() 52 assertNotNull(mDevicePolicyManager); in setUp() 58 assertTrue(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)); in setUp() 59 assertTrue(mDevicePolicyManager.isProfileOwnerApp( in setUp() 64 return isParent ? mParentDevicePolicyManager : mDevicePolicyManager; in getDevicePolicyManager()
|
D | PasswordMinimumRestrictionsTest.java | 52 mParentDpm = mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT); in setUp() 54 mDevicePolicyManager.getPasswordQuality(ADMIN_RECEIVER_COMPONENT); in setUp() 56 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, PASSWORD_QUALITY_COMPLEX); in setUp() 60 .add(invokeGetMethod(method, mDevicePolicyManager, ADMIN_RECEIVER_COMPONENT)); in setUp() 69 invokeSetMethod(METHOD_LIST[i], mDevicePolicyManager, ADMIN_RECEIVER_COMPONENT, in tearDown() 74 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, in tearDown() 82 invokeSetMethod(METHOD_LIST[i], mDevicePolicyManager, ADMIN_RECEIVER_COMPONENT, in testPasswordMinimumRestriction() 92 TEST_PASSWORD_LENGTH + i, invokeGetMethod(METHOD_LIST[i], mDevicePolicyManager, in testPasswordMinimumRestriction() 108 invokeSetMethod(method, mDevicePolicyManager, null, TEST_PASSWORD_LENGTH); in testSetPasswordMinimumRestrictionWithNull() 136 invokeSetMethod(METHOD_LIST[i], mDevicePolicyManager, ADMIN_RECEIVER_COMPONENT, in testGetPasswordMinimumRestrictionWithNullAdmin() [all …]
|
D | ManagedProfileTest.java | 38 private DevicePolicyManager mDevicePolicyManager; field in ManagedProfileTest 52 mDevicePolicyManager = (DevicePolicyManager) in setUp() 58 mDevicePolicyManager.clearCrossProfileIntentFilters(ADMIN_RECEIVER_COMPONENT); in tearDown() 65 mDevicePolicyManager.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT, in testClearCrossProfileIntentFilters() 70 mDevicePolicyManager.clearCrossProfileIntentFilters(ADMIN_RECEIVER_COMPONENT); in testClearCrossProfileIntentFilters() 84 mDevicePolicyManager.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT, in testAddCrossProfileIntentFilter_primary() 99 mDevicePolicyManager.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT, in testAddCrossProfileIntentFilter_all() 114 mDevicePolicyManager.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT, in testAddCrossProfileIntentFilter_managed()
|
D | PreManagedProfileTest.java | 25 protected DevicePolicyManager mDevicePolicyManager; field in PreManagedProfileTest 31 mDevicePolicyManager = (DevicePolicyManager) mContext in setUp() 36 assertTrue(mDevicePolicyManager in testIsProvisioningAllowedTrue() 41 assertFalse(mDevicePolicyManager in testIsProvisioningAllowedFalse()
|
/cts/tests/admin/src/android/admin/cts/ |
D | DevicePolicyManagerTest.java | 47 private DevicePolicyManager mDevicePolicyManager; field in DevicePolicyManagerTest 75 mDevicePolicyManager = (DevicePolicyManager) in setUp() 89 List<ComponentName> activeAdmins = mDevicePolicyManager.getActiveAdmins(); in testGetActiveAdmins() 92 assertTrue(mDevicePolicyManager.isAdminActive(mComponent)); in testGetActiveAdmins() 100 int originalValue = mDevicePolicyManager.getKeyguardDisabledFeatures(mComponent); in testKeyguardDisabledFeatures() 104 mDevicePolicyManager.setKeyguardDisabledFeatures(mComponent, which); in testKeyguardDisabledFeatures() 105 assertEquals(which, mDevicePolicyManager.getKeyguardDisabledFeatures(mComponent)); in testKeyguardDisabledFeatures() 108 mDevicePolicyManager.setKeyguardDisabledFeatures(mComponent, originalValue); in testKeyguardDisabledFeatures() 118 mDevicePolicyManager.requestBugreport(mComponent); in testRequestRemoteBugreport_failIfNotDeviceOwner() 131 mDevicePolicyManager.setSecurityLoggingEnabled(mComponent, true); in testSetSecurityLoggingEnabled_failIfNotDeviceOwner() [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | SecurityLoggingTest.java | 33 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), true); in testSetSecurityLoggingEnabledNotPossibleIfMoreThanOneUserPresent() 45 mDevicePolicyManager.retrieveSecurityLogs(getWho()); in testRetrievingSecurityLogsNotPossibleIfMoreThanOneUserPresent() 57 mDevicePolicyManager.retrievePreRebootSecurityLogs(getWho()); in testRetrievingPreviousSecurityLogsNotPossibleIfMoreThanOneUserPresent() 68 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), true); in testEnablingAndDisablingSecurityLogging() 69 assertTrue(mDevicePolicyManager.isSecurityLoggingEnabled(getWho())); in testEnablingAndDisablingSecurityLogging() 70 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), false); in testEnablingAndDisablingSecurityLogging() 71 assertFalse(mDevicePolicyManager.isSecurityLoggingEnabled(getWho())); in testEnablingAndDisablingSecurityLogging() 79 List<SecurityEvent> logs = mDevicePolicyManager.retrieveSecurityLogs(getWho()); in testRetrievingSecurityLogsNotPossibleImmediatelyAfterPreviousSuccessfulRetrieval() 82 assertNull(mDevicePolicyManager.retrieveSecurityLogs(getWho())); in testRetrievingSecurityLogsNotPossibleImmediatelyAfterPreviousSuccessfulRetrieval() 83 assertNull(mDevicePolicyManager.retrieveSecurityLogs(getWho())); in testRetrievingSecurityLogsNotPossibleImmediatelyAfterPreviousSuccessfulRetrieval()
|
D | KeyManagementTest.java | 57 private DevicePolicyManager mDevicePolicyManager; field in KeyManagementTest 68 mDevicePolicyManager = (DevicePolicyManager) in setUp() 70 BaseDeviceOwnerTest.assertDeviceOwner(mDevicePolicyManager); in setUp() 73 assertTrue(mDevicePolicyManager.resetPassword("test", 0)); in setUp() 79 mDevicePolicyManager.setPasswordQuality(getWho(), in tearDown() 81 mDevicePolicyManager.setPasswordMinimumLength(getWho(), 0); in tearDown() 82 assertTrue(mDevicePolicyManager.resetPassword("", 0)); in tearDown() 92 assertTrue(mDevicePolicyManager.installKeyPair(getWho(), privKey, cert, alias)); in testCanInstallAndRemoveValidRsaKeypair() 103 assertTrue(mDevicePolicyManager.removeKeyPair(getWho(), alias)); in testCanInstallAndRemoveValidRsaKeypair() 116 assertTrue(mDevicePolicyManager.installKeyPair(getWho(), privKey, new Certificate[] {cert}, in testCanInstallWithAutomaticAccess() [all …]
|
D | CaCertManagementTest.java | 45 List<byte[]> caCerts = mDevicePolicyManager.getInstalledCaCerts(getWho()); in testCanRetrieveListOfInstalledCaCerts() 57 assertTrue(mDevicePolicyManager.installCaCert(getWho(), FAKE_RSA_1.caCertificate)); in testCanInstallAndUninstallACaCert() 61 mDevicePolicyManager.uninstallCaCert(getWho(), FAKE_RSA_1.caCertificate); in testCanInstallAndUninstallACaCert() 71 assertTrue(mDevicePolicyManager.installCaCert(getWho(), FAKE_RSA_1.caCertificate)); in testUninstallationIsSelective() 72 assertTrue(mDevicePolicyManager.installCaCert(getWho(), FAKE_DSA_1.caCertificate)); in testUninstallationIsSelective() 74 mDevicePolicyManager.uninstallCaCert(getWho(), FAKE_DSA_1.caCertificate); in testUninstallationIsSelective() 78 mDevicePolicyManager.uninstallCaCert(getWho(), FAKE_RSA_1.caCertificate); in testUninstallationIsSelective() 87 assertTrue(mDevicePolicyManager.installCaCert(getWho(), FAKE_RSA_1.caCertificate)); in testCanUninstallAllUserCaCerts() 88 assertTrue(mDevicePolicyManager.installCaCert(getWho(), FAKE_DSA_1.caCertificate)); in testCanUninstallAllUserCaCerts() 90 mDevicePolicyManager.uninstallAllUserCaCerts(getWho()); in testCanUninstallAllUserCaCerts() [all …]
|
D | LockScreenInfoTest.java | 25 mDevicePolicyManager.setDeviceOwnerLockScreenInfo(getWho(), null); in tearDown() 41 mDevicePolicyManager.setDeviceOwnerLockScreenInfo(getWho(), message); in testEmptyStringClearsLockInfo() 42 assertNull(mDevicePolicyManager.getDeviceOwnerLockScreenInfo()); in testEmptyStringClearsLockInfo() 69 mDevicePolicyManager.setDeviceOwnerLockScreenInfo(null, message); in testSetLockInfoWithNullAdminFails() 81 mDevicePolicyManager.setDeviceOwnerLockScreenInfo(getWho(), message); in setLockInfo() 82 assertEquals(message, mDevicePolicyManager.getDeviceOwnerLockScreenInfo()); in setLockInfo()
|
D | LockTaskTest.java | 123 mDevicePolicyManager.setLockTaskPackages(getWho(), new String[0]); in setUp() 137 mDevicePolicyManager.setLockTaskPackages(getWho(), new String[0]); in tearDown() 144 mDevicePolicyManager.setLockTaskPackages(getWho(), new String[] { TEST_PACKAGE }); in testSetLockTaskPackages() 145 assertTrue(mDevicePolicyManager.isLockTaskPermitted(TEST_PACKAGE)); in testSetLockTaskPackages() 147 mDevicePolicyManager.setLockTaskPackages(getWho(), new String[0]); in testSetLockTaskPackages() 148 assertFalse(mDevicePolicyManager.isLockTaskPermitted(TEST_PACKAGE)); in testSetLockTaskPackages() 153 mDevicePolicyManager.setLockTaskPackages(getWho(), new String[] { PACKAGE_NAME }); in testStartLockTask() 168 mDevicePolicyManager.setLockTaskPackages(getWho(), new String[] { PACKAGE_NAME }); in testCannotFinish() 181 mDevicePolicyManager.setLockTaskPackages(getWho(), new String[] { PACKAGE_NAME }); in testUpdateWhitelisting() 184 mDevicePolicyManager.setLockTaskPackages(getWho(), new String[0]); in testUpdateWhitelisting() [all …]
|
D | CreateAndManageUserTest.java | 65 mDevicePolicyManager.clearUserRestriction(getWho(), UserManager.DISALLOW_ADD_USER); in tearDown() 66 mDevicePolicyManager.clearUserRestriction(getWho(), UserManager.DISALLOW_REMOVE_USER); in tearDown() 69 mDevicePolicyManager.removeUser(getWho(), mUserHandle); in tearDown() 208 mDevicePolicyManager.createAndManageUser( in testCreateAndManageEphemeralUser() 230 mDevicePolicyManager.createAndManageUser( in testCreateAndManageEphemeralUserFails() 258 mDevicePolicyManager.addUserRestriction(getWho(), UserManager.DISALLOW_ADD_USER); in testCreateAndManageUser_AddRestrictionSet() 260 mUserHandle = mDevicePolicyManager.createAndManageUser(getWho(), "Test User", getWho(), in testCreateAndManageUser_AddRestrictionSet() 266 mDevicePolicyManager.addUserRestriction(getWho(), UserManager.DISALLOW_REMOVE_USER); in testCreateAndManageUser_RemoveRestrictionSet() 268 mUserHandle = mDevicePolicyManager.createAndManageUser(getWho(), "Test User", getWho(), in testCreateAndManageUser_RemoveRestrictionSet() 272 boolean removed = mDevicePolicyManager.removeUser(getWho(), mUserHandle); in testCreateAndManageUser_RemoveRestrictionSet()
|
D | PreDeviceOwnerTest.java | 28 protected DevicePolicyManager mDevicePolicyManager; field in PreDeviceOwnerTest 34 mDevicePolicyManager = (DevicePolicyManager) in setUp() 39 …assertFalse(mDevicePolicyManager.isProvisioningAllowed(DevicePolicyManager.ACTION_PROVISION_MANAGE… in testIsProvisioningAllowedFalse() 43 assertFalse(mDevicePolicyManager in testIsProvisioningAllowedFalseForManagedProfileAction()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | DpcAllowedAccountManagementTest.java | 59 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in setUp() 66 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in tearDown() 74 assertEquals(0, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_setterAndGetter() 76 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_1, in testAccountManagementDisabled_setterAndGetter() 79 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_2, in testAccountManagementDisabled_setterAndGetter() 81 assertEquals(1, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_setterAndGetter() 83 mDevicePolicyManager.getAccountTypesWithManagementDisabled()[0]); in testAccountManagementDisabled_setterAndGetter() 85 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_1, in testAccountManagementDisabled_setterAndGetter() 87 assertEquals(0, mDevicePolicyManager.getAccountTypesWithManagementDisabled().length); in testAccountManagementDisabled_setterAndGetter() 92 mDevicePolicyManager.setAccountManagementDisabled(ADMIN_RECEIVER_COMPONENT, ACCOUNT_TYPE_1, in testAccountManagementDisabled_profileAndDeviceOwnerCanAddAccount() [all …]
|
D | ApplicationRestrictionsTest.java | 98 mDevicePolicyManager.setApplicationRestrictions( in tearDown() 100 mDevicePolicyManager.setApplicationRestrictions( in tearDown() 102 mDevicePolicyManager.setApplicationRestrictions( in tearDown() 110 mDevicePolicyManager.setApplicationRestrictions( in testNullComponentThrowsException() 118 mDevicePolicyManager.getApplicationRestrictions(null, APP_RESTRICTIONS_TARGET_PKG); in testNullComponentThrowsException() 128 mDevicePolicyManager.setApplicationRestrictions( in testSetApplicationRestrictions() 130 mDevicePolicyManager.setApplicationRestrictions( in testSetApplicationRestrictions() 134 assertBundle0(mDevicePolicyManager.getApplicationRestrictions( in testSetApplicationRestrictions() 136 assertBundle1(mDevicePolicyManager.getApplicationRestrictions( in testSetApplicationRestrictions() 143 mDevicePolicyManager.setApplicationRestrictions( in testSetApplicationRestrictions() [all …]
|
D | TrustAgentInfoTest.java | 41 mDevicePolicyManager.setTrustAgentConfiguration(ADMIN_RECEIVER_COMPONENT, in tearDown() 43 assertNull(mDevicePolicyManager.getTrustAgentConfiguration( in tearDown() 45 mDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, in tearDown() 52 mDevicePolicyManager.setTrustAgentConfiguration(ADMIN_RECEIVER_COMPONENT, in testSetAndGetTrustAgentConfiguration() 56 mDevicePolicyManager.getTrustAgentConfiguration( in testSetAndGetTrustAgentConfiguration() 60 configs = mDevicePolicyManager in testSetAndGetTrustAgentConfiguration() 64 configs = mDevicePolicyManager in testSetAndGetTrustAgentConfiguration() 68 mDevicePolicyManager.setKeyguardDisabledFeatures(ADMIN_RECEIVER_COMPONENT, in testSetAndGetTrustAgentConfiguration() 71 configs = mDevicePolicyManager in testSetAndGetTrustAgentConfiguration() 74 configs = mDevicePolicyManager in testSetAndGetTrustAgentConfiguration()
|
D | AudioRestrictionTest.java | 33 return mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT); 49 mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT); in testDisallowAdjustVolume_muted() 53 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, false); in testDisallowAdjustVolume_muted() 58 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowAdjustVolume_muted() 63 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, false); in testDisallowAdjustVolume_muted() 65 assertTrue(mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT)); in testDisallowAdjustVolume_muted() 67 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowAdjustVolume_muted() 69 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, initVolumeMuted); in testDisallowAdjustVolume_muted() 79 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowAdjustVolume() 88 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, in testDisallowAdjustVolume() [all …]
|
D | SupportMessageTest.java | 87 mDevicePolicyManager.setShortSupportMessage(ADMIN_RECEIVER_COMPONENT, in testMaximumLengthPrefixIsSaved() 93 mDevicePolicyManager.setLongSupportMessage(ADMIN_RECEIVER_COMPONENT, LongMessage.LONG); in testMaximumLengthPrefixIsSaved() 115 mDevicePolicyManager.setShortSupportMessage(null, ShortMessage.SIMPLE); in testSetOrGetSupportMessageWithNullAdminFails() 120 CharSequence message = mDevicePolicyManager.getShortSupportMessage(null); in testSetOrGetSupportMessageWithNullAdminFails() 127 mDevicePolicyManager.setLongSupportMessage(null, LongMessage.SIMPLE); in testSetOrGetSupportMessageWithNullAdminFails() 133 CharSequence message = mDevicePolicyManager.getLongSupportMessage(null); in testSetOrGetSupportMessageWithNullAdminFails() 153 mDevicePolicyManager.setShortSupportMessage(ADMIN_RECEIVER_COMPONENT, message); in setShortMessage() 163 mDevicePolicyManager.setLongSupportMessage(ADMIN_RECEIVER_COMPONENT, message); in setLongMessage() 168 return mDevicePolicyManager.getShortSupportMessage(ADMIN_RECEIVER_COMPONENT); in getShortMessage() 172 return mDevicePolicyManager.getLongSupportMessage(ADMIN_RECEIVER_COMPONENT); in getLongMessage()
|
D | BaseDeviceAdminTest.java | 42 protected DevicePolicyManager mDevicePolicyManager; field in BaseDeviceAdminTest 51 mDevicePolicyManager = mContext.getSystemService(DevicePolicyManager.class); in setUp() 52 assertNotNull(mDevicePolicyManager); in setUp() 57 assertTrue(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)); in setUp() 59 mDevicePolicyManager.isProfileOwnerApp(PACKAGE_NAME) || in setUp() 60 mDevicePolicyManager.isDeviceOwnerApp(PACKAGE_NAME)); in setUp()
|
D | ApplicationHiddenTest.java | 58 mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, PACKAGE_TO_HIDE, false); in tearDown() 63 assertTrue(mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden() 65 assertTrue(mDevicePolicyManager.isApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden() 68 assertTrue(mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden() 70 assertFalse(mDevicePolicyManager.isApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testSetApplicationHidden() 76 assertFalse(mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testCannotHideActiveAdmin() 81 assertFalse(mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, in testCannotHideNonExistingPackage()
|
/cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/ |
D | ClearProfileOwnerTest.java | 26 private DevicePolicyManager mDevicePolicyManager; field in ClearProfileOwnerTest 30 mDevicePolicyManager = (DevicePolicyManager) in tearDown() 32 if (mDevicePolicyManager != null) { in tearDown() 33 if (mDevicePolicyManager.isProfileOwnerApp(BaseProfileOwnerTest.PACKAGE_NAME)) { in tearDown() 34 mDevicePolicyManager.clearProfileOwner(BaseProfileOwnerTest.getWho()); in tearDown() 36 assertFalse(mDevicePolicyManager.isProfileOwnerApp(BaseProfileOwnerTest.PACKAGE_NAME)); in tearDown() 50 for (int i = 0; i < 1000 && mDevicePolicyManager.isAdminActive(cn); i++) { in waitForActiveAdminRemoved() 53 assertFalse(mDevicePolicyManager.isAdminActive(cn)); in waitForActiveAdminRemoved()
|
/cts/hostsidetests/devicepolicy/app/PackageInstaller/src/com/android/cts/packageinstaller/ |
D | ClearDeviceOwnerTest.java | 39 private DevicePolicyManager mDevicePolicyManager; field in ClearDeviceOwnerTest 45 mDevicePolicyManager = (DevicePolicyManager) in setUp() 47 assertNotNull(mDevicePolicyManager); in setUp() 49 assertTrue(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT)); in setUp() 50 assertTrue("App is not device owner", mDevicePolicyManager.isDeviceOwnerApp(PACKAGE_NAME)); in setUp() 55 mDevicePolicyManager.clearDeviceOwnerApp(PACKAGE_NAME); in tearDown() 56 assertFalse(mDevicePolicyManager.isDeviceOwnerApp(PACKAGE_NAME)); in tearDown() 68 for (int i = 0; i < 1000 && mDevicePolicyManager.isAdminActive(cn); i++) { in waitForActiveAdminRemoved() 71 assertFalse(mDevicePolicyManager.isAdminActive(cn)); in waitForActiveAdminRemoved()
|
D | SilentPackageInstallTest.java | 36 mDevicePolicyManager.setUninstallBlocked(getWho(), TEST_APP_PKG, true); in testUninstallBlocked() 37 assertTrue(mDevicePolicyManager.isUninstallBlocked(getWho(), TEST_APP_PKG)); in testUninstallBlocked() 38 assertTrue(mDevicePolicyManager.isUninstallBlocked(null, TEST_APP_PKG)); in testUninstallBlocked() 42 mDevicePolicyManager.setUninstallBlocked(getWho(), TEST_APP_PKG, false); in testUninstallBlocked() 43 assertFalse(mDevicePolicyManager.isUninstallBlocked(getWho(), TEST_APP_PKG)); in testUninstallBlocked() 44 assertFalse(mDevicePolicyManager.isUninstallBlocked(null, TEST_APP_PKG)); in testUninstallBlocked()
|
/cts/hostsidetests/devicepolicy/app/AppRestrictionsManagingApp/src/com/android/cts/apprestrictions/managingapp/ |
D | ApplicationRestrictionsManagerTest.java | 66 private DevicePolicyManager mDevicePolicyManager; field in ApplicationRestrictionsManagerTest 76 mDevicePolicyManager = (DevicePolicyManager) in setUp() 91 assertFalse(mDevicePolicyManager.isCallerApplicationRestrictionsManagingPackage()); in testCannotManageAppRestrictions() 93 mDevicePolicyManager.setApplicationRestrictions( in testCannotManageAppRestrictions() 101 mDevicePolicyManager.getApplicationRestrictions(null, APP_RESTRICTIONS_TARGET_PKG); in testCannotManageAppRestrictions() 113 assertTrue(mDevicePolicyManager.isCallerApplicationRestrictionsManagingPackage()); in testCanManageAppRestrictions() 115 mDevicePolicyManager.setApplicationRestrictions( in testCanManageAppRestrictions() 117 assertBundle0(mDevicePolicyManager.getApplicationRestrictions( in testCanManageAppRestrictions() 124 mDevicePolicyManager.setApplicationRestrictions( in testCanManageAppRestrictions() 126 assertBundle1(mDevicePolicyManager.getApplicationRestrictions( in testCanManageAppRestrictions() [all …]
|