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

Commit 690e0cf6 authored by Yuyang Huang's avatar Yuyang Huang Committed by Automerger Merge Worker
Browse files

Merge "Remove auto_connect_on_hfp_when_no_a2dp_device flag" into main am: 488d8fcc am: 9ef2bb63

parents 81c191ed 9ef2bb63
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -887,11 +887,6 @@ public class PhonePolicy implements AdapterService.BluetoothStateCallback {
            return;
        }

        if (!Flags.autoConnectOnHfpWhenNoA2dpDevice()) {
            debugLog("HFP auto connect is not enabled");
            return;
        }

        if (Flags.autoConnectOnMultipleHfpWhenNoA2dpDevice()) {
            final List<BluetoothDevice> mostRecentlyConnectedHfpDevices =
                    mDatabaseManager.getMostRecentlyActiveHfpDevices();
+0 −3
Original line number Diff line number Diff line
@@ -1071,7 +1071,6 @@ public class PhonePolicyTest {
     */
    @Test
    public void testAutoConnectHfpOnly() {
        mSetFlagsRule.enableFlags(Flags.FLAG_AUTO_CONNECT_ON_HFP_WHEN_NO_A2DP_DEVICE);
        mSetFlagsRule.disableFlags(Flags.FLAG_AUTO_CONNECT_ON_MULTIPLE_HFP_WHEN_NO_A2DP_DEVICE);

        // Return desired values from the mocked object(s)
@@ -1109,7 +1108,6 @@ public class PhonePolicyTest {

    @Test
    public void autoConnect_whenMultiHfp_startConnection() {
        mSetFlagsRule.enableFlags(Flags.FLAG_AUTO_CONNECT_ON_HFP_WHEN_NO_A2DP_DEVICE);
        mSetFlagsRule.enableFlags(Flags.FLAG_AUTO_CONNECT_ON_MULTIPLE_HFP_WHEN_NO_A2DP_DEVICE);

        // Return desired values from the mocked object(s)
@@ -1154,7 +1152,6 @@ public class PhonePolicyTest {
    @Test
    public void autoConnect_whenMultiHfpAndDeconnection_startConnection() {
        mSetFlagsRule.enableFlags(Flags.FLAG_AUTO_CONNECT_ON_MULTIPLE_HFP_WHEN_NO_A2DP_DEVICE);
        mSetFlagsRule.enableFlags(Flags.FLAG_AUTO_CONNECT_ON_HFP_WHEN_NO_A2DP_DEVICE);

        // Return desired values from the mocked object(s)
        doReturn(BluetoothAdapter.STATE_ON).when(mAdapterService).getState();
+0 −7
Original line number Diff line number Diff line
package: "com.android.bluetooth.flags"
container: "com.android.btservices"

flag {
    name: "auto_connect_on_hfp_when_no_a2dp_device"
    namespace: "bluetooth"
    description: "Auto connect to hfp device is there is no a2dp device to connect to"
    bug: "305799237"
}

flag {
    name: "auto_connect_on_multiple_hfp_when_no_a2dp_device"
    namespace: "bluetooth"