From fac6568cbb329e06b22bfe07993acb263f3762ab Mon Sep 17 00:00:00 2001 From: Michael Plass Date: Wed, 9 Aug 2017 14:13:48 -0700 Subject: Wifi connection hysteresis Making an automatic connection should not happen unless the RSSI is a little bit above the level at which a connection is considered to be "bad", to avoid flapping back and forth between wifi and cell. Bug: 64422319 Test: Unit tests, manual Change-Id: I9a148f2d66ea835d19696eb6317b682f6756f002 --- .../java/com/android/server/wifi/WifiConnectivityManager.java | 4 ++-- service/java/com/android/server/wifi/WifiNetworkSelector.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'service') diff --git a/service/java/com/android/server/wifi/WifiConnectivityManager.java b/service/java/com/android/server/wifi/WifiConnectivityManager.java index 47c77e203..de63b251a 100644 --- a/service/java/com/android/server/wifi/WifiConnectivityManager.java +++ b/service/java/com/android/server/wifi/WifiConnectivityManager.java @@ -559,9 +559,9 @@ public class WifiConnectivityManager { mConnectionAttemptTimeStamps = new LinkedList<>(); mMin5GHzRssi = context.getResources().getInteger( - R.integer.config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz); + R.integer.config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz); mMin24GHzRssi = context.getResources().getInteger( - R.integer.config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz); + R.integer.config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz); mBand5GHzBonus = context.getResources().getInteger( R.integer.config_wifi_framework_5GHz_preference_boost_factor); mCurrentConnectionBonus = context.getResources().getInteger( diff --git a/service/java/com/android/server/wifi/WifiNetworkSelector.java b/service/java/com/android/server/wifi/WifiNetworkSelector.java index 57779ad08..8fdf080cc 100644 --- a/service/java/com/android/server/wifi/WifiNetworkSelector.java +++ b/service/java/com/android/server/wifi/WifiNetworkSelector.java @@ -570,15 +570,15 @@ public class WifiNetworkSelector { mLocalLog = localLog; mThresholdQualifiedRssi24 = context.getResources().getInteger( - R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_24GHz); + R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_24GHz); mThresholdQualifiedRssi5 = context.getResources().getInteger( - R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_5GHz); + R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_5GHz); mThresholdMinimumRssi24 = context.getResources().getInteger( - R.integer.config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz); + R.integer.config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz); mThresholdMinimumRssi5 = context.getResources().getInteger( - R.integer.config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz); + R.integer.config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz); mEnableAutoJoinWhenAssociated = context.getResources().getBoolean( - R.bool.config_wifi_framework_enable_associated_network_selection); + R.bool.config_wifi_framework_enable_associated_network_selection); mStayOnNetworkMinimumTxRate = context.getResources().getInteger( R.integer.config_wifi_framework_min_tx_rate_for_staying_on_network); mStayOnNetworkMinimumRxRate = context.getResources().getInteger( -- cgit v1.2.3