/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | UserSessionTest.java | 26 mDevicePolicyManager.setLogoutEnabled(getWho(), true); in testSetLogoutEnabled() 31 mDevicePolicyManager.setLogoutEnabled(getWho(), false); in testSetLogoutDisabled() 36 mDevicePolicyManager.setStartUserSessionMessage(getWho(), START_SESSION_MESSAGE); in testSetStartUserSessionMessage() 38 mDevicePolicyManager.getStartUserSessionMessage(getWho())); in testSetStartUserSessionMessage() 42 mDevicePolicyManager.setEndUserSessionMessage(getWho(), END_SESSION_MESSAGE); in testSetEndUserSessionMessage() 43 assertEquals(END_SESSION_MESSAGE, mDevicePolicyManager.getEndUserSessionMessage(getWho())); in testSetEndUserSessionMessage() 47 mDevicePolicyManager.setStartUserSessionMessage(getWho(), START_SESSION_MESSAGE); in testClearStartUserSessionMessage() 48 mDevicePolicyManager.setStartUserSessionMessage(getWho(), null); in testClearStartUserSessionMessage() 49 assertNull(mDevicePolicyManager.getStartUserSessionMessage(getWho())); in testClearStartUserSessionMessage() 54 mDevicePolicyManager.setEndUserSessionMessage(getWho(), END_SESSION_MESSAGE); in testClearEndUserSessionMessage() [all …]
|
D | CreateAndManageUserTest.java | 69 mDevicePolicyManager.clearUserRestriction(getWho(), UserManager.DISALLOW_ADD_USER); in tearDown() 70 mDevicePolicyManager.clearUserRestriction(getWho(), UserManager.DISALLOW_REMOVE_USER); in tearDown() 78 getWho(), in testCreateAndManageUser() 80 getWho(), in testCreateAndManageUser() 91 getWho(), in testCreateAndManageUser_LowStorage() 93 getWho(), in testCreateAndManageUser_LowStorage() 107 getWho(), in testCreateAndManageUser_MaxUsers() 109 getWho(), in testCreateAndManageUser_MaxUsers() 135 getWho(), in testCreateAndManageUser_GetSecondaryUsers() 137 getWho(), in testCreateAndManageUser_GetSecondaryUsers() [all …]
|
D | OverrideApnTest.java | 85 List <ApnSetting> apnList = mDevicePolicyManager.getOverrideApns(getWho()); in tearDown() 87 boolean deleted = mDevicePolicyManager.removeOverrideApn(getWho(), apn.getId()); in tearDown() 90 mDevicePolicyManager.setOverrideApnsEnabled(getWho(), false); in tearDown() 94 int insertedId = mDevicePolicyManager.addOverrideApn(getWho(), testApnFull); in testAddGetRemoveOverrideApn() 96 List <ApnSetting> apnList = mDevicePolicyManager.getOverrideApns(getWho()); in testAddGetRemoveOverrideApn() 120 assertTrue(mDevicePolicyManager.removeOverrideApn(getWho(), insertedId)); in testAddGetRemoveOverrideApn() 121 apnList = mDevicePolicyManager.getOverrideApns(getWho()); in testAddGetRemoveOverrideApn() 126 assertFalse(mDevicePolicyManager.removeOverrideApn(getWho(), -1)); in testRemoveOverrideApnFailsForIncorrectId() 130 mDevicePolicyManager.addOverrideApn(getWho(), testApnFull); in testInsertConflictingApn() 131 int insertConflictingId = mDevicePolicyManager.addOverrideApn(getWho(), testApnFull); in testInsertConflictingApn() [all …]
|
D | PrivateDnsPolicyTest.java | 47 mDevicePolicyManager.setGlobalPrivateDnsModeOpportunistic(getWho()); in tearDown() 65 dpm.addUserRestriction(getWho(), restriction); in setUserRestriction() 67 dpm.clearUserRestriction(getWho(), restriction); in setUserRestriction() 76 int resultCode = mDevicePolicyManager.setGlobalPrivateDnsModeOpportunistic(getWho()); in callSetGlobalPrivateDnsOpportunisticModeExpectingResult() 93 getWho(), privateDnsHost); in callSetGlobalPrivateDnsHostModeExpectingResult() 108 mDevicePolicyManager.getGlobalPrivateDnsMode(getWho())).isEqualTo( in testSetOpportunisticMode() 110 assertThat(mDevicePolicyManager.getGlobalPrivateDnsHost(getWho())).isNull(); in testSetOpportunisticMode() 119 mDevicePolicyManager.getGlobalPrivateDnsMode(getWho())).isEqualTo( in testSetSpecificHostMode() 122 mDevicePolicyManager.getGlobalPrivateDnsHost(getWho())).isEqualTo( in testSetSpecificHostMode() 129 () -> mDevicePolicyManager.setGlobalPrivateDnsModeSpecifiedHost(getWho(), null)); in testSetModeWithIncorrectHost() [all …]
|
D | AdminActionBookkeepingTest.java | 61 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), false); in tearDown() 62 mDevicePolicyManager.setNetworkLoggingEnabled(getWho(), false); in tearDown() 63 mDevicePolicyManager.uninstallCaCert(getWho(), TEST_CA.getBytes()); in tearDown() 75 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), true); in testRetrieveSecurityLogs() 78 mDevicePolicyManager.retrieveSecurityLogs(getWho()); in testRetrieveSecurityLogs() 89 mDevicePolicyManager.retrievePreRebootSecurityLogs(getWho()) != null; in testRetrieveSecurityLogs() 118 mDevicePolicyManager.requestBugreport(getWho()); in testRequestBugreport() 162 mDevicePolicyManager.setNetworkLoggingEnabled(getWho(), true); in testGetLastNetworkLogRetrievalTime() 165 mDevicePolicyManager.retrieveNetworkLogs(getWho(), 0 /* batchToken */); in testGetLastNetworkLogRetrievalTime() 179 mDevicePolicyManager.setOrganizationName(getWho(), null); in testDeviceOwnerOrganizationName() [all …]
|
D | SetTimeTest.java | 69 assertTrue("failed to set time", mDevicePolicyManager.setTime(getWho(), testTime)); in testSetTimeWithValue() 80 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME, "0"); in testSetTime() 86 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME, "1"); in testSetTimeFailWithAutoTimeOn() 87 assertFalse(mDevicePolicyManager.setTime(getWho(), TEST_TIME_1)); in testSetTimeFailWithAutoTimeOn() 104 mDevicePolicyManager.setTimeZone(getWho(), testTimeZone)); in testSetTimeZoneWithValue() 122 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME_ZONE, "0"); in testSetTimeZone() 134 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME_ZONE, "1"); in testSetTimeZone() 139 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME_ZONE, "1"); in testSetTimeZoneFailWithAutoTimezoneOn() 140 assertFalse(mDevicePolicyManager.setTimeZone(getWho(), TEST_TIME_ZONE_1)); in testSetTimeZoneFailWithAutoTimezoneOn() 149 mDevicePolicyManager.setGlobalSetting(getWho(), Settings.Global.AUTO_TIME, "0"); in restoreTime() [all …]
|
D | SecurityLoggingTest.java | 208 mDevicePolicyManager.retrieveSecurityLogs(getWho()); in testRetrievingSecurityLogsThrowsSecurityException() 220 mDevicePolicyManager.retrievePreRebootSecurityLogs(getWho()); in testRetrievingPreviousSecurityLogsThrowsSecurityException() 301 events = mDevicePolicyManager.retrieveSecurityLogs(getWho()); in getEvents() 472 assertFalse(mDevicePolicyManager.isSecurityLoggingEnabled(getWho())); in testEnablingSecurityLogging() 473 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), true); in testEnablingSecurityLogging() 474 assertTrue(mDevicePolicyManager.isSecurityLoggingEnabled(getWho())); in testEnablingSecurityLogging() 482 mDevicePolicyManager.setSecurityLoggingEnabled(getWho(), false); in testDisablingSecurityLogging() 483 assertFalse(mDevicePolicyManager.isSecurityLoggingEnabled(getWho())); in testDisablingSecurityLogging() 486 assertNull(mDevicePolicyManager.retrieveSecurityLogs(getWho())); in testDisablingSecurityLogging() 494 final List<SecurityEvent> logs = mDevicePolicyManager.retrieveSecurityLogs(getWho()); in testSecurityLoggingRetrievalRateLimited() [all …]
|
D | BackupServicePoliciesTest.java | 26 assertFalse(mDevicePolicyManager.isBackupServiceEnabled(getWho())); in testEnablingAndDisablingBackupService() 27 mDevicePolicyManager.setBackupServiceEnabled(getWho(), true); in testEnablingAndDisablingBackupService() 28 assertTrue(mDevicePolicyManager.isBackupServiceEnabled(getWho())); in testEnablingAndDisablingBackupService() 29 mDevicePolicyManager.setBackupServiceEnabled(getWho(), false); in testEnablingAndDisablingBackupService() 30 assertFalse(mDevicePolicyManager.isBackupServiceEnabled(getWho())); in testEnablingAndDisablingBackupService()
|
D | DevicePolicyLoggingTest.java | 26 mDevicePolicyManager.setKeyguardDisabled(getWho(), true); in testSetKeyguardDisabledLogged() 27 mDevicePolicyManager.setKeyguardDisabled(getWho(), false); in testSetKeyguardDisabledLogged() 31 mDevicePolicyManager.setStatusBarDisabled(getWho(), true); in testSetStatusBarDisabledLogged() 32 mDevicePolicyManager.setStatusBarDisabled(getWho(), false); in testSetStatusBarDisabledLogged()
|
D | BluetoothRestrictionTest.java | 52 mDevicePolicyManager.clearUserRestriction(getWho(), UserManager.DISALLOW_BLUETOOTH); in tearDown() 65 mDevicePolicyManager.addUserRestriction(getWho(), UserManager.DISALLOW_BLUETOOTH); in testEnableBluetoothFailsWhenDisallowed() 80 mDevicePolicyManager.addUserRestriction(getWho(), UserManager.DISALLOW_BLUETOOTH); in testBluetoothGetsDisabledAfterRestrictionSet() 92 mDevicePolicyManager.addUserRestriction(getWho(), UserManager.DISALLOW_BLUETOOTH); in testEnableBluetoothSucceedsAfterRestrictionRemoved() 98 mDevicePolicyManager.clearUserRestriction(getWho(), UserManager.DISALLOW_BLUETOOTH); in testEnableBluetoothSucceedsAfterRestrictionRemoved() 127 mDevicePolicyManager.addUserRestriction(getWho(), restriction); in testOppDisabledWhenRestrictionSet() 134 mDevicePolicyManager.clearUserRestriction(getWho(), restriction); in testOppDisabledWhenRestrictionSet()
|
D | NetworkLoggingTest.java | 87 final List<NetworkEvent> events = mDevicePolicyManager.retrieveNetworkLogs(getWho(), 107 mDevicePolicyManager.setNetworkLoggingEnabled(getWho(), false); in tearDown() 108 assertFalse(mDevicePolicyManager.isNetworkLoggingEnabled(getWho())); in tearDown() 118 mDevicePolicyManager.setNetworkLoggingEnabled(getWho(), true); in testRetrievingNetworkLogsThrowsSecurityException() 119 assertTrue(mDevicePolicyManager.isNetworkLoggingEnabled(getWho())); in testRetrievingNetworkLogsThrowsSecurityException() 121 mDevicePolicyManager.retrieveNetworkLogs(getWho(), FAKE_BATCH_TOKEN); in testRetrievingNetworkLogsThrowsSecurityException() 132 mDevicePolicyManager.setNetworkLoggingEnabled(getWho(), true); in testProvidingWrongBatchTokenReturnsNull() 133 assertTrue(mDevicePolicyManager.isNetworkLoggingEnabled(getWho())); in testProvidingWrongBatchTokenReturnsNull() 134 assertNull(mDevicePolicyManager.retrieveNetworkLogs(getWho(), FAKE_BATCH_TOKEN)); in testProvidingWrongBatchTokenReturnsNull() 159 mDevicePolicyManager.setNetworkLoggingEnabled(getWho(), true); in testNetworkLoggingAndRetrieval() [all …]
|
D | AirplaneModeRestrictionTest.java | 43 mDevicePolicyManager.clearUserRestriction(getWho(), UserManager.DISALLOW_AIRPLANE_MODE); in setUp() 49 mDevicePolicyManager.clearUserRestriction(getWho(), UserManager.DISALLOW_AIRPLANE_MODE); in tearDown() 69 mDevicePolicyManager.addUserRestriction(getWho(), UserManager.DISALLOW_AIRPLANE_MODE); in testAirplaneModeTurnedOffWhenRestrictionSet() 81 mDevicePolicyManager.addUserRestriction(getWho(), UserManager.DISALLOW_AIRPLANE_MODE); in testAirplaneModeCannotBeTurnedOnWithRestrictionOn()
|
D | LockScreenInfoTest.java | 25 mDevicePolicyManager.setDeviceOwnerLockScreenInfo(getWho(), null); in tearDown() 41 mDevicePolicyManager.setDeviceOwnerLockScreenInfo(getWho(), message); in testEmptyStringClearsLockInfo() 81 mDevicePolicyManager.setDeviceOwnerLockScreenInfo(getWho(), message); in setLockInfo()
|
D | BaseDeviceOwnerTest.java | 56 assertTrue(mDevicePolicyManager.isAdminActive(getWho())); in assertDeviceOwner() 58 assertFalse(mDevicePolicyManager.isManagedProfile(getWho())); in assertDeviceOwner() 61 protected ComponentName getWho() { in getWho() method in BaseDeviceOwnerTest
|
D | BaseAffiliatedProfileOwnerTest.java | 43 assertTrue(mDevicePolicyManager.isAdminActive(getWho())); in assertDeviceOrAffiliatedProfileOwner() 51 protected ComponentName getWho() { in getWho() method in BaseAffiliatedProfileOwnerTest
|
D | SystemUpdatePolicyTest.java | 102 mDevicePolicyManager.setSystemUpdatePolicy(getWho(), null); in tearDown() 216 mDevicePolicyManager.setSystemUpdatePolicy(getWho(), null); in testFreezePeriodCannotSetIfTooCloseToPrevious() 366 mDevicePolicyManager.setSystemUpdatePolicy(getWho(), policy); in testPolicy() 385 mDevicePolicyManager.setSystemUpdatePolicy(getWho(), policy); in setPolicyWithFreezePeriod() 450 mDevicePolicyManager.setTime(getWho(), c.getTimeInMillis()); in setSystemDate()
|
D | PackageInstallTest.java | 89 mDevicePolicyManager.setKeepUninstalledPackages(getWho(), in testKeepPackageCache() 97 assertTrue(mDevicePolicyManager.installExistingPackage(getWho(), TEST_APP_PKG)); in testInstallExistingPackage()
|
/cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/ |
D | BackupServicePoliciesTest.java | 9 assertFalse(mDevicePolicyManager.isBackupServiceEnabled(getWho())); in testEnablingAndDisablingBackupService() 10 mDevicePolicyManager.setBackupServiceEnabled(getWho(), true); in testEnablingAndDisablingBackupService() 11 assertTrue(mDevicePolicyManager.isBackupServiceEnabled(getWho())); in testEnablingAndDisablingBackupService() 12 mDevicePolicyManager.setBackupServiceEnabled(getWho(), false); in testEnablingAndDisablingBackupService() 13 assertFalse(mDevicePolicyManager.isBackupServiceEnabled(getWho())); in testEnablingAndDisablingBackupService()
|
D | AdminActionBookkeepingTest.java | 62 mDevicePolicyManager.uninstallCaCert(getWho(), TEST_CA.getBytes()); in tearDown() 79 mDevicePolicyManager.setSecureSetting(getWho(), setting, "com.test.2"); in testIsDefaultInputMethodSet() 100 assertTrue(mDevicePolicyManager.installCaCert(getWho(), rawCert)); in testGetPolicyInstalledCaCerts() 108 mDevicePolicyManager.uninstallCaCert(getWho(), rawCert); in testGetPolicyInstalledCaCerts()
|
D | BaseProfileOwnerTest.java | 44 assertTrue(dpm.isAdminActive(getWho())); in assertProfileOwner() 48 protected static ComponentName getWho() { in getWho() method in BaseProfileOwnerTest
|
D | WifiTest.java | 21 mDevicePolicyManager.getWifiMacAddress(getWho()); in testCannotGetWifiMacAddress()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | KeyManagementTest.java | 118 assertThat(mDevicePolicyManager.installKeyPair(getWho(), privKey, cert, alias)).isTrue(); in testCanInstallAndRemoveValidRsaKeypair() 129 assertThat(mDevicePolicyManager.removeKeyPair(getWho(), alias)).isTrue(); in testCanInstallAndRemoveValidRsaKeypair() 144 getWho(), privKey, new Certificate[] {cert}, grant, true)) in testCanInstallWithAutomaticAccess() 148 getWho(), privKey, new Certificate[] {cert}, withhold, false)) in testCanInstallWithAutomaticAccess() 159 assertThat(mDevicePolicyManager.removeKeyPair(getWho(), grant)).isTrue(); in testCanInstallWithAutomaticAccess() 160 assertThat(mDevicePolicyManager.removeKeyPair(getWho(), withhold)).isTrue(); in testCanInstallWithAutomaticAccess() 186 assertThat(mDevicePolicyManager.installKeyPair(getWho(), privKey, certChain, alias, true)) in testCanInstallCertChain() 199 assertThat(mDevicePolicyManager.removeKeyPair(getWho(), alias)).isTrue(); in testCanInstallCertChain() 213 getWho(), privKey, new Certificate[] {cert}, alias, true)) in testGrantsDoNotPersistBetweenInstallations() 219 assertThat(mDevicePolicyManager.removeKeyPair(getWho(), alias)).isTrue(); in testGrantsDoNotPersistBetweenInstallations() [all …]
|
D | DeviceIdAttestationTest.java | 32 getWho()); in testFailsWithoutProfileOwnerIdsGrant() 40 mDevicePolicyManager, getWho()); in testSucceedsWithProfileOwnerIdsGrant() 44 protected ComponentName getWho() { in getWho() method in DeviceIdAttestationTest
|
/cts/tests/tests/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/ |
D | SilentPackageInstallTest.java | 42 mDevicePolicyManager.setUninstallBlocked(getWho(), TEST_APP_PKG, true); in testUninstallBlocked() 43 assertTrue(mDevicePolicyManager.isUninstallBlocked(getWho(), TEST_APP_PKG)); in testUninstallBlocked() 48 mDevicePolicyManager.setUninstallBlocked(getWho(), TEST_APP_PKG, false); in testUninstallBlocked() 49 assertFalse(mDevicePolicyManager.isUninstallBlocked(getWho(), TEST_APP_PKG)); in testUninstallBlocked()
|
/cts/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/src/com/android/cts/comp/ |
D | AdminReceiver.java | 40 getManager(context).setProfileEnabled(getWho(context)); in onProfileProvisioningComplete() 41 getManager(context).setProfileName(getWho(context), "Corp owned Managed Profile"); in onProfileProvisioningComplete()
|