/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | StartProfilesTest.java | 71 public static final DeviceState sDeviceState = new DeviceState(); field in StartProfilesTest 83 sDeviceState.workProfile().stop(); in startProfile_returnsTrue() 85 assertThat(sActivityManager.startProfile(sDeviceState.workProfile().userHandle())).isTrue(); in startProfile_returnsTrue() 94 sDeviceState.workProfile().stop(); in startProfile_broadcastIsReceived_profileIsStarted() 95 BlockingBroadcastReceiver broadcastReceiver = sDeviceState.registerBroadcastReceiver( in startProfile_broadcastIsReceived_profileIsStarted() 97 userIsEqual(sDeviceState.workProfile())); in startProfile_broadcastIsReceived_profileIsStarted() 98 sActivityManager.startProfile(sDeviceState.workProfile().userHandle()); in startProfile_broadcastIsReceived_profileIsStarted() 102 assertThat(sUserManager.isUserRunning(sDeviceState.workProfile().userHandle())).isTrue(); in startProfile_broadcastIsReceived_profileIsStarted() 112 assertThat(sActivityManager.stopProfile(sDeviceState.workProfile().userHandle())).isTrue(); in stopProfile_returnsTrue() 122 BlockingBroadcastReceiver broadcastReceiver = sDeviceState.registerBroadcastReceiver( in stopProfile_profileIsStopped() [all …]
|
D | LockTaskTest.java | 89 public static final DeviceState sDeviceState = new DeviceState(); field in LockTaskTest 130 sDeviceState.dpc().devicePolicyManager().getLockTaskPackages(); in setLockTaskPackages_lockTaskPackagesIsSet() 132 sDeviceState.dpc().devicePolicyManager().setLockTaskPackages(new String[]{PACKAGE_NAME}); in setLockTaskPackages_lockTaskPackagesIsSet() 135 assertThat(sDeviceState.dpc().devicePolicyManager().getLockTaskPackages()).asList() in setLockTaskPackages_lockTaskPackagesIsSet() 138 sDeviceState.dpc().devicePolicyManager().setLockTaskPackages(originalLockTaskPackages); in setLockTaskPackages_lockTaskPackagesIsSet() 147 sDeviceState.dpc().devicePolicyManager().getLockTaskPackages(); in startLockTask_recordsMetric() 151 …sDeviceState.dpc().devicePolicyManager().setLockTaskPackages(new String[]{sTestApp.packageName()}); in startLockTask_recordsMetric() 171 sDeviceState.dpc().devicePolicyManager().setLockTaskPackages(originalLockTaskPackages); in startLockTask_recordsMetric() 180 () -> sDeviceState.dpc().devicePolicyManager().getLockTaskPackages()); in getLockTaskPackages_policyIsNotAllowedToBeFetched_throwsException() 188 sDeviceState.dpc().devicePolicyManager().getLockTaskPackages(); in setLockTaskPackages_empty_lockTaskPackagesIsSet() [all …]
|
D | CrossProfileAppsTest.java | 71 public static final DeviceState sDeviceState = new DeviceState(); field in CrossProfileAppsTest 79 assertThat(targetProfiles).doesNotContain(sDeviceState.primaryUser().userHandle()); in getTargetUserProfiles_callingFromPrimaryUser_doesNotContainPrimaryUser() 88 assertThat(targetProfiles).doesNotContain(sDeviceState.secondaryUser().userHandle()); in getTargetUserProfiles_callingFromPrimaryUser_doesNotContainSecondaryUser() 97 assertThat(targetProfiles).contains(sDeviceState.primaryUser().userHandle()); in getTargetUserProfiles_callingFromWorkProfile_containsPrimaryUser() 107 assertThat(targetProfiles).contains(sDeviceState.workProfile().userHandle()); in getTargetUserProfiles_callingFromPrimaryUser_containsWorkProfile() 117 assertThat(targetProfiles).doesNotContain(sDeviceState.workProfile().userHandle()); in getTargetUserProfiles_callingFromPrimaryUser_appNotInstalledInWorkProfile_doesNotContainWorkProfile() 128 sDeviceState.workProfile(/* forUser= */ PRIMARY_USER).userHandle()); in getTargetUserProfiles_callingFromSecondaryUser_doesNotContainWorkProfile() 138 sDeviceState.workProfile().userHandle()); in startMainActivity_callingFromWorkProfile_targetIsPrimaryUser_launches() 140 assertMainActivityLaunchedForUser(sDeviceState.primaryUser().userHandle()); in startMainActivity_callingFromWorkProfile_targetIsPrimaryUser_launches() 151 sDeviceState.workProfile().userHandle()); in startMainActivity_callingFromPrimaryUser_targetIsWorkProfile_launches() [all …]
|
D | UserControlDisabledPackagesTest.java | 72 public static final DeviceState sDeviceState = new DeviceState(); field in UserControlDisabledPackagesTest 79 sDeviceState.dpc().devicePolicyManager().getUserControlDisabledPackages(); in setUserControlDisabledPackages_toOneProtectedPackage() 81 sDeviceState.dpc().devicePolicyManager().setUserControlDisabledPackages( in setUserControlDisabledPackages_toOneProtectedPackage() 84 assertThat(sDeviceState.dpc().devicePolicyManager().getUserControlDisabledPackages()) in setUserControlDisabledPackages_toOneProtectedPackage() 87 sDeviceState.dpc().devicePolicyManager().setUserControlDisabledPackages( in setUserControlDisabledPackages_toOneProtectedPackage() 97 sDeviceState.dpc().devicePolicyManager().getUserControlDisabledPackages(); in setUserControlDisabledPackages_toEmptyProtectedPackages() 99 sDeviceState.dpc().devicePolicyManager().setUserControlDisabledPackages( in setUserControlDisabledPackages_toEmptyProtectedPackages() 103 … sDeviceState.dpc().devicePolicyManager().getUserControlDisabledPackages()).isEmpty(); in setUserControlDisabledPackages_toEmptyProtectedPackages() 105 sDeviceState.dpc().devicePolicyManager().setUserControlDisabledPackages( in setUserControlDisabledPackages_toEmptyProtectedPackages() 115 () -> sDeviceState.dpc().devicePolicyManager().setUserControlDisabledPackages( in setUserControlDisabledPackages_notAllowedToSetProtectedPackages_throwsException() [all …]
|
D | NetworkResetTest.java | 52 public static final DeviceState sDeviceState = new DeviceState(); field in NetworkResetTest 84 sDeviceState.dpc().devicePolicyManager().addUserRestriction(DISALLOW_NETWORK_RESET); in factoryReset_disallowedByNetworkResetPolicy_doesNotFactoryReset() 108 sDeviceState.dpc().devicePolicyManager() in factoryReset_disallowedByConfigPrivateDnsPolicy_doesPartialFactoryReset() 136 sDeviceState.dpc().devicePolicyManager() in factoryReset_noPolicyRestrictions_resetsToDefault() 138 sDeviceState.dpc().devicePolicyManager() in factoryReset_noPolicyRestrictions_resetsToDefault() 174 sDeviceState.dpc().devicePolicyManager().addUserRestriction(policy); in restoreUserRestriction() 176 sDeviceState.dpc().devicePolicyManager().clearUserRestriction(policy); in restoreUserRestriction()
|
D | PreferentialNetworkServiceTest.java | 64 public static final DeviceState sDeviceState = new DeviceState(); field in PreferentialNetworkServiceTest 124 sDeviceState.dpc().devicePolicyManager().setPreferentialNetworkServiceEnabled(true); in setPreferentialNetworkServiceEnabled_enableService_issueRequest() 129 sDeviceState.dpc().devicePolicyManager().setPreferentialNetworkServiceEnabled(false); in setPreferentialNetworkServiceEnabled_enableService_issueRequest() 162 sDeviceState.dpc().devicePolicyManager().setPreferentialNetworkServiceEnabled(false); in setPreferentialNetworkServiceEnabled_disableService_noIssueRequest() 167 sDeviceState.dpc().devicePolicyManager().setPreferentialNetworkServiceEnabled(false); in setPreferentialNetworkServiceEnabled_disableService_noIssueRequest()
|
D | NegativeCallAuthorizationTest.java | 53 public static final DeviceState sDeviceState = new DeviceState(); field in NegativeCallAuthorizationTest
|
D | DevicePolicyManagerTest.java | 109 public static final DeviceState sDeviceState = new DeviceState(); field in DevicePolicyManagerTest
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/users/ |
D | UserReferenceTest.java | 63 public static final DeviceState sDeviceState = new DeviceState(); field in UserReferenceTest 83 assertThat(sDeviceState.secondaryUser().resolve()).isNotNull(); in resolve_doesExist_returnsUser() 136 sDeviceState.secondaryUser().start(); in start_userAlreadyStarted_doesNothing() 138 sDeviceState.secondaryUser().start(); in start_userAlreadyStarted_doesNothing() 140 assertThat(sDeviceState.secondaryUser().resolve().state()) in start_userAlreadyStarted_doesNothing() 153 sDeviceState.secondaryUser().stop(); in stop_userStarted_userIsStopped() 155 … assertThat(sDeviceState.secondaryUser().resolve().state()).isEqualTo(User.UserState.NOT_RUNNING); in stop_userStarted_userIsStopped() 161 sDeviceState.secondaryUser().stop(); in stop_userNotStarted_doesNothing() 163 sDeviceState.secondaryUser().stop(); in stop_userNotStarted_doesNothing() 165 assertThat(sDeviceState.secondaryUser().resolve().state()) in stop_userNotStarted_doesNothing() [all …]
|
D | UsersTest.java | 70 public static final DeviceState sDeviceState = new DeviceState(); field in UsersTest 355 .containsExactly(sDeviceState.secondaryUser(), additionalUser); in findUsersOfType_returnsUsers()
|
/cts/common/device-side/bedstead/harrier/src/test/java/com/android/bedstead/harrier/ |
D | DeviceStateTest.java | 85 public static final DeviceState sDeviceState = new DeviceState(); field in DeviceStateTest 96 assertThat(sDeviceState.workProfile()).isNotNull(); in workProfile_workProfileProvided_returnsWorkProfile() 102 assertThat(sDeviceState.profile(MANAGED_PROFILE_TYPE_NAME)).isNotNull(); in profile_profileIsProvided_returnsProfile() 108 assertThat(sDeviceState.workProfile()).isEqualTo(sTestApis.users().instrumented()); in workProfile_runningOnWorkProfile_returnsCurrentProfile() 114 assertThrows(IllegalStateException.class, sDeviceState::workProfile); in workProfile_noWorkProfile_throwsException() 125 assertThrows(IllegalStateException.class, sDeviceState::workProfile); in workProfile_createdWorkProfile_throwsException() 153 assertThat(sDeviceState.tvProfile()).isNotNull(); in tvProfile_tvProfileProvided_returnsTvProfile() 159 assertThat(sDeviceState.tvProfile()).isEqualTo(sTestApis.users().instrumented()); in tvProfile_runningOnTvProfile_returnsCurrentProfile() 165 assertThrows(IllegalStateException.class, sDeviceState::tvProfile); in tvProfile_noTvProfile_throwsException() 176 assertThrows(IllegalStateException.class, sDeviceState::tvProfile); in tvProfile_createdTvProfile_throwsException() [all …]
|
D | DeviceStateClassAnnotationWithoutBedsteadJunit4Test.java | 38 public static final DeviceState sDeviceState = new DeviceState(); field in DeviceStateClassAnnotationWithoutBedsteadJunit4Test
|
D | DeviceStateClassAnnotationTest.java | 44 public static final DeviceState sDeviceState = new DeviceState(); field in DeviceStateClassAnnotationTest
|
/cts/common/device-side/bedstead/deviceadminapp/src/test/java/com/android/bedstead/deviceadminapp/ |
D | DeviceAdminAppTest.java | 47 public static final DeviceState sDeviceState = new DeviceState(); field in DeviceAdminAppTest 61 sDeviceState.primaryUser(), DeviceAdminApp.deviceAdminComponentName(sContext))) { in setAsDeviceOwner_isEnabled()
|
/cts/common/device-side/bedstead/testapp/src/test/java/com/android/bedstead/testapp/ |
D | TestAppActivityReferenceTest.java | 43 public static final DeviceState sDeviceState = new DeviceState(); field in TestAppActivityReferenceTest
|
D | TestAppActivitiesTest.java | 39 public static final DeviceState sDeviceState = new DeviceState(); field in TestAppActivitiesTest
|
D | TestAppInstanceReferenceTest.java | 52 public static final DeviceState sDeviceState = new DeviceState(); field in TestAppInstanceReferenceTest
|
/cts/tests/tests/content/src/android/content/cts/ |
D | ContentProviderTest.java | 74 public static final DeviceState sDeviceState = new DeviceState(); field in ContentProviderTest 343 sTestApis.context().androidContextAsUser(sDeviceState.workProfile()) in createContentUriForUser_returnsCorrectUri() 350 workProfileUriWithoutUserId, sDeviceState.workProfile().userHandle()); in createContentUriForUser_returnsCorrectUri()
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/devicepolicy/ |
D | DevicePolicyTest.java | 57 public static final DeviceState sDeviceState = new DeviceState(); field in DevicePolicyTest
|
/cts/common/device-side/bedstead/remotedpc/src/library/test/java/com/android/bedstead/remotedpc/ |
D | RemoteDpcTest.java | 56 public static DeviceState sDeviceState = new DeviceState(); field in RemoteDpcTest
|