Fixed "Add to Contacts" appearing in DialerView with empty number 39/59439/1
authorEugene Kurzberg <i.kurtsberg@samsung.com>
Mon, 15 Feb 2016 11:39:05 +0000 (13:39 +0200)
committerEugene Kurzberg <i.kurtsberg@samsung.com>
Mon, 15 Feb 2016 11:39:22 +0000 (13:39 +0200)
when database changes occur.

Change-Id: I0d57b7bef8f47d0b7579bd056a88932b5a62f66f
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
lib-phone/src/Phone/Dialer/DialerView.cpp

index 2e8efb7..d96edb4 100644 (file)
@@ -298,8 +298,10 @@ void DialerView::onCallPressed(Evas_Object *obj, void *event_info)
 void DialerView::onDbChanged(const char *uri)
 {
        std::string number = m_Entry->getNumber();
-       m_SearchEngine.searchFromScratch(number);
-       m_SearchControl->setResults(m_SearchEngine.getSearchResult());
+       if (!number.empty()) {
+               m_SearchEngine.searchFromScratch(number);
+               m_SearchControl->setResults(m_SearchEngine.getSearchResult());
+       }
 }
 
 void DialerView::launchCall(const std::string &number)