Merge "Change ZipArchiveHandle from void* to ZipArchive*"

am: f79542efd3

Change-Id: Iebca19f2757ae77c07eca46a721c6966621fea14
This commit is contained in:
Ryan Prichard
2018-10-15 19:06:02 -07:00
committed by android-build-merger
3 changed files with 8 additions and 4 deletions

View File

@@ -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) {
}

View File

@@ -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_;

View File

@@ -41,7 +41,8 @@
#include <unistd.h>
#include <time.h>
typedef void* ZipArchiveHandle;
struct ZipArchive;
typedef ZipArchive* ZipArchiveHandle;
namespace android {