system/bt
修订版 | efb7dfe6b4a6c2d0fa510c8dc6657a495c7f3ed7 (tree) |
---|---|
时间 | 2019-06-04 00:14:28 |
作者 | TreeHugger Robot <treehugger-gerrit@goog...> |
Commiter | Android (Google) Code Review |
Merge "DO NOT MERGE: btif: require pairing dialog for JustWorks SSP" into pi-dev
@@ -916,7 +916,6 @@ static void btif_dm_pin_req_evt(tBTA_DM_PIN_REQ* p_pin_req) { | ||
916 | 916 | static void btif_dm_ssp_cfm_req_evt(tBTA_DM_SP_CFM_REQ* p_ssp_cfm_req) { |
917 | 917 | bt_bdname_t bd_name; |
918 | 918 | uint32_t cod; |
919 | - bool is_incoming = !(pairing_cb.state == BT_BOND_STATE_BONDING); | |
920 | 919 | int dev_type; |
921 | 920 | |
922 | 921 | BTIF_TRACE_DEBUG("%s", __func__); |
@@ -961,28 +960,6 @@ static void btif_dm_ssp_cfm_req_evt(tBTA_DM_SP_CFM_REQ* p_ssp_cfm_req) { | ||
961 | 960 | |
962 | 961 | pairing_cb.is_ssp = true; |
963 | 962 | |
964 | - /* If JustWorks auto-accept */ | |
965 | - if (p_ssp_cfm_req->just_works) { | |
966 | - /* Pairing consent for JustWorks needed if: | |
967 | - * 1. Incoming (non-temporary) pairing is detected AND | |
968 | - * 2. local IO capabilities are DisplayYesNo AND | |
969 | - * 3. remote IO capabiltiies are DisplayOnly or NoInputNoOutput; | |
970 | - */ | |
971 | - if (is_incoming && pairing_cb.bond_type != BOND_TYPE_TEMPORARY && | |
972 | - ((p_ssp_cfm_req->loc_io_caps == HCI_IO_CAP_DISPLAY_YESNO) && | |
973 | - (p_ssp_cfm_req->rmt_io_caps == HCI_IO_CAP_DISPLAY_ONLY || | |
974 | - p_ssp_cfm_req->rmt_io_caps == HCI_IO_CAP_NO_IO))) { | |
975 | - BTIF_TRACE_EVENT( | |
976 | - "%s: User consent needed for incoming pairing request. loc_io_caps: " | |
977 | - "%d, rmt_io_caps: %d", | |
978 | - __func__, p_ssp_cfm_req->loc_io_caps, p_ssp_cfm_req->rmt_io_caps); | |
979 | - } else { | |
980 | - BTIF_TRACE_EVENT("%s: Auto-accept JustWorks pairing", __func__); | |
981 | - btif_dm_ssp_reply(&bd_addr, BT_SSP_VARIANT_CONSENT, true, 0); | |
982 | - return; | |
983 | - } | |
984 | - } | |
985 | - | |
986 | 963 | cod = devclass2uint(p_ssp_cfm_req->dev_class); |
987 | 964 | |
988 | 965 | if (cod == 0) { |