Set password mode in password layout 86/92686/3
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 18 Oct 2016 06:48:37 +0000 (15:48 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 18 Oct 2016 10:17:36 +0000 (03:17 -0700)
Change-Id: Ice5ccb141419d2620fc73ebceddd0295b5736b3f
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
ism/extras/wayland_immodule/wayland_imcontext.c

index 8c92dcb..c1ffcc0 100644 (file)
@@ -1324,9 +1324,13 @@ show_input_panel(Ecore_IMF_Context *ctx)
 
     // TIZEN_ONLY(20150715): Support input_panel_state_get
     _input_panel_state = ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW;
+    int layout = ecore_imf_context_input_panel_layout_get (ctx);
     int layout_variation = ecore_imf_context_input_panel_layout_variation_get (ctx);
     //
 
+    if (layout == ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD)
+        imcontext->content_hint |= (WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA | WL_TEXT_INPUT_CONTENT_HINT_PASSWORD);
+
     wl_text_input_set_content_type(imcontext->text_input,
             imcontext->content_hint,
             get_purpose(ctx));
@@ -1350,8 +1354,7 @@ show_input_panel(Ecore_IMF_Context *ctx)
         wl_text_input_set_input_panel_data(imcontext->text_input, (const char *)imcontext->imdata, imcontext->imdata_size);
 
     SECURE_LOGD ("ctx : %p, layout : %d, layout variation : %d\n", ctx,
-            ecore_imf_context_input_panel_layout_get (ctx),
-            layout_variation);
+            layout, layout_variation);
     SECURE_LOGD ("language : %d, cursor position : %d\n",
             ecore_imf_context_input_panel_language_get (ctx),
             cursor_pos);
@@ -2651,6 +2654,7 @@ wayland_im_context_input_panel_layout_set(Ecore_IMF_Context *ctx,
             break;
         case ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD:
             imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_PASSWORD;
+            imcontext->content_hint |= (WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA | WL_TEXT_INPUT_CONTENT_HINT_PASSWORD);
             break;
         case ECORE_IMF_INPUT_PANEL_LAYOUT_DATETIME:
             imcontext->content_purpose = WL_TEXT_INPUT_CONTENT_PURPOSE_DATETIME;
@@ -2693,9 +2697,9 @@ wayland_im_context_input_mode_set(Ecore_IMF_Context *ctx,
     if (!imcontext) return;
 
     if (input_mode & ECORE_IMF_INPUT_MODE_INVISIBLE)
-        imcontext->content_hint |= WL_TEXT_INPUT_CONTENT_HINT_PASSWORD;
+        imcontext->content_hint |= (WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA | WL_TEXT_INPUT_CONTENT_HINT_PASSWORD);
     else
-        imcontext->content_hint &= ~WL_TEXT_INPUT_CONTENT_HINT_PASSWORD;
+        imcontext->content_hint &= ~(WL_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA | WL_TEXT_INPUT_CONTENT_HINT_PASSWORD);
 
     if (imcontext->input && imcontext->text_input) {
         LOGD ("ctx : %p, input mode : %d\n", ctx, input_mode);