Loading services/core/java/com/android/server/os/NativeTombstoneManager.java +21 −20 Original line number Diff line number Diff line Loading @@ -153,9 +153,17 @@ public final class NativeTombstoneManager { return Optional.empty(); } try (ParcelFileDescriptor pfd = ParcelFileDescriptor.open(path, MODE_READ_WRITE)) { ParcelFileDescriptor pfd; try { pfd = ParcelFileDescriptor.open(path, MODE_READ_WRITE); } catch (FileNotFoundException ex) { Slog.w(TAG, "failed to open " + path, ex); return Optional.empty(); } final Optional<TombstoneFile> parsedTombstone = TombstoneFile.parse(pfd); if (!parsedTombstone.isPresent()) { IoUtils.closeQuietly(pfd); return Optional.empty(); } Loading @@ -171,13 +179,6 @@ public final class NativeTombstoneManager { } return parsedTombstone; } catch (FileNotFoundException ex) { Slog.w(TAG, "failed to open " + path, ex); return Optional.empty(); } catch (IOException ex) { Slog.e(TAG, "IO exception during write to " + path, ex); return Optional.empty(); } } /** Loading Loading
services/core/java/com/android/server/os/NativeTombstoneManager.java +21 −20 Original line number Diff line number Diff line Loading @@ -153,9 +153,17 @@ public final class NativeTombstoneManager { return Optional.empty(); } try (ParcelFileDescriptor pfd = ParcelFileDescriptor.open(path, MODE_READ_WRITE)) { ParcelFileDescriptor pfd; try { pfd = ParcelFileDescriptor.open(path, MODE_READ_WRITE); } catch (FileNotFoundException ex) { Slog.w(TAG, "failed to open " + path, ex); return Optional.empty(); } final Optional<TombstoneFile> parsedTombstone = TombstoneFile.parse(pfd); if (!parsedTombstone.isPresent()) { IoUtils.closeQuietly(pfd); return Optional.empty(); } Loading @@ -171,13 +179,6 @@ public final class NativeTombstoneManager { } return parsedTombstone; } catch (FileNotFoundException ex) { Slog.w(TAG, "failed to open " + path, ex); return Optional.empty(); } catch (IOException ex) { Slog.e(TAG, "IO exception during write to " + path, ex); return Optional.empty(); } } /** Loading