summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ryan Prichard <rprichard@google.com> 2018-10-15 22:05:59 -0700
committer android-build-merger <android-build-merger@google.com> 2018-10-15 22:05:59 -0700
commit559dbd88c7e27638965308ab763e71aa0cd3d1cd (patch)
treea171773d9037c7628f4e47d0c821bf7213100c9d
parent482e8570d1a60145e47ef7ba461893bdd27db975 (diff)
parent498357670e30d48f0219578719cf005e7a21cf04 (diff)
Merge "Change ZipArchiveHandle from void* to ZipArchive*" am: f79542efd3 am: a34a1e0c97
am: 498357670e Change-Id: I4fe5a70c750328bb67cdc02a08e4f9eeb97ac20d
-rw-r--r--libs/androidfw/ApkAssets.cpp2
-rw-r--r--libs/androidfw/include/androidfw/ApkAssets.h7
-rw-r--r--libs/androidfw/include/androidfw/ZipFileRO.h3
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<Asset> 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<void, void(*)(void*)>;
+ using ZipArchivePtr = std::unique_ptr<ZipArchive, void(*)(ZipArchiveHandle)>;
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 <unistd.h>
#include <time.h>
-typedef void* ZipArchiveHandle;
+struct ZipArchive;
+typedef ZipArchive* ZipArchiveHandle;
namespace android {