From e86bdcaed1372aa05bdfba175007b05613aecd9b Mon Sep 17 00:00:00 2001 From: Jack He Date: Thu, 17 Nov 2016 16:19:43 -0800 Subject: [PATCH] Add developer setting and system API for inband ringing support * Add 1 system API to check inband ringing flag in config.xml static isInbandRingingSupported(Context) * Add developer menu options to enable this feature Bug: 19171297 Test: mm -j 40, HFP regression testing, testplans/82144 Change-Id: Iaf56ea41911f546bbc7ae1f82e399d0f8d48f75f --- core/java/android/bluetooth/BluetoothHeadset.java | 12 ++++++++++++ packages/SettingsLib/res/values/strings.xml | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java index f46a3b3c733ab..2d25659bd7737 100644 --- a/core/java/android/bluetooth/BluetoothHeadset.java +++ b/core/java/android/bluetooth/BluetoothHeadset.java @@ -1009,6 +1009,18 @@ public final class BluetoothHeadset implements BluetoothProfile { return false; } + /** + * check if in-band ringing is supported for this platform. + * + * @return true if in-band ringing is supported + * false if in-band ringing is not supported + * @hide + */ + public static boolean isInbandRingingSupported(Context context) { + return context.getResources().getBoolean( + com.android.internal.R.bool.config_bluetooth_hfp_inband_ringing_support); + } + /** * Send Headset the BIND response from AG to report change in the status of the * HF indicators to the headset diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml index c51f872e49b50..adbcfe82acac7 100644 --- a/packages/SettingsLib/res/values/strings.xml +++ b/packages/SettingsLib/res/values/strings.xml @@ -429,6 +429,8 @@ Cellular data always active Disable absolute volume + + Enable in-band ringing Bluetooth AVRCP Version @@ -510,6 +512,9 @@ Check apps installed via ADB/ADT for harmful behavior. Disables the Bluetooth absolute volume feature in case of volume issues with remote devices such as unacceptably loud volume or lack of control. + + Allow ringtones on the phone to be played on Bluetooth headsets + Local terminal