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

Commit 8afcac5a authored by Ajay Panicker's avatar Ajay Panicker Committed by android-build-merger
Browse files

Delete bt_snoop.log when snoop logging is disabled

am: 4063f4ae

Change-Id: I3359087dc96042e914ef8bcfcff3a735140c2751
parents 88d88f05 4063f4ae
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -142,6 +142,11 @@ static void update_logging() {
  bool should_log = module_started && (logging_enabled_via_api ||
                                       stack_config->get_btsnoop_turned_on());

  if (module_started && !should_log) {
    LOG_INFO(LOG_TAG, "Deleting snoop log if it exists");
    remove(stack_config->get_btsnoop_log_path());
  }

  if (should_log == is_logging) return;

  is_logging = should_log;