M module-services/service-cellular/call/api/CallTimer.cpp => module-services/service-cellular/call/api/CallTimer.cpp +2 -2
@@ 2,7 2,6 @@
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "CallTimer.hpp"
-#include <Timers/TimerFactory.hpp>
CallTimer::CallTimer(sys::TimerHandle handle) : handle(std::move(handle))
{}
@@ 20,7 19,8 @@ void CallTimer::stop()
time_t CallTimer::duration()
{
- return std::time(nullptr) - startActiveTime;
+ const auto timeElapsed = std::time(nullptr) - startActiveTime;
+ return handle.isActive() ? timeElapsed : 0;
}
TimerRing::TimerRing(sys::TimerHandle handle) : handle(std::move(handle))
M module-services/service-cellular/call/api/CallTimer.hpp => module-services/service-cellular/call/api/CallTimer.hpp +1 -2
@@ 3,7 3,6 @@
#pragma once
-#include <memory>
#include <Timers/TimerHandle.hpp>
namespace call::api
@@ 26,7 25,7 @@ namespace call::api
class CallTimer : public call::api::Timer
{
sys::TimerHandle handle;
- std::time_t startActiveTime{};
+ std::time_t startActiveTime{0};
public:
explicit CallTimer(sys::TimerHandle handle);
M pure_changelog.md => pure_changelog.md +1 -0
@@ 3,6 3,7 @@
## Unreleased
### Fixed
+* Fixed improper duration of the rejected outgoing call shown in calls log
* Fixed turning on loudspeaker before outgoing call is answered
* Fixed PLAY label translation in German
* Fixed USB connection/disconnection detection