Fix EmergencyCallback in NetworkController
- Do some cleanup so that things are more testable
- Test emergency callback since its possible
- Fix emergency callback in no sims case
Bug: 16218652
Change-Id: Ic859eff732cc11c5ae8aa6ced3584905bbe215c7
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
index dfc6924..a81f06e2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
@@ -45,6 +45,7 @@
import com.android.systemui.qs.QSPanel;
import com.android.systemui.qs.QSTile;
import com.android.systemui.statusbar.policy.BatteryController;
+import com.android.systemui.statusbar.policy.NetworkControllerImpl.EmergencyListener;
import com.android.systemui.statusbar.policy.NextAlarmController;
import com.android.systemui.statusbar.policy.UserInfoController;
@@ -54,7 +55,8 @@
* The view to manage the header area in the expanded status bar.
*/
public class StatusBarHeaderView extends RelativeLayout implements View.OnClickListener,
- BatteryController.BatteryStateChangeCallback, NextAlarmController.NextAlarmChangeCallback {
+ BatteryController.BatteryStateChangeCallback, NextAlarmController.NextAlarmChangeCallback,
+ EmergencyListener {
private boolean mExpanded;
private boolean mListening;
@@ -527,7 +529,8 @@
return true;
}
- public void setShowEmergencyCallsOnly(boolean show) {
+ @Override
+ public void setEmergencyCallsOnly(boolean show) {
boolean changed = show != mShowEmergencyCallsOnly;
if (changed) {
mShowEmergencyCallsOnly = show;