Merge "BootReceiver: Added an event log after the dropbox file copy is successful."
am: 5323d42b82
Change-Id: Iaf53e8a99b61d68c3b920b76c78e9208845c56f3
This commit is contained in:
@@ -530,6 +530,7 @@ java_library {
|
||||
"core/java/android/net/EventLogTags.logtags",
|
||||
"core/java/android/webkit/EventLogTags.logtags",
|
||||
"core/java/com/android/internal/logging/EventLogTags.logtags",
|
||||
"core/java/com/android/server/DropboxLogTags.logtags",
|
||||
],
|
||||
|
||||
aidl: {
|
||||
|
||||
@@ -33,6 +33,7 @@ import android.os.storage.StorageManager;
|
||||
import android.provider.Downloads;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AtomicFile;
|
||||
import android.util.EventLog;
|
||||
import android.util.Slog;
|
||||
import android.util.Xml;
|
||||
|
||||
@@ -40,6 +41,7 @@ import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.util.FastXmlSerializer;
|
||||
import com.android.internal.util.XmlUtils;
|
||||
import com.android.server.DropboxLogTags;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -297,6 +299,7 @@ public class BootReceiver extends BroadcastReceiver {
|
||||
Slog.i(TAG, "Copying " + filename + " to DropBox (" + tag + ")");
|
||||
db.addText(tag, headers + FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n") +
|
||||
footers);
|
||||
EventLog.writeEvent(DropboxLogTags.DROPBOX_FILE_COPY, filename, maxSize, tag);
|
||||
}
|
||||
|
||||
private static void addAuditErrorsToDropBox(DropBoxManager db,
|
||||
|
||||
12
core/java/com/android/server/DropboxLogTags.logtags
Normal file
12
core/java/com/android/server/DropboxLogTags.logtags
Normal file
@@ -0,0 +1,12 @@
|
||||
# See system/core/logcat/event.logtags for a description of the format of this file.
|
||||
|
||||
# The java package name happens to be the same as frameworks/base/services/core
|
||||
# /java/com/android/server/EventLogTags.logtags. To avoid conflict, this file's name cannot
|
||||
# be EventLogTags.logtags because it generates a class with the same name.
|
||||
|
||||
option java_package com.android.server;
|
||||
|
||||
# -----------------------------
|
||||
# BootReceiver.java
|
||||
# -----------------------------
|
||||
81002 dropbox_file_copy (FileName|3),(Size|1),(Tag|3)
|
||||
Reference in New Issue
Block a user