Merge "Don't scroll when removing saved networks." into oc-dr1-dev
am: 1e561edb45
Change-Id: I9fa78596bdcbaeac90aaee55ddcde3f698ad907f
This commit is contained in:
@@ -43,7 +43,6 @@ import android.provider.Settings;
|
||||
import android.support.annotation.VisibleForTesting;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.support.v7.preference.PreferenceCategory;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
@@ -735,7 +734,7 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
AccessPoint accessPoint = accessPoints.get(index);
|
||||
// Ignore access points that are out of range.
|
||||
if (accessPoint.isReachable()) {
|
||||
String key = generateKey(accessPoint);
|
||||
String key = AccessPointPreference.generatePreferenceKey(accessPoint);
|
||||
hasAvailableAccessPoints = true;
|
||||
LongPressAccessPointPreference pref =
|
||||
(LongPressAccessPointPreference) getCachedPreference(key);
|
||||
@@ -777,18 +776,6 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
}
|
||||
}
|
||||
|
||||
private String generateKey(AccessPoint accessPoint) {
|
||||
StringBuilder key = new StringBuilder();
|
||||
String bssid = accessPoint.getBssid();
|
||||
if (TextUtils.isEmpty(bssid)) {
|
||||
key.append(accessPoint.getSsidStr());
|
||||
} else {
|
||||
key.append(bssid);
|
||||
}
|
||||
key.append(',').append(accessPoint.getSecurity());
|
||||
return key.toString();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private LongPressAccessPointPreference createLongPressActionPointPreference(
|
||||
AccessPoint accessPoint) {
|
||||
|
Reference in New Issue
Block a user