Loading src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java +2 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll mManager = manager; mProfileManager = mManager.getProfileManager(); mCachedDevice = device; mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mContext, mCachedDevice); mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mManager, mCachedDevice); lifecycle.addObserver(this); } Loading Loading @@ -460,7 +460,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll for (CachedBluetoothDevice item : mAllOfCachedDevices) { item.unregisterCallback(this); } mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mContext, mCachedDevice); mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mManager, mCachedDevice); for (CachedBluetoothDevice item : mAllOfCachedDevices) { item.registerCallback(this); } Loading src/com/android/settings/bluetooth/LeAudioBluetoothDetailsHeaderController.java +4 −2 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr @VisibleForTesting LayoutPreference mLayoutPreference; LocalBluetoothManager mManager; private CachedBluetoothDevice mCachedDevice; private List<CachedBluetoothDevice> mAllOfCachedDevices; @VisibleForTesting Loading Loading @@ -152,8 +153,9 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr public void init(CachedBluetoothDevice cachedBluetoothDevice, LocalBluetoothManager bluetoothManager) { mCachedDevice = cachedBluetoothDevice; mManager = bluetoothManager; mProfileManager = bluetoothManager.getProfileManager(); mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mContext, mCachedDevice); mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mManager, mCachedDevice); } @VisibleForTesting Loading Loading @@ -300,7 +302,7 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr for (CachedBluetoothDevice item : mAllOfCachedDevices) { item.unregisterCallback(this); } mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mContext, mCachedDevice); mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mManager, mCachedDevice); for (CachedBluetoothDevice item : mAllOfCachedDevices) { item.registerCallback(this); } Loading src/com/android/settings/bluetooth/Utils.java +2 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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; Loading Loading
src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java +2 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll mManager = manager; mProfileManager = mManager.getProfileManager(); mCachedDevice = device; mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mContext, mCachedDevice); mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mManager, mCachedDevice); lifecycle.addObserver(this); } Loading Loading @@ -460,7 +460,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll for (CachedBluetoothDevice item : mAllOfCachedDevices) { item.unregisterCallback(this); } mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mContext, mCachedDevice); mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mManager, mCachedDevice); for (CachedBluetoothDevice item : mAllOfCachedDevices) { item.registerCallback(this); } Loading
src/com/android/settings/bluetooth/LeAudioBluetoothDetailsHeaderController.java +4 −2 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr @VisibleForTesting LayoutPreference mLayoutPreference; LocalBluetoothManager mManager; private CachedBluetoothDevice mCachedDevice; private List<CachedBluetoothDevice> mAllOfCachedDevices; @VisibleForTesting Loading Loading @@ -152,8 +153,9 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr public void init(CachedBluetoothDevice cachedBluetoothDevice, LocalBluetoothManager bluetoothManager) { mCachedDevice = cachedBluetoothDevice; mManager = bluetoothManager; mProfileManager = bluetoothManager.getProfileManager(); mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mContext, mCachedDevice); mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mManager, mCachedDevice); } @VisibleForTesting Loading Loading @@ -300,7 +302,7 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr for (CachedBluetoothDevice item : mAllOfCachedDevices) { item.unregisterCallback(this); } mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mContext, mCachedDevice); mAllOfCachedDevices = Utils.getAllOfCachedBluetoothDevices(mManager, mCachedDevice); for (CachedBluetoothDevice item : mAllOfCachedDevices) { item.registerCallback(this); } Loading
src/com/android/settings/bluetooth/Utils.java +2 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading @@ -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; Loading