Loading packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java +9 −13 Original line number Diff line number Diff line Loading @@ -711,21 +711,20 @@ public class StatusBarPolicy { ConnectivityManager.EXTRA_NETWORK_INFO)); int connectionStatus = intent.getIntExtra(ConnectivityManager.EXTRA_INET_CONDITION, 0); Slog.d(TAG, "got CONNECTIVITY_ACTION - info=" + info + ", status = " + connectionStatus); if (info.isConnected() == false) return; int inetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0); switch (info.getType()) { case ConnectivityManager.TYPE_MOBILE: if (info.isConnected()) { updateDataNetType(info.getSubtype(), connectionStatus); mInetCondition = inetCondition; updateDataNetType(info.getSubtype()); updateDataIcon(); updateSignalStrength(); // apply any change in connectionStatus } break; case ConnectivityManager.TYPE_WIFI: mInetCondition = inetCondition; if (info.isConnected()) { mIsWifiConnected = true; mInetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0); int iconId; if (mLastWifiSignalLevel == -1) { iconId = sWifiSignalImages[mInetCondition][0]; Loading @@ -738,7 +737,6 @@ public class StatusBarPolicy { } else { mLastWifiSignalLevel = -1; mIsWifiConnected = false; mInetCondition = 0; int iconId = sWifiSignalImages[0][0]; mService.setIcon("wifi", iconId, 0); Loading Loading @@ -777,9 +775,8 @@ public class StatusBarPolicy { @Override public void onDataConnectionStateChanged(int state, int networkType) { mDataState = state; updateDataNetType(networkType, 0); updateDataNetType(networkType); updateDataIcon(); updateSignalStrength(); // apply the change in connection status } @Override Loading Loading @@ -940,8 +937,7 @@ public class StatusBarPolicy { return (levelEvdoDbm < levelEvdoSnr) ? levelEvdoDbm : levelEvdoSnr; } private final void updateDataNetType(int net, int inetCondition) { mInetCondition = (inetCondition > INET_CONDITION_THRESHOLD ? 1 : 0); private final void updateDataNetType(int net) { switch (net) { case TelephonyManager.NETWORK_TYPE_EDGE: mDataIconList = sDataNetType_e[mInetCondition]; Loading services/java/com/android/server/ConnectivityService.java +16 −0 Original line number Diff line number Diff line Loading @@ -920,11 +920,19 @@ public class ConnectivityService extends IConnectivityManager.Stub { newNet = tryFailover(prevNetType); if (newNet != null) { NetworkInfo switchTo = newNet.getNetworkInfo(); if (!switchTo.isConnected()) { // if the other net is connected they've already reset this and perhaps even gotten // a positive report we don't want to overwrite, but if not we need to clear this now // to turn our cellular sig strength white mDefaultInetConditionPublished = 0; } intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); } else { mDefaultInetConditionPublished = 0; // we're not connected anymore intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); } } intent.putExtra(ConnectivityManager.EXTRA_INET_CONDITION, mDefaultInetConditionPublished); // do this before we broadcast the change handleConnectivityChange(prevNetType); Loading Loading @@ -1083,12 +1091,20 @@ public class ConnectivityService extends IConnectivityManager.Stub { newNet = tryFailover(info.getType()); if (newNet != null) { NetworkInfo switchTo = newNet.getNetworkInfo(); if (!switchTo.isConnected()) { // if the other net is connected they've already reset this and perhaps even gotten // a positive report we don't want to overwrite, but if not we need to clear this now // to turn our cellular sig strength white mDefaultInetConditionPublished = 0; } intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); } else { mDefaultInetConditionPublished = 0; intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); } } intent.putExtra(ConnectivityManager.EXTRA_INET_CONDITION, mDefaultInetConditionPublished); sendStickyBroadcast(intent); /* * If the failover network is already connected, then immediately send Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java +9 −13 Original line number Diff line number Diff line Loading @@ -711,21 +711,20 @@ public class StatusBarPolicy { ConnectivityManager.EXTRA_NETWORK_INFO)); int connectionStatus = intent.getIntExtra(ConnectivityManager.EXTRA_INET_CONDITION, 0); Slog.d(TAG, "got CONNECTIVITY_ACTION - info=" + info + ", status = " + connectionStatus); if (info.isConnected() == false) return; int inetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0); switch (info.getType()) { case ConnectivityManager.TYPE_MOBILE: if (info.isConnected()) { updateDataNetType(info.getSubtype(), connectionStatus); mInetCondition = inetCondition; updateDataNetType(info.getSubtype()); updateDataIcon(); updateSignalStrength(); // apply any change in connectionStatus } break; case ConnectivityManager.TYPE_WIFI: mInetCondition = inetCondition; if (info.isConnected()) { mIsWifiConnected = true; mInetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0); int iconId; if (mLastWifiSignalLevel == -1) { iconId = sWifiSignalImages[mInetCondition][0]; Loading @@ -738,7 +737,6 @@ public class StatusBarPolicy { } else { mLastWifiSignalLevel = -1; mIsWifiConnected = false; mInetCondition = 0; int iconId = sWifiSignalImages[0][0]; mService.setIcon("wifi", iconId, 0); Loading Loading @@ -777,9 +775,8 @@ public class StatusBarPolicy { @Override public void onDataConnectionStateChanged(int state, int networkType) { mDataState = state; updateDataNetType(networkType, 0); updateDataNetType(networkType); updateDataIcon(); updateSignalStrength(); // apply the change in connection status } @Override Loading Loading @@ -940,8 +937,7 @@ public class StatusBarPolicy { return (levelEvdoDbm < levelEvdoSnr) ? levelEvdoDbm : levelEvdoSnr; } private final void updateDataNetType(int net, int inetCondition) { mInetCondition = (inetCondition > INET_CONDITION_THRESHOLD ? 1 : 0); private final void updateDataNetType(int net) { switch (net) { case TelephonyManager.NETWORK_TYPE_EDGE: mDataIconList = sDataNetType_e[mInetCondition]; Loading
services/java/com/android/server/ConnectivityService.java +16 −0 Original line number Diff line number Diff line Loading @@ -920,11 +920,19 @@ public class ConnectivityService extends IConnectivityManager.Stub { newNet = tryFailover(prevNetType); if (newNet != null) { NetworkInfo switchTo = newNet.getNetworkInfo(); if (!switchTo.isConnected()) { // if the other net is connected they've already reset this and perhaps even gotten // a positive report we don't want to overwrite, but if not we need to clear this now // to turn our cellular sig strength white mDefaultInetConditionPublished = 0; } intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); } else { mDefaultInetConditionPublished = 0; // we're not connected anymore intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); } } intent.putExtra(ConnectivityManager.EXTRA_INET_CONDITION, mDefaultInetConditionPublished); // do this before we broadcast the change handleConnectivityChange(prevNetType); Loading Loading @@ -1083,12 +1091,20 @@ public class ConnectivityService extends IConnectivityManager.Stub { newNet = tryFailover(info.getType()); if (newNet != null) { NetworkInfo switchTo = newNet.getNetworkInfo(); if (!switchTo.isConnected()) { // if the other net is connected they've already reset this and perhaps even gotten // a positive report we don't want to overwrite, but if not we need to clear this now // to turn our cellular sig strength white mDefaultInetConditionPublished = 0; } intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); } else { mDefaultInetConditionPublished = 0; intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); } } intent.putExtra(ConnectivityManager.EXTRA_INET_CONDITION, mDefaultInetConditionPublished); sendStickyBroadcast(intent); /* * If the failover network is already connected, then immediately send Loading