wificond: Mark scanner impl instance invalid
The call to ScannerImpl.invalidate() does not reset the |valid_| field
currently. This leads to unexpected behavior when any calls are made
on that instance after invoking invalidate().
Bug: 110378816
Bug: 121327323
Test: Repeatedly toggled wifi state and ensured we connected back.
Change-Id: I8da3e1d9284ec9e27f8a0980a669611369810c34
(cherry picked from commit 7b332f6c5f43d455e948fab6b705b9985b061348)
diff --git a/scanning/scanner_impl.cpp b/scanning/scanner_impl.cpp
index 2c1b1d0..a4db6da 100644
--- a/scanning/scanner_impl.cpp
+++ b/scanning/scanner_impl.cpp
@@ -82,6 +82,7 @@
<< (int)interface_index_;
scan_utils_->UnsubscribeScanResultNotification(interface_index_);
scan_utils_->UnsubscribeSchedScanResultNotification(interface_index_);
+ valid_ = false;
}
bool ScannerImpl::CheckIsValid() {