[Tizen] Disable ATSPI when release or perf image accepted/tizen/unified/20230818.054529
authorWonsik Jung <sidein@samsung.com>
Wed, 16 Aug 2023 08:25:03 +0000 (17:25 +0900)
committerWonsik Jung <sidein@samsung.com>
Wed, 16 Aug 2023 08:25:09 +0000 (17:25 +0900)
This reverts commit 197a52d3b63710a61d3473532818797be23b47ea.

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&)