NativeTombstoneManager: catch ProtoParseException.

If we can't parse the proto for some reason, don't nuke system_server.

Bug: http://b/159164105
Test: `adb shell crasher` on sc-vf-dev
Change-Id: Id8af5f41177d68dacfd9da69eddea4d88d62f420
This commit is contained in:
Josh Gao
2021-02-18 14:09:37 -08:00
parent 355753053c
commit 2b67941ffe

View File

@@ -42,6 +42,7 @@ import android.system.StructStat;
import android.util.Slog;
import android.util.SparseArray;
import android.util.proto.ProtoInputStream;
import android.util.proto.ProtoParseException;
import com.android.internal.annotations.GuardedBy;
import com.android.server.BootReceiver;
@@ -434,7 +435,7 @@ public final class NativeTombstoneManager {
break;
}
}
} catch (IOException ex) {
} catch (IOException | ProtoParseException ex) {
Slog.e(TAG, "Failed to parse tombstone", ex);
return Optional.empty();
}