diff options
| author | 2017-03-02 12:45:10 +0900 | |
|---|---|---|
| committer | 2017-03-03 07:23:23 +0900 | |
| commit | 7de2f9c73fbe93bfb7dff3c046cf7a3137599f6c (patch) | |
| tree | d1db83724b9bc9f6e3dd82856d71675f65ed4a39 /libs/androidfw/include | |
| parent | cb0629eaa1a63684b1e6dbb366d42e80a26a5da9 (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.h | 15 |
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); |