diff options
author | Wink Saville <wink@google.com> | 2009-06-01 14:39:20 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2009-06-01 14:39:20 -0700 |
commit | f315238a2b07c7e84f6ade800e504f520d262e66 (patch) | |
tree | ca139c52989818f8a0adbbc28c13799c15bb5cf0 /services/java/com | |
parent | ff0d91479d3c8523bc290bd1b65fcd2546be1d40 (diff) | |
download | frameworks_base-f315238a2b07c7e84f6ade800e504f520d262e66.zip frameworks_base-f315238a2b07c7e84f6ade800e504f520d262e66.tar.gz frameworks_base-f315238a2b07c7e84f6ade800e504f520d262e66.tar.bz2 |
TODO's from Teleca with modifications from wink.
Diffstat (limited to 'services/java/com')
-rw-r--r-- | services/java/com/android/server/status/StatusBarPolicy.java | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/services/java/com/android/server/status/StatusBarPolicy.java b/services/java/com/android/server/status/StatusBarPolicy.java index af94100..42c885d 100644 --- a/services/java/com/android/server/status/StatusBarPolicy.java +++ b/services/java/com/android/server/status/StatusBarPolicy.java @@ -840,30 +840,10 @@ public class StatusBarPolicy { updateDataIcon(); } - // TODO(Teleca): I've add isCdma() to reduce some code duplication and simplify. - // Please validate the correctness of these changes private boolean isCdma() { - // Is this equivalent, if so it seems simpler? -// return ((mPhone != null) && (mPhone.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA)); - - if (mServiceState != null) { - switch(mServiceState.getRadioTechnology()) { - case ServiceState.RADIO_TECHNOLOGY_1xRTT: - case ServiceState.RADIO_TECHNOLOGY_EVDO_0: - case ServiceState.RADIO_TECHNOLOGY_EVDO_A: - case ServiceState.RADIO_TECHNOLOGY_IS95A: - case ServiceState.RADIO_TECHNOLOGY_IS95B: - return true; - default: - return false; - } - } else { - return false; - } + return ((mPhone != null) && (mPhone.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA)); } - // TODO(Teleca): I've add hasService() to reduce some code duplication and simplify. - // Please validate the correctness of these changes. private boolean hasService() { if (mServiceState != null) { switch (mServiceState.getState()) { @@ -1223,10 +1203,12 @@ public class StatusBarPolicy { private final void updateCdmaRoamingIcon() { if (!hasService()) { mService.setIconVisibility(mCdmaRoamingIndicatorIcon, false); + return; } if (!isCdma()) { mService.setIconVisibility(mCdmaRoamingIndicatorIcon, false); + return; } int[] iconList = sRoamingIndicatorImages_cdma; @@ -1256,8 +1238,10 @@ public class StatusBarPolicy { mService.setIconVisibility(mCdmaRoamingIndicatorIcon, true); break; case EriInfo.ROAMING_ICON_MODE_FLASH: - mCdmaRoamingIndicatorIconData.iconId = com.android.internal.R.drawable.stat_sys_roaming_cdma_flash; + mCdmaRoamingIndicatorIconData.iconId = + com.android.internal.R.drawable.stat_sys_roaming_cdma_flash; mService.updateIcon(mCdmaRoamingIndicatorIcon, mCdmaRoamingIndicatorIconData, null); + mService.setIconVisibility(mCdmaRoamingIndicatorIcon, true); break; } |