summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorSanket Padawe <sanketpadawe@google.com>2015-02-13 00:07:22 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-13 00:07:22 +0000
commit62197c9a97bc824cd875e18bb820985f056c007e (patch)
tree20843411d8927ca9caf64cb0a21f6dba684b830e /src/com/android
parent6fc2f7f65d5ab9dae22cbd13f7fb4213da26b691 (diff)
parent4a7ca7d5a7c83dc77921c9c32abc7b366c18b46c (diff)
downloadpackages_apps_Settings-62197c9a97bc824cd875e18bb820985f056c007e.zip
packages_apps_Settings-62197c9a97bc824cd875e18bb820985f056c007e.tar.gz
packages_apps_Settings-62197c9a97bc824cd875e18bb820985f056c007e.tar.bz2
am 4a7ca7d5: am bdfdf07c: am 0362e870: am 7e21fa5a: Data Usage tab title should say "Cellular" with only 1 sim and wifi tab.
* commit '4a7ca7d5a7c83dc77921c9c32abc7b366c18b46c': Data Usage tab title should say "Cellular" with only 1 sim and wifi tab.
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/settings/DataUsageSummary.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index 8eb70e6..cba0879 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -670,10 +670,12 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
final Context context = getActivity();
mTabHost.clearAllTabs();
- for (int i = 0; i < mTelephonyManager.getSimCount(); i++) {
+ int simCount = mTelephonyManager.getSimCount();
+
+ for (int i = 0; i < simCount; i++) {
final SubscriptionInfo sir = Utils.findRecordBySlotId(context, i);
if (sir != null) {
- addMobileTab(context, sir);
+ addMobileTab(context, sir, (simCount > 1));
}
}
@@ -2664,11 +2666,16 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
}
};
- private void addMobileTab(Context context, SubscriptionInfo subInfo) {
+ private void addMobileTab(Context context, SubscriptionInfo subInfo, boolean isMultiSim) {
if (subInfo != null && mMobileTagMap != null) {
if (hasReadyMobileRadio(context, subInfo.getSubscriptionId())) {
- mTabHost.addTab(buildTabSpec(mMobileTagMap.get(subInfo.getSubscriptionId()),
- subInfo.getDisplayName()));
+ if (isMultiSim) {
+ mTabHost.addTab(buildTabSpec(mMobileTagMap.get(subInfo.getSubscriptionId()),
+ subInfo.getDisplayName()));
+ } else {
+ mTabHost.addTab(buildTabSpec(mMobileTagMap.get(subInfo.getSubscriptionId()),
+ R.string.data_usage_tab_mobile));
+ }
}
} else {
if (LOGD) Log.d(TAG, "addMobileTab: subInfoList is null");