[Tizen] Disable ATSPI when release or perf image 71/296671/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 3 Aug 2023 02:45:59 +0000 (11:45 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 3 Aug 2023 02:46:29 +0000 (11:46 +0900)
Change-Id: I236e41b733d4dc361cb5c538eaf39c12e93ed931
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali/internal/accessibility/bridge/bridge-impl.cpp

index de479b1..b6cfb41 100644 (file)
@@ -46,6 +46,7 @@
 #include <dali/internal/accessibility/bridge/dummy/dummy-atspi.h>
 #include <dali/internal/adaptor/common/adaptor-impl.h>
 #include <dali/internal/system/common/environment-variables.h>
+#include <unistd.h>
 
 using namespace Dali::Accessibility;
 
@@ -870,13 +871,19 @@ std::shared_ptr<Bridge> CreateBridge()
 
   try
   {
-    /* check environment variable first */
+    /* Check environment variable first */
     const char* envAtspiDisabled = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_DISABLE_ATSPI);
     if(envAtspiDisabled && std::atoi(envAtspiDisabled) != 0)
     {
       return Dali::Accessibility::DummyBridge::GetInstance();
     }
 
+    // Check if the image is either release or perf mode
+    if((access("/etc/release", F_OK) == 0) || (access("/etc/perf", F_OK) == 0))
+    {
+      return Dali::Accessibility::DummyBridge::GetInstance();
+    }
+
     return std::make_shared<BridgeImpl>();
   }
   catch(const std::exception&)