/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/ |
D | TestApisTest.java | 32 Truth.assertThat(TestApis.users()).isNotNull(); in users_returnsInstance() 37 Truth.assertThat(TestApis.users()).isEqualTo(TestApis.users()); in users_multipleCalls_returnsSameInstance() 42 Truth.assertThat(TestApis.packages()).isNotNull(); in packages_returnsInstance() 47 Truth.assertThat(TestApis.packages()).isEqualTo(TestApis.packages()); in packages_multipleCalls_returnsSameInstance() 52 Truth.assertThat(TestApis.devicePolicy()).isNotNull(); in devicePolicy_returnsInstance() 57 Truth.assertThat(TestApis.devicePolicy()).isEqualTo(TestApis.devicePolicy()); in devicePolicy_multipleCalls_returnsSameInstance() 62 Truth.assertThat(TestApis.permissions()).isNotNull(); in permissions_returnsInstance() 67 Truth.assertThat(TestApis.permissions()).isEqualTo(TestApis.permissions()); in permissions_multipleCalls_returnsSameInstance() 72 Truth.assertThat(TestApis.context()).isNotNull(); in context_returnsInstance() 77 Truth.assertThat(TestApis.context()).isEqualTo(TestApis.context()); in context_multipleCalls_returnsSameInstance() [all …]
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/settings/ |
D | GlobalSettingsTest.kt | 24 import com.android.bedstead.nene.TestApis in <lambda>() 40 TestApis.settings().global().reset() in <lambda>() 46 TestApis.settings().global().putInt(KEY, INT_VALUE) in <lambda>() 55 TestApis.settings().global().putInt(context.contentResolver, KEY, INT_VALUE) in <lambda>() 65 TestApis.settings().global().putInt( in <lambda>() 73 TestApis.settings().global().putInt(TestApis.users().instrumented(), KEY, INT_VALUE) in <lambda>() 83 TestApis.settings().global().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>() 84 TestApis.permissions().withPermission(INTERACT_ACROSS_USERS_FULL).use { in <lambda>() 86 TestApis.context().androidContextAsUser(deviceState.secondaryUser()) in <lambda>() 97 TestApis.settings().global().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>() [all …]
|
D | SecureSettingsTest.kt | 25 import com.android.bedstead.nene.TestApis in <lambda>() 41 TestApis.settings().secure().reset() in <lambda>() 47 TestApis.settings().secure().putInt(KEY, INT_VALUE) in <lambda>() 57 TestApis.settings().secure().putInt(context.contentResolver, KEY, INT_VALUE) in <lambda>() 67 TestApis.settings().secure().putInt( in <lambda>() 75 TestApis.settings().secure().putInt(TestApis.users().instrumented(), KEY, INT_VALUE) in <lambda>() 86 TestApis.settings().secure().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>() 88 TestApis.permissions().withPermission(INTERACT_ACROSS_USERS_FULL).use { in <lambda>() 90 TestApis.context().androidContextAsUser(deviceState.secondaryUser()) in <lambda>() 101 TestApis.settings().secure().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>() [all …]
|
D | SystemSettingsTest.kt | 24 import com.android.bedstead.nene.TestApis in <lambda>() 39 TestApis.settings().system().putInt(KEY, INT_VALUE) in <lambda>() 49 TestApis.settings().system().putInt(sContext.contentResolver, KEY, INT_VALUE) in <lambda>() 60 TestApis.settings().system().putInt( in <lambda>() 68 TestApis.settings().system().putInt(TestApis.users().instrumented(), KEY, INT_VALUE) in <lambda>() 79 TestApis.settings().system().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>() 81 TestApis.permissions().withPermission(INTERACT_ACROSS_USERS_FULL).use { p -> in <lambda>() 83 TestApis.context().androidContextAsUser(deviceState.secondaryUser()) in <lambda>() 94 TestApis.settings().system().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>() 100 TestApis.settings().system().putInt(KEY, INT_VALUE) in <lambda>() [all …]
|
/cts/common/device-side/bedstead/modules/multiuser/src/test/kotlin/com/android/bedstead/multiuser/ |
D | UsersTest.kt | 33 import com.android.bedstead.nene.TestApis in <lambda>() 50 private val mSecondaryUserType = TestApis in <lambda>() 53 private val mManagedProfileType = TestApis in <lambda>() 56 private val mInstrumentedUser = TestApis in <lambda>() 64 val managedProfileUserType = TestApis in <lambda>() 81 val systemUserType = TestApis in <lambda>() 97 val managedProfileUserType = TestApis in <lambda>() 114 assertThat(TestApis.users().supportedType(INVALID_TYPE_NAME)).isNull() in <lambda>() 120 val user = TestApis.users().createUser().create() in <lambda>() 123 assertThat(TestApis.users().all()).contains(user) in <lambda>() [all …]
|
D | UserReferenceTest.java | 52 import com.android.bedstead.nene.TestApis; 69 private static final Context sContext = TestApis.context().instrumentedContext(); 89 assertThat(TestApis.users().find(USER_ID).id()).isEqualTo(USER_ID); in id_returnsId() 94 assertThat(TestApis.users().find(USER_ID).userHandle().getIdentifier()).isEqualTo(USER_ID); in userHandle_referencesId() 99 assertThat(TestApis.users().find(NON_EXISTING_USER_ID).exists()).isFalse(); in exists_doesNotExist_returnsFalse() 115 assertThat(TestApis.users().all()).doesNotContain(user); in remove_userExists_removesUser() 129 () -> TestApis.users().find(NON_EXISTING_USER_ID).start()); in start_userDoesNotExist_throwsException() 204 TestApis.users().find(NON_EXISTING_USER_ID).stop(); in stop_userDoesNotExist_doesNothing() 234 assertThat(TestApis.users().current()).isEqualTo(sDeviceState.secondaryUser()); in switchTo_userIsSwitched() 242 assertThat(TestApis.users().current()).isEqualTo(sDeviceState.workProfile().parent()); in switchTo_profile_switchesToParent() [all …]
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/devicepolicy/ |
D | DevicePolicyTest.java | 42 import com.android.bedstead.nene.TestApis; 73 private static final UserReference sUser = TestApis.users().instrumented(); 74 private static final UserReference NON_EXISTENT_USER = TestApis.users().find(99999); 87 if (!sUser.equals(TestApis.users().system())) { in setupClass() 89 sTestApp.install(TestApis.users().system()); in setupClass() 102 UserReference profile = TestApis.users().createUser() in setProfileOwner_profileOwnerIsSet() 104 .type(TestApis.users().supportedType(UserType.MANAGED_PROFILE_TYPE_NAME)) in setProfileOwner_profileOwnerIsSet() 109 TestApis.devicePolicy().setProfileOwner(profile, DPC_COMPONENT_NAME); in setProfileOwner_profileOwnerIsSet() 112 assertThat(TestApis.devicePolicy().getProfileOwner(profile)).isEqualTo(profileOwner); in setProfileOwner_profileOwnerIsSet() 123 UserReference profile = TestApis.users().createUser() in setProfileOwner_profileOwnerIsAlreadySet_throwsException() [all …]
|
/cts/common/device-side/bedstead/modules/permissions/src/test/kotlin/com/android/bedstead/permissions/ |
D | PermissionsTest.kt | 25 import com.android.bedstead.nene.TestApis 26 import com.android.bedstead.nene.TestApis.devicePolicy 27 import com.android.bedstead.nene.TestApis.permissions 68 TestApis.permissions().withPermission(PERMISSION_HELD_BY_SHELL).use { in withPermission_shellPermission_permissionIsGranted() 83 TestApis.permissions().withoutPermission( in withoutPermission_alreadyGranted_androidPreQ_throwsException() 95 TestApis.permissions().withPermission(PERMISSION_HELD_BY_SHELL).use { in withoutPermission_permissionIsNotGranted() 96 TestApis.permissions().withoutPermission(PERMISSION_HELD_BY_SHELL).use { in withoutPermission_permissionIsNotGranted() 110 TestApis.permissions().withPermission(PERMISSION_HELD_BY_SHELL).use { in autoclose_withoutPermission_permissionIsGrantedAgain() 111 TestApis.permissions().withoutPermission(PERMISSION_HELD_BY_SHELL).use { } in autoclose_withoutPermission_permissionIsGrantedAgain() 125 TestApis.permissions().withoutPermission(INSTALL_PERMISSION) in withoutPermission_installPermission_androidPreQ_throwsException() [all …]
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/packages/ |
D | PackagesTest.java | 37 import com.android.bedstead.nene.TestApis; 76 private final UserReference mUser = TestApis.users().instrumented(); 78 TestApis.packages().find("com.android.providers.telephony"); 80 TestApis.packages().find(TEST_APP_PACKAGE_NAME); 82 TestApis.packages().find(NON_EXISTING_PACKAGE); 83 private final UserReference mNonExistingUser = TestApis.users().find(99999); 101 assertThat(TestApis.packages().features()).contains(INPUT_METHODS_FEATURE); in features_noUserSpecified_containsKnownFeature() 106 assertThrows(NullPointerException.class, () -> TestApis.packages().find(null)); in find_nullPackageName_throwsException() 111 assertThat(TestApis.packages().find(mExistingPackage.packageName())).isNotNull(); in find_existingPackage_returnsPackageReference() 116 assertThat(TestApis.packages().find(NON_EXISTING_PACKAGE)).isNotNull(); in find_nonExistingPackage_returnsPackageReference() [all …]
|
D | PackageTest.java | 36 import com.android.bedstead.nene.TestApis; 58 private static final UserReference sUser = TestApis.users().instrumented(); 66 TestApis.context().instrumentedContext(); 69 TestApis.packages().find(sContext.getPackageName()); 87 try (PermissionContext p = TestApis.permissions() in setupClass() 95 try (PermissionContext p = TestApis.permissions() in teardownClass() 103 assertThat(TestApis.packages().find(PACKAGE_NAME).packageName()).isEqualTo(PACKAGE_NAME); in packageName_returnsPackageName() 108 assertThat(TestApis.packages().find(NON_EXISTING_PACKAGE_NAME).exists()).isFalse(); in exists_nonExistingPackage_returnsFalse() 113 assertThat(TestApis.packages().find(EXISTING_PACKAGE_NAME).exists()).isTrue(); in exists_existingPackage_returnsTrue() 138 Package pkg = TestApis.packages().install(sTestAppApkFile); in uninstallForAllUsers_isUninstalledForAllUsers() [all …]
|
/cts/common/device-side/bedstead/remotedpc/src/test/java/com/android/bedstead/remotedpc/ |
D | RemoteDpcTest.java | 42 import com.android.bedstead.nene.TestApis; 71 private static final UserReference sUser = TestApis.users().instrumented(); 73 TestApis.users().find(99999); 80 sNonRemoteDpcTestApp.install(TestApis.users().system()); in setupClass() 102 TestApis.devicePolicy().setDeviceOwner(NON_REMOTE_DPC_COMPONENT); in deviceOwner_nonRemoteDpcDeviceOwner_returnsNull() 127 TestApis.devicePolicy().setProfileOwner(sUser, NON_REMOTE_DPC_COMPONENT); in profileOwner_nonRemoteDpcProfileOwner_returnsNull() 151 UserReference profile = TestApis.users().createUser() in profileOwner_userHandle_noProfileOwner_returnsNull() 153 .type(TestApis.users().supportedType(UserType.MANAGED_PROFILE_TYPE_NAME)) in profileOwner_userHandle_noProfileOwner_returnsNull() 168 UserReference profile = TestApis.users().createUser() in profileOwner_userHandle_nonRemoteDpcProfileOwner_returnsNull() 170 .type(TestApis.users().supportedType(UserType.MANAGED_PROFILE_TYPE_NAME)) in profileOwner_userHandle_nonRemoteDpcProfileOwner_returnsNull() [all …]
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/display/ |
D | DisplayTest.kt | 21 import com.android.bedstead.nene.TestApis 33 TestApis.display().setScreenOrientation(DisplayProperties.ScreenOrientation.LANDSCAPE) in setScreenOrientation_landscape_orientationIsSet() 36 TestApis.display().getScreenOrientation() in setScreenOrientation_landscape_orientationIsSet() 42 TestApis.display().setScreenOrientation(DisplayProperties.ScreenOrientation.PORTRAIT) in setScreenOrientation_portrait_orientationIsSet() 45 TestApis.display().getScreenOrientation() in setScreenOrientation_portrait_orientationIsSet() 51 TestApis.display().setDisplayTheme(DisplayProperties.Theme.DARK) in setDisplayTheme_setDark_themeIsSet() 53 assertThat(TestApis.display().getDisplayTheme()).isEqualTo(DisplayProperties.Theme.DARK) in setDisplayTheme_setDark_themeIsSet() 58 TestApis.display().setDisplayTheme(DisplayProperties.Theme.LIGHT) in setDisplayTheme_setLight_themeIsSet() 60 assertThat(TestApis.display().getDisplayTheme()).isEqualTo(DisplayProperties.Theme.LIGHT) in setDisplayTheme_setLight_themeIsSet() 65 assertThat(TestApis.display()).isNotNull() in display_returnsInstance() [all …]
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/devicepolicy/ |
D | DevicePolicy.kt | 31 import com.android.bedstead.nene.TestApis in <lambda>() 100 Poll.forValue("Profile Owner") { TestApis.devicePolicy().getProfileOwner(user) } in <lambda>() 106 TestApis.packages().find( in <lambda>() 118 for (user in TestApis.users().all()) { in <lambda>() 138 fun getProfileOwner(user: UserReference = TestApis.users().instrumented()): ProfileOwner? { in <lambda>() 150 user: UserReference = TestApis.users().system() in <lambda>() 158 TestApis.permissions().withPermission( in <lambda>() 189 val deviceOwnerPackage = TestApis.packages().find( in <lambda>() 192 Poll.forValue("Device Owner") { TestApis.devicePolicy().getDeviceOwner() } in <lambda>() 252 fun clearOrganizationId(user: UserReference = TestApis.users().instrumented()) { in <lambda>() [all …]
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/settings/ |
D | GlobalSettings.kt | 24 import com.android.bedstead.nene.TestApis in <lambda>() 38 TestApis.permissions().withPermission( in <lambda>() 56 if (user == TestApis.users().instrumented()) { in <lambda>() 60 putInt(TestApis.context().androidContextAsUser(user).contentResolver, key, value) in <lambda>() 70 TestApis.permissions().withPermission(Manifest.permission.WRITE_SECURE_SETTINGS).use { p -> in <lambda>() 72 TestApis.context().instrumentedContext().contentResolver, key, value) in <lambda>() 82 TestApis.permissions().withPermission( in <lambda>() 100 if (user == TestApis.users().instrumented()) { in <lambda>() 104 putString(TestApis.context().androidContextAsUser(user).contentResolver, key, value) in <lambda>() 114 TestApis.permissions().withPermission(Manifest.permission.WRITE_SECURE_SETTINGS).use { in <lambda>() [all …]
|
D | SecureSettings.kt | 24 import com.android.bedstead.nene.TestApis 38 TestApis.permissions().withPermission( in putInt() 56 if (user == TestApis.users().instrumented()) { in putInt() 60 putInt(TestApis.context().androidContextAsUser(user).contentResolver, key, value) in putInt() 70 TestApis.permissions().withPermission( in putInt() 73 TestApis.context().instrumentedContext().contentResolver, key, value) in putInt() 83 TestApis.permissions().withPermission(INTERACT_ACROSS_USERS_FULL).use { in getInt() 94 TestApis.permissions().withPermission(INTERACT_ACROSS_USERS_FULL).use { in getInt() 123 return if (user == TestApis.users().instrumented()) { in getInt() 125 } else getInt(TestApis.context().androidContextAsUser(user).contentResolver, key) in getInt() [all …]
|
D | SystemSettings.kt | 24 import com.android.bedstead.nene.TestApis 38 TestApis.permissions().withPermission( in putInt() 56 if (user == TestApis.users().instrumented()) { in putInt() 60 putInt(TestApis.context().androidContextAsUser(user).contentResolver, key, value) in putInt() 70 TestApis.permissions().withPermission(Manifest.permission.WRITE_SECURE_SETTINGS).use { in putInt() 72 TestApis.context().instrumentedContext().contentResolver, key, value) in putInt() 82 TestApis.permissions().withPermission( in putString() 100 if (user == TestApis.users().instrumented()) { in putString() 104 putString(TestApis.context().androidContextAsUser(user).contentResolver, key, value) in putString() 114 TestApis.permissions().withPermission(Manifest.permission.WRITE_SECURE_SETTINGS).use { in putString() [all …]
|
/cts/common/device-side/bedstead/harrier/src/test/java/com/android/bedstead/harrier/ |
D | DeviceStateTest.java | 132 import com.android.bedstead.nene.TestApis; 182 assertThat(sDeviceState.workProfile()).isEqualTo(TestApis.users().instrumented()); in workProfile_runningOnWorkProfile_returnsCurrentProfile() 194 assertThat(sDeviceState.tvProfile()).isEqualTo(TestApis.users().instrumented()); in tvProfile_runningOnTvProfile_returnsCurrentProfile() 207 try (UserReference tvProfile = TestApis.users().createUser() in tvProfile_createdTvProfile_throwsException() 208 .parent(TestApis.users().instrumented()) in tvProfile_createdTvProfile_throwsException() 209 .type(TestApis.users().supportedType(TV_PROFILE_TYPE_NAME)) in tvProfile_createdTvProfile_throwsException() 218 assertThat(TestApis.users().findProfileOfType( in ensureHasTvProfileAnnotation_tvProfileExists() 219 TestApis.users().supportedType(TV_PROFILE_TYPE_NAME), in ensureHasTvProfileAnnotation_tvProfileExists() 220 TestApis.users().instrumented()) in ensureHasTvProfileAnnotation_tvProfileExists() 231 assertThat(TestApis.users().findProfileOfType( in ensureHasNoTvProfileAnnotation_tvProfileDoesNotExist() [all …]
|
D | DeviceStateClassAnnotationTest.java | 33 import com.android.bedstead.nene.TestApis; 71 TestApis.users() in beforeClass() 73 TestApis.users().supportedType(MANAGED_PROFILE_TYPE_NAME), in beforeClass() 74 TestApis.users().initial())) in beforeClass() 103 assertThat(TestApis.users().findProfileOfType( in ensureHasWorkProfileAnnotationOnClass_workProfileExists() 104 TestApis.users().supportedType(MANAGED_PROFILE_TYPE_NAME), in ensureHasWorkProfileAnnotationOnClass_workProfileExists() 105 TestApis.users().instrumented()) in ensureHasWorkProfileAnnotationOnClass_workProfileExists() 112 assertThat(TestApis.users().findProfileOfType( in ensureHasNoWorkProfileAnnotation_overridesClassAnnotation() 113 TestApis.users().supportedType(MANAGED_PROFILE_TYPE_NAME), in ensureHasNoWorkProfileAnnotation_overridesClassAnnotation() 114 TestApis.users().instrumented()) in ensureHasNoWorkProfileAnnotation_overridesClassAnnotation() [all …]
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/packages/ |
D | Package.java | 63 import com.android.bedstead.nene.TestApis; 101 TestApis.context().instrumentedContext().getPackageManager(); 102 private static final RoleManager sRoleManager = TestApis.context().instrumentedContext() 161 return TestApis.packages().install(user, apkFile); in install() 174 return TestApis.packages().install(user, apkFile.get()); in install() 187 return TestApis.packages().install(user, apkFile); in installBytes() 201 return TestApis.packages().install(user, apkFile.get()); in installBytes() 236 TestApis.context().androidContextAsUser(user), in uninstall() 243 try (PermissionContext p = TestApis.permissions().withPermission( in uninstall() 248 } else if (user.equals(TestApis.users().instrumented())) { in uninstall() [all …]
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/bugreports/ |
D | BugReportsTest.kt | 5 import com.android.bedstead.nene.TestApis 17 TestApis.bugReports().setTakeQuickBugReports(true).use { in setTakeQuickBugreports_true_valueIsSet() 19 assertThat(TestApis.bugReports().willTakeQuickBugReports()).isTrue() in setTakeQuickBugreports_true_valueIsSet() 25 TestApis.bugReports().setTakeQuickBugReports(false).use { in setTakeQuickBugreports_false_valueIsSet() 27 assertThat(TestApis.bugReports().willTakeQuickBugReports()).isFalse() in setTakeQuickBugreports_false_valueIsSet() 33 TestApis.bugReports().setTakeQuickBugReports(false) in setTakeQuickBugreports_autoclose_resetsValue() 35 TestApis.bugReports().setTakeQuickBugReports(true).use { in setTakeQuickBugreports_autoclose_resetsValue() 39 assertThat(TestApis.bugReports().willTakeQuickBugReports()).isFalse() in setTakeQuickBugreports_autoclose_resetsValue()
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | ProfileOwnerTest.kt | 27 import com.android.bedstead.nene.TestApis in <lambda>() 53 .builderForUser(TestApis.users().instrumented(), SET_PROFILE_OWNER_COMMAND) in <lambda>() 57 assertThat(TestApis.devicePolicy().getProfileOwner()).isNotNull() in <lambda>() 59 val profileOwner = TestApis.devicePolicy().getProfileOwner() in <lambda>() 74 .builderForUser(TestApis.users().instrumented(), SET_PROFILE_OWNER_COMMAND) in <lambda>() 78 assertThat(TestApis.devicePolicy().getProfileOwner()).isNotNull() in <lambda>() 80 val profileOwner = TestApis.devicePolicy().getProfileOwner() in <lambda>() 91 TestApis.users().createUser() in <lambda>() 92 .parent(TestApis.users().instrumented()) in <lambda>() 101 assertThat(TestApis.devicePolicy().getProfileOwner(profile)).isNotNull() in <lambda>() [all …]
|
D | DeviceOwnerTest.kt | 36 import com.android.bedstead.nene.TestApis in <lambda>() 132 TEST_ONLY_DPC.install(TestApis.users().system()).use { in <lambda>() 139 assertThat(TestApis.devicePolicy().getDeviceOwner()).isNotNull() in <lambda>() 141 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() 158 NOT_TEST_ONLY_DPC.install(TestApis.users().system()).use { in <lambda>() 165 assertThat(TestApis.devicePolicy().getDeviceOwner()).isNotNull() in <lambda>() 167 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() 180 TEST_ONLY_DPC.install(TestApis.users().system()).use { in <lambda>() 188 assertThat(TestApis.devicePolicy().getDeviceOwner()).isNull() in <lambda>() 190 val deviceOwner = TestApis.devicePolicy().getDeviceOwner() in <lambda>() [all …]
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/telephony/ |
D | Telephony.kt | 20 import com.android.bedstead.nene.TestApis 29 TestApis.context().instrumentedContext() 34 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getDeviceId() 41 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getImei() 48 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getMeid() 55 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getSubscriberId() 62 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getSimSerialNumber() 69 TestApis.permissions().withPermission(READ_PRIVILEGED_PHONE_STATE).use { in getNai()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/content/ |
D | Suggestions.kt | 20 import com.android.bedstead.nene.TestApis in <lambda>() 37 TestApis.context().instrumentedContext().getSystemService<ContentSuggestionsManager>( in <lambda>() 43 fun setDefaultServiceEnabled(user: UserReference = TestApis.users().instrumented(), in <lambda>() 50 TestApis.permissions().withPermission(MANAGE_CONTENT_SUGGESTIONS).use { in <lambda>() 55 TestApis.permissions().withPermission(MANAGE_CONTENT_SUGGESTIONS).use { in <lambda>() 62 fun defaultServiceEnabled(user: UserReference = TestApis.users().instrumented()): Boolean { in <lambda>() 76 TestApis.permissions().withPermission(MANAGE_CONTENT_SUGGESTIONS).use { in <lambda>() 82 TestApis.permissions().withPermission(MANAGE_CONTENT_SUGGESTIONS).use { in <lambda>() 83 TestApis.content().suggestions().clearTemporaryService(user) in <lambda>() 89 fun clearTemporaryService(user: UserReference = TestApis.users().instrumented()) { in <lambda>() [all …]
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/notifications/ |
D | NotificationsTest.java | 35 import com.android.bedstead.nene.TestApis; 52 private static final UserReference USER = TestApis.users().instrumented(); 55 TestApis.context().instrumentedContext().getSystemService(NotificationManager.class); 59 TestApis.notifications().setNotificationListenerAccessGranted( in setNotificationListenerAccessGranted_true_notificationListenerAccessIsGranted() 68 TestApis.notifications().setNotificationListenerAccessGranted( in setNotificationListenerAccessGranted_false_notificationListenerAccessIsNotGranted() 77 assertThrows(NullPointerException.class, () -> TestApis.notifications() in setNotificationListenerAccessGranted_nullComponent_throwsException() 84 assertThrows(NullPointerException.class, () -> TestApis.notifications() in setNotificationListenerAccessGranted_nullUser_throwsException() 92 try (NotificationListener notifications = TestApis.notifications().createListener()) { in query_notificationIsPosted_findsNotification() 96 .wherePackageName().isEqualTo(TestApis.packages().instrumented().packageName()) in query_notificationIsPosted_findsNotification() 103 assertThrows(NeneException.class, () -> TestApis.notifications().createListener()); in createListener_noNotificationsTestAnnotation_throwsException() [all …]
|