migration of hwacceleration related changes from tizen 2.4 95/69595/3 accepted/tizen/common/20160520.170923 accepted/tizen/ivi/20160520.002323 accepted/tizen/mobile/20160520.002334 accepted/tizen/tv/20160520.002255 accepted/tizen/wearable/20160520.002307 submit/tizen/20160517.005404 submit/tizen/20160518.002620 submit/tizen/20160519.002157 submit/tizen/20160519.045032
authorjongmyeongko <jongmyeong.ko@samsung.com>
Mon, 16 May 2016 04:58:00 +0000 (13:58 +0900)
committerjongmyeongko <jongmyeong.ko@samsung.com>
Mon, 16 May 2016 07:10:14 +0000 (16:10 +0900)
Change-Id: Ib05944b2af2a95da3ab5f19b639d52ba69cd6c8c
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
include/pkgmgrinfo_type.h
parser/pkgmgr_parser.c
src/pkgmgrinfo_appinfo.c

index b912568..e7f5ad5 100644 (file)
@@ -108,9 +108,9 @@ enum {
 #define        PMINFO_PKGINFO_INSTALL_LOCATION_EXTERNAL        "LOCATION_EXTERNAL"
 
 typedef enum {
-       PMINFO_HWACCELERATION_NOT_USE_GL = 0,           /**< Don't use hardware acceleration*/
-       PMINFO_HWACCELERATION_USE_GL = 1,               /**< Use hardware acceleration*/
-       PMINFO_HWACCELERATION_USE_SYSTEM_SETTING = 2            /**< Follow system setting for hardware acceleration */
+       PMINFO_HWACCELERATION_OFF = 0,          /**< Don't use hardware acceleration*/
+       PMINFO_HWACCELERATION_ON = 1,           /**< Use hardware acceleration*/
+       PMINFO_HWACCELERATION_DEFAULT = 2               /**< Follow system setting for hardware acceleration */
 }pkgmgrinfo_app_hwacceleration;
 
 typedef enum {
index 75ad043..89adbc9 100644 (file)
@@ -1642,6 +1642,18 @@ static int __ps_process_application(xmlTextReaderPtr reader, application_x *appl
                application->indicatordisplay = strdup("false");
        }
 
+       /* hw-acceleration values are changed from use-GL/not-use-GL/use-system-setting to on/off/default */
+       if (strcmp(application->hwacceleration, "use-GL") == 0) {
+               free((void *)application->hwacceleration);
+               application->hwacceleration = strdup("on");
+       } else if (strcmp(application->hwacceleration, "not-use-GL") == 0) {
+               free((void *)application->hwacceleration);
+               application->hwacceleration = strdup("off");
+       } else if (strcmp(application->hwacceleration, "use-system-setting") == 0) {
+               free((void *)application->hwacceleration);
+               application->hwacceleration = strdup("default");
+       }
+
        depth = xmlTextReaderDepth(reader);
        while ((ret = __next_child_element(reader, depth))) {
                node = xmlTextReaderConstName(reader);
index 4376dbf..11d3796 100644 (file)
@@ -2020,12 +2020,12 @@ API int pkgmgrinfo_appinfo_get_hwacceleration(pkgmgrinfo_appinfo_h handle, pkgmg
                return PMINFO_R_ERROR;
 
        val = (char *)info->app_info->hwacceleration;
-       if (strcasecmp(val, "not-use-GL") == 0)
-               *hwacceleration = PMINFO_HWACCELERATION_NOT_USE_GL;
-       else if (strcasecmp(val, "use-GL") == 0)
-               *hwacceleration = PMINFO_HWACCELERATION_USE_GL;
+       if (strcasecmp(val, "off") == 0)
+               *hwacceleration = PMINFO_HWACCELERATION_OFF;
+       else if (strcasecmp(val, "on") == 0)
+               *hwacceleration = PMINFO_HWACCELERATION_ON;
        else
-               *hwacceleration = PMINFO_HWACCELERATION_USE_SYSTEM_SETTING;
+               *hwacceleration = PMINFO_HWACCELERATION_DEFAULT;
 
        return PMINFO_R_OK;
 }