Log when large dropbox entries are dropped.

Test: manual
Bug: 215516219
Change-Id: I83396fd80bde04f033041067c66010630060506d
This commit is contained in:
Siim Sammul
2022-08-12 11:42:09 +01:00
parent 715c51f98e
commit f1c79e013b

View File

@@ -479,6 +479,10 @@ public final class DropBoxManagerService extends SystemService {
if (length > max) {
// Log and fall through to create empty tombstone below
Slog.w(TAG, "Dropping: " + tag + " (" + length + " > " + max + " bytes)");
logDropboxDropped(
FrameworkStatsLog.DROPBOX_ENTRY_DROPPED__DROP_REASON__ENTRY_TOO_LARGE,
tag,
0);
} else {
temp = new File(mDropBoxDir, "drop" + Thread.currentThread().getId() + ".tmp");
try (FileOutputStream out = new FileOutputStream(temp)) {