Modify smack label for osp-compat
authorDuyoung Jang <duyoung.jang@samsung.com>
Wed, 3 Jul 2013 08:40:40 +0000 (17:40 +0900)
committerDuyoung Jang <duyoung.jang@samsung.com>
Wed, 3 Jul 2013 11:45:17 +0000 (20:45 +0900)
Change-Id: I49e09f8e8a33154225f4763962b9ced3b233b4aa
Signed-off-by: Duyoung Jang <duyoung.jang@samsung.com>
inc/InstallerDefs.h
src/Manager/PermissionManager.cpp
src/XmlHandler/ManifestGenerator.cpp

index ccb23b5..95dff7c 100755 (executable)
@@ -23,7 +23,7 @@
 
 #include "InstallerUtil.h"
 
-#define OSP_INSTALLER_VERSION "version=[20130703.1]"
+#define OSP_INSTALLER_VERSION "version=[20130703.2]"
 
 #define DIR_BIN                                L"/bin"
 #define DIR_INFO                       L"/info"
 #define METADATA_SPLASH_INDICATOR_DISPLAY              L"http://developer.samsung.com/tizen/metadata/splash/indicatordisplay"
 #define METADATA_SPLASH_PORTRAIT                               L"http://developer.samsung.com/tizen/metadata/splash/portrait"
 #define METADATA_SPLASH_LANDSCAPE                              L"http://developer.samsung.com/tizen/metadata/splash/landscape"
+#define METADATA_DISABLE_SCREEN_READER L"http://developer.samsung.com/tizen/metadata/disablescreenreader"
 
 #define DIR_APPLICATIONS_TMP                                   "/opt/usr/apps/tmp"
 
index 5967f8d..ea8ee6d 100755 (executable)
@@ -236,9 +236,7 @@ PermissionManager::SetSymLink(InstallationContext* pContext)
        InstallerUtil::CreateSymlink(oldPath, newPath);
 #else
        newPath = appRootPath + L"/Res";
-       std::unique_ptr< char[] > pResPath(_StringConverter::CopyToCharArrayN(newPath));
-       int ret = symlink("./res", pResPath.get());
-       smackManager.SetupPath(pContext->__packageId, newPath, SMACK_DIR_TYPE_ANY_LABEL, L"_");
+       InstallerUtil::CreateSymlink(L"./res", newPath, false);
 #endif
 
 #if 0
@@ -247,9 +245,7 @@ PermissionManager::SetSymLink(InstallationContext* pContext)
        InstallerUtil::CreateSymlink(oldPath, newPath);
 #else
        newPath = appRootPath + L"/Home";
-       std::unique_ptr< char[] > pHomePath(_StringConverter::CopyToCharArrayN(newPath));
-       ret = symlink("./data", pHomePath.get());
-       smackManager.SetupPath(pContext->__packageId, newPath, SMACK_DIR_TYPE_ANY_LABEL, L"_");
+       InstallerUtil::CreateSymlink(L"./data", newPath, false);
 #endif
 
        oldPath = appRootPath + DIR_RES + L"/screen-size-normal";
index d079608..39ee9cc 100755 (executable)
@@ -580,6 +580,7 @@ bool
 ManifestGenerator::WriteApp(int index, AppData* pAppData)
 {
        IMap* pNameList = pAppData->__pNameList;
+       HashMap* pMetadataMap = pAppData->__pMetadataMap;
        String label("label");
        String type("c++app");
        String binaryPath;
@@ -662,6 +663,12 @@ ManifestGenerator::WriteApp(int index, AppData* pAppData)
        __pWriter->WriteAttribute("hw-acceleration", glFrame);
        __pWriter->WriteAttribute("mainapp", mainapp);
 
+       String screenReaderOff(METADATA_DISABLE_SCREEN_READER);
+       if (pMetadataMap->ContainsKey(screenReaderOff) == true)
+       {
+               __pWriter->WriteAttribute(L"screen-reader", L"screenreader-off");
+       }
+
        String indicatorDisplay;
        String portraitValue;
        String landscapeValue;
@@ -694,7 +701,6 @@ ManifestGenerator::WriteApp(int index, AppData* pAppData)
                __pWriter->EndElement();
        }
 
-       HashMap* pMetadataMap = pAppData->__pMetadataMap;
        if (pMetadataMap->GetCount() > 0)
        {
                WriteMetadata(pMetadataMap);