@@ -85,6 +85,8 @@ public class NetworkController extends BroadcastReceiver {
8585 boolean mDataActive ;
8686 int mMobileActivityIconId ; // overlay arrows for data direction
8787 int mLastSignalLevel ;
88+ boolean mShowPhoneRSSIForData = false ;
89+ boolean mShowAtLeastThreeGees = false ;
8890
8991 String mContentDescriptionPhoneSignal ;
9092 String mContentDescriptionWifi ;
@@ -151,11 +153,15 @@ void setMobileDataIndicators(boolean visible, int strengthIcon, int activityIcon
151153 */
152154 public NetworkController (Context context ) {
153155 mContext = context ;
156+ final Resources res = context .getResources ();
154157
155158 ConnectivityManager cm = (ConnectivityManager )mContext .getSystemService (
156159 Context .CONNECTIVITY_SERVICE );
157160 mHasMobileDataFeature = cm .isNetworkSupported (ConnectivityManager .TYPE_MOBILE );
158161
162+ mShowPhoneRSSIForData = res .getBoolean (R .bool .config_showPhoneRSSIForData );
163+ mShowAtLeastThreeGees = res .getBoolean (R .bool .config_showMin3G );
164+
159165 // set up the default wifi icon, used when no radios have ever appeared
160166 updateWifiIcons ();
161167
@@ -240,7 +246,7 @@ public void addSignalCluster(SignalCluster cluster) {
240246 mContentDescriptionWifi );
241247 cluster .setMobileDataIndicators (
242248 mHasMobileDataFeature ,
243- mPhoneSignalIconId ,
249+ mShowPhoneRSSIForData ? mPhoneSignalIconId : mDataSignalIconId ,
244250 mMobileActivityIconId ,
245251 mDataTypeIconId ,
246252 mContentDescriptionPhoneSignal ,
@@ -434,17 +440,25 @@ private final void updateTelephonySignalStrength() {
434440 private final void updateDataNetType () {
435441 switch (mDataNetType ) {
436442 case TelephonyManager .NETWORK_TYPE_UNKNOWN :
437- mDataIconList = TelephonyIcons .DATA_G [mInetCondition ];
438- mDataTypeIconId = 0 ;
439- mContentDescriptionDataType = mContext .getString (
440- R .string .accessibility_data_connection_gprs );
441- break ;
443+ if (!mShowAtLeastThreeGees ) {
444+ mDataIconList = TelephonyIcons .DATA_G [mInetCondition ];
445+ mDataTypeIconId = 0 ;
446+ mContentDescriptionDataType = mContext .getString (
447+ R .string .accessibility_data_connection_gprs );
448+ break ;
449+ } else {
450+ // fall through
451+ }
442452 case TelephonyManager .NETWORK_TYPE_EDGE :
443- mDataIconList = TelephonyIcons .DATA_E [mInetCondition ];
444- mDataTypeIconId = R .drawable .stat_sys_data_connected_e ;
445- mContentDescriptionDataType = mContext .getString (
446- R .string .accessibility_data_connection_edge );
447- break ;
453+ if (!mShowAtLeastThreeGees ) {
454+ mDataIconList = TelephonyIcons .DATA_E [mInetCondition ];
455+ mDataTypeIconId = R .drawable .stat_sys_data_connected_e ;
456+ mContentDescriptionDataType = mContext .getString (
457+ R .string .accessibility_data_connection_edge );
458+ break ;
459+ } else {
460+ // fall through
461+ }
448462 case TelephonyManager .NETWORK_TYPE_UMTS :
449463 mDataIconList = TelephonyIcons .DATA_3G [mInetCondition ];
450464 mDataTypeIconId = R .drawable .stat_sys_data_connected_3g ;
@@ -496,10 +510,17 @@ private final void updateDataNetType() {
496510 R .string .accessibility_data_connection_4g );
497511 break ;
498512 default :
499- mDataIconList = TelephonyIcons .DATA_G [mInetCondition ];
500- mDataTypeIconId = R .drawable .stat_sys_data_connected_g ;
501- mContentDescriptionDataType = mContext .getString (
502- R .string .accessibility_data_connection_gprs );
513+ if (!mShowAtLeastThreeGees ) {
514+ mDataIconList = TelephonyIcons .DATA_G [mInetCondition ];
515+ mDataTypeIconId = R .drawable .stat_sys_data_connected_g ;
516+ mContentDescriptionDataType = mContext .getString (
517+ R .string .accessibility_data_connection_gprs );
518+ } else {
519+ mDataIconList = TelephonyIcons .DATA_3G [mInetCondition ];
520+ mDataTypeIconId = R .drawable .stat_sys_data_connected_3g ;
521+ mContentDescriptionDataType = mContext .getString (
522+ R .string .accessibility_data_connection_3g );
523+ }
503524 break ;
504525 }
505526 if ((isCdma () && isCdmaEri ()) || mPhone .isNetworkRoaming ()) {
@@ -877,7 +898,7 @@ else if (!mDataConnected && !mWifiConnected && !mBluetoothTethered) {
877898 mContentDescriptionWifi );
878899 cluster .setMobileDataIndicators (
879900 mHasMobileDataFeature ,
880- mPhoneSignalIconId ,
901+ mShowPhoneRSSIForData ? mPhoneSignalIconId : mDataSignalIconId ,
881902 mMobileActivityIconId ,
882903 mDataTypeIconId ,
883904 mContentDescriptionPhoneSignal ,
0 commit comments