[TBT][BluetoothGatt][NonACR][TFIVE-14725,TFIVE-14740, fixed disconnected button enabl... 13/191113/4
authorAmritanshu Pandia <a.pandia1@samsung.com>
Thu, 11 Oct 2018 10:23:56 +0000 (15:53 +0530)
committerNibha Sharma <nibha.sharma@samsung.com>
Thu, 11 Oct 2018 11:24:31 +0000 (11:24 +0000)
Change-Id: I566c5ec77a86f3d46c346595c545f606497c83fe
Signed-off-by: Amritanshu Pandia <a.pandia1@samsung.com>
release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk
release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk
tbtcoreapp/src/view/tbt-bluetooth-callback-view.c
tbtcoreapp/src/view/tbt-bluetoothle-view.c

index ff35815..7eac300 100755 (executable)
Binary files a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk and b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk differ
index e65c451..8fa3c9d 100755 (executable)
Binary files a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk differ
index 26fa755..978ea44 100644 (file)
@@ -177,10 +177,10 @@ bluetooth_view *bluetooth_callback_view_add(Evas_Object *navi, tbt_info *tbt_inf
                this->create_label = ui_utils_label_add(this->view->layout, "Create Bond: ");
                elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD);
 
-               ui_utils_guide_instruction_popup_button(navi, "Instructions:<br/>Test Type One<br/>1.Bluetooth On<br/>2. Create Bonding callback Invoked<br/><br/>Test Type Two<br/>1. Bluetooth Off<br/>2. Correct Error Message Displayed<br/><b>Note:You can also refer info section");
+               ui_utils_guide_instruction_popup_button(navi, "Instructions:<br/>Test Type One<br/>1.Bluetooth On<br/>2. Create Bond with some device and Create Bonding callback Invoked<br/><br/>Test Type Two<br/>1. Bluetooth Off<br/>2. Correct Error Message Displayed<br/><b>Note:You can also refer info section");
 
                char resultc[256] ={0,};
-               sprintf(resultc, "result = %s", "Maually ON bluetooth and invoke create bond callback");
+               sprintf(resultc, "result = %s",get_bluetooth_error(ret));
                 ui_utils_label_set_text(this->create_label, resultc, "left");
                ret = bt_device_set_bond_created_cb(Bluetooth_bt_device_bond_created_cb_p, this);
                DBG("bt_device_set_bond_created_cb %d", ret);
@@ -204,10 +204,10 @@ bluetooth_view *bluetooth_callback_view_add(Evas_Object *navi, tbt_info *tbt_inf
                this->create_label = ui_utils_label_add(this->view->layout, "Destroy Bond: ");
                elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD);
 
-               ui_utils_guide_instruction_popup_button(navi, "Instructions:<br/>Test Type One<br/>1.Bluetooth On<br/>2. Destroy Bonding callback Invoked<br/><br/>Test Type Two<br/>1. Bluetooth Off<br/>2. Correct Error Message Displayed<br/><b>Note:You can also refer info section");
+               ui_utils_guide_instruction_popup_button(navi, "Instructions:<br/>Test Type One<br/>1.Bluetooth On<br/>2. Create bond with device and destroy bond then Destroy Bonding callback Invoked<br/><br/>Test Type Two<br/>1. Bluetooth Off<br/>2. Correct Error Message Displayed<br/><b>Note:You can also refer info section");
 
                char resultc[256] ={0,};
-               sprintf(resultc, "result = %s", "Maually ON bluetooth and invoke destroy bond callback");
+               sprintf(resultc, "result = %s",get_bluetooth_error(ret));
                 ui_utils_label_set_text(this->create_label, resultc, "left");
                ret = bt_device_set_bond_destroyed_cb(Bluetooth_bt_device_bond_destroyed_cb_p, this);
                RETVM_IF(ret != BT_ERROR_NONE && ret != BT_ERROR_NOT_SUPPORTED, NULL, "bt_device_set_bond_created_cb failed : %s", get_bluetooth_error(ret));
index 4aff462..18b9330 100755 (executable)
@@ -576,8 +576,6 @@ static Evas_Object *add_control_layout(bluetoothle_view *this, Evas_Object *pare
                this->disconnect_btn = ui_utils_push_button_add(this, table, "Disconnect", _disconnect_button_pressed_cb);
                elm_table_pack(table, this->disconnect_btn, 1, 0, 1, 1);
 
-               elm_object_disabled_set(this->disconnect_btn, EINA_TRUE);
-
                this->read_btn = ui_utils_push_button_add(this, table, "Read", _read_button_pressed_cb);
                elm_table_pack(table, this->read_btn, 0, 1, 1, 1);
 
@@ -655,7 +653,10 @@ static void _control_button_pressed_cb(void *user_data, Evas_Object *obj, void *
        if(this->view->tbt_info->apptype == TBT_APP_BLE_GATT_CLIENT)
        {
                //Discover Bluetooth LE Devices
+               elm_object_disabled_set(this->disconnect_btn, EINA_TRUE);
+               DBG("TBT Discovery Started...");
                discover_bluetooth_le(this);
+               DBG("TBT Discovery Completed...");
        }
        else if(this->view->tbt_info->apptype == TBT_APP_BLE_GATT_SERVER)
        {
@@ -678,7 +679,7 @@ static void _disconnect_button_pressed_cb(void *user_data, Evas_Object *obj, voi
        DBG("remote_server_address %s", this->remote_server_address);
        result = bt_gatt_disconnect(this->remote_server_address);
        RETM_IF(result != BT_ERROR_NONE, "bt_gatt_disconnect failed --> error: %s", get_bluetooth_error(result));
-
+       elm_object_disabled_set(this->disconnect_btn, EINA_TRUE);
 
 }
 
@@ -850,6 +851,7 @@ switch(state)
                        elm_object_disabled_set(this->read_btn, EINA_TRUE);
                        elm_object_disabled_set(this->write_btn, EINA_TRUE);
                        elm_object_disabled_set(this->expand_btn, EINA_TRUE);
+                       elm_object_disabled_set(this->disconnect_btn, EINA_FALSE);
                        break;
                }