summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiangyu/Malcolm Chen <refuhoo@google.com>2018-07-20 21:36:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-07-20 21:36:04 +0000
commit38fb17b4a2517bd436a30b22cddde9974e6cdb9a (patch)
treec673095aeb0bcfc380b20a590bfca85e87c22101
parentfb3d7c164726d20a3847b7bf9ec1be610751823b (diff)
parent3732c2bc6d2e709c7727445059310184d5e1aeca (diff)
downloadplatform_packages_services_Telephony-pie-dr1-dev.tar.gz
platform_packages_services_Telephony-pie-dr1-dev.tar.bz2
platform_packages_services_Telephony-pie-dr1-dev.zip
Merge "Fix the bug TM#getNetworkCountryISO returns null in SUW." into pi-devpie-dr1-dev
-rwxr-xr-xsrc/com/android/phone/PhoneInterfaceManager.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 5e1fe2252..a327d8883 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1716,6 +1716,10 @@ public class PhoneInterfaceManager extends ITelephony.Stub {
// registered cell info, so return a NULL country instead.
final long identity = Binder.clearCallingIdentity();
try {
+ if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
+ // Get default phone in this case.
+ phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
+ }
final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
// Todo: fix this when we can get the actual cellular network info when the device
// is on IWLAN.