tizen_base::Parcel p;
p.WriteParcelable(*parcel_.get());
std::vector<uint8_t> raw = p.GetRaw();
+ char *locale = _get_system_locale();
+ if (locale == nullptr)
+ return false;
- handler->HandleRequest(&raw[0], raw.size(), vconf_get_str(VCONFKEY_LANGSET));
+ handler->HandleRequest(&raw[0], raw.size(), locale);
+ free(locale);
auto result = handler->GetResult();
if (result.size() == 0) return true;
#include "pkg_request.hh"
#include "runner.hh"
#include "pkgmgrinfo_debug.h"
+#include "pkgmgrinfo_private.h"
#ifdef LOG_TAG
#undef LOG_TAG
thread_pool_ = std::make_unique<WorkerThread>(thread_num_);
sid_ = g_unix_fd_add(server_->GetFd(), G_IO_IN, OnReceiveRequest, this);
vconf_notify_key_changed(VCONFKEY_LANGSET, OnLanguageChange, this);
- thread_pool_->SetLocale(vconf_get_str(VCONFKEY_LANGSET));
+ char *locale = _get_system_locale();
+ if (locale == nullptr)
+ return;
+
+ thread_pool_->SetLocale(locale);
+ free(locale);
LOGI("Start Runner");
}
void Runner::OnLanguageChange(keynode_t* key, void* user_data) {
auto runner = static_cast<Runner*>(user_data);
- runner->thread_pool_->SetLocale(vconf_get_str(VCONFKEY_LANGSET));
+ char *locale = _get_system_locale();
+ if (locale == nullptr)
+ return;
+
+ runner->thread_pool_->SetLocale(locale);
+ free(locale);
}
bool Runner::QueueRequest(int client_fd) {