Merge "Revert consider TEMPORARILY_NOT_METERED as unmetered in data usage"

This commit is contained in:
Treehugger Robot
2022-12-02 11:27:27 +00:00
committed by Gerrit Code Review
5 changed files with 11 additions and 17 deletions

View File

@@ -7336,10 +7336,11 @@ public class ConnectivityServiceTest {
expectNotifyNetworkStatus(onlyCell(), onlyCell(), MOBILE_IFNAME);
reset(mStatsManager);
// Temp metered change should update ifaces
// Temp metered change shouldn't update ifaces
mCellNetworkAgent.addCapability(NET_CAPABILITY_TEMPORARILY_NOT_METERED);
waitForIdle();
expectNotifyNetworkStatus(onlyCell(), onlyCell(), MOBILE_IFNAME);
verify(mStatsManager, never()).notifyNetworkStatus(eq(onlyCell()),
any(List.class), eq(MOBILE_IFNAME), any(List.class));
reset(mStatsManager);
// Congested change shouldn't update ifaces

View File

@@ -995,8 +995,8 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest {
forcePollAndWaitForIdle();
// Verify service recorded history.
assertUidTotal(templateMetered5g, UID_RED, 128L, 2L, 128L, 2L, 0);
assertUidTotal(templateNonMetered5g, UID_RED, 256, 3L, 128L, 5L, 0);
assertUidTotal(templateMetered5g, UID_RED, 384L, 5L, 256L, 7L, 0);
assertUidTotal(templateNonMetered5g, UID_RED, 0L, 0L, 0L, 0L, 0);
}
@Test