[TBT][bluetooth][Non-ACR][Destroy callback code and info section modified] 21/187321/1
authornibha2 <nibha.sharma@samsung.com>
Wed, 22 Aug 2018 04:51:40 +0000 (10:21 +0530)
committernibha2 <nibha.sharma@samsung.com>
Wed, 22 Aug 2018 04:51:40 +0000 (10:21 +0530)
Change-Id: I05d032b5b637593bef7164909c6d50e7a1c1d0fc
Signed-off-by: nibha2 <nibha.sharma@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/model/tbt-list.c
tbtcoreapp/src/view/tbt-bluetooth-callback-view.c

index 175295b..0d2c137 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 b2eb78a..4efcd81 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 9ee5052..557a621 100644 (file)
@@ -608,7 +608,8 @@ static tbt_info tbtapps[] =
                        .icon_name = "dummy",
                        .info = "Test Type One<br/>"
                                        "1.Bluetooth On<br/>"
-                                       "2. Destroy Bonding callback Invoked<br/>"
+                                       "2.Connect with some device and then unpair with the same connected device<br/>"
+                                       "3. Destroy Bonding callback Invoked<br/>"
                                        "<br/>Test Type Two<br/>"
                                        "1. Bluetooth Off<br/>"
                                        "2. Correct Error Message Displayed",
@@ -2231,7 +2232,7 @@ static tbt_info tbtapps[] =
                        .parent = "System Settings",
                        .apptype = TBT_APP_SYSTEM_SETTINGS_TIMECHANGE,
                        .icon_name = "dummy",
-                       .info = "<br/>1.Manually change settings for each item through device Settings.<br/>2. Verify all the items' values.",
+                       .info = "<br/>1.sdb root on,sdb shell,vconftool set -t int memory/system/timechanged 10 -f.<br/>",
                        .result = 0
                },
        #endif
index 8f73c47..49df945 100644 (file)
@@ -43,7 +43,7 @@ struct _bluetooth_view
 };
 
 static bool is_not_supported = false;
-static const char *remote_address = "B8:5E:7B:E7:92:7D";
+static const char *remote_address;
 static void _app_destroy_cb(void* this);
 static void Bluetooth_bt_device_bond_created_cb_p(int result, bt_device_info_s * device_info, void *user_data);
 static void Bluetooth_bt_device_bond_destroyed_cb_p(int result, char *remote_address, void *user_data);
@@ -178,6 +178,8 @@ bluetooth_view *bluetooth_callback_view_add(Evas_Object *navi, tbt_info *tbt_inf
                elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD);
 
                char resultc[256] ={0,};
+               sprintf(resultc, "result = %s", "Maually ON bluetooth and pair this device with some other device");
+                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);
                RETVM_IF(ret != BT_ERROR_NONE && ret != BT_ERROR_NOT_SUPPORTED, NULL, "bt_device_set_bond_created_cb failed : %s", get_bluetooth_error(ret));
@@ -189,10 +191,10 @@ bluetooth_view *bluetooth_callback_view_add(Evas_Object *navi, tbt_info *tbt_inf
                        elm_object_text_set(popup, "Bluetooth is not supported");
                        RETVM_IF(!this->view, NULL,"Bluetooth is not supported");
                }
-               ret = bt_device_create_bond(remote_address);
-               DBG("bt_device_create_bond %d", ret);
-               sprintf(resultc, "result = %s", get_bluetooth_error(ret));
-               ui_utils_label_set_text(this->create_label, resultc, "left");
+               //ret = bt_device_create_bond(remote_address);
+               //DBG("bt_device_create_bond %d", ret);
+               //sprintf(resultc, "result = %s", get_bluetooth_error(ret));
+               //ui_utils_label_set_text(this->create_label, resultc, "left");
        }
 
        else if (this->view->tbt_info->apptype == TBT_APP_BT_CALLBACK_DESTROY_BOND_TEST)
@@ -203,8 +205,14 @@ bluetooth_view *bluetooth_callback_view_add(Evas_Object *navi, tbt_info *tbt_inf
                //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");
 
                char resultc[256] ={0,};
-               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));
+               sprintf(resultc, "result = %s", "Maually ON bluetooth and invoke destroy bond callback");
+                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);
+                RETVM_IF(ret != BT_ERROR_NONE && ret != BT_ERROR_NOT_SUPPORTED, NULL, "bt_device_set_bond_created_cb failed : %s", get_bluetooth_error(ret));
+
+               //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));
 
                if(ret == BT_ERROR_NOT_SUPPORTED)
                {
@@ -213,14 +221,14 @@ bluetooth_view *bluetooth_callback_view_add(Evas_Object *navi, tbt_info *tbt_inf
                        elm_object_text_set(popup, "Bluetooth is not supported");
                        RETVM_IF(!this->view, NULL,"Bluetooth is not supported");
                }
-               ret = bt_device_create_bond(remote_address);
-               DBG("bt_device_create_bond %d", ret);
-               sprintf(resultc, "result = %s", get_bluetooth_error(ret));
-               ui_utils_label_set_text(this->create_label, resultc, "left");
-
-               ret = bt_device_destroy_bond(remote_address);
-               sprintf(resultc, "result = %s", get_bluetooth_error(ret));
-               ui_utils_label_set_text(this->create_label, resultc, "left");
+               //ret = bt_device_create_bond(remote_address);
+               //DBG("bt_device_create_bond %d", ret);
+               //sprintf(resultc, "result = %s", get_bluetooth_error(ret));
+               //ui_utils_label_set_text(this->create_label, resultc, "left");
+
+               //ret = bt_device_destroy_bond(remote_address);
+               //sprintf(resultc, "result = %s", get_bluetooth_error(ret));
+               //ui_utils_label_set_text(this->create_label, resultc, "left");
        }
 
        else if (this->view->tbt_info->apptype == TBT_APP_BT_CALLBACK_DISCOVER_DEVICES_TEST)
@@ -360,6 +368,16 @@ static void Bluetooth_bt_device_bond_created_cb_p(int result, bt_device_info_s *
        char resultc[256] ={0,};
        sprintf(resultc, "CreateBonding Callback Invoked with result = %s", get_bluetooth_error(result));
        ui_utils_label_set_text(this->create_label, resultc, "left");
+       remote_address = device_info->remote_address;
+       if (this->view->tbt_info->apptype == TBT_APP_BT_CALLBACK_DESTROY_BOND_TEST)
+       {
+               int 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));
+               ret = bt_device_destroy_bond(device_info->remote_address);
+               sprintf(resultc, "result = %s", get_bluetooth_error(ret));
+               ui_utils_label_set_text(this->create_label, resultc, "left");
+       }
+
 }
 
 /**