[Wi-Fi] Replace some WifiEntryShell methods with WifiEntry version

These WifiEntryShell methods are removed:

getNetworkId
hiddenSSID
isPasspoint

Bug: 143326832
Test: build
Change-Id: I6642992a90ea18328817cb58931cc370045b1e56
This commit is contained in:
Arc Wang
2020-01-02 18:11:32 +08:00
parent 0a13ae9aea
commit 08b4204643
4 changed files with 12 additions and 75 deletions

View File

@@ -536,7 +536,7 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle
}
private void refreshSsid() {
if (WifiEntryShell.isPasspoint(mWifiEntry) || WifiEntryShell.isOsuProvider(mWifiEntry)) {
if (mWifiEntry.isSubscription() || WifiEntryShell.isOsuProvider(mWifiEntry)) {
mSsidPref.setVisible(true);
mSsidPref.setSummary(mWifiEntry.getTitle());
} else {
@@ -701,7 +701,7 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle
* Forgets the wifi network associated with this preference.
*/
private void forgetNetwork() {
if (WifiEntryShell.isPasspoint(mWifiEntry)) {
if (mWifiEntry.isSubscription()) {
// Post a dialog to confirm if user really want to forget the passpoint network.
showConfirmForgetDialog();
return;
@@ -825,7 +825,7 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle
// For saved Passpoint network, framework doesn't have the field to keep the MAC choice
// persistently, so Passpoint network will always use the default value so far, which is
// randomized MAC address, so don't need to modify title.
if (WifiEntryShell.isPasspoint(mWifiEntry)) {
if (mWifiEntry.isSubscription()) {
return;
}