OSDN Git Service

am d7b2dccb: Display IMEI and ICCID for LTE device.
authorJohn Wang <johnwang@google.com>
Wed, 13 Jul 2011 17:54:17 +0000 (10:54 -0700)
committerAndroid Git Automerger <android-git-automerger@android.com>
Wed, 13 Jul 2011 17:54:17 +0000 (10:54 -0700)
* commit 'd7b2dccbe60a02965186d28f0b671ef1c419a2a8':
  Display IMEI and ICCID for LTE device.

1  2 
res/values/strings.xml
src/com/android/settings/deviceinfo/Status.java

      <string name="status_number" product="default">My phone number</string>
      <!-- About phone, status item title.  The phone MIN number of the current device.-->
      <string name="status_min_number">MIN</string>
 +    <!-- About phone, status item title.  The phone MSID number of the current device.-->
 +    <string name="status_msid_number">MSID</string>
      <!-- About phone, status item title.  The phone PRL Version of the current device.-->
      <string name="status_prl_version">PRL Version</string>
-     <!-- About phone, status item title.  The phone IMEI/MEID number of the current LTE/CDMA device.-->
-     <string name="status_meid_number">IMEI / MEID</string>
+     <!-- About phone, status item title.  The phone MEID number of the current LTE/CDMA device. [CHAR LIMIT=30] -->
+     <string name="status_meid_number">MEID</string>
+     <!-- About phone, status item title.  The ICCID of the current LTE device. [CHAR LIMIT=30] -->
+     <string name="status_icc_id">ICCID</string>
      <!-- About phone, status item title for the type of data phone network we're connected to, for example 3G or Edge or GPRS -->
      <string name="status_network_type">Mobile network type</string>
      <!-- About phone, status item title. The status of data access.  For example, the value may be "Connected" -->
@@@ -227,15 -229,19 +229,22 @@@ public class Status extends PreferenceA
              if (mPhone.getPhoneName().equals("CDMA")) {
                  setSummaryText(KEY_MEID_NUMBER, mPhone.getMeid());
                  setSummaryText(KEY_MIN_NUMBER, mPhone.getCdmaMin());
 +                if (getResources().getBoolean(R.bool.config_msid_enable)) {
 +                    findPreference(KEY_MIN_NUMBER).setTitle(R.string.status_msid_number);
 +                }
                  setSummaryText(KEY_PRL_VERSION, mPhone.getCdmaPrlVersion());
-                 // device is not GSM/UMTS, do not display GSM/UMTS features
-                 // check Null in case no specified preference in overlay xml
-                 removePreferenceFromScreen(KEY_IMEI);
                  removePreferenceFromScreen(KEY_IMEI_SV);
+                 if (mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
+                     // Show ICC ID and IMEI for LTE device
+                     setSummaryText(KEY_ICC_ID, mPhone.getIccSerialNumber());
+                     setSummaryText(KEY_IMEI, mPhone.getImei());
+                 } else {
+                     // device is not GSM/UMTS, do not display GSM/UMTS features
+                     // check Null in case no specified preference in overlay xml
+                     removePreferenceFromScreen(KEY_IMEI);
+                     removePreferenceFromScreen(KEY_ICC_ID);
+                 }
              } else {
                  setSummaryText(KEY_IMEI, mPhone.getDeviceId());