am 1fad138f: Merge "Show Carrier Network Change icon SysUI even while connected" into mnc-dev
* commit '1fad138f820e23de050f16f22b5ad757dc41eb10': Show Carrier Network Change icon SysUI even while connected
This commit is contained in:
@@ -272,7 +272,7 @@ public class MobileSignalController extends SignalController<
|
||||
}
|
||||
|
||||
private boolean isCarrierNetworkChangeActive() {
|
||||
return !hasService() && mCurrentState.carrierNetworkChangeMode;
|
||||
return mCurrentState.carrierNetworkChangeMode;
|
||||
}
|
||||
|
||||
public void handleBroadcast(Intent intent) {
|
||||
|
||||
@@ -391,35 +391,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
|
||||
|
||||
}
|
||||
|
||||
public void testCarrierNetworkChange_carrierNetworkChangeWhileConnected() {
|
||||
int strength = SignalStrength.SIGNAL_STRENGTH_GREAT;
|
||||
|
||||
setupDefaultSignal();
|
||||
setLevel(strength);
|
||||
|
||||
// API call is made
|
||||
setCarrierNetworkChange(true /* enabled */);
|
||||
|
||||
// Boolean value is set, but we still have a signal, should be showing normal
|
||||
verifyLastMobileDataIndicators(true /* visible */,
|
||||
TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH[1][strength] /* strengthIcon */,
|
||||
DEFAULT_ICON /* typeIcon */);
|
||||
|
||||
// Lose voice but still have data
|
||||
setVoiceRegState(ServiceState.STATE_OUT_OF_SERVICE);
|
||||
verifyLastMobileDataIndicators(true /* visible */,
|
||||
TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH[1][strength] /* strengthIcon */,
|
||||
DEFAULT_ICON /* typeIcon */);
|
||||
|
||||
// Voice but no data
|
||||
setVoiceRegState(ServiceState.STATE_IN_SERVICE);
|
||||
setDataRegState(ServiceState.STATE_OUT_OF_SERVICE);
|
||||
verifyLastMobileDataIndicators(true /* visible */,
|
||||
TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH[1][strength] /* strengthIcon */,
|
||||
DEFAULT_ICON /* typeIcon */);
|
||||
}
|
||||
|
||||
public void testCarrierNetworkChange_carrierNetworkChangeWhileDisconnected() {
|
||||
public void testCarrierNetworkChange_carrierNetworkChange() {
|
||||
int strength = SignalStrength.SIGNAL_STRENGTH_GREAT;
|
||||
|
||||
setupDefaultSignal();
|
||||
@@ -430,20 +402,16 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
|
||||
TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH[1][strength] /* strengthIcon */,
|
||||
DEFAULT_ICON /* typeIcon */);
|
||||
|
||||
// API call is made and all connectivity lost
|
||||
// API call is made
|
||||
setCarrierNetworkChange(true /* enabled */);
|
||||
setVoiceRegState(ServiceState.STATE_OUT_OF_SERVICE);
|
||||
setDataRegState(ServiceState.STATE_OUT_OF_SERVICE);
|
||||
|
||||
// Out of service and carrier network change is true, show special indicator
|
||||
// Carrier network change is true, show special indicator
|
||||
verifyLastMobileDataIndicators(true /* visible */,
|
||||
TelephonyIcons.TELEPHONY_CARRIER_NETWORK_CHANGE[0][0] /* strengthIcon */,
|
||||
0 /* typeIcon */);
|
||||
|
||||
// Revert back
|
||||
setCarrierNetworkChange(false /* enabled */);
|
||||
setVoiceRegState(ServiceState.STATE_IN_SERVICE);
|
||||
setDataRegState(ServiceState.STATE_IN_SERVICE);
|
||||
|
||||
// Verify back in previous state
|
||||
verifyLastMobileDataIndicators(true /* visible */,
|
||||
|
||||
Reference in New Issue
Block a user