From: Igor Olshevskyi Date: Mon, 30 Oct 2017 07:23:03 +0000 (+0200) Subject: TizenRefApp-9739 [Call UI] Fix issue with two fingers swipe on Accept/Reject call... X-Git-Tag: submit/tizen/20180410.135041~2^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7142649b8263614f99f1e8c8706714e8dd7b7711;p=profile%2Fwearable%2Fapps%2Fnative%2Fcall-ui.git TizenRefApp-9739 [Call UI] Fix issue with two fingers swipe on Accept/Reject call during Screen Reader Change-Id: Idf5452d6fdf1095a62103f5b5477d36a857bd180 --- diff --git a/call-ui/view/AcceptRejectWidget.cpp b/call-ui/view/AcceptRejectWidget.cpp index 9b1e93a..19be23c 100644 --- a/call-ui/view/AcceptRejectWidget.cpp +++ b/call-ui/view/AcceptRejectWidget.cpp @@ -57,6 +57,9 @@ namespace callui { namespace { namespace impl { constexpr LayoutTheme LAYOUT_IMG_REJECT {"layout", "callui_image", "reject"}; + const std::string ATSPI_ATTRIBUTE_KEY = "gesture_required"; + const std::string ATSPI_ATTRIBUTE_VALUE = "scroll"; + constexpr auto BC_ITEM_COUNT = 4; constexpr auto BC_ANIMATE_COUNT_MAX = 3; @@ -1521,6 +1524,8 @@ namespace callui { acceptAtspi.setName(AO_STR_ACCEPT_CALL); acceptAtspi.setDescription( AO_STR_SWIPE_RIGHT_WITH_TWO_FINGERS_TO_ACCEPT); + acceptAtspi.addAttribute(impl::ATSPI_ATTRIBUTE_KEY, + impl::ATSPI_ATTRIBUTE_VALUE); m_rejAo = utils::createAccessObject(parent, *m_rejEventLy); if (!m_rejAo) { @@ -1533,6 +1538,8 @@ namespace callui { rejectAtspi.setName(AO_STR_REJECT_CALL); rejectAtspi.setDescription( AO_STR_SWIPE_LEFT_WITH_TWO_FINGERS_TO_REJECT); + rejectAtspi.addAttribute(impl::ATSPI_ATTRIBUTE_KEY, + impl::ATSPI_ATTRIBUTE_VALUE); return RES_OK; } diff --git a/ucl/include/ucl/gui/Atspi.h b/ucl/include/ucl/gui/Atspi.h index 4194ddc..adea58d 100644 --- a/ucl/include/ucl/gui/Atspi.h +++ b/ucl/include/ucl/gui/Atspi.h @@ -173,6 +173,18 @@ namespace ucl { */ void clearRelationships(); + /** + * @brief Adds key-value pair identifying widget extra attribute + * @param[in] key The string key to give extra information + * @param[in] value The string value to give extra information + */ + void addAttribute(const std::string &key, const std::string &value); + + /** + * @brief Removes all attributes in accessible object + */ + void clearAttributes(); + /** * @brief Registers gesture event handler * @param[in] handler Handler of the event diff --git a/ucl/include/ucl/gui/Atspi.hpp b/ucl/include/ucl/gui/Atspi.hpp index e1c53f6..9a6d732 100644 --- a/ucl/include/ucl/gui/Atspi.hpp +++ b/ucl/include/ucl/gui/Atspi.hpp @@ -147,6 +147,18 @@ namespace ucl { elm_atspi_accessible_relationships_clear(getAo()); } + inline void Atspi::addAttribute(const std::string &key, + const std::string &value) + { + elm_atspi_accessible_attribute_append(getAo(), + key.c_str(), value.c_str()); + } + + inline void Atspi::clearAttributes() + { + elm_atspi_accessible_attributes_clear(getAo()); + } + inline void Atspi::addGestureHandler(AtspiGestureHandler handler) { if (handler) {