Skip to content
Snippets Groups Projects
Commit a14cb037 authored by Josh Gao's avatar Josh Gao Committed by Automerger Merge Worker
Browse files

Merge "Add proto tombstones to Dropbox." am: 3361ca6c am: 093e8d26 am:...

Merge "Add proto tombstones to Dropbox." am: 3361ca6c am: 093e8d26 am: a1b73317 am: c78b8d8d

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1590892

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I97c11ec415ea6e8d1cb1b7f2be0ce4bfcaa951ca
parents d4dcaeba c78b8d8d
No related branches found
No related tags found
No related merge requests found
...@@ -74,6 +74,7 @@ public class BootReceiver extends BroadcastReceiver { ...@@ -74,6 +74,7 @@ public class BootReceiver extends BroadcastReceiver {
private static final int GMSCORE_LASTK_LOG_SIZE = 196608; private static final int GMSCORE_LASTK_LOG_SIZE = 196608;
private static final String TAG_TOMBSTONE = "SYSTEM_TOMBSTONE"; private static final String TAG_TOMBSTONE = "SYSTEM_TOMBSTONE";
private static final String TAG_TOMBSTONE_PROTO = "SYSTEM_TOMBSTONE_PROTO";
// The pre-froyo package and class of the system updater, which // The pre-froyo package and class of the system updater, which
// ran in the system process. We need to remove its packages here // ran in the system process. We need to remove its packages here
...@@ -251,14 +252,14 @@ public class BootReceiver extends BroadcastReceiver { ...@@ -251,14 +252,14 @@ public class BootReceiver extends BroadcastReceiver {
* @param ctx Context * @param ctx Context
* @param tombstone path to the tombstone * @param tombstone path to the tombstone
*/ */
public static void addTombstoneToDropBox(Context ctx, File tombstone) { public static void addTombstoneToDropBox(Context ctx, File tombstone, boolean proto) {
final DropBoxManager db = ctx.getSystemService(DropBoxManager.class); final DropBoxManager db = ctx.getSystemService(DropBoxManager.class);
final String bootReason = SystemProperties.get("ro.boot.bootreason", null); final String bootReason = SystemProperties.get("ro.boot.bootreason", null);
HashMap<String, Long> timestamps = readTimestamps(); HashMap<String, Long> timestamps = readTimestamps();
try { try {
final String headers = getBootHeadersToLogAndUpdate(); final String headers = getBootHeadersToLogAndUpdate();
addFileToDropBox(db, timestamps, headers, tombstone.getPath(), LOG_SIZE, addFileToDropBox(db, timestamps, headers, tombstone.getPath(), LOG_SIZE,
TAG_TOMBSTONE); proto ? TAG_TOMBSTONE_PROTO : TAG_TOMBSTONE);
} catch (IOException e) { } catch (IOException e) {
Slog.e(TAG, "Can't log tombstone", e); Slog.e(TAG, "Can't log tombstone", e);
} }
......
...@@ -114,8 +114,9 @@ public final class NativeTombstoneManager { ...@@ -114,8 +114,9 @@ public final class NativeTombstoneManager {
if (filename.endsWith(".pb")) { if (filename.endsWith(".pb")) {
handleProtoTombstone(path); handleProtoTombstone(path);
BootReceiver.addTombstoneToDropBox(mContext, path, true);
} else { } else {
BootReceiver.addTombstoneToDropBox(mContext, path); BootReceiver.addTombstoneToDropBox(mContext, path, false);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment