Loading src/com/android/settings/bluetooth/AvailableMediaBluetoothDeviceUpdater.java +12 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater implements Preference.OnPreferenceClickListener { private static final String TAG = "AvailableMediaBluetoothDeviceUpdater"; private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG); private static final boolean DBG = Log.isLoggable(BluetoothDeviceUpdater.TAG, Log.DEBUG); private static final String PREF_KEY = "available_media_bt"; Loading Loading @@ -111,4 +111,15 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater protected String getPreferenceKey() { return PREF_KEY; } @Override protected String getLogTag() { return TAG; } @Override protected void update(CachedBluetoothDevice cachedBluetoothDevice) { super.update(cachedBluetoothDevice); Log.d(TAG, "Map : " + mPreferenceMap); } } src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java +13 −7 Original line number Diff line number Diff line Loading @@ -267,8 +267,6 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll for (LocalBluetoothProfile profile : tmpResult) { if (mProfileDeviceMap.containsKey(profile.toString())) { mProfileDeviceMap.get(profile.toString()).add(cachedItem); Log.d(TAG, "getProfiles: " + profile.toString() + " add device " + cachedItem.getDevice().getAnonymizedAddress()); } else { List<CachedBluetoothDevice> tmpCachedDeviceList = new ArrayList<CachedBluetoothDevice>(); Loading Loading @@ -303,7 +301,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll result.remove(mManager.getProfileManager().getA2dpProfile()); result.remove(mManager.getProfileManager().getHeadsetProfile()); } Log.d(TAG, "getProfiles:result:" + result); Log.d(TAG, "getProfiles:Map:" + mProfileDeviceMap); return result; } Loading Loading @@ -336,7 +334,8 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) { Log.d(TAG, "User disable LE device: " + leAudioDevice.getDevice().getAnonymizedAddress()); "device:" + leAudioDevice.getDevice().getAnonymizedAddress() + "disable LE profile"); profile.setEnabled(leAudioDevice.getDevice(), false); if (vcp != null) { vcp.setEnabled(leAudioDevice.getDevice(), false); Loading Loading @@ -374,7 +373,8 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll LocalBluetoothProfile csip = mProfileManager.getCsipSetCoordinatorProfile(); for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) { Log.d(TAG, "User enable LE device: " + leAudioDevice.getDevice().getAnonymizedAddress()); "device:" + leAudioDevice.getDevice().getAnonymizedAddress() + "enable LE profile"); profile.setEnabled(leAudioDevice.getDevice(), true); if (vcp != null) { vcp.setEnabled(leAudioDevice.getDevice(), true); Loading @@ -390,9 +390,12 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll Log.d(TAG, "Disable " + profile.toString() + " before user enables LE"); for (CachedBluetoothDevice profileDevice : mProfileDeviceMap.get(profile.toString())) { if (profile.isEnabled(profileDevice.getDevice())) { Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":" + profile.toString() + " set disable"); profile.setEnabled(profileDevice.getDevice(), false); } else { Log.d(TAG, "The " + profile.toString() + " profile is disabled. Do nothing."); Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":" + profile.toString() + " profile is disabled. Do nothing."); } } } Loading @@ -403,9 +406,12 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll Log.d(TAG, "enable " + profile.toString() + "after user disables LE"); for (CachedBluetoothDevice profileDevice : mProfileDeviceMap.get(profile.toString())) { if (!profile.isEnabled(profileDevice.getDevice())) { Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":" + profile.toString() + " set enable"); profile.setEnabled(profileDevice.getDevice(), true); } else { Log.d(TAG, "The " + profile.toString() + " profile is enabled. Do nothing."); Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":" + profile.toString() + " profile is enabled. Do nothing."); } } } Loading src/com/android/settings/bluetooth/BluetoothDeviceUpdater.java +13 −9 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, protected LocalBluetoothManager mLocalManager; protected int mMetricsCategory; private static final String TAG = "BluetoothDeviceUpdater"; protected static final String TAG = "BluetoothDeviceUpdater"; private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG); @VisibleForTesting Loading Loading @@ -88,7 +88,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, */ public void registerCallback() { if (mLocalManager == null) { Log.e(TAG, "registerCallback() Bluetooth is not supported on this device"); Log.e(getLogTag(), "registerCallback() Bluetooth is not supported on this device"); return; } mLocalManager.setForegroundActivity(mContext); Loading @@ -102,7 +102,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, */ public void unregisterCallback() { if (mLocalManager == null) { Log.e(TAG, "unregisterCallback() Bluetooth is not supported on this device"); Log.e(getLogTag(), "unregisterCallback() Bluetooth is not supported on this device"); return; } mLocalManager.setForegroundActivity(null); Loading @@ -115,7 +115,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, */ public void forceUpdate() { if (mLocalManager == null) { Log.e(TAG, "forceUpdate() Bluetooth is not supported on this device"); Log.e(getLogTag(), "forceUpdate() Bluetooth is not supported on this device"); return; } if (BluetoothAdapter.getDefaultAdapter().isEnabled()) { Loading @@ -131,7 +131,8 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, public void removeAllDevicesFromPreference() { if (mLocalManager == null) { Log.e(TAG, "removeAllDevicesFromPreference() BT is not supported on this device"); Log.e(getLogTag(), "removeAllDevicesFromPreference() BT is not supported on this device"); return; } final Collection<CachedBluetoothDevice> cachedDevices = Loading Loading @@ -172,7 +173,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, public void onProfileConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state, int bluetoothProfile) { if (DBG) { Log.d(TAG, "onProfileConnectionStateChanged() device: " + cachedDevice.getName() Log.d(getLogTag(), "onProfileConnectionStateChanged() device: " + cachedDevice.getName() + ", state: " + state + ", bluetoothProfile: " + bluetoothProfile); } update(cachedDevice); Loading @@ -181,7 +182,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, @Override public void onAclConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { if (DBG) { Log.d(TAG, "onAclConnectionStateChanged() device: " + cachedDevice.getName() Log.d(getLogTag(), "onAclConnectionStateChanged() device: " + cachedDevice.getName() + ", state: " + state); } update(cachedDevice); Loading Loading @@ -312,8 +313,8 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, } final BluetoothDevice device = cachedDevice.getDevice(); if (DBG) { Log.d(TAG, "isDeviceConnected() device name : " + cachedDevice.getName() + ", is connected : " + device.isConnected() + " , is profile connected : " Log.d(getLogTag(), "isDeviceConnected() device name : " + cachedDevice.getName() + ", is connected : " + device.isConnected() + " , is profile connected : " + cachedDevice.isConnected()); } return device.getBondState() == BluetoothDevice.BOND_BONDED && device.isConnected(); Loading @@ -331,4 +332,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, protected boolean isDeviceInCachedDevicesList(CachedBluetoothDevice cachedDevice){ return mLocalManager.getCachedDeviceManager().getCachedDevicesCopy().contains(cachedDevice); } protected String getLogTag() { return TAG; } } src/com/android/settings/bluetooth/ConnectedBluetoothDeviceUpdater.java +12 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ import com.android.settingslib.bluetooth.CachedBluetoothDevice; public class ConnectedBluetoothDeviceUpdater extends BluetoothDeviceUpdater { private static final String TAG = "ConnBluetoothDeviceUpdater"; private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG); private static final boolean DBG = Log.isLoggable(BluetoothDeviceUpdater.TAG, Log.DEBUG); private static final String PREF_KEY = "connected_bt"; Loading Loading @@ -118,4 +118,15 @@ public class ConnectedBluetoothDeviceUpdater extends BluetoothDeviceUpdater { protected String getPreferenceKey() { return PREF_KEY; } @Override protected String getLogTag() { return TAG; } @Override protected void update(CachedBluetoothDevice cachedBluetoothDevice) { super.update(cachedBluetoothDevice); Log.d(TAG, "Map : " + mPreferenceMap); } } src/com/android/settings/bluetooth/LeAudioBluetoothDetailsHeaderController.java +20 −5 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr @VisibleForTesting LayoutPreference mLayoutPreference; private CachedBluetoothDevice mCachedDevice; private List<CachedBluetoothDevice> mLeAudioDevices; @VisibleForTesting Handler mHandler = new Handler(Looper.getMainLooper()); @VisibleForTesting Loading Loading @@ -128,7 +129,13 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr return; } mIsRegisterCallback = true; if (mLeAudioDevices != null && !mLeAudioDevices.isEmpty()) { for (CachedBluetoothDevice item : mLeAudioDevices) { item.registerCallback(this); } } else { mCachedDevice.registerCallback(this); } refresh(); } Loading @@ -137,7 +144,13 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr if (!mIsRegisterCallback) { return; } if (mLeAudioDevices != null && !mLeAudioDevices.isEmpty()) { for (CachedBluetoothDevice item : mLeAudioDevices) { item.unregisterCallback(this); } } else { mCachedDevice.unregisterCallback(this); } mIsRegisterCallback = false; } Loading @@ -149,6 +162,8 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr LocalBluetoothManager bluetoothManager) { mCachedDevice = cachedBluetoothDevice; mProfileManager = bluetoothManager.getProfileManager(); mLeAudioDevices = getAllOfLeAudioDevices(); } @VisibleForTesting Loading Loading @@ -230,15 +245,15 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr leAudioDevices.add(member); } } Log.d(TAG, "mLeAudioDevices is " + mLeAudioDevices); return leAudioDevices; } private void updateBatteryLayout() { // Init the battery layouts. hideAllOfBatteryLayouts(); final List<CachedBluetoothDevice> leAudioDevices = getAllOfLeAudioDevices(); LeAudioProfile leAudioProfile = mProfileManager.getLeAudioProfile(); if (leAudioDevices == null || leAudioDevices.isEmpty()) { if (mLeAudioDevices == null || mLeAudioDevices.isEmpty()) { Log.e(TAG, "There is no LeAudioProfile."); return; } Loading @@ -252,7 +267,7 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr return; } for (CachedBluetoothDevice cachedDevice : leAudioDevices) { for (CachedBluetoothDevice cachedDevice : mLeAudioDevices) { int deviceId = leAudioProfile.getAudioLocation(cachedDevice.getDevice()); Log.d(TAG, "LeAudioDevices:" + cachedDevice.getDevice().getAnonymizedAddress() + ", deviceId:" + deviceId); Loading Loading
src/com/android/settings/bluetooth/AvailableMediaBluetoothDeviceUpdater.java +12 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater implements Preference.OnPreferenceClickListener { private static final String TAG = "AvailableMediaBluetoothDeviceUpdater"; private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG); private static final boolean DBG = Log.isLoggable(BluetoothDeviceUpdater.TAG, Log.DEBUG); private static final String PREF_KEY = "available_media_bt"; Loading Loading @@ -111,4 +111,15 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater protected String getPreferenceKey() { return PREF_KEY; } @Override protected String getLogTag() { return TAG; } @Override protected void update(CachedBluetoothDevice cachedBluetoothDevice) { super.update(cachedBluetoothDevice); Log.d(TAG, "Map : " + mPreferenceMap); } }
src/com/android/settings/bluetooth/BluetoothDetailsProfilesController.java +13 −7 Original line number Diff line number Diff line Loading @@ -267,8 +267,6 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll for (LocalBluetoothProfile profile : tmpResult) { if (mProfileDeviceMap.containsKey(profile.toString())) { mProfileDeviceMap.get(profile.toString()).add(cachedItem); Log.d(TAG, "getProfiles: " + profile.toString() + " add device " + cachedItem.getDevice().getAnonymizedAddress()); } else { List<CachedBluetoothDevice> tmpCachedDeviceList = new ArrayList<CachedBluetoothDevice>(); Loading Loading @@ -303,7 +301,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll result.remove(mManager.getProfileManager().getA2dpProfile()); result.remove(mManager.getProfileManager().getHeadsetProfile()); } Log.d(TAG, "getProfiles:result:" + result); Log.d(TAG, "getProfiles:Map:" + mProfileDeviceMap); return result; } Loading Loading @@ -336,7 +334,8 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) { Log.d(TAG, "User disable LE device: " + leAudioDevice.getDevice().getAnonymizedAddress()); "device:" + leAudioDevice.getDevice().getAnonymizedAddress() + "disable LE profile"); profile.setEnabled(leAudioDevice.getDevice(), false); if (vcp != null) { vcp.setEnabled(leAudioDevice.getDevice(), false); Loading Loading @@ -374,7 +373,8 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll LocalBluetoothProfile csip = mProfileManager.getCsipSetCoordinatorProfile(); for (CachedBluetoothDevice leAudioDevice : mProfileDeviceMap.get(profile.toString())) { Log.d(TAG, "User enable LE device: " + leAudioDevice.getDevice().getAnonymizedAddress()); "device:" + leAudioDevice.getDevice().getAnonymizedAddress() + "enable LE profile"); profile.setEnabled(leAudioDevice.getDevice(), true); if (vcp != null) { vcp.setEnabled(leAudioDevice.getDevice(), true); Loading @@ -390,9 +390,12 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll Log.d(TAG, "Disable " + profile.toString() + " before user enables LE"); for (CachedBluetoothDevice profileDevice : mProfileDeviceMap.get(profile.toString())) { if (profile.isEnabled(profileDevice.getDevice())) { Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":" + profile.toString() + " set disable"); profile.setEnabled(profileDevice.getDevice(), false); } else { Log.d(TAG, "The " + profile.toString() + " profile is disabled. Do nothing."); Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":" + profile.toString() + " profile is disabled. Do nothing."); } } } Loading @@ -403,9 +406,12 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll Log.d(TAG, "enable " + profile.toString() + "after user disables LE"); for (CachedBluetoothDevice profileDevice : mProfileDeviceMap.get(profile.toString())) { if (!profile.isEnabled(profileDevice.getDevice())) { Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":" + profile.toString() + " set enable"); profile.setEnabled(profileDevice.getDevice(), true); } else { Log.d(TAG, "The " + profile.toString() + " profile is enabled. Do nothing."); Log.d(TAG, "The " + profileDevice.getDevice().getAnonymizedAddress() + ":" + profile.toString() + " profile is enabled. Do nothing."); } } } Loading
src/com/android/settings/bluetooth/BluetoothDeviceUpdater.java +13 −9 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, protected LocalBluetoothManager mLocalManager; protected int mMetricsCategory; private static final String TAG = "BluetoothDeviceUpdater"; protected static final String TAG = "BluetoothDeviceUpdater"; private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG); @VisibleForTesting Loading Loading @@ -88,7 +88,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, */ public void registerCallback() { if (mLocalManager == null) { Log.e(TAG, "registerCallback() Bluetooth is not supported on this device"); Log.e(getLogTag(), "registerCallback() Bluetooth is not supported on this device"); return; } mLocalManager.setForegroundActivity(mContext); Loading @@ -102,7 +102,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, */ public void unregisterCallback() { if (mLocalManager == null) { Log.e(TAG, "unregisterCallback() Bluetooth is not supported on this device"); Log.e(getLogTag(), "unregisterCallback() Bluetooth is not supported on this device"); return; } mLocalManager.setForegroundActivity(null); Loading @@ -115,7 +115,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, */ public void forceUpdate() { if (mLocalManager == null) { Log.e(TAG, "forceUpdate() Bluetooth is not supported on this device"); Log.e(getLogTag(), "forceUpdate() Bluetooth is not supported on this device"); return; } if (BluetoothAdapter.getDefaultAdapter().isEnabled()) { Loading @@ -131,7 +131,8 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, public void removeAllDevicesFromPreference() { if (mLocalManager == null) { Log.e(TAG, "removeAllDevicesFromPreference() BT is not supported on this device"); Log.e(getLogTag(), "removeAllDevicesFromPreference() BT is not supported on this device"); return; } final Collection<CachedBluetoothDevice> cachedDevices = Loading Loading @@ -172,7 +173,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, public void onProfileConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state, int bluetoothProfile) { if (DBG) { Log.d(TAG, "onProfileConnectionStateChanged() device: " + cachedDevice.getName() Log.d(getLogTag(), "onProfileConnectionStateChanged() device: " + cachedDevice.getName() + ", state: " + state + ", bluetoothProfile: " + bluetoothProfile); } update(cachedDevice); Loading @@ -181,7 +182,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, @Override public void onAclConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { if (DBG) { Log.d(TAG, "onAclConnectionStateChanged() device: " + cachedDevice.getName() Log.d(getLogTag(), "onAclConnectionStateChanged() device: " + cachedDevice.getName() + ", state: " + state); } update(cachedDevice); Loading Loading @@ -312,8 +313,8 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, } final BluetoothDevice device = cachedDevice.getDevice(); if (DBG) { Log.d(TAG, "isDeviceConnected() device name : " + cachedDevice.getName() + ", is connected : " + device.isConnected() + " , is profile connected : " Log.d(getLogTag(), "isDeviceConnected() device name : " + cachedDevice.getName() + ", is connected : " + device.isConnected() + " , is profile connected : " + cachedDevice.isConnected()); } return device.getBondState() == BluetoothDevice.BOND_BONDED && device.isConnected(); Loading @@ -331,4 +332,7 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback, protected boolean isDeviceInCachedDevicesList(CachedBluetoothDevice cachedDevice){ return mLocalManager.getCachedDeviceManager().getCachedDevicesCopy().contains(cachedDevice); } protected String getLogTag() { return TAG; } }
src/com/android/settings/bluetooth/ConnectedBluetoothDeviceUpdater.java +12 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ import com.android.settingslib.bluetooth.CachedBluetoothDevice; public class ConnectedBluetoothDeviceUpdater extends BluetoothDeviceUpdater { private static final String TAG = "ConnBluetoothDeviceUpdater"; private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG); private static final boolean DBG = Log.isLoggable(BluetoothDeviceUpdater.TAG, Log.DEBUG); private static final String PREF_KEY = "connected_bt"; Loading Loading @@ -118,4 +118,15 @@ public class ConnectedBluetoothDeviceUpdater extends BluetoothDeviceUpdater { protected String getPreferenceKey() { return PREF_KEY; } @Override protected String getLogTag() { return TAG; } @Override protected void update(CachedBluetoothDevice cachedBluetoothDevice) { super.update(cachedBluetoothDevice); Log.d(TAG, "Map : " + mPreferenceMap); } }
src/com/android/settings/bluetooth/LeAudioBluetoothDetailsHeaderController.java +20 −5 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr @VisibleForTesting LayoutPreference mLayoutPreference; private CachedBluetoothDevice mCachedDevice; private List<CachedBluetoothDevice> mLeAudioDevices; @VisibleForTesting Handler mHandler = new Handler(Looper.getMainLooper()); @VisibleForTesting Loading Loading @@ -128,7 +129,13 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr return; } mIsRegisterCallback = true; if (mLeAudioDevices != null && !mLeAudioDevices.isEmpty()) { for (CachedBluetoothDevice item : mLeAudioDevices) { item.registerCallback(this); } } else { mCachedDevice.registerCallback(this); } refresh(); } Loading @@ -137,7 +144,13 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr if (!mIsRegisterCallback) { return; } if (mLeAudioDevices != null && !mLeAudioDevices.isEmpty()) { for (CachedBluetoothDevice item : mLeAudioDevices) { item.unregisterCallback(this); } } else { mCachedDevice.unregisterCallback(this); } mIsRegisterCallback = false; } Loading @@ -149,6 +162,8 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr LocalBluetoothManager bluetoothManager) { mCachedDevice = cachedBluetoothDevice; mProfileManager = bluetoothManager.getProfileManager(); mLeAudioDevices = getAllOfLeAudioDevices(); } @VisibleForTesting Loading Loading @@ -230,15 +245,15 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr leAudioDevices.add(member); } } Log.d(TAG, "mLeAudioDevices is " + mLeAudioDevices); return leAudioDevices; } private void updateBatteryLayout() { // Init the battery layouts. hideAllOfBatteryLayouts(); final List<CachedBluetoothDevice> leAudioDevices = getAllOfLeAudioDevices(); LeAudioProfile leAudioProfile = mProfileManager.getLeAudioProfile(); if (leAudioDevices == null || leAudioDevices.isEmpty()) { if (mLeAudioDevices == null || mLeAudioDevices.isEmpty()) { Log.e(TAG, "There is no LeAudioProfile."); return; } Loading @@ -252,7 +267,7 @@ public class LeAudioBluetoothDetailsHeaderController extends BasePreferenceContr return; } for (CachedBluetoothDevice cachedDevice : leAudioDevices) { for (CachedBluetoothDevice cachedDevice : mLeAudioDevices) { int deviceId = leAudioProfile.getAudioLocation(cachedDevice.getDevice()); Log.d(TAG, "LeAudioDevices:" + cachedDevice.getDevice().getAnonymizedAddress() + ", deviceId:" + deviceId); Loading