OSDN Git Service

The config_show4GForLTe is dynamic use latest value.
authorWink Saville <wink@google.com>
Fri, 21 Jun 2013 01:15:20 +0000 (18:15 -0700)
committerWink Saville <wink@google.com>
Fri, 21 Jun 2013 01:15:20 +0000 (18:15 -0700)
Previously this was updated only at construction time,
but the value isn't even set at that time and can change
at anytime. So instead read the current value when needed.

Bug: 9513380
Change-Id: I50c676beadf5df8190897a9f6ab94c098e8d7e71

packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java

index da5f767..73752e5 100644 (file)
@@ -90,7 +90,6 @@ public class NetworkController extends BroadcastReceiver {
     boolean mShowPhoneRSSIForData = false;
     boolean mShowAtLeastThreeGees = false;
     boolean mAlwaysShowCdmaRssi = false;
-    boolean mShow4GforLTE = false;
 
     String mContentDescriptionPhoneSignal;
     String mContentDescriptionWifi;
@@ -200,7 +199,6 @@ public class NetworkController extends BroadcastReceiver {
 
         mShowPhoneRSSIForData = res.getBoolean(R.bool.config_showPhoneRSSIForData);
         mShowAtLeastThreeGees = res.getBoolean(R.bool.config_showMin3G);
-        mShow4GforLTE = res.getBoolean(R.bool.config_show4GForLTE);
         mAlwaysShowCdmaRssi = res.getBoolean(
                 com.android.internal.R.bool.config_alwaysUseCdmaRssi);
 
@@ -680,7 +678,8 @@ public class NetworkController extends BroadcastReceiver {
                             R.string.accessibility_data_connection_3g);
                     break;
                 case TelephonyManager.NETWORK_TYPE_LTE:
-                    if (mShow4GforLTE) {
+                    boolean show4GforLTE = mContext.getResources().getBoolean(R.bool.config_show4GForLTE);
+                    if (show4GforLTE) {
                         mDataIconList = TelephonyIcons.DATA_4G[mInetCondition];
                         mDataTypeIconId = R.drawable.stat_sys_data_connected_4g;
                         mQSDataTypeIconId = R.drawable.ic_qs_signal_4g;