OSDN Git Service

Remove sending broadcast when StatsLogProcessor is being initialized as
authoryro <yro@google.com>
Thu, 8 Feb 2018 19:12:28 +0000 (11:12 -0800)
committerHoward Ro <yro@google.com>
Mon, 12 Feb 2018 22:20:39 +0000 (22:20 +0000)
its clients have not started to receive broadcasts

This also fixes broken statsd_test's which happens whenever there are
files in /data/misc/stats-data/ which is generated right before reboots.
This would delay the upload time from right after reboot to next upload
cycle but it should not be an issue.

Bug: 73089712
Test: statsd_test
Change-Id: Ida81099c9c9e54804a0c3b3b349096312ef570bc

cmds/statsd/src/StatsLogProcessor.cpp

index 4fac5aa..3a20b12 100644 (file)
@@ -72,9 +72,6 @@ StatsLogProcessor::StatsLogProcessor(const sp<UidMap>& uidMap,
       mAnomalyMonitor(anomalyMonitor),
       mSendBroadcast(sendBroadcast),
       mTimeBaseSec(timeBaseSec) {
-    // On each initialization of StatsLogProcessor, check stats-data directory to see if there is
-    // any left over data to be read.
-    StorageManager::sendBroadcast(STATS_DATA_DIR, mSendBroadcast);
     StatsPullerManager statsPullerManager;
     statsPullerManager.SetTimeBaseSec(mTimeBaseSec);
 }