From 3addcd39659f2c950c4a5c65ba0ea4fed6818196 Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Wed, 10 Oct 2018 22:20:10 -0700 Subject: Change ZipArchiveHandle from void* to ZipArchive* Bug: none Test: m checkbuild Exempt-From-Owner-Approval: owner is OOO for another week, it's a fairly minor change to this repository Change-Id: If4cf57619034ab98b06115ca60beb2fb26c4cd19 --- libs/androidfw/ApkAssets.cpp | 2 +- libs/androidfw/include/androidfw/ApkAssets.h | 7 +++++-- libs/androidfw/include/androidfw/ZipFileRO.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libs/androidfw/ApkAssets.cpp b/libs/androidfw/ApkAssets.cpp index 8f58f74d4652..66a547723b2f 100644 --- a/libs/androidfw/ApkAssets.cpp +++ b/libs/androidfw/ApkAssets.cpp @@ -39,7 +39,7 @@ using base::unique_fd; static const std::string kResourcesArsc("resources.arsc"); -ApkAssets::ApkAssets(void* unmanaged_handle, const std::string& path) +ApkAssets::ApkAssets(ZipArchiveHandle unmanaged_handle, const std::string& path) : zip_handle_(unmanaged_handle, ::CloseArchive), path_(path) { } diff --git a/libs/androidfw/include/androidfw/ApkAssets.h b/libs/androidfw/include/androidfw/ApkAssets.h index 69702e314442..db2d0382bcf6 100644 --- a/libs/androidfw/include/androidfw/ApkAssets.h +++ b/libs/androidfw/include/androidfw/ApkAssets.h @@ -27,6 +27,9 @@ #include "androidfw/LoadedArsc.h" #include "androidfw/misc.h" +struct ZipArchive; +typedef ZipArchive* ZipArchiveHandle; + namespace android { class LoadedIdmap; @@ -88,9 +91,9 @@ class ApkAssets { // Creates an Asset from any file on the file system. static std::unique_ptr CreateAssetFromFile(const std::string& path); - ApkAssets(void* unmanaged_handle, const std::string& path); + ApkAssets(ZipArchiveHandle unmanaged_handle, const std::string& path); - using ZipArchivePtr = std::unique_ptr; + using ZipArchivePtr = std::unique_ptr; ZipArchivePtr zip_handle_; const std::string path_; diff --git a/libs/androidfw/include/androidfw/ZipFileRO.h b/libs/androidfw/include/androidfw/ZipFileRO.h index 03154d04def1..c221e3b7aeae 100644 --- a/libs/androidfw/include/androidfw/ZipFileRO.h +++ b/libs/androidfw/include/androidfw/ZipFileRO.h @@ -41,7 +41,8 @@ #include #include -typedef void* ZipArchiveHandle; +struct ZipArchive; +typedef ZipArchive* ZipArchiveHandle; namespace android { -- cgit v1.2.3-59-g8ed1b