src/notifications/noti.c
src/device/brightness.c
src/device/volume.c
- src/settings/modules/more-settings.c
+ src/settings/modules/voice-control.c
src/settings/modules/bluetooth.c
src/settings/modules/dnd.c
src/settings/modules/softkey.c
extern void quickpanel_noti_on_clear_all_clicked(void *data, Evas_Object *obj, void *info);
extern void quickpanel_noti_on_noti_setting_clicked(void *data, Evas_Object *obj, void *info);
+extern void quickpanel_setting_clicked(void *data, Evas_Object *obj, void *info);
extern int quickpanel_noti_get_type_count(notification_type_e noti_type);
extern void quickpanel_noti_update_by_system_time_changed_setting_cb(system_settings_key_e key, void *data);
extern void quickpanel_noti_update_by_system_time_changed_vconf_cb(keynode_t *key, void *data);
profile = mobile-4.0
# C/CPP Sources
-USER_SRCS = src/notifications/noti_win.c src/settings/modules/softkey.c src/settings/settings_icon_common.c src/device/brightness.c src/device/volume.c src/common.c src/notifications/noti_listbox.c src/settings/modules/sound-profile.c src/notifications/animated_image.c src/notifications/noti_util.c src/vi/vi_manager.c src/notifications/noti_section.c src/service/keyboard.c src/settings/settings_gridbox.c src/settings/modules/more-settings.c src/voice_control.c src/datetime/datetime.c src/sim_controller.c src/service/animated_icon.c src/settings/modules/dnd.c src/service/reminder.c src/preference.c src/accessibility.c src/notifications/noti_view_listype.c src/settings/setting_module_api.c src/notifications/noti_list_item.c src/notifications/noti_node.c src/common_uic.c src/datetime/util-time.c src/handler_controller.c src/settings/modules/wifi.c src/list_util.c src/notifications/noti_view.c src/settings/setting_utils.c src/quickpanel-ui.c src/service/noti_led.c src/settings/modules/bluetooth.c src/page/pager_common.c src/minictrl/minictrl.c src/service/uninstall.c src/service/emergency_mode.c src/page/page_base.c src/page/pager.c src/settings/settings.c src/modules.c src/media.c src/settings/settings_view_featured.c src/notifications/activenoti.c src/notifications/noti_view_ongoing.c src/notifications/noti.c
+USER_SRCS = src/notifications/noti_win.c src/settings/modules/softkey.c src/settings/settings_icon_common.c src/device/brightness.c src/device/volume.c src/common.c src/notifications/noti_listbox.c src/settings/modules/sound-profile.c src/notifications/animated_image.c src/notifications/noti_util.c src/vi/vi_manager.c src/notifications/noti_section.c src/service/keyboard.c src/settings/settings_gridbox.c src/settings/modules/voice-control.c src/voice_control.c src/datetime/datetime.c src/sim_controller.c src/service/animated_icon.c src/settings/modules/dnd.c src/service/reminder.c src/preference.c src/accessibility.c src/notifications/noti_view_listype.c src/settings/setting_module_api.c src/notifications/noti_list_item.c src/notifications/noti_node.c src/common_uic.c src/datetime/util-time.c src/handler_controller.c src/settings/modules/wifi.c src/list_util.c src/notifications/noti_view.c src/settings/setting_utils.c src/quickpanel-ui.c src/service/noti_led.c src/settings/modules/bluetooth.c src/page/pager_common.c src/minictrl/minictrl.c src/service/uninstall.c src/service/emergency_mode.c src/page/page_base.c src/page/pager.c src/settings/settings.c src/modules.c src/media.c src/settings/settings_view_featured.c src/notifications/activenoti.c src/notifications/noti_view_ongoing.c src/notifications/noti.c
# EDC Sources
USER_EDCS =
images {
image: "handler_btn_02.png" COMP;
image: "core_theme_bg_01.png" COMP;
+ image: "core_theme_bg_small.png" COMP;
}
styles {
}
}
}
+ part{
+ name: "background_2";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.5 0.5;
+ min: 1200 250;
+ max: 1200 250;
+ rel1 {
+ relative: 40/1280 30/720;
+ to: "base";
+ }
+ rel2 {
+ relative: 1240/1280 280/720;
+ }
+ image {
+ normal: "core_theme_bg_small.png";
+ }
+ }
+ }
part{
name: "qp.base.rect.datetime";
type:SPACER;
RESOURCE_IMAGE("icon_do not disturb_on.png");
RESOURCE_IMAGE("icon_do not disturb_disabled.png");
-RESOURCE_IMAGE("icon_moresettings_off.png");
-RESOURCE_IMAGE("icon_moresettings_on.png");
-RESOURCE_IMAGE("icon_moresettings_disabled.png");
+RESOURCE_IMAGE("icon_voice_control_off.png");
+RESOURCE_IMAGE("icon_voice_control_on.png");
+RESOURCE_IMAGE("icon_voice_control_disabled.png");
RESOURCE_IMAGE("icon_softkey_off.png");
RESOURCE_IMAGE("icon_softkey_on.png");
description
{
state: "default" 0.0;
- min: 412 48;
- max: 412 48;
+ min: 1200 48;
+ max: 1200 48;
rel1 {
relative: 0.0 0.0;
}
visible: 1;
}
}
+ part {
+ name: "rect.settings";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 50 48;
+ max: 50 48;
+ fixed: 1 1;
+ rel1 {
+ to: "base";
+ relative: 0.0 0.0;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to_y: "base";
+ }
+ align: 0.0 0.5;
+ color: 0 0 0 0;
+ visible: 1;
+ }
+ }
+ part {
+ name : "settings_button_swallow";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ align: 0 0;
+ rel1 { relative: 0.0 0.0; to: "rect.settings";}
+ rel2 { relative: 1.0 1.0; to: "rect.settings"; }
+ }
+ }
+ part {
+ name: "spacer_settings";
+ type: SPACER;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 738 5;
+ max: 738 5;
+ fixed: 1 1;
+ rel1 {
+ to: "rect.settings";
+ relative: 1.0 0.0;
+ }
+ rel2 {
+ to_x: "base";
+ relative: 1.0 1.0;
+ }
+ align: 0.0 0.0;
+ }
+ }
part {
name: "rect.button.notisetting";
max: 212 48;
fixed: 1 1;
rel1 {
- to: "base";
- relative: 0.0 0.0;
+ to: "spacer_settings";
+ relative: 1.0 0.0;
}
rel2 {
relative: 1.0 1.0;
msgid "IDS_ST_BUTTON2_AUTO_NROTATE"
msgstr "Auto\nrotate"
-msgid "IDS_ST_BUTTON2_MORE_SETTINGS"
-msgstr "More\nsettings"
+msgid "IDS_ST_BUTTON2_VOICE_CONTROL"
+msgstr "Voice control"
msgid "IDS_ST_BUTTON2_SOFTKEY_CONTAINER"
msgstr "Soft key\ncontainer"
}
}
+HAPI void quickpanel_setting_clicked(void *data, Evas_Object *obj, void *info)
+{
+ DBG("Settings clicked");
+
+ quickpanel_media_play_feedback();
+
+ quickpanel_common_launch_app("org.tizen.setting", NULL);
+
+ quickpanel_uic_close_quickpanel(true, 1);
+}
+
HAPI void quickpanel_noti_on_noti_setting_clicked(void *data, Evas_Object *obj, void *info)
{
DBG("Noti Setting clicked");
#include <tzsh_quickpanel_service.h>
#include <system_settings.h>
#include <notification_setting_internal.h>
+#include <app.h>
#include "quickpanel-ui.h"
#include "quickpanel_def.h"
static struct _noti_section{
Evas_Object *layout;
Evas_Object *clear_btn;
- Evas_Object *noti_setting_btn
+ Evas_Object *noti_setting_btn;
+ Evas_Object *setting_btn
} noti_section_data = {
.layout = NULL,
.clear_btn = NULL,
.noti_setting_btn = NULL,
+ .setting_btn = NULL,
};
static void _noti_section_set_text(Evas_Object *noti_section, int count)
return ;
}
+ Evas_Object *setting_button = elm_button_add(section);
+ retif(setting_button == NULL, NULL, "failed to create setting_button object");
+ Evas_Object *img = elm_image_add(setting_button);
+ char buffer[1024] = {0,};
+ const char *path = app_get_resource_path();
+ if(path == NULL) {
+ ERR("Unable to get path for image");
+ return ;
+ }
+ DBG("Image path = %s",path);
+ snprintf(buffer, 1024, "%s%s%s", path, "images_icon/", "icon_settings.png");
+ elm_image_file_set(img, buffer, NULL);
+ evas_object_size_hint_min_set(img, ELM_SCALE_SIZE(48), ELM_SCALE_SIZE(48));
+ evas_object_size_hint_max_set(img, ELM_SCALE_SIZE(48), ELM_SCALE_SIZE(48));
+ elm_object_part_content_set(setting_button, "icon", img);
+ elm_object_style_set(setting_button, "focus");
+ elm_object_part_content_set(section, "settings_button_swallow", setting_button);
+ evas_object_smart_callback_add(setting_button, "clicked", quickpanel_setting_clicked, NULL);
+ evas_object_show(setting_button);
+ free(path);
+
elm_object_part_content_set(section, "focus", focus_clear);
evas_object_smart_callback_add(focus_clear, "clicked", quickpanel_noti_on_clear_all_clicked, NULL);
elm_object_part_content_set(section, "focus.setting", focus_setting);
evas_object_smart_callback_add(focus_setting, "clicked", quickpanel_noti_on_noti_setting_clicked, NULL);
-
- elm_grid_pack(parent, section, NOTI_SECTION_X, NOTI_SECTION_Y, NOTI_SECTION_WIDTH, NOTI_SECTION_HEIGHT);
+ elm_grid_pack(parent, section, 32, NOTI_SECTION_Y, 1200, NOTI_SECTION_HEIGHT);
noti_section_data.layout = section;
noti_section_data.clear_btn = focus_clear;
if (strcmp(key, PREF_BRIGHTNESS) == 0)
return "OFF";
else if (strcmp(key, PREF_QUICKSETTING_ORDER) == 0)
- return "wifi,bluetooth,sound,dnd,softkey,moresettings,mobile_data,assisitvelight,u_power_saving,wifi_hotspot,flightmode";
+ return "wifi,bluetooth,sound,dnd,softkey,voicecontrol,mobile_data,assisitvelight,u_power_saving,wifi_hotspot,flightmode";
else if (strcmp(key, PREF_QUICKSETTING_FEATURED_NUM) == 0)
return "11";
else if (strcmp(key, PREF_SHORTCUT_ENABLE) == 0)
+++ /dev/null
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <Elementary.h>
-
-#include <vconf.h>
-#include <system_settings.h>
-#include <bundle_internal.h>
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-
-#include "common.h"
-#include "quickpanel-ui.h"
-#include "settings.h"
-#include "setting_utils.h"
-#include "setting_module_api.h"
-#include "settings_icon_common.h"
-
-#define BUTTON_LABEL _("IDS_ST_BUTTON2_MORE_SETTINGS")
-#define BUTTON_ICON_NORMAL "icon_moresettings_off.png"
-#define BUTTON_ICON_HIGHLIGHT "icon_moresettings_on.png"
-#define BUTTON_ICON_DIM "icon_moresettings_disabled.png"
-
-static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
-
-static const char *_label_get(void)
-{
- return BUTTON_LABEL;
-}
-
-static const char *_icon_get(qp_setting_icon_image_type type)
-{
- if (type == QP_SETTING_ICON_NORMAL) {
- return BUTTON_ICON_NORMAL;
- } else if (type == QP_SETTING_ICON_HIGHLIGHT) {
- return BUTTON_ICON_HIGHLIGHT;
- } else if (type == QP_SETTING_ICON_DIM) {
-#ifdef BUTTON_ICON_DIM
- return BUTTON_ICON_DIM;
-#endif
- }
-
- return NULL;
-}
-
-static void _long_press_cb(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
-
- if (quickpanel_setting_module_is_immediate_actionable(module, QP_SETTING_ICON_LONGPRESSED) == false)
- return;
-
- quickpanel_setting_icon_handler_longpress(module->setting_pkgname, "viewtype", "main");
-}
-
-static void _view_update(Evas_Object *view, int state, int flag_extra_1, int flag_extra_2)
-{
- Evas_Object *image = NULL;
- const char *icon_path = NULL;
-
- quickpanel_setting_icon_state_set(view, state);
-
- if (state == ICON_VIEW_STATE_ON) {
-#ifdef BUTTON_ICON_HIGHLIGHT
- icon_path = BUTTON_ICON_HIGHLIGHT;
-#endif
- } else if (state == ICON_VIEW_STATE_DIM) {
-#ifdef BUTTON_ICON_DIM
- icon_path = BUTTON_ICON_DIM;
-#endif
- } else {
- icon_path = BUTTON_ICON_NORMAL;
- }
-
- if (icon_path == NULL)
- icon_path = BUTTON_ICON_NORMAL;
-
- image = quickpanel_setting_icon_image_new(view, icon_path);
- quickpanel_setting_icon_content_set(view, image);
- quickpanel_setting_icon_text_set(view, BUTTON_LABEL, state);
-}
-
-static void _status_update(QP_Module_Setting *module, int flag_extra_1, int flag_extra_2)
-{
- int ret = 0;
- bool status = false;
- retif(module == NULL, , "Invalid parameter!");
-
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, &status);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE , "failed to notify key SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO : %d", ret);
-
- if (status == true)
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_ON);
- else
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_OFF);
-
-
- quickpanel_setting_module_icon_view_update(module, quickpanel_setting_module_icon_state_get(module), FLAG_VALUE_VOID);
-}
-
-static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- DBG(" ***** mouse clicked -cb 128 *****");
- DBG("***** first %d value *****",quickpanel_setting_module_icon_state_get(module));
- if(quickpanel_setting_module_icon_state_get(module) == 1) {
- DBG("***** %d value *****",quickpanel_setting_module_icon_state_get(module));
- quickpanel_setting_module_icon_state_set(module, 0);
- quickpanel_setting_module_icon_view_update(module ,0,FLAG_VALUE_VOID);
- }
- else {
- DBG("***** %d value *****",quickpanel_setting_module_icon_state_get(module));
- quickpanel_setting_module_icon_state_set(module, 1);
- quickpanel_setting_module_icon_view_update(module ,1,FLAG_VALUE_VOID);
- quickpanel_common_launch_app("org.tizen.setting" ,NULL);
- }
-}
-
-static int _register_module_event_handler(void *data)
-{
- int ret = 0;
- return QP_OK;
-}
-
-static int _unregister_module_event_handler(void *data)
-{
- int ret = 0;
- return QP_OK;
-}
-
-/****************************************************************************
- *
- * Quickpanel Item functions
- *
- ****************************************************************************/
-static int _init(void *data)
-{
- int ret = QP_OK;
-
- ret = _register_module_event_handler(data);
-
- return ret;
-}
-
-static int _fini(void *data)
-{
- int ret = QP_OK;
-
- ret = _unregister_module_event_handler(data);
-
- return ret;
-}
-
-static void _lang_changed(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-static void _refresh(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-QP_Module_Setting moresettings = {
- .name = "moresettings",
- .setting_pkgname = "org.tizen.setting",
- .init = _init,
- .fini = _fini,
- .lang_changed = _lang_changed,
- .refresh = _refresh,
- .icon_get = _icon_get,
- .label_get = _label_get,
- .view_update = _view_update,
- .status_update = _status_update,
- .handler_longpress = _long_press_cb,
- .handler_press = _mouse_clicked_cb,
-};
quickpanel_setting_module_icon_timer_del(module);\r
ret = vconf_get_bool(VCONFKEY_SETAPPL_SOFT_KEY, &status);\r
msgif(ret != 0, "fail to get VCONFKEY_SETAPPL_SOFT_KEY:%d", ret);\r
- DBG(">>>> status[%d] == %s <<<", status, (status == true ? "TRUE" : "FALSE"));\r
- if (status == true) {\r
+ DBG(">>>> status[%d] == %s <<<", status, (status == 1 ? "TRUE" : "FALSE"));\r
+ if (status == 1) {\r
quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_ON);\r
}\r
else {\r
static void _state_change(QP_Module_Setting *module)\r
{\r
int ret = 0;\r
- bool enable = 0;\r
DBG(">>> Entered state_change");\r
- Eina_Bool state = quickpanel_setting_module_icon_state_get(module);\r
- DBG(">>>> _state_change , state value = %s <<<", state == false ? "FALSE" : "TRUE");\r
+ int state = quickpanel_setting_module_icon_state_get(module);\r
+ DBG(">>>> _state_change , state value = %s <<<", state == 0 ? "FALSE" : "TRUE");\r
ret = vconf_set_bool(VCONFKEY_SETAPPL_SOFT_KEY, !state);\r
msgif(ret != 0, "failed set VCONFKEY_SETAPPL_SOFT_KEY:%d", ret);\r
ret = vconf_get_bool(VCONFKEY_SETAPPL_SOFT_KEY, &state);\r
msgif(ret != 0, "fail to get VCONFKEY_SETAPPL_SOFT_KEY:%d", ret);\r
- DBG("softkey check value = %s", state == false ? "FALSE" : "TRUE");\r
+ DBG("softkey check value = %s", state == 0 ? "FALSE" : "TRUE");\r
DBG(">>> END");\r
}\r
\r
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <Elementary.h>
+
+#include <vconf.h>
+#include <system_settings.h>
+#include <bundle_internal.h>
+#include <tzsh.h>
+#include <tzsh_quickpanel_service.h>
+#include <voice_control_setting.h>
+#include <voice_control_common.h>
+#include <aul.h>
+#include <app_manager.h>
+#include <app_control.h>
+
+#include "common.h"
+#include "common_uic.h"
+#include "quickpanel-ui.h"
+#include "settings.h"
+#include "setting_utils.h"
+#include "setting_module_api.h"
+#include "settings_icon_common.h"
+
+#define BUTTON_LABEL _("IDS_ST_BUTTON2_VOICE_CONTROL")
+#define BUTTON_ICON_NORMAL "icon_voice_control_off.png"
+#define BUTTON_ICON_HIGHLIGHT "icon_voice_control_on.png"
+#define BUTTON_ICON_DIM "icon_voice_control_disabled.png"
+#define VOICE_CONTROL_PKG "org.tizen.voice-control-panel"
+
+static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
+
+static int vcpid = -1;
+
+static const char *_label_get(void)
+{
+ return BUTTON_LABEL;
+}
+
+static int _check_dead_signal(int pid, void *data)
+{
+ DBG("Process %d is terminated", pid);
+ if (pid < 0) {
+ ERR("pid : %d", pid);
+ return 0;
+ }
+ if(pid == vcpid) {
+ DBG("pid = %d and vcpid = %d",pid,vcpid);
+ QP_Module_Setting *module = (QP_Module_Setting *)data;
+ DBG("name of module = %s",module->name);
+ if(module == NULL) {
+ ERR("module is NULL");
+ return 0;
+ }
+ DBG(" check_dead_signal, setting the module icon state to 0");
+ quickpanel_setting_module_icon_state_set(module, 0);
+ quickpanel_setting_module_icon_view_update(module ,0,FLAG_VALUE_VOID);
+ }
+ return 0;
+}
+
+static const char *_icon_get(qp_setting_icon_image_type type)
+{
+ if (type == QP_SETTING_ICON_NORMAL) {
+ return BUTTON_ICON_NORMAL;
+ } else if (type == QP_SETTING_ICON_HIGHLIGHT) {
+ return BUTTON_ICON_HIGHLIGHT;
+ } else if (type == QP_SETTING_ICON_DIM) {
+#ifdef BUTTON_ICON_DIM
+ return BUTTON_ICON_DIM;
+#endif
+ }
+
+ return NULL;
+}
+
+static void _long_press_cb(void *data)
+{
+ QP_Module_Setting *module = (QP_Module_Setting *)data;
+
+ if (quickpanel_setting_module_is_immediate_actionable(module, QP_SETTING_ICON_LONGPRESSED) == false)
+ return;
+
+ quickpanel_setting_icon_handler_longpress(module->setting_pkgname, "viewtype", "main");
+}
+
+static void _view_update(Evas_Object *view, int state, int flag_extra_1, int flag_extra_2)
+{
+ Evas_Object *image = NULL;
+ const char *icon_path = NULL;
+
+ quickpanel_setting_icon_state_set(view, state);
+
+ if (state == ICON_VIEW_STATE_ON) {
+#ifdef BUTTON_ICON_HIGHLIGHT
+ icon_path = BUTTON_ICON_HIGHLIGHT;
+#endif
+ } else if (state == ICON_VIEW_STATE_DIM) {
+#ifdef BUTTON_ICON_DIM
+ icon_path = BUTTON_ICON_DIM;
+#endif
+ } else {
+ icon_path = BUTTON_ICON_NORMAL;
+ }
+
+ if (icon_path == NULL)
+ icon_path = BUTTON_ICON_NORMAL;
+
+ image = quickpanel_setting_icon_image_new(view, icon_path);
+ quickpanel_setting_icon_content_set(view, image);
+ quickpanel_setting_icon_text_set(view, BUTTON_LABEL, state);
+}
+
+static void _status_update(QP_Module_Setting *module, int flag_extra_1, int flag_extra_2)
+{
+ DBG(" _status_update quickpanel");
+ retif(module == NULL, , "Invalid parameter!");
+
+ bool status = false;
+ if (VC_ERROR_NONE != vc_setting_get_enabled(&status)) {
+ ERR("Fail to get_enabled");
+ return ;
+ }
+ DBG("_status_update[1], _check_voice_control_enabled [%d]", status);
+ if (status == true) {
+ if (VC_ERROR_NONE != vc_setting_set_enabled(false)) {
+ ERR("Fail to set_disabled");
+ return ;
+ }
+ }
+ if (VC_ERROR_NONE != vc_setting_get_enabled(&status)) {
+ ERR("Fail to get_enabled");
+ return ;
+ }
+ DBG(" after vc_setting_get_enabled ");
+ DBG("_status_update[2], _check_voice_control_enabled [%d]", status);
+ if (status == true)
+ quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_ON);
+ else
+ quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_OFF);
+ quickpanel_setting_module_icon_view_update(module, quickpanel_setting_module_icon_state_get(module), FLAG_VALUE_VOID);
+}
+
+static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+ QP_Module_Setting *module = (QP_Module_Setting *)data;
+ DBG(" ***** mouse clicked -cb 128 *****");
+ DBG("***** first %d value *****",quickpanel_setting_module_icon_state_get(module));
+
+ if(quickpanel_setting_module_icon_state_get(module) == 1) {
+ DBG("***** %d value *****",quickpanel_setting_module_icon_state_get(module));
+
+ if(VC_ERROR_NONE != vc_setting_set_enabled(false)) {
+ ERR("Fail to set enabled");
+ return;
+ }
+
+ bool disabled = true;
+ if (VC_ERROR_NONE != vc_setting_get_enabled(&disabled)) {
+ ERR("Fail to get disabled");
+ return ;
+ }
+ DBG("_check_voice_control_disabled [%d]", disabled);
+
+ quickpanel_setting_module_icon_state_set(module, 0);
+ quickpanel_setting_module_icon_view_update(module ,0,FLAG_VALUE_VOID);
+ }
+ else {
+ DBG("***** %d value *****",quickpanel_setting_module_icon_state_get(module));
+ if(VC_ERROR_NONE != vc_setting_set_enabled(true)) {
+ ERR("Fail to set enabled");
+ return ;
+ }
+
+ bool enabled = false;
+ if (VC_ERROR_NONE != vc_setting_get_enabled(&enabled)) {
+ ERR("Fail to get enabled");
+ return;
+ }
+ DBG("_check_voice_control_enabled [%d]", enabled);
+
+ quickpanel_setting_module_icon_state_set(module, 1);
+ quickpanel_setting_module_icon_view_update(module ,1,FLAG_VALUE_VOID);
+
+ int ret = 0;
+ ret = quickpanel_common_send_message_to_app(VOICE_CONTROL_PKG, NULL, NULL, NULL);
+ quickpanel_common_inform_launch_app_result(VOICE_CONTROL_PKG, ret);
+
+ app_context_h app_context_handle = NULL;
+ ret = app_manager_get_app_context(VOICE_CONTROL_PKG, &app_context_handle);
+ if (ret != APP_MANAGER_ERROR_NONE) {
+ ERR("Failed to get app context");
+ return ;
+ }
+
+ ret = app_context_get_pid(app_context_handle, &vcpid);
+ if (ret != APP_MANAGER_ERROR_NONE) {
+ ERR("Failed to get pid");
+ return ;
+ }
+
+ ret = aul_listen_app_dead_signal(_check_dead_signal, module);
+ if (ret < 0) {
+ ERR("aul_listen_app_dead_signal failed");
+ return ;
+ }
+ DBG(" pid of voice_control is = %d ",vcpid);
+ quickpanel_uic_close_quickpanel(true, 1);
+ }
+}
+
+static int _register_module_event_handler(void *data)
+{
+ int ret = 0;
+ return QP_OK;
+}
+
+static int _unregister_module_event_handler(void *data)
+{
+ int ret = 0;
+ return QP_OK;
+}
+
+/****************************************************************************
+ *
+ * Quickpanel Item functions
+ *
+ ****************************************************************************/
+static int _init(void *data)
+{
+ if (VC_ERROR_NONE != vc_setting_initialize()) {
+ ERR("Fail to init ");
+ return QP_FAIL;
+ }
+ int ret = QP_OK;
+
+ ret = _register_module_event_handler(data);
+
+ return ret;
+}
+
+static int _fini(void *data)
+{
+ int ret = QP_OK;
+
+ ret = _unregister_module_event_handler(data);
+
+ return ret;
+}
+
+static void _lang_changed(void *data)
+{
+ QP_Module_Setting *module = (QP_Module_Setting *)data;
+ retif(module == NULL, , "Invalid parameter!");
+
+ quickpanel_setting_module_icon_view_update_text(module);
+}
+
+static void _refresh(void *data)
+{
+ QP_Module_Setting *module = (QP_Module_Setting *)data;
+ retif(module == NULL, , "Invalid parameter!");
+
+ quickpanel_setting_module_icon_view_update_text(module);
+}
+
+QP_Module_Setting voicecontrol = {
+ .name = "voicecontrol",
+ .setting_pkgname = "org.tizen.voice-control-panel",
+ .init = _init,
+ .fini = _fini,
+ .lang_changed = _lang_changed,
+ .refresh = _refresh,
+ .icon_get = _icon_get,
+ .label_get = _label_get,
+ .view_update = _view_update,
+ .status_update = _status_update,
+ .handler_longpress = _long_press_cb,
+ .handler_press = _mouse_clicked_cb,
+};
extern QP_Module_Setting dnd;
extern QP_Module_Setting bluetooth;
extern QP_Module_Setting sound;
-extern QP_Module_Setting moresettings;
+extern QP_Module_Setting voicecontrol;
extern QP_Module_Setting softkey;
QP_Module settings = {
&wifi,
&dnd,
&sound,
- &moresettings,
+ &voicecontrol,
&bluetooth,
&softkey,
NULL,