summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPauloftheWest <paulofthewest@google.com>2014-12-19 22:53:03 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-12-19 22:53:03 +0000
commit3e864c0bdae3ff9801e04438b8347631b3153d6d (patch)
tree21c5b20c3db48469d50141b6f810d1807f96c9fa /src
parent19627ca215fa643a443722f183f3f781d4a2b041 (diff)
parenta68bdb6dbe329481d1f50b66e6973135ad5fb27c (diff)
downloadpackages_apps_Settings-3e864c0bdae3ff9801e04438b8347631b3153d6d.tar.gz
packages_apps_Settings-3e864c0bdae3ff9801e04438b8347631b3153d6d.tar.bz2
packages_apps_Settings-3e864c0bdae3ff9801e04438b8347631b3153d6d.zip
Merge "Removed extraneous slot information on single SIM devices." into lmp-mr1-dev
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/deviceinfo/ImeiInformation.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/settings/deviceinfo/ImeiInformation.java b/src/com/android/settings/deviceinfo/ImeiInformation.java
index 38fd3357b..253e22a11 100644
--- a/src/com/android/settings/deviceinfo/ImeiInformation.java
+++ b/src/com/android/settings/deviceinfo/ImeiInformation.java
@@ -43,6 +43,7 @@ public class ImeiInformation extends PreferenceActivity {
private static final String KEY_IMEI_SV = "imei_sv";
private SubscriptionManager mSubscriptionManager;
+ private boolean isMultiSIM = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -56,6 +57,7 @@ public class ImeiInformation extends PreferenceActivity {
// Since there are multiple phone for dsds, therefore need to show information for different
// phones.
private void initPreferenceScreen(int slotCount) {
+ isMultiSIM = (slotCount > 1);
for (int slotId = 0; slotId < slotCount; slotId ++) {
addPreferencesFromResource(R.xml.device_info_phone_status);
setPreferenceValue(slotId);
@@ -122,8 +124,10 @@ public class ImeiInformation extends PreferenceActivity {
private void updateTitle(Preference pref, int slotId) {
if (pref != null) {
String title = pref.getTitle().toString();
- // Slot starts from 1, slotId starts from 0 so plus 1
- title = title + getResources().getString(R.string.slot_number, slotId + 1);
+ if (isMultiSIM) {
+ // Slot starts from 1, slotId starts from 0 so plus 1
+ title += " " + getResources().getString(R.string.slot_number, slotId + 1);
+ }
pref.setTitle(title);
}
}