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

Commit 54709fa0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Floss: filter unexpected cancel discovery from UI" am: ea4b7a08

parents c75a9c51 ea4b7a08
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1081,6 +1081,13 @@ impl IBluetooth for Bluetooth {
    }

    fn cancel_discovery(&self) -> bool {
        // Reject the cancel discovery request if the underlying stack is not in a discovering
        // state. For example, previous start discovery was enqueued for ongoing discovery.
        if !self.is_discovering {
            debug!("Reject cancel_discovery as it's not in discovering state.");
            return false;
        }

        self.intf.lock().unwrap().cancel_discovery() == 0
    }