summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Amit Mahajan <amitmahajan@google.com> 2016-01-14 06:34:46 +0000
committer android-build-merger <android-build-merger@google.com> 2016-01-14 06:34:46 +0000
commitfa86813a56cf631b4609387e8ef5ed9e82b47eac (patch)
tree7010ef6a320d333fbbd55d4cc6131b4afcec8549
parentaf8c1b8f943f2c616c75da83b44063ae3a5f556f (diff)
parent2b260b0006403e6be39015c12e422f9782ce6877 (diff)
Merge "DO NOT MERGE Adding new intent for EMERGENCY_CALL_STATE_CHANGE" into mnc-dr1.5-dev am: 658fdf8426
am: 2b260b0006 * commit '2b260b0006403e6be39015c12e422f9782ce6877': DO NOT MERGE Adding new intent for EMERGENCY_CALL_STATE_CHANGE
-rw-r--r--telephony/java/android/telephony/CarrierConfigManager.java8
-rw-r--r--telephony/java/com/android/internal/telephony/PhoneConstants.java23
-rw-r--r--telephony/java/com/android/internal/telephony/TelephonyIntents.java23
3 files changed, 43 insertions, 11 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 7dee48b879d2..e1deb98cef59 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -458,6 +458,13 @@ public class CarrierConfigManager {
*/
public static final String KEY_ALLOW_ADDING_APNS_BOOL = "allow_adding_apns_bool";
+ /**
+ * Boolean indicating if intent for emergency call state changes should be broadcast
+ * @hide
+ */
+ public static final String KEY_BROADCAST_EMERGENCY_CALL_STATE_CHANGES_BOOL =
+ "broadcast_emergency_call_state_changes_bool";
+
// These variables are used by the MMS service and exposed through another API, {@link
// SmsManager}. The variable names and string values are copied from there.
public static final String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled";
@@ -556,6 +563,7 @@ public class CarrierConfigManager {
sDefaults.putString(KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_VAL_STRING, "");
sDefaults.putBoolean(KEY_CSP_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_ALLOW_ADDING_APNS_BOOL, true);
+ sDefaults.putBoolean(KEY_BROADCAST_EMERGENCY_CALL_STATE_CHANGES_BOOL, false);
sDefaults.putBoolean(KEY_ALWAYS_SHOW_EMERGENCY_ALERT_ONOFF_BOOL, false);
sDefaults.putStringArray(KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY, null);
diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java
index 572cc6fb4bb9..8bc1402fb8a2 100644
--- a/telephony/java/com/android/internal/telephony/PhoneConstants.java
+++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java
@@ -35,17 +35,17 @@ public class PhoneConstants {
IDLE, RINGING, OFFHOOK;
};
- /**
- * The state of a data connection.
- * <ul>
- * <li>CONNECTED = IP traffic should be available</li>
- * <li>CONNECTING = Currently setting up data connection</li>
- * <li>DISCONNECTED = IP not available</li>
- * <li>SUSPENDED = connection is created but IP traffic is
- * temperately not available. i.e. voice call is in place
- * in 2G network</li>
- * </ul>
- */
+ /**
+ * The state of a data connection.
+ * <ul>
+ * <li>CONNECTED = IP traffic should be available</li>
+ * <li>CONNECTING = Currently setting up data connection</li>
+ * <li>DISCONNECTED = IP not available</li>
+ * <li>SUSPENDED = connection is created but IP traffic is
+ * temperately not available. i.e. voice call is in place
+ * in 2G network</li>
+ * </ul>
+ */
public enum DataState {
CONNECTED, CONNECTING, DISCONNECTED, SUSPENDED;
};
@@ -86,6 +86,7 @@ public class PhoneConstants {
public static final String NETWORK_UNAVAILABLE_KEY = "networkUnvailable";
public static final String DATA_NETWORK_ROAMING_KEY = "networkRoaming";
public static final String PHONE_IN_ECM_STATE = "phoneinECMState";
+ public static final String PHONE_IN_EMERGENCY_CALL = "phoneInEmergencyCall";
public static final String REASON_LINK_PROPERTIES_CHANGED = "linkPropertiesChanged";
diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
index f563839e2c93..77b8a6785c84 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
@@ -75,6 +75,7 @@ public class TelephonyIntents {
*/
public static final String ACTION_RADIO_TECHNOLOGY_CHANGED
= "android.intent.action.RADIO_TECHNOLOGY";
+
/**
* <p>Broadcast Action: The emergency callback mode is changed.
* <ul>
@@ -94,6 +95,28 @@ public class TelephonyIntents {
*/
public static final String ACTION_EMERGENCY_CALLBACK_MODE_CHANGED
= "android.intent.action.EMERGENCY_CALLBACK_MODE_CHANGED";
+
+ /**
+ * <p>Broadcast Action: The emergency call state is changed.
+ * <ul>
+ * <li><em>phoneInEmergencyCall</em> - A boolean value, true if phone in emergency call,
+ * false otherwise</li>
+ * </ul>
+ * <p class="note">
+ * You can <em>not</em> receive this through components declared
+ * in manifests, only by explicitly registering for it with
+ * {@link android.content.Context#registerReceiver(android.content.BroadcastReceiver,
+ * android.content.IntentFilter) Context.registerReceiver()}.
+ *
+ * <p class="note">
+ * Requires no permission.
+ *
+ * <p class="note">This is a protected intent that can only be sent
+ * by the system.
+ */
+ public static final String ACTION_EMERGENCY_CALL_STATE_CHANGED
+ = "android.intent.action.EMERGENCY_CALL_STATE_CHANGED";
+
/**
* Broadcast Action: The phone's signal strength has changed. The intent will have the
* following extra values:</p>