/cts/tests/tests/telecom/src/android/telecom/cts/ |
D | CtsRoleManagerAdapter.java | 95 public List<String> getRoleHolder(String roleName) { in getRoleHolder() argument 98 List<String> previousHolders = mRoleManager.getRoleHolders(roleName); in getRoleHolder() 106 private void addRoleHolder(String roleName, String packageName) throws InterruptedException { in addRoleHolder() argument 111 mRoleManager.addRoleHolderAsUser(roleName, packageName, in addRoleHolder() 115 q.add(roleName + packageName); in addRoleHolder() 122 assertEquals(roleName + packageName, res); in addRoleHolder() 125 private void removeRoleHolderInternal(String roleName, String packageName) in removeRoleHolderInternal() argument 131 mRoleManager.removeRoleHolderAsUser(roleName, packageName, 0, user, executor, in removeRoleHolderInternal() 134 q.add(roleName + packageName); in removeRoleHolderInternal() 141 assertEquals(roleName + packageName, res); in removeRoleHolderInternal()
|
D | NullBindingCallScreeningServiceTest.java | 114 private void addRoleHolder(String roleName, String packageName) in addRoleHolder() argument 120 runWithShellPermissionIdentity(() -> mRoleManager.addRoleHolderAsUser(roleName, in addRoleHolder() 133 private void removeRoleHolder(String roleName, String packageName) in removeRoleHolder() argument 139 runWithShellPermissionIdentity(() -> mRoleManager.removeRoleHolderAsUser(roleName, in removeRoleHolder()
|
D | CallRedirectionServiceTest.java | 317 private void addRoleHolder(String roleName, String packageName) throws Exception { in addRoleHolder() argument 322 runWithShellPermissionIdentity(() -> mRoleManager.addRoleHolderAsUser(roleName, in addRoleHolder() 335 private void removeRoleHolder(String roleName, String packageName) in removeRoleHolder() argument 341 runWithShellPermissionIdentity(() -> mRoleManager.removeRoleHolderAsUser(roleName, in removeRoleHolder()
|
D | ThirdPartyCallScreeningServiceTest.java | 580 private void addRoleHolder(String roleName, String packageName) in addRoleHolder() argument 586 runWithShellPermissionIdentity(() -> mRoleManager.addRoleHolderAsUser(roleName, in addRoleHolder() 599 private void removeRoleHolder(String roleName, String packageName) in removeRoleHolder() argument 605 runWithShellPermissionIdentity(() -> mRoleManager.removeRoleHolderAsUser(roleName, in removeRoleHolder()
|
D | BackgroundCallAudioTest.java | 666 private void clearRoleHoldersAsUser(String roleName) in clearRoleHoldersAsUser() argument 672 runWithShellPermissionIdentity(() -> mRoleManager.clearRoleHoldersAsUser(roleName, in clearRoleHoldersAsUser()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | RolePermissionOverrideTest.kt | 106 private fun getRoleHolders(roleName: String): List<String> = in getRoleHolders() 107 callWithShellPermissionIdentity { roleManager.getRoleHolders(roleName) } in getRoleHolders() 109 private fun getRoleHolder(roleName: String): String? = getRoleHolders(roleName).firstOrNull() in getRoleHolder() 117 private fun addRoleHolder(roleName: String, packageName: String) { in addRoleHolder() 121 roleName, packageName, 0, user, context.mainExecutor, future in addRoleHolder()
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | PermissionUtils.java | 212 public static List<String> getRoleHolders(String roleName) throws Exception { in getRoleHolders() argument 214 .getSystemService(RoleManager.class).getRoleHolders(roleName), in getRoleHolders() 226 public static String getRoleHolder(String roleName) throws Exception { in getRoleHolder() argument 227 List<String> packageNames = getRoleHolders(roleName); in getRoleHolder() 234 + roleName + "\" but found " + packageNames.size() + ": " + packageNames); in getRoleHolder()
|
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ |
D | PackageDeviceInfo.java | 386 for(String roleName: roleNames) { in collectRoles() 388 store.addResult(ROLE_NAME, roleName); in collectRoles() 402 for(String roleName: RolesUtil.ROLE_NAMES) { in getPackageRolesData() 403 List<String> packageNames = getRoleHolders(roleName, roleManager); in getPackageRolesData() 407 packageRolesData.get(packageName).add(roleName); in getPackageRolesData() 413 …public static List<String> getRoleHolders(String roleName, RoleManager roleManager) throws Excepti… in getRoleHolders() argument 415 () -> roleManager.getRoleHolders(roleName), in getRoleHolders()
|
/cts/tests/tests/companion/uiautomation/src/android/companion/cts/uiautomation/ |
D | UiAutomationTestBase.kt | 106 profile?.let { roleName -> targetApp.removeFromHoldersOfRole(roleName) } in <lambda>() method 362 protected fun assertIsProfileRoleHolder() = profile?.let { roleName -> in <lambda>() method 364 roleManager.getRoleHolders(roleName) in <lambda>() 366 assertContains(roleHolders, targetPackageName, "Not a holder of $roleName") in <lambda>()
|
/cts/tests/tests/nfc/src/android/nfc/cts/ |
D | WalletRoleTestUtils.java | 148 OnRoleHoldersChangedListener onRoleHoldersChangedListener = (roleName, user) -> { in runWithRole() 149 if (roleName.equals(RoleManager.ROLE_WALLET)) { in runWithRole() 203 OnRoleHoldersChangedListener onRoleHoldersChangedListener = (roleName, user) -> { in runWithRoleNone() 204 if (roleName.equals(RoleManager.ROLE_WALLET)) { in runWithRoleNone()
|
/cts/tests/tests/app.usage/BroadcastResponseStats/src/android/app/usage/brs/cts/ |
D | BroadcastResponseStatsTest.java | 2186 final OnRoleHoldersChangedListener listener = (roleName, user) -> { in addAssistRoleHolder() 2187 Log.d(TAG, "Received role changed callback for role=" + roleName in addAssistRoleHolder() 2190 && ROLE_ASSISTANT.equals(roleName) && user.getIdentifier() == userId in addAssistRoleHolder() 2205 private void addRoleHolderAsUser(String roleName, String pkgName, int userId) in addRoleHolderAsUser() argument 2209 mRoleManager.addRoleHolderAsUser(roleName, pkgName, 0, in addRoleHolderAsUser() 2221 final OnRoleHoldersChangedListener listener = (roleName, user) -> { in removeAssistRoleHolder() 2222 Log.d(TAG, "Received role changed callback for role=" + roleName in removeAssistRoleHolder() 2225 && ROLE_ASSISTANT.equals(roleName) && user.getIdentifier() == userId in removeAssistRoleHolder() 2240 private void removeRoleHolderAsUser(String roleName, String pkgName, int userId) in removeRoleHolderAsUser() argument 2244 mRoleManager.removeRoleHolderAsUser(roleName, pkgName, 0, in removeRoleHolderAsUser()
|