Fix for StepParse - additional conditions checking for watch 46/88546/1
authorBartlomiej Kunikowski <b.kunikowski@partner.samsung.com>
Mon, 19 Sep 2016 11:03:15 +0000 (13:03 +0200)
committerBartlomiej Kunikowski <b.kunikowski@partner.samsung.com>
Mon, 19 Sep 2016 13:29:49 +0000 (15:29 +0200)
category in manifest

Change-Id: I1a1051fc466616df92dd1e5b02e34d4a6e872dce

src/wgt/step/configuration/step_parse.cc

index 4fcc344..33bb0b2 100644 (file)
@@ -274,14 +274,14 @@ bool StepParse::FillMainApplicationInfo(manifest_x* manifest) {
     LOG(ERROR) << "Application info manifest data has not been found.";
     return false;
   }
-  bool has_watch_catergory = false;
+  bool has_watch_category = false;
   bool has_ime = false;
   auto category_info =
       GetManifestDataForKey<const wgt::parse::CategoryInfoList>(
              app_keys::kTizenCategoryKey);
 
   if (category_info) {
-    has_watch_catergory = std::find_if(category_info->categories.begin(),
+    has_watch_category = std::find_if(category_info->categories.begin(),
                                        category_info->categories.end(),
                                        [](const std::string& category) {
       return category == kCategoryWearableClock ||
@@ -297,18 +297,19 @@ bool StepParse::FillMainApplicationInfo(manifest_x* manifest) {
   application_x* application = reinterpret_cast<application_x*>(
       calloc(1, sizeof(application_x)));
   application->component_type =
-      has_watch_catergory ? strdup("watchapp") : strdup("uiapp");
+      has_watch_category ? strdup("watchapp") : strdup("uiapp");
   application->mainapp = strdup("true");
   application->appid = strdup(app_info->id().c_str());
   auto settings_info =
       GetManifestDataForKey<const wgt::parse::SettingInfo>(
              wgt::application_widget_keys::kTizenSettingKey);
   bool no_display = settings_info ? settings_info->no_display() : false;
-  application->nodisplay = (has_ime || no_display) ? strdup("true") :
-      strdup("false");
-  application->taskmanage = has_ime ? strdup("false") : strdup("true");
+  application->nodisplay = (has_watch_category || has_ime || no_display) ?
+      strdup("true") : strdup("false");
+  application->taskmanage = (has_watch_category || has_ime) ? strdup("false") :
+      strdup("true");
   SetApplicationXDefaults(application);
-  if (has_watch_catergory)
+  if (has_watch_category)
     application->ambient_support =
         strdup(app_info->ambient_support() ? "true" : "false");
   else