summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ling Ma <linggm@google.com> 2025-03-05 13:32:31 -0800
committer Ling Ma <linggm@google.com> 2025-03-05 13:34:53 -0800
commit5de2f89c7880afaf457749211e445bfffb6d3b7b (patch)
tree12e4be933460fa2b48a711b1c82ed4e87ef52fcc
parent6fa5bdd136f09fba0d8eaf8f9f0e62b4a790728f (diff)
[log] debug getDataNetworkType
Fix: 400506639 Test: basic voice call Flag: EXEMPT log only Change-Id: I40d40c4904770c9ad8bb8f49d33163a48501f9e3
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 41569deeddb5..9364f646d54b 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -3374,14 +3374,13 @@ public class TelephonyManager {
return telephony.getDataNetworkTypeForSubscriber(subId, getOpPackageName(),
getAttributionTag());
} else {
- // This can happen when the ITelephony interface is not up yet.
+ Log.e(TAG, "getDataNetworkType: ITelephony interface is not up yet");
return NETWORK_TYPE_UNKNOWN;
}
- } catch(RemoteException ex) {
- // This shouldn't happen in the normal case
- return NETWORK_TYPE_UNKNOWN;
- } catch (NullPointerException ex) {
- // This could happen before phone restarts due to crashing
+ } catch (RemoteException // Shouldn't happen in the normal case
+ | NullPointerException ex // Could happen before phone restarts due to crashing
+ ) {
+ Log.e(TAG, "getDataNetworkType: " + ex.getMessage());
return NETWORK_TYPE_UNKNOWN;
}
}