Merge "Ensure dropbox could copy tombstone files to special folder."
This commit is contained in:
@@ -254,13 +254,13 @@ public class BootReceiver extends BroadcastReceiver {
|
|||||||
|
|
||||||
// Start watching for new tombstone files; will record them as they occur.
|
// Start watching for new tombstone files; will record them as they occur.
|
||||||
// This gets registered with the singleton file observer thread.
|
// This gets registered with the singleton file observer thread.
|
||||||
sTombstoneObserver = new FileObserver(TOMBSTONE_DIR.getPath(), FileObserver.CLOSE_WRITE) {
|
sTombstoneObserver = new FileObserver(TOMBSTONE_DIR.getPath(), FileObserver.CREATE) {
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(int event, String path) {
|
public void onEvent(int event, String path) {
|
||||||
HashMap<String, Long> timestamps = readTimestamps();
|
HashMap<String, Long> timestamps = readTimestamps();
|
||||||
try {
|
try {
|
||||||
File file = new File(TOMBSTONE_DIR, path);
|
File file = new File(TOMBSTONE_DIR, path);
|
||||||
if (file.isFile()) {
|
if (file.isFile() && file.getName().startsWith("tombstone_")) {
|
||||||
addFileToDropBox(db, timestamps, headers, file.getPath(), LOG_SIZE,
|
addFileToDropBox(db, timestamps, headers, file.getPath(), LOG_SIZE,
|
||||||
"SYSTEM_TOMBSTONE");
|
"SYSTEM_TOMBSTONE");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user