From: Szymon Janc Date: Mon, 4 Nov 2013 15:34:23 +0000 (+0100) Subject: android: Add support for handling get properties commands X-Git-Tag: android-x86-4.4-r3~6990 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a880b227bdb37ebedf50fa2bcaa2d9e468e23e12;p=android-x86%2Fexternal-bluetooth-bluez.git android: Add support for handling get properties commands When this commands is received all properties shall be reported to HAL. --- diff --git a/android/adapter.c b/android/adapter.c index fb5c462a2..56ac4b729 100644 --- a/android/adapter.c +++ b/android/adapter.c @@ -1120,6 +1120,19 @@ static bool get_property(void *buf, uint16_t len) } } +static void get_properties(void) +{ + get_address(); + get_name(); + get_uuids(); + get_class(); + get_type(); + get_service(); + get_scan_mode(); + get_devices(); + get_disc_timeout(); +} + static bool start_discovery(void) { struct mgmt_cp_start_discovery cp; @@ -1504,6 +1517,10 @@ void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf, goto error; break; + case HAL_OP_GET_ADAPTER_PROPS: + get_properties(); + + break; case HAL_OP_GET_ADAPTER_PROP: if (!get_property(buf, len)) goto error;