From: Shinwoo Kim Date: Fri, 7 May 2021 10:53:32 +0000 (+0900) Subject: atspi: suppress screen-reader by env variable X-Git-Tag: dali_2.0.26~8^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=bf1881cd1b590abdbae5bc38e32381022a13c9ba 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 --- 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