[Wi-Fi] Remove passpoint methods in WifiEntryShell

Bug: 143326832
Test: build
Change-Id: I9d21909f18df03d50f69447c3f2014b75ecd2d8b
This commit is contained in:
Arc Wang
2020-01-30 14:46:14 +08:00
parent 4ee5d1819b
commit f591fe0901
2 changed files with 2 additions and 41 deletions

View File

@@ -23,7 +23,6 @@ import com.android.wifitrackerlib.WifiEntry;
* all the unavalable {@link AccessPoint} methods & constants.
*
* TODO(b/143326832): Replace all methods & constants with WifiEntry version when it's available.
* TODO(b/143326832): How about AccessPoint#getSettingsSummary(boolean convertSavedAsDisconnected)?
*/
public class WifiEntryShell {
public WifiEntryShell(){};
@@ -47,41 +46,4 @@ public class WifiEntryShell {
* Upper bound on the 5.0 GHz (802.11a/h/j/n/ac) WLAN channels
*/
public static final int HIGHER_FREQ_5GHZ = 5900;
// Passpoint methods
/**
* Mapping of the corresponding {@link AccessPoint} method
*/
public static boolean isExpired(WifiEntry wifiEntry) {
return false;
}
/**
* Mapping of the corresponding {@link AccessPoint} method
*/
public static boolean isPasspointConfigurationR1(WifiEntry wifiEntry) {
return false;
}
/**
* Mapping of the corresponding {@link AccessPoint} method
*/
public static boolean isPasspointConfigurationOsuProvisioned(WifiEntry wifiEntry) {
return false;
}
/**
* Mapping of the corresponding {@link AccessPoint} method
*/
public static boolean isOsuProvider(WifiEntry wifiEntry) {
return false;
}
/**
* Mapping of the corresponding {@link AccessPoint} method
*/
public static String getPasspointFqdn(WifiEntry wifiEntry) {
return "Fake passpoint FQDN";
}
}

View File

@@ -537,7 +537,7 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle
}
private void refreshSsid() {
if (mWifiEntry.isSubscription() || WifiEntryShell.isOsuProvider(mWifiEntry)) {
if (mWifiEntry.isSubscription()) {
mSsidPref.setVisible(true);
mSsidPref.setSummary(mWifiEntry.getTitle());
} else {
@@ -743,8 +743,7 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle
try {
mWifiEntry.forget(this);
} catch (RuntimeException e) {
Log.e(TAG, "Failed to remove Passpoint configuration for "
+ WifiEntryShell.getPasspointFqdn(mWifiEntry));
Log.e(TAG, "Failed to remove Passpoint configuration: " + e);
}
mMetricsFeatureProvider.action(
mFragment.getActivity(), SettingsEnums.ACTION_WIFI_FORGET);