Update language to comply with Android's inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code
for reference.

Bug: 161896447
Test: m
Change-Id: I6c3c03c0c2d1302af6d5245486823c13a3432900
This commit is contained in:
Chiachang Wang
2020-07-28 13:53:09 +08:00
parent 491d1837e9
commit 06defe000d
2 changed files with 3 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ public class NetworkStatsFactory {
private static final String TAG = "NetworkStatsFactory"; private static final String TAG = "NetworkStatsFactory";
private static final boolean USE_NATIVE_PARSING = true; private static final boolean USE_NATIVE_PARSING = true;
private static final boolean SANITY_CHECK_NATIVE = false; private static final boolean VALIDATE_NATIVE_STATS = false;
/** Path to {@code /proc/net/xt_qtaguid/iface_stat_all}. */ /** Path to {@code /proc/net/xt_qtaguid/iface_stat_all}. */
private final File mStatsXtIfaceAll; private final File mStatsXtIfaceAll;
@@ -347,7 +347,7 @@ public class NetworkStatsFactory {
INTERFACES_ALL, TAG_ALL, mUseBpfStats) != 0) { INTERFACES_ALL, TAG_ALL, mUseBpfStats) != 0) {
throw new IOException("Failed to parse network stats"); throw new IOException("Failed to parse network stats");
} }
if (SANITY_CHECK_NATIVE) { if (VALIDATE_NATIVE_STATS) {
final NetworkStats javaStats = javaReadNetworkStatsDetail(mStatsXtUid, final NetworkStats javaStats = javaReadNetworkStatsDetail(mStatsXtUid,
UID_ALL, INTERFACES_ALL, TAG_ALL); UID_ALL, INTERFACES_ALL, TAG_ALL);
assertEquals(javaStats, stats); assertEquals(javaStats, stats);

View File

@@ -227,7 +227,7 @@ public class NetworkStatsRecorder {
for (int i = 0; i < delta.size(); i++) { for (int i = 0; i < delta.size(); i++) {
entry = delta.getValues(i, entry); entry = delta.getValues(i, entry);
// As a last-ditch sanity check, report any negative values and // As a last-ditch check, report any negative values and
// clamp them so recording below doesn't croak. // clamp them so recording below doesn't croak.
if (entry.isNegative()) { if (entry.isNegative()) {
if (mObserver != null) { if (mObserver != null) {