[TBT][BluetoothGatt][NonACR][TFIVE-14725, fixed disconnected button enable issue] 84/191084/2
authorAmritanshu Pandia <a.pandia1@samsung.com>
Thu, 11 Oct 2018 07:41:28 +0000 (13:11 +0530)
committerAmritanshu Pandia <a.pandia1@samsung.com>
Thu, 11 Oct 2018 08:56:02 +0000 (14:26 +0530)
Change-Id: I16db2801fa98cd7c938341ff0e86e34784ecdc2f
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-bluetoothle-view.c

index 35646ecec41b4f424b7a762d7ee8bdb9d1576ba2..398a13130a11c76453df761e6815b5e262f03573 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 fec2441129f3018fc1d7a986ee3d7097e5e0e04b..57a3b954ea444fd752a6cfb797e2c774bf0de628 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 f08f10b72f3854aa2732e3dbbffcd3282ad4074c..6462ad0b234bb4095a7ca07c78f218a66032331b 100755 (executable)
@@ -581,8 +581,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, 2, 0, 1, 1);
 
@@ -692,6 +690,7 @@ 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...");
@@ -719,7 +718,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);
 
 }
 
@@ -891,6 +890,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;
                }