Added support for dock headset observer
Change-Id: I06b2e65e3bfa10735e6c7fd3349afa9ae7d45292
Signed-off-by: Praveen Bharathi <pbharathi@motorola.com>
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 8c36aa6..e14282c 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -533,6 +533,8 @@
* <li> {@link #CATEGORY_TEST}
* <li> {@link #CATEGORY_CAR_DOCK}
* <li> {@link #CATEGORY_DESK_DOCK}
+ * <li> {@link #CATEGORY_LE_DESK_DOCK}
+ * <li> {@link #CATEGORY_HE_DESK_DOCK}
* <li> {@link #CATEGORY_CAR_MODE}
* <li> {@link #CATEGORY_APP_MARKET}
* </ul>
@@ -549,6 +551,8 @@
* <li> {@link #EXTRA_CHANGED_COMPONENT_NAME}
* <li> {@link #EXTRA_DATA_REMOVED}
* <li> {@link #EXTRA_DOCK_STATE}
+ * <li> {@link #EXTRA_DOCK_STATE_HE_DESK}
+ * <li> {@link #EXTRA_DOCK_STATE_LE_DESK}
* <li> {@link #EXTRA_DOCK_STATE_CAR}
* <li> {@link #EXTRA_DOCK_STATE_DESK}
* <li> {@link #EXTRA_DOCK_STATE_UNDOCKED}
@@ -1822,6 +1826,36 @@
"android.intent.action.HEADSET_PLUG";
/**
+ * Broadcast Action: An analog audio speaker/headset plugged in or unplugged.
+ *
+ * <p>The intent will have the following extra values:
+ * <ul>
+ * <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
+ * <li><em>name</em> - Headset type, human readable string </li>
+ * </ul>
+ * </ul>
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_USB_ANLG_HEADSET_PLUG =
+ "android.intent.action.DOCK_HEADSET_PLUG";
+
+ /**
+ * Broadcast Action: An analog audio speaker/headset plugged in or unplugged.
+ *
+ * <p>The intent will have the following extra values:
+ * <ul>
+ * <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
+ * <li><em>name</em> - Headset type, human readable string </li>
+ * </ul>
+ * </ul>
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_USB_DGTL_HEADSET_PLUG =
+ "android.intent.action.DOCK_HEADSET_PLUG";
+
+ /**
* Broadcast Action: An outgoing call is about to be placed.
*
* <p>The Intent will have the following extra value:
@@ -2060,6 +2094,21 @@
*/
@SdkConstant(SdkConstantType.INTENT_CATEGORY)
public static final String CATEGORY_DESK_DOCK = "android.intent.category.DESK_DOCK";
+ /**
+ * An activity to run when device is inserted into a analog (low end) dock.
+ * Used with {@link #ACTION_MAIN} to launch an activity. For more
+ * information, see {@link android.app.UiModeManager}.
+ */
+ @SdkConstant(SdkConstantType.INTENT_CATEGORY)
+ public static final String CATEGORY_LE_DESK_DOCK = "android.intent.category.LE_DESK_DOCK";
+
+ /**
+ * An activity to run when device is inserted into a digital (high end) dock.
+ * Used with {@link #ACTION_MAIN} to launch an activity. For more
+ * information, see {@link android.app.UiModeManager}.
+ */
+ @SdkConstant(SdkConstantType.INTENT_CATEGORY)
+ public static final String CATEGORY_HE_DESK_DOCK = "android.intent.category.HE_DESK_DOCK";
/**
* Used to indicate that the activity can be used in a car environment.
@@ -2208,7 +2257,9 @@
* intents to request the dock state. Possible values are
* {@link android.content.Intent#EXTRA_DOCK_STATE_UNDOCKED},
* {@link android.content.Intent#EXTRA_DOCK_STATE_DESK}, or
- * {@link android.content.Intent#EXTRA_DOCK_STATE_CAR}.
+ * {@link android.content.Intent#EXTRA_DOCK_STATE_CAR}, or
+ * {@link android.content.Intent#EXTRA_DOCK_STATE_LE_DESK}, or
+ * {@link android.content.Intent#EXTRA_DOCK_STATE_HE_DESK}.
*/
public static final String EXTRA_DOCK_STATE = "android.intent.extra.DOCK_STATE";
@@ -2231,6 +2282,18 @@
public static final int EXTRA_DOCK_STATE_CAR = 2;
/**
+ * Used as an int value for {@link android.content.Intent#EXTRA_DOCK_STATE}
+ * to represent that the phone is in a analog (low end) dock.
+ */
+ public static final int EXTRA_DOCK_STATE_LE_DESK = 3;
+
+ /**
+ * Used as an int value for {@link android.content.Intent#EXTRA_DOCK_STATE}
+ * to represent that the phone is in a digital (high end) dock.
+ */
+ public static final int EXTRA_DOCK_STATE_HE_DESK = 4;
+
+ /**
* Boolean that can be supplied as meta-data with a dock activity, to
* indicate that the dock should take over the home key when it is active.
*/