Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8c711d8 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Remove calls to APIs no longer being supported" am: 30a4d24f am: 93df3c5a am: 72ad6275

Change-Id: I2e9452f98d9bffd3647329b3b030692aeaa56a33
parents df762079 72ad6275
Loading
Loading
Loading
Loading
+5 −16
Original line number Diff line number Diff line
@@ -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();
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -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);