summaryrefslogtreecommitdiffstats
path: root/telephony/java/android
diff options
context:
space:
mode:
authorStuart Scott <stuartscott@google.com>2014-09-30 16:12:42 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-30 16:12:42 +0000
commit3aacaac344d3bc9699d8dbb89094867310417725 (patch)
treed180a7b691d12101c3d49d066c877b190d1a5268 /telephony/java/android
parent9ff903789dd9650e7f3986503fad089d047b64ed (diff)
parenta541338a1eaa0fd3ed53c4eaf4be2551ec1a7350 (diff)
downloadframeworks_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.java11
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);
}