summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/tests
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-07-22 16:34:36 -0400
committerJason Monk <jmonk@google.com>2015-07-23 14:20:18 -0400
commitb0808aab0caec42a068b927be974076783a87692 (patch)
treeb746851e0f429366c2c07abf33b29486aaceb9a5 /packages/SystemUI/tests
parent2ba3fec6e0222754d93ed7a491354164d113ad6e (diff)
downloadframeworks_base-b0808aab0caec42a068b927be974076783a87692.zip
frameworks_base-b0808aab0caec42a068b927be974076783a87692.tar.gz
frameworks_base-b0808aab0caec42a068b927be974076783a87692.tar.bz2
Fix emergency only when no sims
Need to look at a ServiceState to determine if we are actually in a emergency only state. Bug: 22619451 Change-Id: I06a2a6fab85ed2ce41d8f7cbb98a1f169ec61b33
Diffstat (limited to 'packages/SystemUI/tests')
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java
index 52dea40..d9b9063 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java
@@ -21,6 +21,7 @@ import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkCapabilities;
import android.os.Looper;
+import android.telephony.ServiceState;
import android.telephony.SignalStrength;
import android.telephony.SubscriptionInfo;
import android.telephony.TelephonyManager;
@@ -70,11 +71,20 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
public void testEmergencyOnlyNoSubscriptions() {
setupDefaultSignal();
+ setSubscriptions();
+ mNetworkController.mLastServiceState = new ServiceState();
+ mNetworkController.mLastServiceState.setEmergencyOnly(true);
mNetworkController.recalculateEmergency();
- verifyEmergencyOnly(false);
+ verifyEmergencyOnly(true);
+ }
+ public void testNoEmengencyNoSubscriptions() {
+ setupDefaultSignal();
setSubscriptions();
- verifyEmergencyOnly(true);
+ mNetworkController.mLastServiceState = new ServiceState();
+ mNetworkController.mLastServiceState.setEmergencyOnly(false);
+ mNetworkController.recalculateEmergency();
+ verifyEmergencyOnly(false);
}
public void testNoSimlessIconWithoutMobile() {