am 080674e6: Merge "Getting mcc/mnc from system prop instead of subInfoRecord." into lmp-mr1-dev
* commit '080674e6da8e3db392a2a9e96a00cfc8e4635d00':
Getting mcc/mnc from system prop instead of subInfoRecord.
diff --git a/src/com/android/settings/ApnSettings.java b/src/com/android/settings/ApnSettings.java
index db5449f..9de329c 100644
--- a/src/com/android/settings/ApnSettings.java
+++ b/src/com/android/settings/ApnSettings.java
@@ -53,6 +53,7 @@
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.TelephonyProperties;
+import android.telephony.TelephonyManager;
import java.util.ArrayList;
@@ -131,7 +132,8 @@
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
final Activity activity = getActivity();
- final int subId = activity.getIntent().getIntExtra("sub_id", -1);
+ // Fixme: Workaround for single sim device.
+ mSubscriptionInfo = Utils.findRecordBySlotId(activity, 0);
mUm = (UserManager) getSystemService(Context.USER_SERVICE);
@@ -142,7 +144,6 @@
setHasOptionsMenu(true);
}
- mSubscriptionInfo = Utils.findRecordBySubId(activity, subId);
}
@Override
@@ -202,9 +203,10 @@
}
private void fillList() {
+ final TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
final String mccmnc = mSubscriptionInfo == null ? ""
- : Integer.toString(mSubscriptionInfo.getMcc())
- + Integer.toString(mSubscriptionInfo.getMnc());
+ : tm.getSimOperator(mSubscriptionInfo.getSubscriptionId());
+ Log.d(TAG, "mccmnc = " + mccmnc);
final String where = "numeric=\""
+ mccmnc
+ "\"";