[Wi-Fi] Apply WifiTrackerLib objects in wifi/dpp/WifiNetworkListFragment

Bug: 152571756
Bug: 145100890
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiNetworkListFragmentTest
Change-Id: I2136b452da4a3008f493c46c8ed14b311cfc9fdd
This commit is contained in:
Arc Wang
2020-05-07 10:41:54 +08:00
parent 757982509e
commit e46081819d
6 changed files with 256 additions and 375 deletions

View File

@@ -88,9 +88,6 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
*/
private int[] mWifiDppRemoteBandSupport;
/** Secret extra that allows fake networks to show in UI for testing purposes */
private boolean mIsTest;
@Override
public int getMetricsCategory() {
return SettingsEnums.SETTINGS_WIFI_DPP_CONFIGURATOR;
@@ -149,7 +146,6 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
case Settings.ACTION_PROCESS_WIFI_EASY_CONNECT_URI:
final Uri uri = intent.getData();
final String uriString = (uri == null) ? null : uri.toString();
mIsTest = intent.getBooleanExtra(WifiDppUtils.EXTRA_TEST, false);
mWifiDppQrCode = WifiQrCode.getValidWifiDppQrCodeOrNull(uriString);
mWifiDppRemoteBandSupport = intent.getIntArrayExtra(
Settings.EXTRA_EASY_CONNECT_BAND_LIST); // returns null if none
@@ -239,11 +235,6 @@ public class WifiDppConfiguratorActivity extends WifiDppBaseActivity implements
if (fragment == null) {
fragment = new WifiDppChooseSavedWifiNetworkFragment();
if (mIsTest) {
Bundle bundle = new Bundle();
bundle.putBoolean(WifiDppUtils.EXTRA_TEST, true);
fragment.setArguments(bundle);
}
} else {
if (fragment.isVisible()) {
return;