Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +2 −9 Original line number Diff line number Diff line Loading @@ -387,15 +387,8 @@ public class MobileSignalController extends SignalController<MobileState, Mobile int qsTypeIcon = 0; IconState qsIcon = null; CharSequence description = null; // Mobile icon will only be shown in the statusbar in 2 scenarios // 1. Mobile is the default network, and it is validated // 2. Mobile is the default network, it is not validated and there is no other // non-Carrier WiFi networks available. boolean maybeShowIcons = (mCurrentState.inetCondition == 1) || (mCurrentState.inetCondition == 0 && !mNetworkController.isNonCarrierWifiNetworkAvailable()); // Only send data sim callbacks to QS. if (mCurrentState.dataSim && mCurrentState.isDefault && maybeShowIcons) { if (mCurrentState.dataSim && mCurrentState.isDefault) { qsTypeIcon = (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.qsDataType : 0; qsIcon = new IconState(mCurrentState.enabled Loading @@ -408,7 +401,7 @@ public class MobileSignalController extends SignalController<MobileState, Mobile boolean activityOut = mCurrentState.dataConnected && !mCurrentState.carrierNetworkChangeMode && mCurrentState.activityOut; showDataIcon &= mCurrentState.dataSim && mCurrentState.isDefault && maybeShowIcons; showDataIcon &= mCurrentState.dataSim && mCurrentState.isDefault; boolean showTriangle = showDataIcon && !mCurrentState.airplaneMode; int typeIcon = (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.dataType : 0; showDataIcon |= mCurrentState.roaming; Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java +3 −17 Original line number Diff line number Diff line Loading @@ -109,17 +109,10 @@ public class WifiSignalController extends contentDescription += ("," + mContext.getString(R.string.data_connection_no_internet)); } if (mProviderModel) { // WiFi icon will only be shown in the statusbar in 2 scenarios // 1. WiFi is the default network, and it is validated // 2. WiFi is the default network, it is not validated and there is no other // non-Carrier WiFi networks available. boolean maybeShowIcons = (mCurrentState.inetCondition == 1) || (mCurrentState.inetCondition == 0 && !mNetworkController.isNonCarrierWifiNetworkAvailable()); IconState statusIcon = new IconState( wifiVisible && maybeShowIcons, getCurrentIconId(), contentDescription); wifiVisible, getCurrentIconId(), contentDescription); IconState qsIcon = null; if ((mCurrentState.isDefault && maybeShowIcons) || (!mNetworkController.isRadioOn() if (mCurrentState.isDefault || (!mNetworkController.isRadioOn() && !mNetworkController.isEthernetDefault())) { qsIcon = new IconState(mCurrentState.connected, mWifiTracker.isCaptivePortal ? R.drawable.ic_qs_wifi_disconnected Loading Loading @@ -158,15 +151,8 @@ public class WifiSignalController extends if (mCurrentState.inetCondition == 0) { dataContentDescription = mContext.getString(R.string.data_connection_no_internet); } // Mobile icon will only be shown in the statusbar in 2 scenarios // 1. Mobile is the default network, and it is validated // 2. Mobile is the default network, it is not validated and there is no other // non-Carrier WiFi networks available. boolean maybeShowIcons = (mCurrentState.inetCondition == 1) || (mCurrentState.inetCondition == 0 && !mNetworkController.isNonCarrierWifiNetworkAvailable()); boolean sbVisible = mCurrentState.enabled && mCurrentState.connected && maybeShowIcons && mCurrentState.isDefault; && mCurrentState.isDefault; IconState statusIcon = new IconState(sbVisible, getCurrentIconIdForCarrierWifi(), contentDescription); int typeIcon = sbVisible ? icons.dataType : 0; Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerWifiTest.java +1 −3 Original line number Diff line number Diff line Loading @@ -238,9 +238,7 @@ public class NetworkControllerWifiTest extends NetworkControllerBaseTest { mNetworkController.setNoNetworksAvailable(false); setWifiStateForVcn(true, testSsid); setWifiLevelForVcn(0); // Connected, but still not validated - does not show //verifyLastWifiIcon(false, WifiIcons.WIFI_SIGNAL_STRENGTH[0][0]); verifyLastMobileDataIndicatorsForVcn(false, 0, 0, false); verifyLastMobileDataIndicatorsForVcn(true, 0, TelephonyIcons.ICON_CWF, false); mNetworkController.setNoNetworksAvailable(true); for (int testLevel = 0; testLevel < WifiIcons.WIFI_LEVEL_COUNT; testLevel++) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +2 −9 Original line number Diff line number Diff line Loading @@ -387,15 +387,8 @@ public class MobileSignalController extends SignalController<MobileState, Mobile int qsTypeIcon = 0; IconState qsIcon = null; CharSequence description = null; // Mobile icon will only be shown in the statusbar in 2 scenarios // 1. Mobile is the default network, and it is validated // 2. Mobile is the default network, it is not validated and there is no other // non-Carrier WiFi networks available. boolean maybeShowIcons = (mCurrentState.inetCondition == 1) || (mCurrentState.inetCondition == 0 && !mNetworkController.isNonCarrierWifiNetworkAvailable()); // Only send data sim callbacks to QS. if (mCurrentState.dataSim && mCurrentState.isDefault && maybeShowIcons) { if (mCurrentState.dataSim && mCurrentState.isDefault) { qsTypeIcon = (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.qsDataType : 0; qsIcon = new IconState(mCurrentState.enabled Loading @@ -408,7 +401,7 @@ public class MobileSignalController extends SignalController<MobileState, Mobile boolean activityOut = mCurrentState.dataConnected && !mCurrentState.carrierNetworkChangeMode && mCurrentState.activityOut; showDataIcon &= mCurrentState.dataSim && mCurrentState.isDefault && maybeShowIcons; showDataIcon &= mCurrentState.dataSim && mCurrentState.isDefault; boolean showTriangle = showDataIcon && !mCurrentState.airplaneMode; int typeIcon = (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.dataType : 0; showDataIcon |= mCurrentState.roaming; Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java +3 −17 Original line number Diff line number Diff line Loading @@ -109,17 +109,10 @@ public class WifiSignalController extends contentDescription += ("," + mContext.getString(R.string.data_connection_no_internet)); } if (mProviderModel) { // WiFi icon will only be shown in the statusbar in 2 scenarios // 1. WiFi is the default network, and it is validated // 2. WiFi is the default network, it is not validated and there is no other // non-Carrier WiFi networks available. boolean maybeShowIcons = (mCurrentState.inetCondition == 1) || (mCurrentState.inetCondition == 0 && !mNetworkController.isNonCarrierWifiNetworkAvailable()); IconState statusIcon = new IconState( wifiVisible && maybeShowIcons, getCurrentIconId(), contentDescription); wifiVisible, getCurrentIconId(), contentDescription); IconState qsIcon = null; if ((mCurrentState.isDefault && maybeShowIcons) || (!mNetworkController.isRadioOn() if (mCurrentState.isDefault || (!mNetworkController.isRadioOn() && !mNetworkController.isEthernetDefault())) { qsIcon = new IconState(mCurrentState.connected, mWifiTracker.isCaptivePortal ? R.drawable.ic_qs_wifi_disconnected Loading Loading @@ -158,15 +151,8 @@ public class WifiSignalController extends if (mCurrentState.inetCondition == 0) { dataContentDescription = mContext.getString(R.string.data_connection_no_internet); } // Mobile icon will only be shown in the statusbar in 2 scenarios // 1. Mobile is the default network, and it is validated // 2. Mobile is the default network, it is not validated and there is no other // non-Carrier WiFi networks available. boolean maybeShowIcons = (mCurrentState.inetCondition == 1) || (mCurrentState.inetCondition == 0 && !mNetworkController.isNonCarrierWifiNetworkAvailable()); boolean sbVisible = mCurrentState.enabled && mCurrentState.connected && maybeShowIcons && mCurrentState.isDefault; && mCurrentState.isDefault; IconState statusIcon = new IconState(sbVisible, getCurrentIconIdForCarrierWifi(), contentDescription); int typeIcon = sbVisible ? icons.dataType : 0; Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerWifiTest.java +1 −3 Original line number Diff line number Diff line Loading @@ -238,9 +238,7 @@ public class NetworkControllerWifiTest extends NetworkControllerBaseTest { mNetworkController.setNoNetworksAvailable(false); setWifiStateForVcn(true, testSsid); setWifiLevelForVcn(0); // Connected, but still not validated - does not show //verifyLastWifiIcon(false, WifiIcons.WIFI_SIGNAL_STRENGTH[0][0]); verifyLastMobileDataIndicatorsForVcn(false, 0, 0, false); verifyLastMobileDataIndicatorsForVcn(true, 0, TelephonyIcons.ICON_CWF, false); mNetworkController.setNoNetworksAvailable(true); for (int testLevel = 0; testLevel < WifiIcons.WIFI_LEVEL_COUNT; testLevel++) { Loading