Remove calls to APIs no longer being supported
Bug: 143245666
Test: Manual
Change-Id: Ibec2c9d60ec5c90e9e4f0a03b75c54164f50f42d
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingController.java b/src/com/android/settings/bluetooth/BluetoothPairingController.java
index 94bdfe8..a1d86be 100644
--- a/src/com/android/settings/bluetooth/BluetoothPairingController.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingController.java
@@ -294,8 +294,7 @@
if (mType == BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY) {
mDevice.setPairingConfirmation(true);
} else if (mType == BluetoothDevice.PAIRING_VARIANT_DISPLAY_PIN) {
- byte[] pinBytes = BluetoothDevice.convertPinToBytes(mPasskeyFormatted);
- mDevice.setPin(pinBytes);
+ mDevice.setPin(mPasskeyFormatted);
}
}
@@ -391,17 +390,9 @@
switch (mType) {
case BluetoothDevice.PAIRING_VARIANT_PIN:
case BluetoothDevice.PAIRING_VARIANT_PIN_16_DIGITS:
- byte[] pinBytes = BluetoothDevice.convertPinToBytes(passkey);
- if (pinBytes == null) {
- return;
- }
- mDevice.setPin(pinBytes);
+ mDevice.setPin(passkey);
break;
- case BluetoothDevice.PAIRING_VARIANT_PASSKEY:
- int pass = Integer.parseInt(passkey);
- mDevice.setPasskey(pass);
- break;
case BluetoothDevice.PAIRING_VARIANT_PASSKEY_CONFIRMATION:
case BluetoothDevice.PAIRING_VARIANT_CONSENT:
@@ -410,11 +401,9 @@
case BluetoothDevice.PAIRING_VARIANT_DISPLAY_PASSKEY:
case BluetoothDevice.PAIRING_VARIANT_DISPLAY_PIN:
- // Do nothing.
- break;
-
case BluetoothDevice.PAIRING_VARIANT_OOB_CONSENT:
- mDevice.setRemoteOutOfBandData();
+ case BluetoothDevice.PAIRING_VARIANT_PASSKEY:
+ // Do nothing.
break;
default:
@@ -428,7 +417,7 @@
*/
public void onCancel() {
Log.d(TAG, "Pairing dialog canceled");
- mDevice.cancelPairingUserInput();
+ mDevice.cancelPairing();
}
/**