Fix SelectionRequestHandler 30/237430/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Tue, 30 Jun 2020 11:13:30 +0000 (20:13 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Tue, 30 Jun 2020 11:13:30 +0000 (20:13 +0900)
When requested GET_ID command with empty id, return current theme info.

Change-Id: If479951e604f73ec5a2fc4c18d5e91cc881f9c9d
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/theme_provider/selection_request_handler.cc

index 97960b2..761f551 100644 (file)
@@ -21,7 +21,11 @@ tizen_base::Bundle SelectionRequestHandler::OnRequest(dbus::Command cmd,
   switch (cmd) {
     case dbus::Command::GET: {
       std::string id = args.GetString(dbus::kCmdDataKey);
-      std::shared_ptr<loader::ThemeInfo> themeinfo = proxy_->LoadTheme(id);
+      std::shared_ptr<loader::ThemeInfo> themeinfo;
+      if (id.empty())
+        themeinfo = proxy_->GetLoadedTheme();
+      else
+        themeinfo = proxy_->LoadTheme(id);
       if (themeinfo == nullptr) {
         b.Add(dbus::kCmdResultKey, "error");
         return b;