Fix testcase failed

Bug: 292979979
Test: [Pass]make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDeviceDetailsFragmentTest
Change-Id: If09f4d8ad9c974c2a7f72932d544490655b92cf7
This commit is contained in:
SongFerngWang
2023-07-26 17:54:20 +08:00
parent e1b4b7fc7d
commit 7cbfe4a10e
3 changed files with 8 additions and 6 deletions

View File

@@ -235,7 +235,8 @@ public final class Utils {
* @param cachedBluetoothDevice The main cachedBluetoothDevice.
* @return all cachedBluetoothDevices with the same groupId.
*/
public static List<CachedBluetoothDevice> getAllOfCachedBluetoothDevices(Context context,
public static List<CachedBluetoothDevice> getAllOfCachedBluetoothDevices(
LocalBluetoothManager localBtMgr,
CachedBluetoothDevice cachedBluetoothDevice) {
List<CachedBluetoothDevice> cachedBluetoothDevices = new ArrayList<>();
if (cachedBluetoothDevice == null) {
@@ -248,7 +249,6 @@ public final class Utils {
return cachedBluetoothDevices;
}
final LocalBluetoothManager localBtMgr = Utils.getLocalBtManager(context);
if (localBtMgr == null) {
Log.e(TAG, "getAllOfCachedBluetoothDevices: no LocalBluetoothManager");
return cachedBluetoothDevices;