diff options
author | Amin Shaikh <ashaikh@google.com> | 2017-04-25 19:07:17 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-04-25 19:07:17 +0000 |
commit | 5d8bb242d898fc014011fe19c56b4c039805014e (patch) | |
tree | 3788f3dc60f968e65630c6874055aff33eaaa2fb /service | |
parent | d4965bdcb7c0ac8c443b058ea8eec9f232ea69e5 (diff) | |
parent | 2cf3661d146e2bdd0d761028e91df775c8eabca3 (diff) |
Remove CURATE_SAVED_OPEN_NETWORKS
am: 2cf3661d14
Change-Id: Idf70ebb5792079372d2f03341617730417e5f3bc
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/SavedNetworkEvaluator.java | 33 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiInjector.java | 5 |
2 files changed, 3 insertions, 35 deletions
diff --git a/service/java/com/android/server/wifi/SavedNetworkEvaluator.java b/service/java/com/android/server/wifi/SavedNetworkEvaluator.java index cafe24ae2..7565f7819 100644 --- a/service/java/com/android/server/wifi/SavedNetworkEvaluator.java +++ b/service/java/com/android/server/wifi/SavedNetworkEvaluator.java @@ -17,12 +17,8 @@ package com.android.server.wifi; import android.content.Context; -import android.database.ContentObserver; import android.net.wifi.ScanResult; import android.net.wifi.WifiConfiguration; -import android.os.Handler; -import android.os.Looper; -import android.provider.Settings; import android.util.LocalLog; import android.util.Pair; @@ -51,12 +47,9 @@ public class SavedNetworkEvaluator implements WifiNetworkSelector.NetworkEvaluat private final int mSecurityAward; private final int mThresholdSaturatedRssi24; private final int mThresholdSaturatedRssi5; - private final ContentObserver mContentObserver; - private boolean mCurateSavedOpenNetworks; SavedNetworkEvaluator(final Context context, WifiConfigManager configManager, Clock clock, - LocalLog localLog, Looper looper, final FrameworkFacade frameworkFacade, - WifiConnectivityHelper connectivityHelper) { + LocalLog localLog, WifiConnectivityHelper connectivityHelper) { mWifiConfigManager = configManager; mClock = clock; mLocalLog = localLog; @@ -80,23 +73,6 @@ public class SavedNetworkEvaluator implements WifiNetworkSelector.NetworkEvaluat R.integer.config_wifi_framework_wifi_score_good_rssi_threshold_24GHz); mThresholdSaturatedRssi5 = context.getResources().getInteger( R.integer.config_wifi_framework_wifi_score_good_rssi_threshold_5GHz); - mContentObserver = new ContentObserver(new Handler(looper)) { - @Override - public void onChange(boolean selfChange) { - boolean networkRecommendationsEnabled = frameworkFacade.getIntegerSetting(context, - Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED, 0) == 1; - boolean curateSavedOpenNetworks = frameworkFacade.getIntegerSetting(context, - Settings.Global.CURATE_SAVED_OPEN_NETWORKS, 0) == 1; - mCurateSavedOpenNetworks = networkRecommendationsEnabled && curateSavedOpenNetworks; - } - }; - mContentObserver.onChange(false /* selfChange*/); - frameworkFacade.registerContentObserver(context, - Settings.Global.getUriFor(Settings.Global.CURATE_SAVED_OPEN_NETWORKS), - false /* notifyForDescendents */, mContentObserver); - frameworkFacade.registerContentObserver(context, - Settings.Global.getUriFor(Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED), - false /* notifyForDescendents */, mContentObserver); } private void localLog(String log) { @@ -320,13 +296,6 @@ public class SavedNetworkEvaluator implements WifiNetworkSelector.NetworkEvaluat continue; } - if (mCurateSavedOpenNetworks - && WifiConfigurationUtil.isConfigForOpenNetwork(network)) { - localLog("Network " + WifiNetworkSelector.toNetworkString(network) - + " is open and CURATE_SAVED_OPEN_NETWORKS is enabled."); - continue; - } - if (score > highestScoreOfScanResult) { highestScoreOfScanResult = score; candidateIdOfScanResult = network.networkId; diff --git a/service/java/com/android/server/wifi/WifiInjector.java b/service/java/com/android/server/wifi/WifiInjector.java index a977a4693..799f9d5a0 100644 --- a/service/java/com/android/server/wifi/WifiInjector.java +++ b/service/java/com/android/server/wifi/WifiInjector.java @@ -198,9 +198,8 @@ public class WifiInjector { mConnectivityLocalLog = new LocalLog(ActivityManager.isLowRamDeviceStatic() ? 256 : 512); mWifiNetworkSelector = new WifiNetworkSelector(mContext, mWifiConfigManager, mClock, mConnectivityLocalLog); - mSavedNetworkEvaluator = new SavedNetworkEvaluator(mContext, - mWifiConfigManager, mClock, mConnectivityLocalLog, wifiStateMachineLooper, - mFrameworkFacade, mWifiConnectivityHelper); + mSavedNetworkEvaluator = new SavedNetworkEvaluator(mContext, mWifiConfigManager, mClock, + mConnectivityLocalLog, mWifiConnectivityHelper); mRecommendedNetworkEvaluator = new RecommendedNetworkEvaluator(context, context.getContentResolver(), wifiStateMachineLooper, mFrameworkFacade, mNetworkScoreManager, mWifiConfigManager, mConnectivityLocalLog); |