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

Commit 1b84cf1d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

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

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

Change-Id: I7645562e5c599d6e72eabc0e02fa8cd510955051
parents 22086ecb d34e01cb
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();