summaryrefslogtreecommitdiff
path: root/libs/androidfw/include/androidfw/AssetManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/androidfw/include/androidfw/AssetManager.h')
-rw-r--r--libs/androidfw/include/androidfw/AssetManager.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/libs/androidfw/include/androidfw/AssetManager.h b/libs/androidfw/include/androidfw/AssetManager.h
index f1e8b9364915..becd307d114d 100644
--- a/libs/androidfw/include/androidfw/AssetManager.h
+++ b/libs/androidfw/include/androidfw/AssetManager.h
@@ -202,10 +202,12 @@ public:
private:
struct asset_path
{
- asset_path() : path(""), type(kFileTypeRegular), idmap(""), isSystemAsset(false) {}
+ asset_path() : path(""), type(kFileTypeRegular), idmap(""),
+ isSystemOverlay(false), isSystemAsset(false) {}
String8 path;
FileType type;
String8 idmap;
+ bool isSystemOverlay;
bool isSystemAsset;
};
@@ -235,6 +237,9 @@ private:
Asset* openIdmapLocked(const struct asset_path& ap) const;
+ void addSystemOverlays(const char* pathOverlaysList, const String8& targetPackagePath,
+ ResTable* sharedRes, size_t offset) const;
+
class SharedZip : public RefBase {
public:
static sp<SharedZip> get(const String8& path, bool createIfNotPresent = true);
@@ -249,6 +254,9 @@ private:
bool isUpToDate();
+ void addOverlay(const asset_path& ap);
+ bool getOverlay(size_t idx, asset_path* out) const;
+
protected:
~SharedZip();
@@ -263,6 +271,8 @@ private:
Asset* mResourceTableAsset;
ResTable* mResourceTable;
+ Vector<asset_path> mOverlays;
+
static Mutex gLock;
static DefaultKeyedVector<String8, wp<SharedZip> > gOpen;
};
@@ -296,6 +306,9 @@ private:
bool isUpToDate();
+ void addOverlay(const String8& path, const asset_path& overlay);
+ bool getOverlay(const String8& path, size_t idx, asset_path* out) const;
+
private:
void closeZip(int idx);