[Wi-Fi] Use new defined proto field for adding new networks panel page.
Use new metric, PANEL_ADD_WIFI_NETWORKS, for proto upload log use. For R feature: Add a mechanism for apps to add saved networks to the device, need to apply new metrics category. Bug: 144891278 Test: Add following test case for testing metric: getMetricsCategory_shouldReturnPanelAddWifiNetworks() Change-Id: I7cde8057c5f2b01c951b1de4203ab1c1a2f0f40a
This commit is contained in:
@@ -21,6 +21,7 @@ import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
import static org.mockito.Mockito.spy;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.net.wifi.WifiConfiguration;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
@@ -139,6 +140,12 @@ public class AddAppNetworksFragmentTest {
|
||||
0).mWifiConfiguration.SSID).isEqualTo(FAKE_NEW_OPEN_SSID);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getMetricsCategory_shouldReturnPanelAddWifiNetworks() {
|
||||
assertThat(mAddAppNetworksFragment.getMetricsCategory()).isEqualTo(
|
||||
SettingsEnums.PANEL_ADD_WIFI_NETWORKS);
|
||||
}
|
||||
|
||||
private void addOneSavedNetworkConfig(@NonNull WifiConfiguration wifiConfiguration) {
|
||||
if (mFakeSavedNetworksList == null) {
|
||||
mFakeSavedNetworksList = new ArrayList<>();
|
||||
@@ -180,5 +187,4 @@ public class AddAppNetworksFragmentTest {
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user