From: Tomasz Iwanek Date: Mon, 26 Sep 2016 12:22:38 +0000 (+0200) Subject: Set nodisplay for downloadable_font and tts category apps X-Git-Tag: accepted/tizen/3.0/ivi/20161011.070258~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f332688723547640d154a8993ad9c101b0f7ba4c;p=platform%2Fcore%2Fappfw%2Fwgt-backend.git Set nodisplay for downloadable_font and tts category apps These apps aren't supposed to be run. Change-Id: I332a5dae817d627db764086baf2413878da9fe95 --- diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index 914bbc3..d2c9b0c 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -53,6 +53,9 @@ const char kCategoryWatchClock[] = "com.samsung.wmanager.WATCH_CLOCK"; const std::string kManifestVersion = "1.0.0"; const char kTizenPackageXmlNamespace[] = "http://tizen.org/ns/packages"; const char kImeCategoryName[] = "http://tizen.org/category/ime"; +const char kDownloadableFontCategoryName[] = + "http://tizen.org/category/downloadable_font"; +const char kTTSCategoryName[] = "http://tizen.org/category/tts"; const char kResWgt[] = "res/wgt"; const char kConfigFileName[] = "config.xml"; @@ -291,6 +294,8 @@ bool StepParse::FillMainApplicationInfo(manifest_x* manifest) { } bool has_watch_category = false; bool has_ime = false; + bool has_downloadable_font = false; + bool has_tts = false; auto category_info = GetManifestDataForKey( app_keys::kTizenCategoryKey); @@ -306,6 +311,14 @@ bool StepParse::FillMainApplicationInfo(manifest_x* manifest) { category_info->categories.end(), kImeCategoryName) != category_info->categories.end(); + has_downloadable_font = std::find(category_info->categories.begin(), + category_info->categories.end(), + kDownloadableFontCategoryName) + != category_info->categories.end(); + has_tts = std::find(category_info->categories.begin(), + category_info->categories.end(), + kTTSCategoryName) + != category_info->categories.end(); } // application data @@ -318,11 +331,16 @@ bool StepParse::FillMainApplicationInfo(manifest_x* manifest) { auto settings_info = GetManifestDataForKey( wgt::application_widget_keys::kTizenSettingKey); + bool no_display = settings_info ? settings_info->no_display() : false; - application->nodisplay = (has_watch_category || has_ime || no_display) ? + bool has_no_display_category = + has_watch_category || has_ime || has_tts || has_downloadable_font; + + application->nodisplay = (has_no_display_category || no_display) ? strdup("true") : strdup("false"); - application->taskmanage = (has_watch_category || has_ime) ? strdup("false") : + application->taskmanage = has_no_display_category ? strdup("false") : strdup("true"); + SetApplicationXDefaults(application); if (has_watch_category) application->ambient_support =