From 379128e5c2fb5f5dbf9171d2ff56571eee83d5e1 Mon Sep 17 00:00:00 2001 From: Jonathan Basseri Date: Wed, 2 Aug 2017 01:10:47 +0000 Subject: [PATCH] Revert "Move getNetworkCountryIso impl from TM to PIM." This reverts commit 6f4657363cac93ddcc718d9716e3b138f770f2e2. Change-Id: Ie0062369198af03441c531cd2181ed9c12b8f012 --- .../java/android/telephony/TelephonyManager.java | 12 +++--------- .../com/android/internal/telephony/ITelephony.aidl | 7 ------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index d77168fa0f7f6..add4f03cddb1e 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1613,7 +1613,8 @@ public class TelephonyManager { * @hide */ public String getNetworkCountryIso(int subId) { - return getNetworkCountryIsoForPhone(getPhoneId(subId)); + int phoneId = SubscriptionManager.getPhoneId(subId); + return getNetworkCountryIsoForPhone(phoneId); } /** @@ -1628,14 +1629,7 @@ public class TelephonyManager { */ /** {@hide} */ public String getNetworkCountryIsoForPhone(int phoneId) { - try { - ITelephony telephony = getITelephony(); - if (telephony != null) - return ""; - return telephony.getNetworkCountryIsoForPhone(phoneId); - } catch (RemoteException ex) { - return ""; - } + return getTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY, ""); } /** Network type is unknown */ diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 1493fe2b8664c..63e7abf8ec049 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -376,13 +376,6 @@ interface ITelephony { Bundle getCellLocation(String callingPkg); - /** - * Returns the ISO country code equivalent of the current registered - * operator's MCC (Mobile Country Code). - * @see android.telephony.TelephonyManager#getNetworkCountryIso - */ - String getNetworkCountryIsoForPhone(int phoneId); - /** * Returns the neighboring cell information of the device. */