Revert "wifi: Scan for networks every time the supplicant state changes" #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reverts commit a8fbd07. The commit acts as described, performing a full WiFi scan every time there is a SupplicantStartedState change. Unfortunately, one of those state changes is "just finished a scan", so it loops performing active scans forever. The beginning of each active scan can be seen immediately in "logcat", it happens every five seconds.
The continuous scanning will make EON chew through battery much faster than it needs to, and I think it may be impairing WiFi throughput. When the WiFi adapter is asked to scan for networks, those can be on other channels and bands, and it has to multitask by briefly pausing normal transmit/receive activity when it goes off-channel. I tried to perform a comparative throughput test, but I would have to backrev NEOS to earlier than v8 and my EON doesn't seem to want to go there.
The stated purpose of a8fbd07 is to make EON connect to local WiFi faster after booting up. If that's still a problem, deep in the Android framework is not the correct place to fix it. As an example, we could give it a one-time startup nudge from something application-level, perhaps in manager.py.