summaryrefslogtreecommitdiff
path: root/libs/androidfw/ZipFileRO.cpp
diff options
context:
space:
mode:
author Pawan Wagh <waghpawan@google.com> 2024-04-15 20:58:19 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-04-15 20:58:19 +0000
commit7a03fb2cade746c2ec056ec1cd554c0d71cb9d78 (patch)
tree81ed8f31c614aebd9e59c1be35743b58eefa3ce2 /libs/androidfw/ZipFileRO.cpp
parentfe51b492dc8a1067e45dbfddf24c4184621e1b80 (diff)
parent528d77f32958c3a977c513d92f84d0d582bdffe4 (diff)
Merge changes from topic "punch_holes_apk" into main am: b402f570f2 am: 528d77f329
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3039899 Change-Id: I842490539e661e6cddcd5b9110c08fda7e7fc1ed Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs/androidfw/ZipFileRO.cpp')
-rw-r--r--libs/androidfw/ZipFileRO.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/libs/androidfw/ZipFileRO.cpp b/libs/androidfw/ZipFileRO.cpp
index 34a6bc27b93f..839c7b6fef37 100644
--- a/libs/androidfw/ZipFileRO.cpp
+++ b/libs/androidfw/ZipFileRO.cpp
@@ -119,30 +119,41 @@ ZipEntryRO ZipFileRO::findEntryByName(const char* entryName) const
* appear to be bogus.
*/
bool ZipFileRO::getEntryInfo(ZipEntryRO entry, uint16_t* pMethod,
+ uint32_t* pUncompLen, uint32_t* pCompLen, off64_t* pOffset,
+ uint32_t* pModWhen, uint32_t* pCrc32) const
+{
+ return getEntryInfo(entry, pMethod, pUncompLen, pCompLen, pOffset, pModWhen,
+ pCrc32, nullptr);
+}
+
+bool ZipFileRO::getEntryInfo(ZipEntryRO entry, uint16_t* pMethod,
uint32_t* pUncompLen, uint32_t* pCompLen, off64_t* pOffset,
- uint32_t* pModWhen, uint32_t* pCrc32) const
+ uint32_t* pModWhen, uint32_t* pCrc32, uint16_t* pExtraFieldSize) const
{
const _ZipEntryRO* zipEntry = reinterpret_cast<_ZipEntryRO*>(entry);
const ZipEntry& ze = zipEntry->entry;
- if (pMethod != NULL) {
+ if (pMethod != nullptr) {
*pMethod = ze.method;
}
- if (pUncompLen != NULL) {
+ if (pUncompLen != nullptr) {
*pUncompLen = ze.uncompressed_length;
}
- if (pCompLen != NULL) {
+ if (pCompLen != nullptr) {
*pCompLen = ze.compressed_length;
}
- if (pOffset != NULL) {
+ if (pOffset != nullptr) {
*pOffset = ze.offset;
}
- if (pModWhen != NULL) {
+ if (pModWhen != nullptr) {
*pModWhen = ze.mod_time;
}
- if (pCrc32 != NULL) {
+ if (pCrc32 != nullptr) {
*pCrc32 = ze.crc32;
}
+ if (pExtraFieldSize != nullptr) {
+ *pExtraFieldSize = ze.extra_field_size;
+ }
return true;
}