MCPcopy Create free account
hub / github.com/CyanogenMod/android_frameworks_base / getResourceFile

Function getResourceFile

tools/aapt/Resource.cpp:181–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181sp<AaptFile> getResourceFile(const sp<AaptAssets>& assets, bool makeIfNecessary)
182{
183 sp<AaptGroup> group = assets->getFiles().valueFor(String8("resources.arsc"));
184 sp<AaptFile> file;
185 if (group != NULL) {
186 file = group->getFiles().valueFor(AaptGroupEntry());
187 if (file != NULL) {
188 return file;
189 }
190 }
191
192 if (!makeIfNecessary) {
193 return NULL;
194 }
195 return assets->addFile(String8("resources.arsc"), AaptGroupEntry(), String8(),
196 NULL, String8());
197}
198
199static status_t parsePackage(Bundle* bundle, const sp<AaptAssets>& assets,
200 const sp<AaptGroup>& grp)

Callers 3

writeResFileFunction · 0.85
writeResFileFDFunction · 0.85
buildResourcesFunction · 0.85

Calls 2

AaptGroupEntryClass · 0.85
addFileMethod · 0.45

Tested by

no test coverage detected