diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2009-07-17 14:45:22 -0700 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2009-07-17 14:45:22 -0700 |
commit | 12cae39747c49e2886bcfbac9ec42094bdb32209 (patch) | |
tree | 634b107d861e88309abbaa2ea57542c0304c75ae /core/java/android/server/BluetoothEventLoop.java | |
parent | 7ff6b74cf275fad0c0ee7929fb9cd1d6dc116299 (diff) | |
download | frameworks_base-12cae39747c49e2886bcfbac9ec42094bdb32209.zip frameworks_base-12cae39747c49e2886bcfbac9ec42094bdb32209.tar.gz frameworks_base-12cae39747c49e2886bcfbac9ec42094bdb32209.tar.bz2 |
Revert "Initial support of 2.1 pairing."
This reverts commit 228b2f3a813e93413a0f9e2f29dfbfc54590a356.
Diffstat (limited to 'core/java/android/server/BluetoothEventLoop.java')
-rw-r--r-- | core/java/android/server/BluetoothEventLoop.java | 49 |
1 files changed, 9 insertions, 40 deletions
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java index dc84d1f..76906b6 100644 --- a/core/java/android/server/BluetoothEventLoop.java +++ b/core/java/android/server/BluetoothEventLoop.java @@ -317,53 +317,23 @@ class BluetoothEventLoop { } mBluetoothService.setRemoteDeviceProperty(address, name, uuid); } + } - private String checkPairingRequestAndGetAddress(String objectPath, int nativeData) { + private void onRequestPinCode(String objectPath, int nativeData) { String address = mBluetoothService.getAddressFromObjectPath(objectPath); if (address == null) { - Log.e(TAG, "Unable to get device address in checkPairingRequestAndGetAddress, " + - "returning null"); - return null; + Log.e(TAG, "Unable to get device address in onRequestPinCode, returning null"); + return; } address = address.toUpperCase(); mPasskeyAgentRequestData.put(address, new Integer(nativeData)); if (mBluetoothService.getBluetoothState() == BluetoothDevice.BLUETOOTH_STATE_TURNING_OFF) { // shutdown path - mBluetoothService.cancelPairingUserInput(address); - return null; + mBluetoothService.cancelPin(address); + return; } - return address; - } - - private void onRequestConfirmation(String objectPath, int passkey, int nativeData) { - String address = checkPairingRequestAndGetAddress(objectPath, nativeData); - if (address == null) return; - - Intent intent = new Intent(BluetoothIntent.PAIRING_REQUEST_ACTION); - intent.putExtra(BluetoothIntent.ADDRESS, address); - intent.putExtra(BluetoothIntent.PASSKEY, passkey); - intent.putExtra(BluetoothIntent.PAIRING_VARIANT, - BluetoothDevice.PAIRING_VARIANT_CONFIRMATION); - mContext.sendBroadcast(intent, BLUETOOTH_ADMIN_PERM); - return; - } - - private void onRequestPasskey(String objectPath, int nativeData) { - String address = checkPairingRequestAndGetAddress(objectPath, nativeData); - if (address == null) return; - - Intent intent = new Intent(BluetoothIntent.PAIRING_REQUEST_ACTION); - intent.putExtra(BluetoothIntent.ADDRESS, address); - intent.putExtra(BluetoothIntent.PAIRING_VARIANT, BluetoothDevice.PAIRING_VARIANT_PASSKEY); - mContext.sendBroadcast(intent, BLUETOOTH_ADMIN_PERM); - return; - } - - private void onRequestPinCode(String objectPath, int nativeData) { - String address = checkPairingRequestAndGetAddress(objectPath, nativeData); - if (address == null) return; if (mBluetoothService.getBondState().getBondState(address) == BluetoothDevice.BOND_BONDING) { @@ -388,7 +358,6 @@ class BluetoothEventLoop { } Intent intent = new Intent(BluetoothIntent.PAIRING_REQUEST_ACTION); intent.putExtra(BluetoothIntent.ADDRESS, address); - intent.putExtra(BluetoothIntent.PAIRING_VARIANT, BluetoothDevice.PAIRING_VARIANT_PIN); mContext.sendBroadcast(intent, BLUETOOTH_ADMIN_PERM); return; } @@ -417,9 +386,9 @@ class BluetoothEventLoop { } private void onAgentCancel() { - Intent intent = new Intent(BluetoothIntent.PAIRING_CANCEL_ACTION); - mContext.sendBroadcast(intent, BLUETOOTH_ADMIN_PERM); - return; + // We immediately response to DBUS Authorize() so this should not + // usually happen + log("onAgentCancel"); } private void onRestartRequired() { |