From bf1881cd1b590abdbae5bc38e32381022a13c9ba Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Fri, 7 May 2021 19:53:32 +0900 Subject: [PATCH] atspi: suppress screen-reader by env variable 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 | 8 ++++++++ dali/internal/system/common/environment-variables.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/dali/internal/accessibility/bridge/bridge-impl.cpp b/dali/internal/accessibility/bridge/bridge-impl.cpp index 49b2edc..ea95081 100644 --- a/dali/internal/accessibility/bridge/bridge-impl.cpp +++ b/dali/internal/accessibility/bridge/bridge-impl.cpp @@ -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; } diff --git a/dali/internal/system/common/environment-variables.h b/dali/internal/system/common/environment-variables.h index 094c16e..ab3f1b9 100644 --- a/dali/internal/system/common/environment-variables.h +++ b/dali/internal/system/common/environment-variables.h @@ -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 -- 2.7.4