OSDN Git Service

Fix incorrect SetConnScanParam function mapping
authorSunny Kapdi <sunnyk@codeaurora.org>
Thu, 27 Aug 2015 07:37:31 +0000 (00:37 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 28 Aug 2015 19:49:02 +0000 (12:49 -0700)
BTA_DM_API_BLE_CONN_SCAN_PARAM_EVT is defined before
BTA_DM_API_BLE_SCAN_PARAM_EVT in the enum but the corresponding
entries in bta_dm_action were inverted. This resulted in incorrect
invocation of set_conn_scan_params while trying to set parameters
for scanning. The call was hence failing here and was not
resulting in setting of the new scan parameters in the Controller
irrespective of the scan mode selected from the App. This would
essentially result in the breakage of ScanSettings.SCAN_MODE_<xx>
Android SDK APIs.

Bug: 23602042
Change-Id: I17e1b14a32250e3ccb7631a67690ec2e0a6bc321

bta/dm/bta_dm_main.c

index fc16bb6..575448c 100644 (file)
@@ -85,8 +85,8 @@ const tBTA_DM_ACTION bta_dm_action[] =
     bta_dm_security_grant,
     bta_dm_ble_set_bg_conn_type,
     bta_dm_ble_set_conn_params,  /* BTA_DM_API_BLE_CONN_PARAM_EVT */
-    bta_dm_ble_set_scan_params,  /* BTA_DM_API_BLE_SCAN_PARAM_EVT */
     bta_dm_ble_set_conn_scan_params,  /* BTA_DM_API_BLE_CONN_SCAN_PARAM_EVT */
+    bta_dm_ble_set_scan_params,  /* BTA_DM_API_BLE_SCAN_PARAM_EVT */
     bta_dm_ble_observe,
     bta_dm_ble_update_conn_params,   /* BTA_DM_API_UPDATE_CONN_PARAM_EVT */
 #if BLE_PRIVACY_SPT == TRUE