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
This commit is contained in:
@@ -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) {
|
||||
}
|
||||
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
typedef void* ZipArchiveHandle;
|
||||
struct ZipArchive;
|
||||
typedef ZipArchive* ZipArchiveHandle;
|
||||
|
||||
namespace android {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user