TizenRefApp-9739 [Call UI] Fix issue with two fingers swipe on Accept/Reject call... 69/158269/2
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Mon, 30 Oct 2017 07:23:03 +0000 (09:23 +0200)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Tue, 31 Oct 2017 08:21:32 +0000 (10:21 +0200)
Change-Id: Idf5452d6fdf1095a62103f5b5477d36a857bd180

call-ui/view/AcceptRejectWidget.cpp
ucl/include/ucl/gui/Atspi.h
ucl/include/ucl/gui/Atspi.hpp

index 9b1e93a9dd35b256b5606a93f07ef433ac9a549c..19be23ce533cd99388e23338759fc4825934cf81 100644 (file)
@@ -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;
        }
index 4194ddc47b5c8cd11c0741b56f9d00f93314d488..adea58d2da2c9107df0eb9649d5d2785c8ee0787 100644 (file)
@@ -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
index e1c53f65b8706e2247eccc8bd94a54104ef0cd0a..9a6d7323f39071fe2af98d9fc455de7932558995 100644 (file)
@@ -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) {