Ensure Application Resource Path gets set if we're using older version of Tizen 57/109057/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 6 Jan 2017 17:13:32 +0000 (17:13 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 6 Jan 2017 17:14:00 +0000 (17:14 +0000)
Use the mechanism we do for the UBUNTU profile.

Change-Id: I4508e483f7378c0faec8e5d8765c0a53ed070131

adaptors/tizen/framework-tizen.cpp

index 91b0388..8aba914 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -423,6 +423,15 @@ std::string Framework::GetResourcePath()
   std::string resourcePath = "";
 #if defined( TIZEN_PLATFORM_CONFIG_SUPPORTED ) && TIZEN_PLATFORM_CONFIG_SUPPORTED
   resourcePath = app_get_resource_path();
+#else // For backwards compatibility with older Tizen versions
+
+  // "DALI_APPLICATION_PACKAGE" is used to get the already configured Application package path.
+  const char* environmentVariable = "DALI_APPLICATION_PACKAGE";
+  char* value = getenv( environmentVariable );
+  if ( value != NULL )
+  {
+    resourcePath = value;
+  }
 #endif //TIZEN_PLATFORM_CONFIG_SUPPORTED
 
   return resourcePath;