diff options
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/util/apk/ZipUtils.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/util/apk/ZipUtils.java b/core/java/android/util/apk/ZipUtils.java index fa5477e4190b..3ca3fc0f6338 100644 --- a/core/java/android/util/apk/ZipUtils.java +++ b/core/java/android/util/apk/ZipUtils.java @@ -63,7 +63,8 @@ abstract class ZipUtils { // exactly the remaining bytes in the buffer. The search is bounded because the maximum // size of the comment field is 65535 bytes because the field is an unsigned 16-bit number. - long fileSize = zip.length(); + // TODO(b/193592496) RandomAccessFile#length + long fileSize = zip.getChannel().size(); if (fileSize < ZIP_EOCD_REC_MIN_SIZE) { return null; } @@ -110,7 +111,8 @@ abstract class ZipUtils { throw new IllegalArgumentException("maxCommentSize: " + maxCommentSize); } - long fileSize = zip.length(); + // TODO(b/193592496) RandomAccessFile#length + long fileSize = zip.getChannel().size(); if (fileSize < ZIP_EOCD_REC_MIN_SIZE) { // No space for EoCD record in the file. return null; |
