summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2019-12-12 21:47:18 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2019-12-12 21:47:18 +0000
commitd8c711d8912a5d0d42fe38f4594aa85111ada38f (patch)
tree5763a61bfe88b51d60ecac3e8c5bd51695a1a391
parentdf762079054da6ab05514f8fa5c9a4948a54ea93 (diff)
parent72ad627539c9e2249d0a10d28e37098599e88770 (diff)
downloadpackages_apps_Settings-d8c711d8912a5d0d42fe38f4594aa85111ada38f.tar.gz
packages_apps_Settings-d8c711d8912a5d0d42fe38f4594aa85111ada38f.tar.bz2
packages_apps_Settings-d8c711d8912a5d0d42fe38f4594aa85111ada38f.zip
Merge "Remove calls to APIs no longer being supported" am: 30a4d24f03 am: 93df3c5ad6 am: 72ad627539
Change-Id: I2e9452f98d9bffd3647329b3b030692aeaa56a33
-rw-r--r--src/com/android/settings/bluetooth/BluetoothPairingController.java21
-rw-r--r--src/com/android/settings/bluetooth/BluetoothPairingService.java2
2 files changed, 6 insertions, 17 deletions
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingController.java b/src/com/android/settings/bluetooth/BluetoothPairingController.java
index 94bdfe8f75..a1d86bef4f 100644
--- a/src/com/android/settings/bluetooth/BluetoothPairingController.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingController.java
@@ -294,8 +294,7 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
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 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
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 @@ public class BluetoothPairingController implements OnCheckedChangeListener,
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 class BluetoothPairingController implements OnCheckedChangeListener,
*/
public void onCancel() {
Log.d(TAG, "Pairing dialog canceled");
- mDevice.cancelPairingUserInput();
+ mDevice.cancelPairing();
}
/**
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingService.java b/src/com/android/settings/bluetooth/BluetoothPairingService.java
index d93e57ddc9..53e93d97c4 100644
--- a/src/com/android/settings/bluetooth/BluetoothPairingService.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingService.java
@@ -85,7 +85,7 @@ public final class BluetoothPairingService extends Service {
} else if (action.equals(ACTION_DISMISS_PAIRING)) {
Log.d(TAG, "Notification cancel " + mDevice.getAddress() + " (" +
mDevice.getName() + ")");
- mDevice.cancelPairingUserInput();
+ mDevice.cancelPairing();
} else {
int bondState = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE,
BluetoothDevice.ERROR);