From fff37da08d14fcde6446e35e448f7cc0e7582821 Mon Sep 17 00:00:00 2001 From: Jack He Date: Tue, 20 Jun 2017 17:07:40 -0700 Subject: [PATCH] Support battery level reporting via Plantronics XEVENT (1/2) * Add related constants to BluetoothHeadset Bug: 35874078 Test: make, test with supporting headsets Change-Id: Ied089a065bf9caa0d03f681950fefa2ea990bb3e Merged-In: Ied089a065bf9caa0d03f681950fefa2ea990bb3e (cherry picked from commit 0fcbba25b7ac7fd59367c8c9ba3080a3e6ade934) --- core/java/android/bluetooth/BluetoothHeadset.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java index 788732c49e501..900f005273c6c 100644 --- a/core/java/android/bluetooth/BluetoothHeadset.java +++ b/core/java/android/bluetooth/BluetoothHeadset.java @@ -199,6 +199,18 @@ public final class BluetoothHeadset implements BluetoothProfile { */ public static final String VENDOR_RESULT_CODE_COMMAND_ANDROID = "+ANDROID"; + /** + * A vendor-specific AT command + * @hide + */ + public static final String VENDOR_SPECIFIC_HEADSET_EVENT_XEVENT = "+XEVENT"; + + /** + * Battery level indicator associated with {@link #VENDOR_SPECIFIC_HEADSET_EVENT_XEVENT} + * @hide + */ + public static final String VENDOR_SPECIFIC_HEADSET_EVENT_XEVENT_BATTERY_LEVEL = "BATTERY"; + /** * Headset state when SCO audio is not connected. * This state can be one of