Add emergencyOnly indicator in ServiceState.
For bug 2536842 to show signal strength in Emergency mode.
The STATE_EMERGENCY_ONLY of ServiceState is not in-use.
So add a hide interface to indicate Emergency mode.
Change-Id: I19398ac5e73a722dcaaf744347f961d1fa7513ac
diff --git a/services/java/com/android/server/status/StatusBarPolicy.java b/services/java/com/android/server/status/StatusBarPolicy.java
index 55840e2..465ff2e 100644
--- a/services/java/com/android/server/status/StatusBarPolicy.java
+++ b/services/java/com/android/server/status/StatusBarPolicy.java
@@ -818,7 +818,7 @@
final ContentResolver cr = mContext.getContentResolver();
if (Settings.System.getInt(cr,
- Settings.System.POWER_SOUNDS_ENABLED, 1) == 1)
+ Settings.System.POWER_SOUNDS_ENABLED, 1) == 1)
{
final String soundPath = Settings.System.getString(cr,
Settings.System.LOW_BATTERY_SOUND);
@@ -972,7 +972,8 @@
int iconLevel = -1;
int[] iconList;
- if (!hasService()) {
+ // Display signal strength while in "emergency calls only" mode
+ if (!hasService() && !mServiceState.isEmergencyOnly()) {
//Slog.d(TAG, "updateSignalStrength: no service");
if (Settings.System.getInt(mContext.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON, 0) == 1) {