summaryrefslogtreecommitdiff
path: root/cmds/statsd/src/storage/StorageManager.cpp
diff options
context:
space:
mode:
authorDivya Sharma <divyash@codeaurora.org>2018-02-27 08:32:05 -0800
committerDivya Sharma <divyash@codeaurora.org>2018-02-27 08:32:05 -0800
commit4e4914b22b779e6376bb00ae20636175b2a70d8c (patch)
treef4ebc5eae2c99e20aceefcc9ffc3de19782f0fbe /cmds/statsd/src/storage/StorageManager.cpp
parentdbed40a3cd31af821ea99c605664908d67df2747 (diff)
parented5d4d06907844e1c87a6ee17c4f2868a8cc6d56 (diff)
PPR1.180219.001_AOSP_Merge
Conflicts: core/res/res/values/config.xml core/res/res/values/symbols.xml packages/SystemUI/res/values/config.xml packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java telecomm/java/android/telecom/Call.java telecomm/java/android/telecom/Connection.java telecomm/java/android/telecom/ConnectionService.java Change-Id: I524d38a61608069028b3496a189118d8eff75f4b
Diffstat (limited to 'cmds/statsd/src/storage/StorageManager.cpp')
-rw-r--r--cmds/statsd/src/storage/StorageManager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmds/statsd/src/storage/StorageManager.cpp b/cmds/statsd/src/storage/StorageManager.cpp
index 00d86582951f..6a1db72b3911 100644
--- a/cmds/statsd/src/storage/StorageManager.cpp
+++ b/cmds/statsd/src/storage/StorageManager.cpp
@@ -14,12 +14,13 @@
* limitations under the License.
*/
-#define DEBUG true // STOPSHIP if true
+#define DEBUG false // STOPSHIP if true
#include "Log.h"
#include "android-base/stringprintf.h"
#include "guardrail/StatsdStats.h"
#include "storage/StorageManager.h"
+#include "stats_log_util.h"
#include <android-base/file.h>
#include <dirent.h>
@@ -252,7 +253,7 @@ void StorageManager::trimToFit(const char* path) {
string file_name = getFilePath(path, timestamp, uid, configID);
// Check for timestamp and delete if it's too old.
- long fileAge = time(nullptr) - timestamp;
+ long fileAge = getWallClockSec() - timestamp;
if (fileAge > StatsdStats::kMaxAgeSecond) {
deleteFile(file_name.c_str());
}