M module-apps/application-calllog/ApplicationCallLog.cpp => module-apps/application-calllog/ApplicationCallLog.cpp +2 -4
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "ApplicationCallLog.hpp"
@@ 133,9 133,7 @@ namespace app
DBServiceAPI::GetQuery(this,
db::Interface::Name::Notifications,
std::make_unique<db::query::notifications::Clear>(NotificationsRecord::Key::Calls));
- const auto [succeed, _] = DBServiceAPI::GetQuery(
- this, db::Interface::Name::Calllog, std::make_unique<db::query::calllog::SetAllRead>());
- return succeed;
+ return true;
}
} /* namespace app */
M module-utils/phonenumber/NumberHolderMatcher.hpp => module-utils/phonenumber/NumberHolderMatcher.hpp +6 -1
@@ 1,4 1,4 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
@@ 63,6 63,11 @@ namespace utils
PhoneNumber::Match level = PhoneNumber::Match::EXACT)
{
utils::time::Scoped t{"bestMatch()"};
+ // if empty string, do not try to match, simply return
+ if (phoneNumber.get().empty()) {
+ return std::nullopt;
+ }
+
restartFor(phoneNumber);
do {
const auto it =
M products/PurePhone/services/db/ServiceDB.cpp => products/PurePhone/services/db/ServiceDB.cpp +3 -3
@@ 128,13 128,13 @@ sys::MessagePointer ServiceDB::DataReceivedHandler(sys::DataMessage *msgl, sys::
sys::ReturnCodes::Success, std::make_unique<ContactRecord>(std::move(ret->contact)));
}
else {
- responseMsg = std::make_shared<DBContactNumberResponseMessage>(sys::ReturnCodes::Failure,
+ responseMsg = std::make_shared<DBContactNumberResponseMessage>(sys::ReturnCodes::Success,
std::unique_ptr<ContactRecord>());
}
} break;
case MessageType::DBContactMatchByNumberID: {
- auto time = utils::time::Scoped("DBContactMatchByNumber");
+ auto time = utils::time::Scoped("DBContactMatchByNumberID");
auto *msg = dynamic_cast<DBMatchContactByNumberIDMessage *>(msgl);
auto ret = contactRecordInterface->GetByNumberID(msg->numberID);
if (ret.has_value()) {
@@ 142,7 142,7 @@ sys::MessagePointer ServiceDB::DataReceivedHandler(sys::DataMessage *msgl, sys::
sys::ReturnCodes::Success, std::make_unique<ContactRecord>(std::move(*ret)));
}
else {
- responseMsg = std::make_shared<DBContactNumberResponseMessage>(sys::ReturnCodes::Failure, nullptr);
+ responseMsg = std::make_shared<DBContactNumberResponseMessage>(sys::ReturnCodes::Success, nullptr);
}
} break;