Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02fd1b46 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "floss: initialize RepeatingTimer::task_ with base::NullCallback" am:...

Merge "floss: initialize RepeatingTimer::task_ with base::NullCallback" am: d34e01cb am: 1b84cf1d

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1911270

Change-Id: I58c20e7fd2bd9039366b1c6ff96f3dedf9bbbfbd
parents fc8552b5 1b84cf1d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include "message_loop_thread.h"
#include "time_util.h"

#include <base/callback.h>
#include <base/logging.h>

namespace bluetooth {
@@ -110,7 +111,11 @@ void RepeatingTimer::CancelHelper(std::promise<void> promise) {
void RepeatingTimer::CancelClosure(std::promise<void> promise) {
  message_loop_thread_ = nullptr;
  task_wrapper_.Cancel();
#if BASE_VER < 927031
  task_ = {};
#else
  task_ = base::NullCallback();
#endif
  period_ = base::TimeDelta();
  expected_time_next_task_us_ = 0;
  promise.set_value();