Increase fallbacks counter when comparison result is different
In current code, the fallbacks counter does not increase
when comparison result is different. This will not impact
how we print log.wtf but will impact the dry run process
for debugging in next every later boots.
Ignore-AOSP-First: Parent CLs are not in aosp yet
Test: 1. NetworkStatsServiceTest
2. manual test with script
Bug: 233752318
Change-Id: Ib152cec2ee0f21d59ccfe4669b31f26b3db71a97
diff --git a/service-t/src/com/android/server/net/NetworkStatsService.java b/service-t/src/com/android/server/net/NetworkStatsService.java
index b37f93d..cb479dd 100644
--- a/service-t/src/com/android/server/net/NetworkStatsService.java
+++ b/service-t/src/com/android/server/net/NetworkStatsService.java
@@ -1145,10 +1145,12 @@
if (error != null) {
Log.wtf(TAG, "Unexpected comparison result for recorder "
+ legacyRecorder.getCookie() + ": " + error);
+ return false;
}
} catch (Throwable e) {
Log.wtf(TAG, "Failed to compare migrated stats with legacy stats for recorder "
+ legacyRecorder.getCookie(), e);
+ return false;
}
return true;
}