summaryrefslogtreecommitdiff
path: root/libs/androidfw/include
diff options
context:
space:
mode:
author Jaekyun Seok <jaekyun@google.com> 2017-03-02 12:45:10 +0900
committer Jaekyun Seok <jaekyun@google.com> 2017-03-03 07:23:23 +0900
commit7de2f9c73fbe93bfb7dff3c046cf7a3137599f6c (patch)
treed1db83724b9bc9f6e3dd82856d71675f65ed4a39 /libs/androidfw/include
parentcb0629eaa1a63684b1e6dbb366d42e80a26a5da9 (diff)
Reinstate codes to enable RRO on system server
Test: building succeeded and tested with sailfish Bug: 35742444 Change-Id: I99d0f1d097525d3eb46255d6cf823f6ae2a02385
Diffstat (limited to 'libs/androidfw/include')
-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);