Added option to set password mode 20/317920/1
authorInhong Han <inhong1.han@samsung.com>
Fri, 10 Jan 2025 00:16:23 +0000 (09:16 +0900)
committerInhong Han <inhong1.han@samsung.com>
Fri, 10 Jan 2025 00:16:23 +0000 (09:16 +0900)
Change-Id: Ie4706eab06e284c9b2aa5f10f1f47c488ea039f5

inc/w-input-selector.h
src/w-input-keyboard.cpp

index 3370c46b5ad80fcd4ec0f1298785d7980386e796..1a2c3e050bbb950f3b8ab14333ea5642b31cd318 100644 (file)
@@ -124,6 +124,7 @@ struct _InputKeyboardData
        int cursor_position_set;
        Elm_Input_Panel_Layout input_panel_layout;
        Eina_Bool single_line;
+       Eina_Bool password_mode;
 };
 typedef struct _InputKeyboardData InputKeyboardData;
 
index cb55ae95032cc9c0c44481078717ef012c1b3a4d..a8d7eb49a87bc1c958ea3849b462c02955768dbb 100644 (file)
@@ -111,6 +111,7 @@ bool input_keyboard_init(app_control_h app_control)
        char *cursor_position_set = NULL;
        char *input_panel_layout = NULL;
        char *single_line = NULL;
+       char *password_mode = NULL;
 
        input_keyboard_deinit();
 
@@ -192,6 +193,17 @@ bool input_keyboard_init(app_control_h app_control)
        free(single_line);
        single_line = NULL;
 
+       // password mode
+       ret = app_control_get_extra_data(app_control, "http://tizen.org/appcontrol/data/input_sensitive_data", &password_mode);
+       if (ret == APP_CONTROL_ERROR_NONE) {
+               if (password_mode) {
+                       g_input_keyboard_data.password_mode = atoi(password_mode);
+               }
+       }
+
+       free(password_mode);
+       password_mode = NULL;
+
        return true;
 }
 
@@ -285,6 +297,7 @@ static Evas_Object *create_entry(Evas_Object *parent)
        elm_entry_cursor_end_set(entry);
        elm_entry_input_panel_return_key_type_set(entry, g_input_keyboard_data.return_key_type);
        elm_entry_single_line_set(entry, g_input_keyboard_data.single_line);
+       elm_entry_password_set(entry, g_input_keyboard_data.password_mode);
 
        if (g_input_keyboard_data.return_key_type == ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE) {
                evas_object_smart_callback_add(entry, "activated", enter_keydown_cb, NULL);