diff options
author | 2024-02-22 06:38:37 +0000 | |
---|---|---|
committer | 2024-02-22 06:38:37 +0000 | |
commit | c76f660ed9110386f26c04c0720f347966ddf928 (patch) | |
tree | f2bf38469be6e106c3b4d0e50a577c0e87f5c037 | |
parent | fe8b8fc62f8d78e45381e0bf1b787ae94cd5d99a (diff) | |
parent | 93cf72f181903778f3b121294909433fa383cc4c (diff) |
Merge "Add voiceCapable condition to RoleManagerTest." into main
-rw-r--r-- | tests/cts/role/src/android/app/role/cts/RoleManagerTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/cts/role/src/android/app/role/cts/RoleManagerTest.java b/tests/cts/role/src/android/app/role/cts/RoleManagerTest.java index ee898d660..4b618a1d7 100644 --- a/tests/cts/role/src/android/app/role/cts/RoleManagerTest.java +++ b/tests/cts/role/src/android/app/role/cts/RoleManagerTest.java @@ -1112,7 +1112,8 @@ public class RoleManagerTest { TelephonyManager telephonyManager = sContext.getSystemService(TelephonyManager.class); List<String> emergencyRoleHolders = getRoleHolders(RoleManager.ROLE_EMERGENCY); - if (callWithShellPermissionIdentity(() -> + if (telephonyManager.isVoiceCapable() + && callWithShellPermissionIdentity(() -> telephonyManager.isEmergencyAssistanceEnabled())) { String emergencyAssistancePackageName = callWithShellPermissionIdentity(() -> telephonyManager.getEmergencyAssistancePackage()); |