[FUI27] Fix internal naming of notifyNetworkStatus
Test: TH Bug: 174123988 Change-Id: I970ee365ca221956ee85788005d331374b5fa71a
This commit is contained in:
@@ -306,7 +306,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// verify service has empty history for wifi
|
||||
@@ -349,7 +349,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// verify service has empty history for wifi
|
||||
@@ -423,7 +423,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// modify some number on wifi, and trigger poll event
|
||||
@@ -464,7 +464,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// create some traffic on first network
|
||||
@@ -499,7 +499,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
.insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 512L, 4L, 512L, 4L, 0L)
|
||||
.insertEntry(TEST_IFACE, UID_BLUE, SET_DEFAULT, TAG_NONE, 512L, 4L, 0L, 0L, 0L));
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
forcePollAndWaitForIdle();
|
||||
|
||||
@@ -539,7 +539,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// create some traffic
|
||||
@@ -607,7 +607,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
setMobileRatTypeAndWaitForIdle(TelephonyManager.NETWORK_TYPE_UMTS);
|
||||
mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// Create some traffic.
|
||||
@@ -699,7 +699,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
new int[]{NetworkCapabilities.NET_CAPABILITY_OEM_PAID})};
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// Create some traffic.
|
||||
@@ -714,7 +714,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
new int[]{NetworkCapabilities.NET_CAPABILITY_OEM_PRIVATE})};
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// Create some traffic.
|
||||
@@ -730,7 +730,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
NetworkCapabilities.NET_CAPABILITY_OEM_PAID})};
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// Create some traffic.
|
||||
@@ -744,7 +744,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
states = new NetworkStateSnapshot[]{buildOemManagedMobileState(IMSI_1, false, new int[]{})};
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// Create some traffic.
|
||||
@@ -797,7 +797,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// create some traffic for two apps
|
||||
@@ -856,7 +856,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
NetworkStats.Entry entry1 = new NetworkStats.Entry(
|
||||
@@ -900,7 +900,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
NetworkStats.Entry uidStats = new NetworkStats.Entry(
|
||||
@@ -931,7 +931,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
|
||||
// mStatsFactory#readNetworkStatsDetail() has the following invocations:
|
||||
// 1) NetworkStatsService#systemReady from #setUp.
|
||||
// 2) mService#forceUpdateIfaces in the test above.
|
||||
// 2) mService#notifyNetworkStatus in the test above.
|
||||
//
|
||||
// Additionally, we should have one call from the above call to mService#getDetailedUidStats
|
||||
// with the augmented ifaceFilter.
|
||||
@@ -955,7 +955,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// create some initial traffic
|
||||
@@ -1013,7 +1013,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// create some initial traffic
|
||||
@@ -1053,7 +1053,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// Create some traffic
|
||||
@@ -1092,7 +1092,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// create some tethering traffic
|
||||
@@ -1149,7 +1149,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectNetworkStatsSummary(buildEmptyStats());
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// verify service has empty history for wifi
|
||||
@@ -1255,7 +1255,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
mService.registerNetworkStatsProvider("TEST", provider);
|
||||
assertNotNull(cb);
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// Verifies that one requestStatsUpdate will be called during iface update.
|
||||
@@ -1320,7 +1320,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
mService.registerNetworkStatsProvider("TEST", provider);
|
||||
assertNotNull(cb);
|
||||
|
||||
mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// Verifies that one requestStatsUpdate will be called during iface update.
|
||||
@@ -1378,7 +1378,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
expectDefaultSettings();
|
||||
NetworkStateSnapshot[] states =
|
||||
new NetworkStateSnapshot[]{buildWifiState(true /* isMetered */, TEST_IFACE)};
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// Register custom provider and retrieve callback.
|
||||
@@ -1428,7 +1428,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
|
||||
// 3G network comes online.
|
||||
setMobileRatTypeAndWaitForIdle(TelephonyManager.NETWORK_TYPE_UMTS);
|
||||
mService.forceUpdateIfaces(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_MOBILE, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// Create some traffic.
|
||||
@@ -1450,7 +1450,8 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
setCombineSubtypeEnabled(true);
|
||||
|
||||
// Call handleOnCollapsedRatTypeChanged manually to simulate the callback fired
|
||||
// when stopping monitor, this is needed by NetworkStatsService to trigger updateIfaces.
|
||||
// when stopping monitor, this is needed by NetworkStatsService to trigger
|
||||
// handleNotifyNetworkStatus.
|
||||
mService.handleOnCollapsedRatTypeChanged();
|
||||
HandlerUtils.waitForIdle(mHandlerThread, WAIT_TIMEOUT);
|
||||
// Create some traffic.
|
||||
@@ -1499,7 +1500,7 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
|
||||
NetworkStateSnapshot[] states = new NetworkStateSnapshot[]{
|
||||
buildWifiState(true /*isMetered*/, TEST_IFACE2), buildMobile3gState(IMSI_1)};
|
||||
expectNetworkStatsUidDetail(buildEmptyStats());
|
||||
mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
mService.notifyNetworkStatus(NETWORKS_WIFI, states, getActiveIface(states),
|
||||
new UnderlyingNetworkInfo[0]);
|
||||
|
||||
// Create some traffic on mobile network.
|
||||
|
||||
Reference in New Issue
Block a user