From: Amritanshu Pandia Date: Thu, 11 Oct 2018 10:23:56 +0000 (+0530) Subject: [TBT][BluetoothGatt][NonACR][TFIVE-14725,TFIVE-14740, fixed disconnected button enabl... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d7e24ab2c4e09d91dd0692160380e8d2cc75b94;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][BluetoothGatt][NonACR][TFIVE-14725,TFIVE-14740, fixed disconnected button enable issue and print issue] Change-Id: I566c5ec77a86f3d46c346595c545f606497c83fe Signed-off-by: Amritanshu Pandia --- diff --git a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk index ff35815..7eac300 100755 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 diff --git a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk index e65c451..8fa3c9d 100755 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 diff --git a/tbtcoreapp/src/view/tbt-bluetooth-callback-view.c b/tbtcoreapp/src/view/tbt-bluetooth-callback-view.c index 26fa755..978ea44 100644 --- a/tbtcoreapp/src/view/tbt-bluetooth-callback-view.c +++ b/tbtcoreapp/src/view/tbt-bluetooth-callback-view.c @@ -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:
Test Type One
1.Bluetooth On
2. Create Bonding callback Invoked

Test Type Two
1. Bluetooth Off
2. Correct Error Message Displayed
Note:You can also refer info section"); + ui_utils_guide_instruction_popup_button(navi, "Instructions:
Test Type One
1.Bluetooth On
2. Create Bond with some device and Create Bonding callback Invoked

Test Type Two
1. Bluetooth Off
2. Correct Error Message Displayed
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:
Test Type One
1.Bluetooth On
2. Destroy Bonding callback Invoked

Test Type Two
1. Bluetooth Off
2. Correct Error Message Displayed
Note:You can also refer info section"); + ui_utils_guide_instruction_popup_button(navi, "Instructions:
Test Type One
1.Bluetooth On
2. Create bond with device and destroy bond then Destroy Bonding callback Invoked

Test Type Two
1. Bluetooth Off
2. Correct Error Message Displayed
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)); diff --git a/tbtcoreapp/src/view/tbt-bluetoothle-view.c b/tbtcoreapp/src/view/tbt-bluetoothle-view.c index 4aff462..18b9330 100755 --- a/tbtcoreapp/src/view/tbt-bluetoothle-view.c +++ b/tbtcoreapp/src/view/tbt-bluetoothle-view.c @@ -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; }