[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
This commit is contained in:
junyulai
2020-03-16 13:27:28 +08:00
committed by Junyu Lai
parent 02a6340ca0
commit 544bc807a4

View File

@@ -721,7 +721,7 @@ public final class NetworkStats implements Parcelable {
* @param entry the {@link Entry} to add. * @param entry the {@link Entry} to add.
* @return a new constructed {@link NetworkStats} object that contains the result. * @return a new constructed {@link NetworkStats} object that contains the result.
*/ */
public @NonNull NetworkStats addValues(@NonNull Entry entry) { public @NonNull NetworkStats addEntry(@NonNull Entry entry) {
return this.clone().combineValues(entry); return this.clone().combineValues(entry);
} }