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

Commit ea4b7a08 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Floss: filter unexpected cancel discovery from UI"

parents 4afb69b0 adbfebfd
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
    }