Merge change 21413 into eclair
* changes: Fix aapt to be able to add configs from overlays.
This commit is contained in:
@@ -482,6 +482,8 @@ public:
|
|||||||
const sp<AaptFile>& file,
|
const sp<AaptFile>& file,
|
||||||
const String8& resType);
|
const String8& resType);
|
||||||
|
|
||||||
|
void addGroupEntry(const AaptGroupEntry& entry) { mGroupEntries.add(entry); }
|
||||||
|
|
||||||
ssize_t slurpFromArgs(Bundle* bundle);
|
ssize_t slurpFromArgs(Bundle* bundle);
|
||||||
|
|
||||||
virtual ssize_t slurpFullTree(Bundle* bundle,
|
virtual ssize_t slurpFullTree(Bundle* bundle,
|
||||||
|
|||||||
@@ -472,11 +472,22 @@ static bool applyFileOverlay(const sp<AaptAssets>& assets,
|
|||||||
// didn't find a match fall through and add it..
|
// didn't find a match fall through and add it..
|
||||||
}
|
}
|
||||||
baseGroup->addFile(overlayFiles.valueAt(overlayGroupIndex));
|
baseGroup->addFile(overlayFiles.valueAt(overlayGroupIndex));
|
||||||
|
assets->addGroupEntry(overlayFiles.keyAt(overlayGroupIndex));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// this group doesn't exist (a file that's only in the overlay)
|
// this group doesn't exist (a file that's only in the overlay)
|
||||||
baseSet->add(overlaySet->keyAt(overlayIndex),
|
baseSet->add(overlaySet->keyAt(overlayIndex),
|
||||||
overlaySet->valueAt(overlayIndex));
|
overlaySet->valueAt(overlayIndex));
|
||||||
|
// make sure all flavors are defined in the resources.
|
||||||
|
sp<AaptGroup> overlayGroup = overlaySet->valueAt(overlayIndex);
|
||||||
|
DefaultKeyedVector<AaptGroupEntry, sp<AaptFile> > overlayFiles =
|
||||||
|
overlayGroup->getFiles();
|
||||||
|
size_t overlayGroupSize = overlayFiles.size();
|
||||||
|
for (size_t overlayGroupIndex = 0;
|
||||||
|
overlayGroupIndex<overlayGroupSize;
|
||||||
|
overlayGroupIndex++) {
|
||||||
|
assets->addGroupEntry(overlayFiles.keyAt(overlayGroupIndex));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// this overlay didn't have resources for this type
|
// this overlay didn't have resources for this type
|
||||||
|
|||||||
Reference in New Issue
Block a user