Merge "[Pkcs] Fixed the TC's failure" into tizen_2.1
[platform/framework/native/appfw.git] / src / app / FApp_AppControlRegistry.cpp
index 34725d1..5413239 100644 (file)
@@ -54,19 +54,15 @@ using namespace Tizen::Io;
 namespace
 {
 
-const wchar_t ACTL_PRIVATE_FILE[] = L"/usr/etc/app-control-system.ini";
 const wchar_t ACTL_DEFAULT_FILE[] = L"/usr/etc/app-control-info.ini";
 const wchar_t ACTL_LEGACY_FILE[] = L"/usr/etc/app-control-alias.ini";
 const wchar_t ACTL_ALIAS_FILE[] = L"/usr/etc/app-control-appid.ini";
-const wchar_t ACTL_PRIVATE_ALIAS_FILE[] = L"/usr/etc/app-control-private-appid.ini";
 
 const wchar_t TIZEN_ALIAS_APPID_PREFIX[] = L"tizen.";
 
 const String ACTL_REGISTRY_OP_NUM = L"OPID_Count";
 const String ACTL_REGISTRY_PUBLIC = L"Public";
-const String ACTL_REGISTRY_LAUNCH_TYPE = L"LaunchType";
 const String ACTL_REGISTRY_PATH = L"Path";
-const String ACTL_REGISTRY_CATEGORY = L"Category";
 const String ACTL_REGISTRY_TITLE = L"Title";
 const String ACTL_REGISTRY_ALIAS_PROVIDER = L"PROVIDER_ALIAS";
 
@@ -129,13 +125,7 @@ _AppControlRegistry::LoadRegistry(void)
 {
        _RegistryImpl reg;
 
-       String regPath = ACTL_PRIVATE_FILE;
-
-       // if ACTL_SYSTEM does not exist, then use default name
-       if (!File::IsFileExist(regPath))
-       {
-               regPath = ACTL_DEFAULT_FILE;
-       }
+       const String regPath = ACTL_DEFAULT_FILE;
 
        result r = reg.Construct(regPath, REG_OPEN_READ_ONLY, null);
        SysTryReturn(NID_APP, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -166,7 +156,6 @@ _AppControlRegistry::LoadRegistry(void)
                }
 
                int public_open = 0;
-               int launch_type = 0;
 
                ///////////////////////////////////////////////////////////////////////
                // Plubic
@@ -185,32 +174,12 @@ _AppControlRegistry::LoadRegistry(void)
                }
 
                ///////////////////////////////////////////////////////////////////////
-               // Launch type
-               index = reg.GetEntryIndex(i, ACTL_REGISTRY_LAUNCH_TYPE);
-               if (index >= 0)
-               {
-                       size = sizeof(size);
-
-                       reg.GetEntryValue(i, index, REG_VALUE_TYPE_INT, &launch_type, &size);
-               }
-
-               ///////////////////////////////////////////////////////////////////////
                // Path
                index = reg.GetEntryIndex(i, ACTL_REGISTRY_PATH);
                if (index >= 0)
                {
                        size = REG_VALUE_BUFFER_LEN;
                        reg.GetEntryValue(i, index, REG_VALUE_TYPE_STRING, &actl_path, &size);
-
-                       if (launch_type == _APPCONTROL_TYPE_OSP)
-                       {
-                               if (!_Aul::IsInstalled(actl_path))
-                               {
-                                       SysLog(NID_APP, "Osp app %ls not installed.", actl_path.GetPointer());
-                                       continue;
-                               }
-                               // [FIXME] retrieve from package info here
-                       }
                }
 
                ///////////////////////////////////////////////////////////////////////
@@ -263,18 +232,7 @@ _AppControlRegistry::LoadRegistry(void)
                                        prop |= _APPCONTROL_PROPERTY_PUBLIC;
                                }
 
-                               switch (launch_type)
-                               {
-                               case _APPCONTROL_TYPE_NATIVE:
-                                       prop |= _APPCONTROL_PROPERTY_SLP;
-                                       break;
-                               case _APPCONTROL_TYPE_OSP:
-                                       prop |= _APPCONTROL_PROPERTY_OSP;
-                                       break;
-                               default:
-                                       SysLog(NID_APP, "Invalid launch type %d", launch_type);
-                                       break;
-                               }
+                               prop |= _APPCONTROL_PROPERTY_SLP;
 
                                //SysLog(NID_APP, "(%ls, %ls)", sec_name.GetPointer(), actl_opId.GetPointer());
                                AppControl* pAc = _AppControlImpl::CreateN(actl_path, sec_name, actl_opId, actl_name, prop);
@@ -285,8 +243,8 @@ _AppControlRegistry::LoadRegistry(void)
                                }
                                else
                                {
-                                       SysLog(NID_APP, "Failed to create AppControl instance (%ls, %ls, %d, %d)",
-                                                               sec_name.GetPointer(), actl_opId.GetPointer(), public_open, launch_type);
+                                       SysLog(NID_APP, "Failed to create AppControl instance (%ls, %ls, %d)",
+                                                               sec_name.GetPointer(), actl_opId.GetPointer(), public_open);
                                }
                        }
                }
@@ -395,13 +353,7 @@ _AppControlRegistry::LoadAliasList(void)
 {
        _RegistryImpl reg;
 
-       String regPath = ACTL_PRIVATE_ALIAS_FILE;
-
-       // if ACTL_SYSTEM does not exist, then use default name
-       if (!File::IsFileExist(regPath))
-       {
-               regPath = ACTL_ALIAS_FILE;
-       }
+       const String regPath = ACTL_ALIAS_FILE;
 
        result r = reg.Construct(regPath, REG_OPEN_READ_ONLY, null);
        SysTryReturn(NID_APP, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));