Give the empty string for Password textfield in Remote Input 60/208160/1
authorSungmin Kwak <sungmin.kwak@samsung.com>
Wed, 19 Jun 2019 05:31:51 +0000 (14:31 +0900)
committerSungmin Kwak <sungmin.kwak@samsung.com>
Wed, 19 Jun 2019 05:31:51 +0000 (14:31 +0900)
Change-Id: I24338de54fac65d075313e03caa87ac89c2785c0

ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp

index d60ef6d..cb2d3aa 100644 (file)
@@ -1551,7 +1551,7 @@ isf_wsc_context_send_surrounding_text (WSCContextISF* wsc_ctx, const char *text,
 
     WSCContextISF *context_scim = wsc_ctx;
 
-    if (!context_scim || !context_scim->impl)
+    if (!context_scim || !context_scim->impl || !text)
         return;
 
     char *conv_text = strdup (utf8_wcstombs (context_scim->impl->surrounding_text).c_str ());
@@ -1565,26 +1565,15 @@ isf_wsc_context_send_surrounding_text (WSCContextISF* wsc_ctx, const char *text,
 
         if (_TV) {
             if (context_scim->impl->input_resource != INPUT_RESOURCE_REMOTE) {
-                String _text(text);
                 if (context_scim->impl->panel_layout == ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD) {
-                    const unsigned char pw_char[5] = { 0xE2, 0x80, 0xA2, 0x2A, 0x00 };    // • U+2022 * U+002A
-                    if (_text.find_first_not_of((char *)pw_char) != String::npos) {
-                        g_info_manager->remoteinput_callback_surrounding_text (_text, context_scim->impl->cursor_pos);
-                    }
-                    else {
-                        String empty("");
-                        g_info_manager->remoteinput_callback_surrounding_text (empty, 0);
-                    }
+                    g_info_manager->remoteinput_callback_surrounding_text (String (""), 0);
                 }
                 else {
-                    g_info_manager->remoteinput_callback_surrounding_text (_text, context_scim->impl->cursor_pos);
+                    g_info_manager->remoteinput_callback_surrounding_text (String (text), context_scim->impl->cursor_pos);
                 }
-                context_scim->impl->init_remote_surrounding_text = true;
             }
         }
-        else {
-            context_scim->impl->init_remote_surrounding_text = true;
-        }
+        context_scim->impl->init_remote_surrounding_text = true;
     }
     free (conv_text);
 }