diff options
author | deymo@chromium.org <deymo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 23:21:58 +0000 |
---|---|---|
committer | deymo@chromium.org <deymo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 23:21:58 +0000 |
commit | ba03c8c05b52aa7e48a8235a9c26c765cbf5cf9e (patch) | |
tree | 7262ca92152f29163741dd19f1deded75ba095ca /device/bluetooth/bluetooth_device_experimental_chromeos.cc | |
parent | 3075512bc3609dc550233ce28ce48d142869c9d8 (diff) | |
download | chromium_src-ba03c8c05b52aa7e48a8235a9c26c765cbf5cf9e.zip chromium_src-ba03c8c05b52aa7e48a8235a9c26c765cbf5cf9e.tar.gz chromium_src-ba03c8c05b52aa7e48a8235a9c26c765cbf5cf9e.tar.bz2 |
Bluetooth: Parse the bluez.Error.Failed on pairing error.
The method org.bluez.Device1.Pair can return with different errors.
Among those, an org.bluez.Error.Failed: "Device or resource busy" is
a possible option.
This patch parses that D-Bus error as an ERROR_FAILED.
BUG=238479
TEST=BluetoothExperimentalChromeOSTest.PairUnpairableDevice on device_unittests passed with the fix, and fails without it.
Review URL: https://chromiumcodereview.appspot.com/15016004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199048 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/bluetooth/bluetooth_device_experimental_chromeos.cc')
-rw-r--r-- | device/bluetooth/bluetooth_device_experimental_chromeos.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/device/bluetooth/bluetooth_device_experimental_chromeos.cc b/device/bluetooth/bluetooth_device_experimental_chromeos.cc index fb45ad0..35478d9 100644 --- a/device/bluetooth/bluetooth_device_experimental_chromeos.cc +++ b/device/bluetooth/bluetooth_device_experimental_chromeos.cc @@ -682,6 +682,8 @@ void BluetoothDeviceExperimentalChromeOS::OnPairError( ConnectErrorCode error_code = ERROR_UNKNOWN; if (error_name == bluetooth_adapter::kErrorConnectionAttemptFailed) { error_code = ERROR_FAILED; + } else if (error_name == bluetooth_adapter::kErrorFailed) { + error_code = ERROR_FAILED; } else if (error_name == bluetooth_adapter::kErrorAuthenticationFailed) { error_code = ERROR_AUTH_FAILED; } else if (error_name == bluetooth_adapter::kErrorAuthenticationCanceled) { |