Loading include/androidfw/AssetManager.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -236,9 +236,11 @@ public: private: private: struct asset_path struct asset_path { { asset_path() : path(""), type(kFileTypeRegular), idmap(""), isSystemOverlay(false) {} String8 path; String8 path; FileType type; FileType type; String8 idmap; String8 idmap; bool isSystemOverlay; }; }; Asset* openInPathLocked(const char* fileName, AccessMode mode, Asset* openInPathLocked(const char* fileName, AccessMode mode, Loading libs/androidfw/AssetManager.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -611,6 +611,11 @@ FileType AssetManager::getFileType(const char* fileName) } } bool AssetManager::appendPathToResTable(const asset_path& ap) const { bool AssetManager::appendPathToResTable(const asset_path& ap) const { // skip those ap's that correspond to system overlays if (ap.isSystemOverlay) { return true; } Asset* ass = NULL; Asset* ass = NULL; ResTable* sharedRes = NULL; ResTable* sharedRes = NULL; bool shared = true; bool shared = true; Loading Loading @@ -796,6 +801,7 @@ void AssetManager::addSystemOverlays(const char* pathOverlaysList, oap.path = String8(buf, space - buf); oap.path = String8(buf, space - buf); oap.type = kFileTypeRegular; oap.type = kFileTypeRegular; oap.idmap = String8(space + 1, newline - space - 1); oap.idmap = String8(space + 1, newline - space - 1); oap.isSystemOverlay = true; Asset* oass = const_cast<AssetManager*>(this)-> Asset* oass = const_cast<AssetManager*>(this)-> openNonAssetInPathLocked("resources.arsc", openNonAssetInPathLocked("resources.arsc", Loading Loading
include/androidfw/AssetManager.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -236,9 +236,11 @@ public: private: private: struct asset_path struct asset_path { { asset_path() : path(""), type(kFileTypeRegular), idmap(""), isSystemOverlay(false) {} String8 path; String8 path; FileType type; FileType type; String8 idmap; String8 idmap; bool isSystemOverlay; }; }; Asset* openInPathLocked(const char* fileName, AccessMode mode, Asset* openInPathLocked(const char* fileName, AccessMode mode, Loading
libs/androidfw/AssetManager.cpp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -611,6 +611,11 @@ FileType AssetManager::getFileType(const char* fileName) } } bool AssetManager::appendPathToResTable(const asset_path& ap) const { bool AssetManager::appendPathToResTable(const asset_path& ap) const { // skip those ap's that correspond to system overlays if (ap.isSystemOverlay) { return true; } Asset* ass = NULL; Asset* ass = NULL; ResTable* sharedRes = NULL; ResTable* sharedRes = NULL; bool shared = true; bool shared = true; Loading Loading @@ -796,6 +801,7 @@ void AssetManager::addSystemOverlays(const char* pathOverlaysList, oap.path = String8(buf, space - buf); oap.path = String8(buf, space - buf); oap.type = kFileTypeRegular; oap.type = kFileTypeRegular; oap.idmap = String8(space + 1, newline - space - 1); oap.idmap = String8(space + 1, newline - space - 1); oap.isSystemOverlay = true; Asset* oass = const_cast<AssetManager*>(this)-> Asset* oass = const_cast<AssetManager*>(this)-> openNonAssetInPathLocked("resources.arsc", openNonAssetInPathLocked("resources.arsc", Loading