call getName() from CachedBluetoothDevice, not CachedBluetoothDeviceManager

-add test case "onGetDeviceName"

Bug: 112735753
Test: make -j42 RunSettingsRoboTests
Change-Id: Id62b6eb8be38fb6ac69ca371563be899b8d61aff
This commit is contained in:
timhypeng
2018-08-23 12:53:17 +08:00
committed by tim peng
parent a59ce66b3b
commit 3029efc5f7
2 changed files with 15 additions and 1 deletions

View File

@@ -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().getName(mDevice);
mDeviceName = mBluetoothManager.getCachedDeviceManager().findDevice(mDevice).getName();
mPbapClientProfile = mBluetoothManager.getProfileManager().getPbapClientProfile();
mPasskeyFormatted = formatKey(mPasskey);
}