static CCoreEventCallback g_core_event_callback;
CSCLCore g_core(&g_core_event_callback);
+static bool g_checked_privilege = false;
+static bool g_permission_allowed = false;
+
extern "C" {
extern void ime_app_main(int argc, char **argv);
}
char uid[16];
ime_error_e ret = IME_ERROR_NONE;
+ if (g_checked_privilege) {
+ return g_permission_allowed ? IME_ERROR_NONE : IME_ERROR_PERMISSION_DENIED;
+ }
+
if (inputmethod_cynara_initialize() == false) {
+ g_permission_allowed = false;
+ g_checked_privilege = true;
LOGE("inputmethod_cynara_initialize () == false");
return IME_ERROR_PERMISSION_DENIED;
}
ret = IME_ERROR_PERMISSION_DENIED;
}
+ g_permission_allowed = (ret == IME_ERROR_NONE);
+ g_checked_privilege = true;
+
inputmethod_cynara_finish();
return ret;