Add input.keys.menu and input.keys.back features
authorJoohyun Kim <joohyune.kim@samsung.com>
Wed, 5 Jun 2013 12:35:15 +0000 (21:35 +0900)
committerJoohyun Kim <joohyune.kim@samsung.com>
Wed, 5 Jun 2013 12:35:15 +0000 (21:35 +0900)
Change-Id: I46c9925ff24b7b2e6764bf6da390b676f269018f
Signed-off-by: Joohyun Kim <joohyune.kim@samsung.com>
src/CMakeLists.txt
src/system/FSys_SystemInfoImpl.cpp

index 615c26a..e136c33 100755 (executable)
@@ -42,6 +42,7 @@ pkg_check_modules(pkgs REQUIRED
        capi-system-system-settings
        capi-system-media-key
        capi-network-bluetooth
+       capi-system-info
        security-server
 )
 
index 6b7542a..2b586c2 100644 (file)
@@ -21,6 +21,7 @@
 #include <unique_ptr.h>
 #include <unistd.h>
 
+#include <system_info.h>
 #include <ITapiModem.h>
 
 #include <FBaseBoolean.h>
@@ -569,13 +570,32 @@ _SystemInfoImpl::GetSysInfo(const String& key, bool& value)
                return E_SUCCESS;
        }
 
-       r = GetFromRegistry(tizenKey, value);
-       if(r != E_SUCCESS)
+       if(key == L"http://tizen.org/feature/input.keys.menu")
        {
-               _SystemClient* pSystemClient = _SystemClient::GetInstance();
-               r = pSystemClient->GetValue(tizenKey, value);
+               bool supported = false;
+               int ret = system_info_get_platform_bool("tizen.org/feature/input.keys.menu", &supported);
+               SysTryReturnResult(NID_SYS, ret == 0, E_SYSTEM, "It is failed to get system information from configration file.");
+               value = supported;
+               r = E_SUCCESS;
+       }
+       else if(key == L"http://tizen.org/feature/input.keys.back")
+       {
+               bool supported = false;
+               int ret = system_info_get_platform_bool("tizen.org/feature/input.keys.back", &supported);
+               SysTryReturnResult(NID_SYS, ret == 0, E_SYSTEM, "It is failed to get system information from configration file.");
+               value = supported;
+               r = E_SUCCESS;
+       }
+       else
+       {
+               r = GetFromRegistry(tizenKey, value);
+               if(r != E_SUCCESS)
+               {
+                       _SystemClient* pSystemClient = _SystemClient::GetInstance();
+                       r = pSystemClient->GetValue(tizenKey, value);
+               }
+               SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_OBJ_NOT_FOUND, "It is failed to get the key[%ls]", tizenKey.GetPointer());
        }
-       SysTryReturnResult(NID_SYS, r == E_SUCCESS, E_OBJ_NOT_FOUND, "It is failed to get the key[%ls]", tizenKey.GetPointer());
 
        if(r == E_SUCCESS)
        {