atspi: suppress screen-reader by env variable 10/258010/1
authorShinwoo Kim <cinoo.kim@samsung.com>
Fri, 7 May 2021 10:53:32 +0000 (19:53 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Fri, 7 May 2021 10:58:31 +0000 (19:58 +0900)
The application could use TTS directly, so this kind of application
does not want screen-reader to read for it, even though it should
emit atspi event such as 'focused' for another AT-Client including
the Aurum.

Change-Id: I7106a4e7eb5cb7a42ef347d32ffbc01eda12fce9

dali/internal/accessibility/bridge/bridge-impl.cpp
dali/internal/system/common/environment-variables.h

index 49b2edc..ea95081 100644 (file)
@@ -370,6 +370,14 @@ Bridge* Bridge::GetCurrentBridge()
   else if (autoInitState == AutoInitState::ENABLED)
   {
     bridge = CreateBridge();
+
+    /* check environment variable for suppressing screen-reader */
+    const char *envSuppressScreenReader = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_ENV_SUPPRESS_SCREEN_READER);
+    if (envSuppressScreenReader && std::atoi(envSuppressScreenReader) != 0)
+    {
+      bridge->SuppressScreenReader(true);
+    }
+
     return bridge;
   }
 
index 094c16e..ab3f1b9 100644 (file)
@@ -139,6 +139,8 @@ namespace Adaptor
 
 #define DALI_ENV_DISABLE_ATSPI "DALI_DISABLE_ATSPI"
 
+#define DALI_ENV_SUPPRESS_SCREEN_READER "DALI_SUPPRESS_SCREEN_READER"
+
 } // namespace Adaptor
 
 } // namespace Internal