From 8dd5ea04d6ad831458df38e2a05c53f71272bb82 Mon Sep 17 00:00:00 2001 From: junyulai Date: Mon, 16 Mar 2020 13:27:28 +0800 Subject: [PATCH] [SP25] Rename functions that add Entry conditionally Currently, in NetworkStats, there are many methods to manipulate the records. However, some methods are similar and ambiguous, such as addEntry, addValues, setValues, addIfaceValues, combineValues and combineAllValues. Thus, properly grouping and renaming methods are necessary. In this change, for methods that add one record conditionally, name them addEntry. addValues -> addEntry Test: atest FrameworksNetTests ImsPhoneCallTrackerTest TetheringTests Fix: 148895143 Change-Id: I9495a198cf247e6c79100f7ac1edcea370b071de --- .../java/com/android/server/net/NetworkStatsServiceTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java b/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java index 6be50c6560..b346c92391 100644 --- a/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java +++ b/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java @@ -1034,10 +1034,10 @@ public class NetworkStatsServiceTest extends NetworkStatsBaseTest { // Create some initial traffic and report to the service. incrementCurrentTime(HOUR_IN_MILLIS); final NetworkStats expectedStats = new NetworkStats(0L, 1) - .addValues(new NetworkStats.Entry(TEST_IFACE, UID_RED, SET_DEFAULT, + .addEntry(new NetworkStats.Entry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_YES, 128L, 2L, 128L, 2L, 1L)) - .addValues(new NetworkStats.Entry(TEST_IFACE, UID_RED, SET_DEFAULT, + .addEntry(new NetworkStats.Entry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, METERED_YES, ROAMING_NO, DEFAULT_NETWORK_YES, 64L, 1L, 64L, 1L, 1L)); cb.notifyStatsUpdated(0 /* unused */, expectedStats, expectedStats);