summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-22 16:24:22 -0700
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-22 16:24:22 -0700
commitf581eeea57fda9db013c221447e7133e8d6feba4 (patch)
tree5f70705bec850d4cab6b04f77978f88587a72661
parent070fc13ede8ce9fe9544d36542b6bf00b0948e92 (diff)
parent48c32ce7a0d6d0cfaff65105e4254a84bc9fb94c (diff)
Snap for 13258483 from 48c32ce7a0d6d0cfaff65105e4254a84bc9fb94c to 25Q2-release
Change-Id: Ib0b34e668d6c4bd21ae8e30d5b679c98a026e06b
-rw-r--r--android/app/src/com/android/bluetooth/hfp/HeadsetService.java11
-rw-r--r--android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java41
-rw-r--r--android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceTest.java2
-rw-r--r--flags/hfp.aconfig10
-rw-r--r--system/gd/hal/BUILD.gn5
-rw-r--r--system/gd/metrics/BUILD.gn5
6 files changed, 19 insertions, 55 deletions
diff --git a/android/app/src/com/android/bluetooth/hfp/HeadsetService.java b/android/app/src/com/android/bluetooth/hfp/HeadsetService.java
index c5ab1f8dde..ce7c623aaf 100644
--- a/android/app/src/com/android/bluetooth/hfp/HeadsetService.java
+++ b/android/app/src/com/android/bluetooth/hfp/HeadsetService.java
@@ -1105,10 +1105,7 @@ public class HeadsetService extends ProfileService {
} else {
broadcastActiveDevice(null);
}
-
- if (Flags.updateActiveDeviceInBandRingtone()) {
- updateInbandRinging(null, true);
- }
+ updateInbandRinging(null, true);
}
}
@@ -1222,9 +1219,7 @@ public class HeadsetService extends ProfileService {
broadcastActiveDevice(mActiveDevice);
}
}
- if (Flags.updateActiveDeviceInBandRingtone()) {
- updateInbandRinging(device, true);
- }
+ updateInbandRinging(device, true);
}
return true;
}
@@ -1941,7 +1936,7 @@ public class HeadsetService extends ProfileService {
if (getConnectedDevices().size() > 1
|| isHeadsetClientConnected()
- || (Flags.updateActiveDeviceInBandRingtone() && mActiveDevice == null)) {
+ || mActiveDevice == null) {
mInbandRingingRuntimeDisable = true;
} else {
mInbandRingingRuntimeDisable = false;
diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java
index 6595d55deb..4040b31d53 100644
--- a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java
+++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceAndStateMachineTest.java
@@ -491,7 +491,6 @@ public class HeadsetServiceAndStateMachineTest {
/** Test the value of isInbandRingingEnabled will be changed with the change of active device */
@Test
public void testIsInbandRingingEnabled_SwitchActiveDevice() {
- mSetFlagsRule.enableFlags(Flags.FLAG_UPDATE_ACTIVE_DEVICE_IN_BAND_RINGTONE);
BluetoothDevice device = getTestDevice(0);
connectTestDevice(device);
@@ -937,14 +936,8 @@ public class HeadsetServiceAndStateMachineTest {
BluetoothDevice deviceB = getTestDevice(1);
connectTestDevice(deviceB);
InOrder inOrder = inOrder(mNativeInterface);
- if (!Flags.updateActiveDeviceInBandRingtone()) {
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(true));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
- } else {
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
- }
+ inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
+ inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
// Set active device to device B
assertThat(mHeadsetService.setActiveDevice(deviceB)).isTrue();
mTestLooper.dispatchAll();
@@ -1004,14 +997,8 @@ public class HeadsetServiceAndStateMachineTest {
connectTestDevice(deviceA);
BluetoothDevice deviceB = getTestDevice(1);
connectTestDevice(deviceB);
- if (!Flags.updateActiveDeviceInBandRingtone()) {
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(true));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
- } else {
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
- }
+ inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
+ inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
// Set active device to device B
assertThat(mHeadsetService.setActiveDevice(deviceB)).isTrue();
mTestLooper.dispatchAll();
@@ -1071,14 +1058,8 @@ public class HeadsetServiceAndStateMachineTest {
BluetoothDevice deviceB = getTestDevice(1);
connectTestDevice(deviceB);
InOrder inOrder = inOrder(mNativeInterface);
- if (!Flags.updateActiveDeviceInBandRingtone()) {
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(true));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
- } else {
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
- }
+ inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
+ inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
// Set active device to device B
assertThat(mHeadsetService.setActiveDevice(deviceB)).isTrue();
mTestLooper.dispatchAll();
@@ -1123,14 +1104,8 @@ public class HeadsetServiceAndStateMachineTest {
BluetoothDevice deviceB = getTestDevice(1);
connectTestDevice(deviceB);
InOrder inOrder = inOrder(mNativeInterface);
- if (!Flags.updateActiveDeviceInBandRingtone()) {
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(true));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
- } else {
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
- inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
- }
+ inOrder.verify(mNativeInterface).sendBsir(eq(deviceA), eq(false));
+ inOrder.verify(mNativeInterface).sendBsir(eq(deviceB), eq(false));
// Set active device to device B
assertThat(mHeadsetService.setActiveDevice(deviceB)).isTrue();
mTestLooper.dispatchAll();
diff --git a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceTest.java b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceTest.java
index 2e03a61c22..8526408a6d 100644
--- a/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceTest.java
+++ b/android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetServiceTest.java
@@ -1247,7 +1247,6 @@ public class HeadsetServiceTest {
}
@Test
- @EnableFlags({Flags.FLAG_UPDATE_ACTIVE_DEVICE_IN_BAND_RINGTONE})
public void testIncomingCallDeviceConnect_InbandRingStatus() {
when(mDatabaseManager.getProfileConnectionPolicy(
any(BluetoothDevice.class), eq(BluetoothProfile.HEADSET)))
@@ -1269,7 +1268,6 @@ public class HeadsetServiceTest {
}
@Test
- @EnableFlags({Flags.FLAG_UPDATE_ACTIVE_DEVICE_IN_BAND_RINGTONE})
public void testIncomingCallWithDeviceAudioConnected() {
ArrayList<BluetoothDevice> connectedDevices = new ArrayList<>();
when(mDatabaseManager.getProfileConnectionPolicy(
diff --git a/flags/hfp.aconfig b/flags/hfp.aconfig
index 9e3bd50b5d..14a91bdc6e 100644
--- a/flags/hfp.aconfig
+++ b/flags/hfp.aconfig
@@ -74,16 +74,6 @@ flag {
}
flag {
- name: "update_active_device_in_band_ringtone"
- namespace: "bluetooth"
- description: "Active device update the in band ringtone, but how ringtone is played is still decided by the headset"
- bug: "349318724"
- metadata {
- purpose: PURPOSE_BUGFIX
- }
-}
-
-flag {
name: "choose_wrong_hfp_codec_in_specific_config"
namespace: "bluetooth"
description: "Flag to fix codec selection in nego when the peer device only support NB and SWB."
diff --git a/system/gd/hal/BUILD.gn b/system/gd/hal/BUILD.gn
index ebf15255af..57007d2571 100644
--- a/system/gd/hal/BUILD.gn
+++ b/system/gd/hal/BUILD.gn
@@ -42,7 +42,10 @@ source_set("BluetoothHalSources_hci_host") {
}
configs += [ "//bt/system/gd:gd_defaults" ]
- deps = [ "//bt/system/gd:gd_default_deps" ]
+ deps = [
+ "//bt/flags:bluetooth_flags_c_lib",
+ "//bt/system/gd:gd_default_deps",
+ ]
}
source_set("BluetoothHalSources_ranging_host") {
diff --git a/system/gd/metrics/BUILD.gn b/system/gd/metrics/BUILD.gn
index ff0d72e81e..6d235376c6 100644
--- a/system/gd/metrics/BUILD.gn
+++ b/system/gd/metrics/BUILD.gn
@@ -50,7 +50,10 @@ source_set("BluetoothMetricsSources") {
"//bt/system/gd:gd_defaults",
"//bt/system/log:log_defaults",
]
- deps = [ "//bt/system/gd:gd_default_deps" ]
+ deps = [
+ "//bt/flags:bluetooth_flags_c_lib",
+ "//bt/system/gd:gd_default_deps",
+ ]
if (target_os == "chromeos") {
deps += [ ":BluetoothMetricsSources_chromeos" ]