summaryrefslogtreecommitdiff
path: root/ism/extras
diff options
context:
space:
mode:
authorInHong Han <inhong1.han@samsung.com>2018-03-13 16:51:57 +0900
committerInHong Han <inhong1.han@samsung.com>2018-03-13 20:17:18 +0900
commit6916d5d778af27555cc259b4b07634120a67dcb2 (patch)
treede6cf0a53df5625cdd4a66c1b0e0cc893d836547 /ism/extras
parent8737f75bb3ce0a80bff81373c6aebc1da8e69618 (diff)
downloadisf-6916d5d778af27555cc259b4b07634120a67dcb2.tar.gz
isf-6916d5d778af27555cc259b4b07634120a67dcb2.tar.bz2
isf-6916d5d778af27555cc259b4b07634120a67dcb2.zip
Fix issue detected by static analysis tool
Change-Id: Iee5916db218695afed44c503597b2371e0e1a384
Diffstat (limited to 'ism/extras')
-rw-r--r--ism/extras/efl_panel/isf_panel_efl.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/ism/extras/efl_panel/isf_panel_efl.cpp b/ism/extras/efl_panel/isf_panel_efl.cpp
index 0dc70d8a..14067b3d 100644
--- a/ism/extras/efl_panel/isf_panel_efl.cpp
+++ b/ism/extras/efl_panel/isf_panel_efl.cpp
@@ -153,9 +153,9 @@ typedef enum _WINDOW_STATE {
typedef struct NotiData
{
- const char* title;
- const char* content;
- const char* icon;
+ String title;
+ String content;
+ String icon;
String launch_app;
int noti_id;
} NotificationData;
@@ -486,7 +486,7 @@ static double _system_scale = 1.0;
#ifdef HAVE_NOTIFICATION
static NotificationData hwkbd_module_noti = {"Input detected from hardware keyboard", "Tap to use virtual keyboard", ISF_KEYBOARD_ICON_FILE, "", 0};
-static NotificationData ise_selector_module_noti = {"Select input method", NULL, "", "", 0};
+static NotificationData ise_selector_module_noti = {"Select input method", "", "", "", 0};
#endif
#if ISF_BUILD_CANDIDATE_UI
@@ -700,15 +700,9 @@ static void create_notification (NotificationData *noti_data)
if (notification != NULL) {
notification_set_pkgname (notification, "isf-panel-efl");
notification_set_layout (notification, NOTIFICATION_LY_ONGOING_EVENT);
- if (noti_data->icon)
- notification_set_image (notification, NOTIFICATION_IMAGE_TYPE_ICON, noti_data->icon);
-
- if (noti_data->title)
- notification_set_text (notification, NOTIFICATION_TEXT_TYPE_TITLE, _(noti_data->title), NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
-
- if (noti_data->content)
- notification_set_text (notification, NOTIFICATION_TEXT_TYPE_CONTENT, _(noti_data->content), NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
-
+ notification_set_image (notification, NOTIFICATION_IMAGE_TYPE_ICON, noti_data->icon.c_str());
+ notification_set_text (notification, NOTIFICATION_TEXT_TYPE_TITLE, _(noti_data->title.c_str()), NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+ notification_set_text (notification, NOTIFICATION_TEXT_TYPE_CONTENT, _(noti_data->content.c_str ()), NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
notification_set_display_applist (notification, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY);
app_control_h service = NULL;
@@ -1913,7 +1907,7 @@ int get_ime_app_list_cb (const pkgmgrinfo_appinfo_h handle, void *user_data)
}
else {
ime_db.mode = TOOLBAR_HELPER_MODE;
- if (ime_db.pkgtype.compare ("rpm") == 0) //1 Inhouse Helper ISE(IME)
+ if (ime_db.pkgtype.compare ("rpm") == 0 && path) //1 Inhouse Helper ISE(IME)
{
if (_TV)
ime_db.options = SCIM_HELPER_STAND_ALONE | SCIM_HELPER_NEED_SCREEN_INFO | SCIM_HELPER_AUTO_RESTART | ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT;
@@ -6974,8 +6968,8 @@ static void show_ime_selector_notification ()
LOGD("IME selector icon path : %s", noti_icon_path.c_str ());
- ise_selector_module_noti.icon = noti_icon_path.c_str ();
- ise_selector_module_noti.content = ise_name.c_str ();
+ ise_selector_module_noti.icon = noti_icon_path;
+ ise_selector_module_noti.content = ise_name;
/* Find IME Selector appid for notification */
if (ime_selector_app.length () < 1) {