diff options
-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()); |