summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/deviceinfo/Status.java
diff options
context:
space:
mode:
authorChouting Zhang <MichaelZhang@motorola.com>2009-06-24 14:25:43 -0500
committerWink Saville <wink@google.com>2009-06-25 22:01:32 -0700
commit386278a338d740dce95b7fa1514662b0eb5683e4 (patch)
tree03df16b9c97743db7fab9efa481a7aae48c41233 /src/com/android/settings/deviceinfo/Status.java
parentd2e3b0139009b98be5ed825e58c38a325240594e (diff)
downloadpackages_apps_Settings-386278a338d740dce95b7fa1514662b0eb5683e4.tar.gz
packages_apps_Settings-386278a338d740dce95b7fa1514662b0eb5683e4.tar.bz2
packages_apps_Settings-386278a338d740dce95b7fa1514662b0eb5683e4.zip
CDMA Settings additions
This patch implement CDMA Settings features 1. Add code to get MEID, MIN, and PRL value if the phone is a CDMA Phone 2. Display MEID, MIN, and PRL on Settings screen if it is a CDMA phone 3. Do not display IMSI, IMEI, and IMEI SV for a CDMA phone
Diffstat (limited to 'src/com/android/settings/deviceinfo/Status.java')
-rw-r--r--src/com/android/settings/deviceinfo/Status.java24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/com/android/settings/deviceinfo/Status.java b/src/com/android/settings/deviceinfo/Status.java
index ece53465a..a16575410 100644
--- a/src/com/android/settings/deviceinfo/Status.java
+++ b/src/com/android/settings/deviceinfo/Status.java
@@ -182,11 +182,27 @@ public class Status extends PreferenceActivity {
mUptime = findPreference("up_time");
//NOTE "imei" is the "Device ID" since it represents the IMEI in GSM and the MEID in CDMA
- setSummaryText("imei", mPhone.getDeviceId());
-
- setSummaryText("imei_sv",
- ((TelephonyManager) getSystemService(TELEPHONY_SERVICE))
+ if (mPhone.getPhoneName().equals("CDMA")) {
+ setSummaryText("meid_number", mPhone.getMeid());
+ setSummaryText("min_number", mPhone.getCdmaMin());
+ setSummaryText("prl_version", mPhone.getCdmaPrlVersion());
+
+ // device is not GSM/UMTS, do not display GSM/UMTS features
+ getPreferenceScreen().removePreference(findPreference("imei"));
+ getPreferenceScreen().removePreference(findPreference("imei_sv"));
+ } else {
+ setSummaryText("imei", mPhone.getDeviceId());
+
+ setSummaryText("imei_sv",
+ ((TelephonyManager) getSystemService(TELEPHONY_SERVICE))
.getDeviceSoftwareVersion());
+
+ // device is not CDMA, do not display CDMA features
+ getPreferenceScreen().removePreference(findPreference("prl_version"));
+ getPreferenceScreen().removePreference(findPreference("meid_number"));
+ getPreferenceScreen().removePreference(findPreference("min_number"));
+ }
+
setSummaryText("number", mPhone.getLine1Number());
mPhoneStateReceiver = new PhoneStateIntentReceiver(this, mHandler);