From 8a5a6135fae5b0b3adb0481672fceda198bbe431 Mon Sep 17 00:00:00 2001 From: Bartlomiej Kunikowski Date: Mon, 19 Sep 2016 13:03:15 +0200 Subject: [PATCH] Fix for StepParse - additional conditions checking for watch category in manifest Change-Id: I1a1051fc466616df92dd1e5b02e34d4a6e872dce --- src/wgt/step/configuration/step_parse.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index 4fcc344..33bb0b2 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -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( 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( 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( 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 -- 2.7.4