using namespace std;
-static string get_autofill_alias(Ecore_IMF_Input_Hints input_hints)
+static string get_autofill_alias(const char *app_id, const char *res_id, Ecore_IMF_Input_Hints input_hints)
{
int autofill_hint = input_hints & ECORE_IMF_INPUT_HINT_AUTOFILL_MASK;
char alias[1024] = { 0 };
- snprintf(alias, sizeof(alias), "%d", autofill_hint);
+ snprintf(alias, sizeof(alias), "%s|%s|%d", app_id ? app_id : "", res_id ? res_id : "", autofill_hint);
return string(alias);
}
-Eina_Bool autofill_save_string(Ecore_IMF_Input_Hints input_hints, const char *text)
+Eina_Bool autofill_save_string(const char *app_id, const char *res_id, Ecore_IMF_Input_Hints input_hints, const char *text)
{
if ((input_hints & ECORE_IMF_INPUT_HINT_AUTOFILL_MASK) == 0)
return EINA_FALSE;
char *password = NULL;
ckmc_raw_buffer_s ckmc_data;
- string alias = get_autofill_alias(input_hints);
+ string alias = get_autofill_alias(app_id, res_id, input_hints);
ckmc_policy_s ckmc_policy;
ckmc_policy.password = password;
ckmc_policy.extractable = true;
}
}
-char *autofill_get_string(Ecore_IMF_Input_Hints input_hints)
+char *autofill_get_string(const char *app_id, const char *res_id, Ecore_IMF_Input_Hints input_hints)
{
string alias;
string autofill_string;
if (autofill_hint == 0)
return NULL;
- alias = get_autofill_alias(input_hints);
+ alias = get_autofill_alias(app_id, res_id, input_hints);
switch (autofill_hint)
{
*
* @privlevel internal
*
+ * @param[in] app_id application ID
+ * @param[in] res_id resource ID
* @param[in] input_hints input hint
* @param[in] text autofill string
*/
-Eina_Bool autofill_save_string(Ecore_IMF_Input_Hints input_hints, const char *text);
+Eina_Bool autofill_save_string(const char *app_id, const char *res_id, Ecore_IMF_Input_Hints input_hints, const char *text);
/**
* @brief Get autofill string.
*
* @privlevel internal
*
+ * @param[in] app_id application ID
+ * @param[in] res_id resource ID
* @param[in] input_hints input hint
*
* @return a newly allocated autofill string. Free with free() when no longer needed.
*/
-char *autofill_get_string(Ecore_IMF_Input_Hints input_hints);
+char *autofill_get_string(const char *app_id, const char *res_id, Ecore_IMF_Input_Hints input_hints);
#ifdef __cplusplus
}
case MultiEventDesc::CANDIDATE_ITEM_MOUSE_DOWN:
if (g_autofill_exist) {
if (multidesc.index == 0) {
- char *text = autofill_get_string((Ecore_IMF_Input_Hints)g_autofill_hint);
+ char *text = autofill_get_string(g_app_id.c_str(), g_resource_id.c_str(), (Ecore_IMF_Input_Hints)g_autofill_hint);
if (text) {
ise_send_string(text);
free(text);
SECURE_LOGD("surrounding text : %s\n", text);
if (!text) return;
- autofill_save_string((Ecore_IMF_Input_Hints)g_autofill_hint, text);
+ autofill_save_string(g_app_id.c_str(), g_resource_id.c_str(), (Ecore_IMF_Input_Hints)g_autofill_hint, text);
free(text);
}
static void show_autofill_data(Ecore_IMF_Input_Hints input_hints)
{
g_autofill_exist = false;
- char *text = autofill_get_string(input_hints);
+ char *text = autofill_get_string(g_app_id.c_str(), g_resource_id.c_str(), input_hints);
if (text) {
g_autofill_string = string(text);