Merge "Fix bug in APK entry alignment."

This commit is contained in:
Alex Klyubin 2016-03-24 00:59:01 +00:00 committed by Gerrit Code Review
commit 7f4eadef7e
1 changed files with 5 additions and 0 deletions

View File

@ -544,6 +544,11 @@ class SignApk {
// Preserve the STORED method of the input entry. // Preserve the STORED method of the input entry.
outEntry = new JarEntry(inEntry); outEntry = new JarEntry(inEntry);
outEntry.setTime(timestamp); outEntry.setTime(timestamp);
// Discard comment and extra fields of this entry to
// simplify alignment logic below and for consistency with
// how compressed entries are handled later.
outEntry.setComment(null);
outEntry.setExtra(null);
// 'offset' is the offset into the file at which we expect // 'offset' is the offset into the file at which we expect
// the file data to begin. This is the value we need to // the file data to begin. This is the value we need to