From 33c6e6537163a299d867354451eeddf4bc474f57 Mon Sep 17 00:00:00 2001 From: Arc Wang Date: Fri, 17 Jan 2020 17:12:05 +0800 Subject: [PATCH] [Wi-Fi] Replace WifiEntryShell#getSecurityString with WifiEntry#getSecurityString Bug: 143326832 Bug: 146407136 Bug: 147781156 Test: manual Check if security information correct Change-Id: I32c247763783a38fed14eb06de863d9819cd6bdd --- src/com/android/settings/wifi/WifiConfigController2.java | 2 +- src/com/android/settings/wifi/WifiEntryShell.java | 7 ------- .../wifi/details2/WifiDetailPreferenceController2.java | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/com/android/settings/wifi/WifiConfigController2.java b/src/com/android/settings/wifi/WifiConfigController2.java index ecf20fd5039..6a780838c84 100644 --- a/src/com/android/settings/wifi/WifiConfigController2.java +++ b/src/com/android/settings/wifi/WifiConfigController2.java @@ -411,7 +411,7 @@ public class WifiConfigController2 implements TextWatcher, } addRow(group, R.string.wifi_security, - WifiEntryShell.getSecurityString(mWifiEntry, false)); + mWifiEntry.getSecurityString(false /* concise */)); mView.findViewById(R.id.ip_fields).setVisibility(View.GONE); } if (mWifiEntry.isSaved() diff --git a/src/com/android/settings/wifi/WifiEntryShell.java b/src/com/android/settings/wifi/WifiEntryShell.java index 2af0d7b0c37..7c6fc480ba6 100644 --- a/src/com/android/settings/wifi/WifiEntryShell.java +++ b/src/com/android/settings/wifi/WifiEntryShell.java @@ -48,13 +48,6 @@ public class WifiEntryShell { */ public static final int HIGHER_FREQ_5GHZ = 5900; - /** - * Mapping of the corresponding {@link AccessPoint} method - */ - public static String getSecurityString(WifiEntry wifiEntry, boolean concise) { - return "None"; - } - // Passpoint methods /** diff --git a/src/com/android/settings/wifi/details2/WifiDetailPreferenceController2.java b/src/com/android/settings/wifi/details2/WifiDetailPreferenceController2.java index 51932130aab..b5813cff3e9 100644 --- a/src/com/android/settings/wifi/details2/WifiDetailPreferenceController2.java +++ b/src/com/android/settings/wifi/details2/WifiDetailPreferenceController2.java @@ -330,7 +330,7 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle mIpv6Category = screen.findPreference(KEY_IPV6_CATEGORY); mIpv6AddressPref = screen.findPreference(KEY_IPV6_ADDRESSES_PREF); - mSecurityPref.setSummary(WifiEntryShell.getSecurityString(mWifiEntry, /* concise */ false)); + mSecurityPref.setSummary(mWifiEntry.getSecurityString(false /* concise */)); } private void setupEntityHeader(PreferenceScreen screen) {