Fix hw key handling bug 90/123090/6
authorYunjin Lee <yunjin-.lee@samsung.com>
Tue, 4 Apr 2017 10:38:12 +0000 (19:38 +0900)
committerYunjin Lee <yunjin-.lee@samsung.com>
Tue, 4 Apr 2017 13:24:27 +0000 (22:24 +0900)
- hwKeyClickedCb passed meaningless value to response handler
- remove meaningless class member m_currentElementId and replace it to m_elementPtr->getId() to handle h/w input properly
- fix passed response type to NResponse::None

Change-Id: I7ff41bcea76b27aa4e2d295ccb63cbd62df89b8a
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
src/agent/notification-daemon/ui/Popupper.cpp
src/agent/notification-daemon/ui/Popupper.h

index 160e48617cfb334705b0aa12e8323f908b6ba7aa..a5b4a04f878f2b187dd61b1745440c5d891135d6 100644 (file)
@@ -108,14 +108,14 @@ Eina_Bool Popupper::hwKeyClickedCb(void *data, int type, void *event)
     ALOGD("HW button pressed. type <" << type << "> pressed key is <" << ev->key << ">");
     if (!strcmp("XF86Home", ev->key) || !strcmp("XF86Back", ev->key)) {
         ALOGD("Respond as deny once.");
-        runner->m_popupResponseHandler(runner->m_currentElementId, NResponseType::Deny);
+        runner->m_popupResponseHandler(runner->m_elementPtr->getId(), NResponseType::None);
     }
     return EINA_TRUE;
 }
 
 void Popupper::timeoutToastCb(void *data, Evas_Object *, void *) {
     Popupper *popupper = static_cast<Popupper*>(data);
-    popupper->m_toastFinishedHandler(popupper->m_currentElementId);
+    popupper->m_toastFinishedHandler(popupper->m_elementPtr->getId());
 }
 
 Popupper::~Popupper()
index f7ac5ef09b385f32d6050cadce51c8340f785f34..a8e5b4ee0a7075776281d9d067cd0a3e017d9bf1 100644 (file)
@@ -76,8 +76,6 @@ private:
     std::unique_ptr<UIElement> m_elementPtr;
     std::unique_ptr<IAnswerable> m_answerablePtr;
 
-    int m_currentElementId = -1;
-
     bool m_shouldRaise = false;
 };