diff options
| author | 2014-02-12 14:05:30 -0800 | |
|---|---|---|
| committer | 2014-02-12 14:08:06 -0800 | |
| commit | 1cbea39fe1740d7d1c3e4aa0e4771a99a56c79ef (patch) | |
| tree | 609e7c7ad6a58d44191de97af33a11d9a5e1c78d /include/androidfw/AssetManager.h | |
| parent | 7594767e55e011101ed9341f01d40730fdbd4cc7 (diff) | |
| parent | dd3d95f182a634acdcc1b1e8e4954234d048eb54 (diff) | |
resolved conflicts for merge of dd3d95f1 to klp-volantis-dev
Change-Id: I96c0f0da852a0b3cf8aef9158678d38aa30f456f
Diffstat (limited to 'include/androidfw/AssetManager.h')
| -rw-r--r-- | include/androidfw/AssetManager.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/include/androidfw/AssetManager.h b/include/androidfw/AssetManager.h index 503377cf7ae8..a13dd16fc736 100644 --- a/include/androidfw/AssetManager.h +++ b/include/androidfw/AssetManager.h @@ -70,6 +70,12 @@ struct ResTable_config; class AssetManager : public AAssetManager { public: static const char* RESOURCES_FILENAME; + static const char* IDMAP_BIN; + static const char* OVERLAY_DIR; + static const char* TARGET_PACKAGE_NAME; + static const char* TARGET_APK_PATH; + static const char* IDMAP_DIR; + typedef enum CacheMode { CACHE_UNKNOWN = 0, CACHE_OFF, // don't try to cache file locations @@ -94,6 +100,7 @@ public: * newly-added asset source. */ bool addAssetPath(const String8& path, int32_t* cookie); + bool addOverlayPath(const String8& path, int32_t* cookie); /* * Convenience for adding the standard system assets. Uses the @@ -272,19 +279,14 @@ private: void setLocaleLocked(const char* locale); void updateResourceParamsLocked() const; - bool createIdmapFileLocked(const String8& originalPath, const String8& overlayPath, - const String8& idmapPath); - - bool isIdmapStaleLocked(const String8& originalPath, const String8& overlayPath, - const String8& idmapPath); - Asset* openIdmapLocked(const struct asset_path& ap) const; - bool getZipEntryCrcLocked(const String8& zipPath, const char* entryFilename, uint32_t* pCrc); + 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); + static sp<SharedZip> get(const String8& path, bool createIfNotPresent = true); ZipFileRO* getZip(); @@ -295,6 +297,9 @@ private: ResTable* setResourceTable(ResTable* res); bool isUpToDate(); + + void addOverlay(const asset_path& ap); + bool getOverlay(size_t idx, asset_path* out) const; protected: ~SharedZip(); @@ -310,6 +315,8 @@ private: Asset* mResourceTableAsset; ResTable* mResourceTable; + Vector<asset_path> mOverlays; + static Mutex gLock; static DefaultKeyedVector<String8, wp<SharedZip> > gOpen; }; @@ -342,6 +349,9 @@ private: static String8 getPathName(const char* path); 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); |