Revert "call getName() from CachedBluetoothDevice, not CachedBluetoothDeviceManager"
This reverts commit 3029efc5f7
.
Reason for revert:
To fix null pointer crash in Pairing dialog. Dialog maybe triggered by intent, in which LocalBluetoothManager couldn't have instance for BluetoothDevice and will return null. As a result, we need to depend on method in CachedBluetoothManager to handle it.
Bug: 115754654
Bug: 112735753
Change-Id: I1ebf1f1c2829cfb75e6c382df5acf785fe54a185
This commit is contained in:
@@ -85,7 +85,7 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
|
||||
|
||||
mType = intent.getIntExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, BluetoothDevice.ERROR);
|
||||
mPasskey = intent.getIntExtra(BluetoothDevice.EXTRA_PAIRING_KEY, BluetoothDevice.ERROR);
|
||||
mDeviceName = mBluetoothManager.getCachedDeviceManager().findDevice(mDevice).getName();
|
||||
mDeviceName = mBluetoothManager.getCachedDeviceManager().getName(mDevice);
|
||||
mPbapClientProfile = mBluetoothManager.getProfileManager().getPbapClientProfile();
|
||||
mPasskeyFormatted = formatKey(mPasskey);
|
||||
}
|
||||
|
Reference in New Issue
Block a user