@@ -88,6 +88,7 @@ public class NetworkController extends BroadcastReceiver {
8888 int mLastSignalLevel ;
8989 boolean mShowPhoneRSSIForData = false ;
9090 boolean mShowAtLeastThreeGees = false ;
91+ boolean mAlwaysShowCdmaRssi = false ;
9192
9293 String mContentDescriptionPhoneSignal ;
9394 String mContentDescriptionWifi ;
@@ -156,7 +157,7 @@ public class NetworkController extends BroadcastReceiver {
156157 IBatteryStats mBatteryStats ;
157158
158159 public interface SignalCluster {
159- void setWifiIndicators (boolean visible , int strengthIcon , int activityIcon ,
160+ void setWifiIndicators (boolean visible , int strengthIcon , int activityIcon ,
160161 String contentDescription );
161162 void setMobileDataIndicators (boolean visible , int strengthIcon , int activityIcon ,
162163 int typeIcon , String contentDescription , String typeContentDescription );
@@ -176,6 +177,8 @@ public NetworkController(Context context) {
176177
177178 mShowPhoneRSSIForData = res .getBoolean (R .bool .config_showPhoneRSSIForData );
178179 mShowAtLeastThreeGees = res .getBoolean (R .bool .config_showMin3G );
180+ mAlwaysShowCdmaRssi = res .getBoolean (
181+ com .android .internal .R .bool .config_alwaysUseCdmaRssi );
179182
180183 // set up the default wifi icon, used when no radios have ever appeared
181184 updateWifiIcons ();
@@ -287,7 +290,7 @@ public void refreshSignalCluster(SignalCluster cluster) {
287290 // wimax is special
288291 cluster .setMobileDataIndicators (
289292 true ,
290- mWimaxIconId ,
293+ mAlwaysShowCdmaRssi ? mPhoneSignalIconId : mWimaxIconId ,
291294 mMobileActivityIconId ,
292295 mDataTypeIconId ,
293296 mContentDescriptionWimax ,
@@ -351,7 +354,7 @@ public void onReceive(Context context, Intent intent) {
351354 @ Override
352355 public void onSignalStrengthsChanged (SignalStrength signalStrength ) {
353356 if (DEBUG ) {
354- Slog .d (TAG , "onSignalStrengthsChanged signalStrength=" + signalStrength +
357+ Slog .d (TAG , "onSignalStrengthsChanged signalStrength=" + signalStrength +
355358 ((signalStrength == null ) ? "" : (" level=" + signalStrength .getLevel ())));
356359 }
357360 mSignalStrength = signalStrength ;
@@ -469,7 +472,15 @@ private final void updateTelephonySignalStrength() {
469472 } else {
470473 int iconLevel ;
471474 int [] iconList ;
472- mLastSignalLevel = iconLevel = mSignalStrength .getLevel ();
475+ if (isCdma () && mAlwaysShowCdmaRssi ) {
476+ mLastSignalLevel = iconLevel = mSignalStrength .getCdmaLevel ();
477+ if (DEBUG ) Slog .d (TAG , "mAlwaysShowCdmaRssi=" + mAlwaysShowCdmaRssi
478+ + " set to cdmaLevel=" + mSignalStrength .getCdmaLevel ()
479+ + " instead of level=" + mSignalStrength .getLevel ());
480+ } else {
481+ mLastSignalLevel = iconLevel = mSignalStrength .getLevel ();
482+ }
483+
473484 if (isCdma ()) {
474485 if (isCdmaEri ()) {
475486 iconList = TelephonyIcons .TELEPHONY_SIGNAL_STRENGTH_ROAMING [mInetCondition ];
@@ -487,7 +498,6 @@ private final void updateTelephonySignalStrength() {
487498 mPhoneSignalIconId = iconList [iconLevel ];
488499 mContentDescriptionPhoneSignal = mContext .getString (
489500 AccessibilityContentDescriptions .PHONE_SIGNAL_STRENGTH [iconLevel ]);
490-
491501 mDataSignalIconId = TelephonyIcons .DATA_SIGNAL_STRENGTH [mInetCondition ][iconLevel ];
492502 }
493503 }
@@ -908,7 +918,7 @@ void refreshViews() {
908918 mobileLabel = "" ;
909919 }
910920 } else {
911- mobileLabel
921+ mobileLabel
912922 = context .getString (R .string .status_bar_settings_signal_meter_disconnected );
913923 }
914924
@@ -1181,7 +1191,7 @@ else if (!mDataConnected && !mWifiConnected && !mBluetoothTethered && !mWimaxCon
11811191 v .setText (wifiLabel );
11821192 }
11831193 }
1184-
1194+
11851195 // mobile label
11861196 N = mMobileLabelViews .size ();
11871197 for (int i =0 ; i <N ; i ++) {
0 commit comments