summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nate Myren <ntmyren@google.com> 2025-03-18 13:07:59 -0700
committer Nate Myren <ntmyren@google.com> 2025-03-18 13:10:21 -0700
commit044a690fc9a0186e1307f02b32344d69bad38681 (patch)
treeb618eebd045155daf19c36b8d00cfab9de01b229
parenta62dd6ccdcea43e182944c783134457b9245d748 (diff)
Catch runtime exception when telephony is not available
When the telephony service is unavailable, calling emergency number check will trigger remote exception,which will be thrown as runtime exception. Bug: 404137946 Test: manual Flag: EXEMPT minor bugfix Relnote: N/A Change-Id: I1c9c20b259849ba9de39ec2fdfd73b15e017baa0
-rw-r--r--service/java/com/android/ecm/EnhancedConfirmationService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/service/java/com/android/ecm/EnhancedConfirmationService.java b/service/java/com/android/ecm/EnhancedConfirmationService.java
index 1a6b80a3c..1cc3a743e 100644
--- a/service/java/com/android/ecm/EnhancedConfirmationService.java
+++ b/service/java/com/android/ecm/EnhancedConfirmationService.java
@@ -685,7 +685,7 @@ public class EnhancedConfirmationService extends SystemService {
if (number != null && mTelephonyManager.isEmergencyNumber(number)) {
return CALL_TYPE_EMERGENCY;
}
- } catch (IllegalStateException | UnsupportedOperationException e) {
+ } catch (RuntimeException e) {
// If either of these are thrown, the telephony service is not available on the
// current device, either because the device lacks telephony calling, or the
// telephony service is unavailable.