Do not allow default network to be switched from WiFi to Cellular when RSSI is high

Under the two conditions:
When external scorer takes action;
The overlay to enable time hysteresis (config_wifiMinConfirmationDurationSendNetworkScoreEnabled) is enabled,
on top of the minimum confirmation duration added for sending low score to Connectivity Service, add a check on RSSI: If RSSI is higher than or equal to a configurable threshold (default -67dBm), then donot send any low score to Connectivity Service. This guarantees that default network will not be switched from WiFi to Cellular when RSSI is high (user is seeing three or four bars on WiFi icon).

The reason for adding RSSI check is that users are trained to look at high RSSI (e.g., three bars) as indication of good WiFi. This will certainly reduce any false alarms (especially for some IOT APs).

Bug: 167643965

Test: atest com.android.server.wifi

Signed-off-by: Mingguang Xu <mingguangxu@google.com>
Change-Id: I31f1802a569603bbf4c50df2fbd73d71935e0f9d
4 files changed