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

Method addFile

tools/aapt/AaptAssets.cpp:1634–1652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1632// =========================================================================
1633
1634status_t AaptGroup::addFile(const sp<AaptFile>& file)
1635{
1636 if (mFiles.indexOfKey(file->getGroupEntry()) < 0) {
1637 file->mPath = mPath;
1638 mFiles.add(file->getGroupEntry(), file);
1639 return NO_ERROR;
1640 }
1641
1642#if 0
1643 printf("Error adding file %s: group %s already exists in leaf=%s path=%s\n",
1644 file->getSourceFile().string(),
1645 file->getGroupEntry().toDirName(String8()).string(),
1646 mLeaf.string(), mPath.string());
1647#endif
1648
1649 SourcePos(file->getSourceFile(), -1).error("Duplicate file.\n%s: Original is here.",
1650 getPrintableSource().string());
1651 return UNKNOWN_ERROR;
1652}
1653
1654void AaptGroup::removeFile(size_t index)
1655{

Callers 7

addLeafFileMethod · 0.45
addResourceMethod · 0.45
getResourceFileFunction · 0.45
collect_filesFunction · 0.45
applyFileOverlayFunction · 0.45
addRandomEntryMethod · 0.45
handleSnapshotFileMethod · 0.45

Calls 10

SourcePosClass · 0.85
stringMethod · 0.80
toDirNameMethod · 0.80
appendPathMethod · 0.80
addDirMethod · 0.80
addMethod · 0.65
errorMethod · 0.65
indexOfKeyMethod · 0.45
lengthMethod · 0.45
valueAtMethod · 0.45

Tested by 1

addRandomEntryMethod · 0.36