Bluetooth: log who changes adapter name

This is very helpful to find which third party app modified the adapter
name.

Bug: 168605944
Test: manual - change name, observe logcat output
Change-Id: I9a13c89e6ef416286411f786e233d81507c9d53a
This commit is contained in:
Jakub Pawlowski
2020-09-16 15:48:47 +02:00
parent cf44a015e8
commit 6dcad2884a

View File

@@ -412,7 +412,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
if (BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED.equals(action)) {
String newName = intent.getStringExtra(BluetoothAdapter.EXTRA_LOCAL_NAME);
if (DBG) {
Slog.d(TAG, "Bluetooth Adapter name changed to " + newName);
Slog.d(TAG, "Bluetooth Adapter name changed to " + newName + " by "
+ mContext.getPackageName());
}
if (newName != null) {
storeNameAndAddress(newName, null);