From e28d7fc21c40eedcac35c7c00b6464fdf8e34b44 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Mon, 13 Jul 2015 14:59:35 -0700 Subject: Set last modified timestamp for the bugreport entry in the zipped file from original file, otherwise it uses the date the zip was created. BUG: 20447313 Change-Id: Iecbaf3ce2f0e3d82ac31a6c7bfbd8fb3037de5e4 --- packages/Shell/src/com/android/shell/BugreportReceiver.java | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/Shell') diff --git a/packages/Shell/src/com/android/shell/BugreportReceiver.java b/packages/Shell/src/com/android/shell/BugreportReceiver.java index 6278650..d83b516 100644 --- a/packages/Shell/src/com/android/shell/BugreportReceiver.java +++ b/packages/Shell/src/com/android/shell/BugreportReceiver.java @@ -215,6 +215,7 @@ public class BugreportReceiver extends BroadcastReceiver { ZipOutputStream zos = new ZipOutputStream( new BufferedOutputStream(new FileOutputStream(bugreportZippedFile)))) { ZipEntry entry = new ZipEntry(bugreportFile.getName()); + entry.setTime(bugreportFile.lastModified()); zos.putNextEntry(entry); int totalBytes = Streams.copy(is, zos); Log.v(TAG, "size of original bugreport: " + totalBytes + " bytes"); -- cgit v1.1