Better wifi-enabled signal from network controller.
The old "is wifi enabled" signal was geared toward the cluster view. Since the clients of the callbacks are now only QS tiles, make sure to plumb through the actual enabled value all the way up to the tile. Bug:15161053 Change-Id: I8b69c599f06d5b36e3f44dc666e1621840ffd927 (cherry picked from commit fd0ea545d47b19c2ebff203a6e768a60698f3609)
This commit is contained in:
committed by
Dave Langemak
parent
8804ce96b1
commit
3d09bbd04f
@@ -83,7 +83,7 @@ public class WifiTile extends QSTile<QSTile.SignalState> {
|
|||||||
|
|
||||||
boolean wifiConnected = cb.enabled && (cb.wifiSignalIconId > 0) && (cb.enabledDesc != null);
|
boolean wifiConnected = cb.enabled && (cb.wifiSignalIconId > 0) && (cb.enabledDesc != null);
|
||||||
boolean wifiNotConnected = (cb.wifiSignalIconId > 0) && (cb.enabledDesc == null);
|
boolean wifiNotConnected = (cb.wifiSignalIconId > 0) && (cb.enabledDesc == null);
|
||||||
state.enabled = wifiConnected;
|
state.enabled = cb.enabled;
|
||||||
state.connected = wifiConnected;
|
state.connected = wifiConnected;
|
||||||
state.activityIn = cb.enabled && cb.activityIn;
|
state.activityIn = cb.enabled && cb.activityIn;
|
||||||
state.activityOut = cb.enabled && cb.activityOut;
|
state.activityOut = cb.enabled && cb.activityOut;
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
|||||||
boolean wifiOut = wifiEnabled && mWifiSsid != null
|
boolean wifiOut = wifiEnabled && mWifiSsid != null
|
||||||
&& (mWifiActivity == WifiManager.DATA_ACTIVITY_INOUT
|
&& (mWifiActivity == WifiManager.DATA_ACTIVITY_INOUT
|
||||||
|| mWifiActivity == WifiManager.DATA_ACTIVITY_OUT);
|
|| mWifiActivity == WifiManager.DATA_ACTIVITY_OUT);
|
||||||
cb.onWifiSignalChanged(wifiEnabled, mQSWifiIconId, wifiIn, wifiOut,
|
cb.onWifiSignalChanged(mWifiEnabled, mQSWifiIconId, wifiIn, wifiOut,
|
||||||
mContentDescriptionWifi, wifiDesc);
|
mContentDescriptionWifi, wifiDesc);
|
||||||
|
|
||||||
boolean mobileIn = mDataConnected && (mDataActivity == TelephonyManager.DATA_ACTIVITY_INOUT
|
boolean mobileIn = mDataConnected && (mDataActivity == TelephonyManager.DATA_ACTIVITY_INOUT
|
||||||
|
|||||||
Reference in New Issue
Block a user