diff options
author | 2025-03-17 16:34:24 +0800 | |
---|---|---|
committer | 2025-03-18 13:10:10 -0700 | |
commit | e27a8ccecf78fdf734827b8a023d53c5c5027b79 (patch) | |
tree | fc588d2c080fb0cce7ed250299bba0fd21e58410 | |
parent | 2f62693aee03f7c1c6c7c6518e96f33062ba9583 (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
Merged-In: I1c9c20b259849ba9de39ec2fdfd73b15e017baa0
Change-Id: Iff61163c265563f4988247dd22668f1c2ea30d02
-rw-r--r-- | service/java/com/android/ecm/EnhancedConfirmationService.java | 2 |
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 af2e81133..515f70add 100644 --- a/service/java/com/android/ecm/EnhancedConfirmationService.java +++ b/service/java/com/android/ecm/EnhancedConfirmationService.java @@ -162,7 +162,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. |