Modified NPE and typo of abbreviation of log tag
There could be NPE issue when connecting LE audio device.
And I've modified typo according to the policy of log tag abbreviation in Telecom.
Test: When node is added after connecting to LE audio device
Bug: 293220012
Change-Id: I8b750fb58c1320101cac4116212f4b807b9b0d09
Signed-off-by: Junyeong Bak <junyeong.bak@samsung.com>
diff --git a/src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java b/src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java
index e1c5625..b5e7457 100644
--- a/src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java
+++ b/src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java
@@ -61,7 +61,8 @@
public void onGroupStatusChanged(int groupId, int groupStatus) {}
@Override
public void onGroupNodeAdded(BluetoothDevice device, int groupId) {
- Log.i(this, device.getAddress() + " group added " + groupId);
+ Log.i(this, (device == null ? "device is null" : device.getAddress())
+ + " group added " + groupId);
if (device == null || groupId == BluetoothLeAudio.GROUP_ID_INVALID) {
Log.w(this, "invalid parameter");
return;
@@ -73,6 +74,8 @@
}
@Override
public void onGroupNodeRemoved(BluetoothDevice device, int groupId) {
+ Log.i(this, (device == null ? "device is null" : device.getAddress())
+ + " group removed " + groupId);
if (device == null || groupId == BluetoothLeAudio.GROUP_ID_INVALID) {
Log.w(this, "invalid parameter");
return;
@@ -88,7 +91,7 @@
new BluetoothProfile.ServiceListener() {
@Override
public void onServiceConnected(int profile, BluetoothProfile proxy) {
- Log.startSession("BMSL.oSC");
+ Log.startSession("BPSL.oSC");
try {
synchronized (mLock) {
String logString;
@@ -126,7 +129,7 @@
@Override
public void onServiceDisconnected(int profile) {
- Log.startSession("BMSL.oSD");
+ Log.startSession("BPSL.oSD");
try {
synchronized (mLock) {
LinkedHashMap<String, BluetoothDevice> lostServiceDevices;