Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e86bdcae authored by Jack He's avatar Jack He Committed by Andre Eisenbach
Browse files

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
parent d3128d4b
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -1009,6 +1009,18 @@ public final class BluetoothHeadset implements BluetoothProfile {
        return false;
        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
     * Send Headset the BIND response from AG to report change in the status of the
     * HF indicators to the headset
     * HF indicators to the headset
+5 −0
Original line number Original line Diff line number Diff line
@@ -429,6 +429,8 @@
    <string name="mobile_data_always_on">Cellular data always active</string>
    <string name="mobile_data_always_on">Cellular data always active</string>
    <!-- Setting Checkbox title for disabling Bluetooth absolute volume -->
    <!-- Setting Checkbox title for disabling Bluetooth absolute volume -->
    <string name="bluetooth_disable_absolute_volume">Disable absolute volume</string>
    <string name="bluetooth_disable_absolute_volume">Disable absolute volume</string>
    <!-- Setting Checkbox title for enabling Bluetooth inband ringing -->
    <string name="bluetooth_enable_inband_ringing">Enable in-band ringing</string>


    <!-- UI debug setting: Select Bluetooth AVRCP Version -->
    <!-- UI debug setting: Select Bluetooth AVRCP Version -->
    <string name="bluetooth_select_avrcp_version_string">Bluetooth AVRCP Version</string>
    <string name="bluetooth_select_avrcp_version_string">Bluetooth AVRCP Version</string>
@@ -510,6 +512,9 @@
    <string name="verify_apps_over_usb_summary">Check apps installed via ADB/ADT for harmful behavior.</string>
    <string name="verify_apps_over_usb_summary">Check apps installed via ADB/ADT for harmful behavior.</string>
    <!-- Summary of checkbox for disabling Bluetooth absolute volume -->
    <!-- Summary of checkbox for disabling Bluetooth absolute volume -->
    <string name="bluetooth_disable_absolute_volume_summary">Disables the Bluetooth absolute volume feature in case of volume issues with remote devices such as unacceptably loud volume or lack of control.</string>
    <string name="bluetooth_disable_absolute_volume_summary">Disables the Bluetooth absolute volume feature in case of volume issues with remote devices such as unacceptably loud volume or lack of control.</string>
    <!-- Summary of checkbox for enabling Bluetooth inband ringing -->
    <string name="bluetooth_enable_inband_ringing_summary">Allow ringtones on the phone to be played on Bluetooth headsets</string>



    <!-- Title of checkbox setting that enables the terminal app. [CHAR LIMIT=32] -->
    <!-- Title of checkbox setting that enables the terminal app. [CHAR LIMIT=32] -->
    <string name="enable_terminal_title">Local terminal</string>
    <string name="enable_terminal_title">Local terminal</string>