From: nibha2 Date: Wed, 20 Dec 2017 08:45:46 +0000 (+0530) Subject: [TBT][Non-ACR][Device][DPTTIZEN-2974,Removed Device Status testcase] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c235bb91a26457ae6213a65549ea9546d02eaf5e;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][Non-ACR][Device][DPTTIZEN-2974,Removed Device Status testcase] Change-Id: I277140247961a85d02f80ee1a6aa8bd11dede5c6 Signed-off-by: nibha2 --- 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 30fe4ba..88ef3c1 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 f1ca127..d00fcc5 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/inc/model/tbt-info.h b/tbtcoreapp/inc/model/tbt-info.h index 4d4c35a..97053b0 100644 --- a/tbtcoreapp/inc/model/tbt-info.h +++ b/tbtcoreapp/inc/model/tbt-info.h @@ -216,8 +216,6 @@ typedef enum { TBT_APP_SOUND_MANAGER, - TBT_APP_SOUND_MANAGER_DEVICE, - TBT_APP_MEDIA_KEY, TBT_APP_PACKAGE_MANAGER, diff --git a/tbtcoreapp/inc/utils/app_module_config.h b/tbtcoreapp/inc/utils/app_module_config.h index e62aac2..5a6ecdd 100644 --- a/tbtcoreapp/inc/utils/app_module_config.h +++ b/tbtcoreapp/inc/utils/app_module_config.h @@ -204,7 +204,6 @@ #define TBT_MODULE_SOUND_MANAGER #define TBT_MODULE_APP_SOUND_MANAGER -#define TBT_MODULE_APP_SOUND_MANAGER_DEVICE #define TBT_MODULE_MEDIA_KEY #define TBT_MODULE_APP_MEDIA_KEY diff --git a/tbtcoreapp/src/model/tbt-list.c b/tbtcoreapp/src/model/tbt-list.c index de840a7..9ee5052 100644 --- a/tbtcoreapp/src/model/tbt-list.c +++ b/tbtcoreapp/src/model/tbt-list.c @@ -2091,20 +2091,6 @@ static tbt_info tbtapps[] = .features_required = {13} }, #endif - #ifdef TBT_MODULE_APP_SOUND_MANAGER_DEVICE - - //SOUND_MANAGER - { - .name = "Device Status", - .parent = "Sound Manager", - .apptype = TBT_APP_SOUND_MANAGER_DEVICE, - .icon_name = "dummy", - .info = "Insert Audio jack and change sound profile to Sound", - .result = 0, - .required_features_count = 1, - .features_required = {FEATURE_MICROPHONE} - }, - #endif #endif #ifdef TBT_MODULE_MEDIA_KEY #ifdef TBT_MODULE_APP_MEDIA_KEY diff --git a/tbtcoreapp/src/view/tbt-genlist-view.c b/tbtcoreapp/src/view/tbt-genlist-view.c index f1c23d4..e2dc6d5 100644 --- a/tbtcoreapp/src/view/tbt-genlist-view.c +++ b/tbtcoreapp/src/view/tbt-genlist-view.c @@ -1155,9 +1155,6 @@ static void _gl_item_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void case TBT_APP_SOUND_MANAGER: soundmanager_view_add(view->navi, info, it); break; - case TBT_APP_SOUND_MANAGER_DEVICE: - soundmanager_view_add(view->navi, info, it); - break; #endif #ifdef TBT_MODULE_MEDIA_KEY case TBT_APP_MEDIA_KEY: diff --git a/tbtcoreapp/src/view/tbt-sound-manager-view.c b/tbtcoreapp/src/view/tbt-sound-manager-view.c index a9a96f3..e1fd9c4 100755 --- a/tbtcoreapp/src/view/tbt-sound-manager-view.c +++ b/tbtcoreapp/src/view/tbt-sound-manager-view.c @@ -40,12 +40,10 @@ struct _soundmanager_view common_view* view; Evas_Object *info_label; - Evas_Object *device_label; }; static void _app_destroy_cb(void* this); void _sound_device_connected_cb(sound_device_h device, bool is_connected, void *user_data); -void _sound_device_information_changed_cb(sound_device_h device, sound_device_changed_info_e changed_info, void *user_data); static bool is_not_supported = false; @@ -109,59 +107,34 @@ soundmanager_view *soundmanager_view_add(Evas_Object *navi, tbt_info *tbt_info, { RETVM_IF(NULL == navi, NULL, "navi is null"); int ret; - soundmanager_view *this = NULL; - this = calloc(1, sizeof(soundmanager_view)); - RETVM_IF(!this, NULL, "calloc failed"); + soundmanager_view *this = NULL; + this = calloc(1, sizeof(soundmanager_view)); + RETVM_IF(!this, NULL, "calloc failed"); - this->view = calloc(1, sizeof(common_view)); - RETVM_IF(!this->view, NULL, "calloc failed"); + this->view = calloc(1, sizeof(common_view)); + RETVM_IF(!this->view, NULL, "calloc failed"); tbt_info->layout_group = "2_part_cnt_btn"; - tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj"); + tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj"); - common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this); - RETVM_IF(NULL == this->view, NULL, "navi is null"); + common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this); + RETVM_IF(NULL == this->view, NULL, "navi is null"); - if(this->view->tbt_info->apptype == TBT_APP_SOUND_MANAGER) - { - - ret = sound_manager_set_device_connected_cb(SOUND_DEVICE_IO_DIRECTION_BOTH_MASK,_sound_device_connected_cb,this); - RETVM_IF(ret != SOUND_MANAGER_ERROR_NONE && ret != SOUND_MANAGER_ERROR_NOT_SUPPORTED, NULL, "sound_manager_set_device_connected_cb failed : %s", get_soundmanager_error(ret)); - - this->info_label = ui_utils_label_add(this->view->layout, "Please change Audio Jack state[Insert/Remove]"); - elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); - - if(ret == SOUND_MANAGER_ERROR_NOT_SUPPORTED) - { - is_not_supported = true; - Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); - elm_object_text_set(popup, "Sound Device is not supported"); - RETVM_IF(!this->view, NULL,"Sound Device is not supported"); - } - elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); - return this; - } - else if (this->view->tbt_info->apptype == TBT_APP_SOUND_MANAGER_DEVICE) - { + ret = sound_manager_set_device_connected_cb(SOUND_DEVICE_IO_DIRECTION_BOTH_MASK,_sound_device_connected_cb,this); + RETVM_IF(ret != SOUND_MANAGER_ERROR_NONE && ret != SOUND_MANAGER_ERROR_NOT_SUPPORTED, NULL, "sound_manager_set_device_connected_cb failed : %s", get_soundmanager_error(ret)); - ret = sound_manager_set_device_information_changed_cb(SOUND_DEVICE_TYPE_EXTERNAL_MASK, _sound_device_information_changed_cb,this); - RETVM_IF(ret != SOUND_MANAGER_ERROR_NONE && ret != SOUND_MANAGER_ERROR_NOT_SUPPORTED, NULL, "sound_manager_set_device_information_changed_cb failed : %s", get_soundmanager_error(ret)); - - this->info_label = ui_utils_label_add(this->view->layout, "Insert Audio jack and change sound profile to Sound"); - elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); - - if(ret == SOUND_MANAGER_ERROR_NOT_SUPPORTED) - { - is_not_supported = true; - Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); - elm_object_text_set(popup, "Sound Device is not supported"); - RETVM_IF(!this->view, NULL,"Sound Device is not supported"); - } - elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); - return this; - } + this->info_label = ui_utils_label_add(this->view->layout, "Please change Audio Jack state[Insert/Remove]"); + elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); + if(ret == SOUND_MANAGER_ERROR_NOT_SUPPORTED) + { + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Sound Device is not supported"); + RETVM_IF(!this->view, NULL,"Sound Device is not supported"); + } + elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); return this; } @@ -220,36 +193,4 @@ void _sound_device_connected_cb(sound_device_h device, bool is_connected, void * } -/** - * @function _sound_device_information_changed_cb - * @since_tizen 3.0 - * @description sound Device Information Changed Cb - * @parameter sound_device_h device, sound_device_changed_info_e changed_info, void *user_data - * @return void - */ -void _sound_device_information_changed_cb(sound_device_h device, sound_device_changed_info_e changed_info, void *user_data) -{ - - RETM_IF(NULL == user_data, "user_data is null"); - soundmanager_view *this = NULL; - this = (soundmanager_view*) user_data; - - DBG("changed_info: %d", changed_info); - - switch(changed_info) - { - case SOUND_DEVICE_CHANGED_INFO_STATE : - ui_utils_label_set_text(this->info_label, "State of the device was changed", "left"); - break; - - case SOUND_DEVICE_CHANGED_INFO_IO_DIRECTION: - ui_utils_label_set_text(this->info_label, "IO direction of the device was changed", "left"); - break; - default: - ui_utils_label_set_text(this->info_label, "Unknown status", "left"); - break; - } - -} - #endif