am a2b5067a
: Merge "RRO: prevent duplicate system overlays"
* commit 'a2b5067aeef5b2d68a7a2f7b4edc7ee0908b5d5b': RRO: prevent duplicate system overlays
This commit is contained in:
@ -236,9 +236,11 @@ public:
|
||||
private:
|
||||
struct asset_path
|
||||
{
|
||||
asset_path() : path(""), type(kFileTypeRegular), idmap(""), isSystemOverlay(false) {}
|
||||
String8 path;
|
||||
FileType type;
|
||||
String8 idmap;
|
||||
bool isSystemOverlay;
|
||||
};
|
||||
|
||||
Asset* openInPathLocked(const char* fileName, AccessMode mode,
|
||||
|
@ -611,6 +611,11 @@ FileType AssetManager::getFileType(const char* fileName)
|
||||
}
|
||||
|
||||
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;
|
||||
ResTable* sharedRes = NULL;
|
||||
bool shared = true;
|
||||
@ -796,6 +801,7 @@ void AssetManager::addSystemOverlays(const char* pathOverlaysList,
|
||||
oap.path = String8(buf, space - buf);
|
||||
oap.type = kFileTypeRegular;
|
||||
oap.idmap = String8(space + 1, newline - space - 1);
|
||||
oap.isSystemOverlay = true;
|
||||
|
||||
Asset* oass = const_cast<AssetManager*>(this)->
|
||||
openNonAssetInPathLocked("resources.arsc",
|
||||
|
Reference in New Issue
Block a user