diff options
author | Stuart Scott <stuartscott@google.com> | 2014-09-30 16:12:42 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-30 16:12:42 +0000 |
commit | 3aacaac344d3bc9699d8dbb89094867310417725 (patch) | |
tree | d180a7b691d12101c3d49d066c877b190d1a5268 /telephony/java/android | |
parent | 9ff903789dd9650e7f3986503fad089d047b64ed (diff) | |
parent | a541338a1eaa0fd3ed53c4eaf4be2551ec1a7350 (diff) | |
download | frameworks_base-3aacaac344d3bc9699d8dbb89094867310417725.zip frameworks_base-3aacaac344d3bc9699d8dbb89094867310417725.tar.gz frameworks_base-3aacaac344d3bc9699d8dbb89094867310417725.tar.bz2 |
am a541338a: am ec89863a: am 38bfcb4a: Merge "Get the MCC/MNC using defaults." into lmp-sprout-dev
* commit 'a541338a1eaa0fd3ed53c4eaf4be2551ec1a7350':
Get the MCC/MNC using defaults.
Diffstat (limited to 'telephony/java/android')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index aa39e76..d718e69 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1501,7 +1501,16 @@ public class TelephonyManager { * @see #getSimState */ public String getSimOperator() { - long subId = getDefaultSubscription(); + long subId = SubscriptionManager.getDefaultDataSubId(); + if (!SubscriptionManager.isUsableSubIdValue(subId)) { + subId = SubscriptionManager.getDefaultSmsSubId(); + if (!SubscriptionManager.isUsableSubIdValue(subId)) { + subId = SubscriptionManager.getDefaultVoiceSubId(); + if (!SubscriptionManager.isUsableSubIdValue(subId)) { + subId = SubscriptionManager.getDefaultSubId(); + } + } + } Rlog.d(TAG, "getSimOperator(): default subId=" + subId); return getSimOperator(subId); } |