From a80fe2b51ea131b4dde36f12f18bb1beba83a66d Mon Sep 17 00:00:00 2001 From: Jack He Date: Thu, 17 Nov 2016 16:19:43 -0800 Subject: 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 (cherry picked from commit e86bdcaed1372aa05bdfba175007b05613aecd9b) --- framework/java/android/bluetooth/BluetoothHeadset.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'framework/java/android/bluetooth') diff --git a/framework/java/android/bluetooth/BluetoothHeadset.java b/framework/java/android/bluetooth/BluetoothHeadset.java index 28421ebc4c..8519dbaada 100644 --- a/framework/java/android/bluetooth/BluetoothHeadset.java +++ b/framework/java/android/bluetooth/BluetoothHeadset.java @@ -1010,6 +1010,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 -- cgit v1.2.3