diff options
Diffstat (limited to 'telephony/java/android')
-rw-r--r-- | telephony/java/android/telephony/PhoneNumberUtils.java | 2 | ||||
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 22 |
2 files changed, 21 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index 3ae2106..ab429fd 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java @@ -1805,7 +1805,7 @@ public class PhoneNumberUtils String countryIso; CountryDetector detector = (CountryDetector) context.getSystemService( Context.COUNTRY_DETECTOR); - if (detector != null) { + if (detector != null && detector.detectCountry() != null) { countryIso = detector.detectCountry().getCountryIso(); } else { Locale locale = context.getResources().getConfiguration().locale; diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 53f1424..8f17e72 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -330,7 +330,7 @@ public class TelephonyManager { */ public List<NeighboringCellInfo> getNeighboringCellInfo() { try { - return getITelephony().getNeighboringCellInfo(mContext.getBasePackageName()); + return getITelephony().getNeighboringCellInfo(mContext.getOpPackageName()); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { @@ -433,12 +433,12 @@ public class TelephonyManager { case RILConstants.NETWORK_MODE_GSM_UMTS: case RILConstants.NETWORK_MODE_LTE_GSM_WCDMA: case RILConstants.NETWORK_MODE_LTE_WCDMA: + case RILConstants.NETWORK_MODE_LTE_CMDA_EVDO_GSM_WCDMA: return PhoneConstants.PHONE_TYPE_GSM; // Use CDMA Phone for the global mode including CDMA case RILConstants.NETWORK_MODE_GLOBAL: case RILConstants.NETWORK_MODE_LTE_CDMA_EVDO: - case RILConstants.NETWORK_MODE_LTE_CMDA_EVDO_GSM_WCDMA: return PhoneConstants.PHONE_TYPE_CDMA; case RILConstants.NETWORK_MODE_LTE_ONLY: @@ -1421,4 +1421,22 @@ public class TelephonyManager { } catch (NullPointerException ex) { } } + + /** + * Returns the MMS user agent. + */ + public String getMmsUserAgent() { + if (mContext == null) return null; + return mContext.getResources().getString( + com.android.internal.R.string.config_mms_user_agent); + } + + /** + * Returns the MMS user agent profile URL. + */ + public String getMmsUAProfUrl() { + if (mContext == null) return null; + return mContext.getResources().getString( + com.android.internal.R.string.config_mms_user_agent_profile_url); + } } |