err = outTable->addBag(SourcePos(in->getPrintableSource(), block->getLineNumber()),
myPackage, curType, ident, parentIdent, itemIdent, str,
err = outTable->addBag(SourcePos(in->getPrintableSource(), block->getLineNumber()),
myPackage, curType, ident, parentIdent, itemIdent, str,
- &spans, &config, false, false, curFormat);
+ &spans, &config, overwrite, false, curFormat);
err = outTable->addEntry(SourcePos(in->getPrintableSource(), block->getLineNumber()),
myPackage, curType, ident, str, &spans, &config,
err = outTable->addEntry(SourcePos(in->getPrintableSource(), block->getLineNumber()),
myPackage, curType, ident, str, &spans, &config,
const sp<AaptAssets>& assets,
const sp<AaptFile>& in,
const ResTable_config& defParams,
const sp<AaptAssets>& assets,
const sp<AaptFile>& in,
const ResTable_config& defParams,
const String16 bool16("bool");
const String16 integer16("integer");
const String16 dimen16("dimen");
const String16 bool16("bool");
const String16 integer16("integer");
const String16 dimen16("dimen");
const String16 style16("style");
const String16 plurals16("plurals");
const String16 array16("array");
const String16 style16("style");
const String16 plurals16("plurals");
const String16 array16("array");
if (locale.size() > 0) {
fprintf(stderr, "aapt: warning: string '%s' in %s marked untranslatable but exists"
" in locale '%s'\n", String8(name).string(),
if (locale.size() > 0) {
fprintf(stderr, "aapt: warning: string '%s' in %s marked untranslatable but exists"
" in locale '%s'\n", String8(name).string(),
block.getPosition(&parserPosition);
err = parseAndAddBag(bundle, in, &block, curParams, myPackage, curType,
block.getPosition(&parserPosition);
err = parseAndAddBag(bundle, in, &block, curParams, myPackage, curType,
- ident, parentIdent, itemIdent, curFormat, false, outTable);
+ ident, parentIdent, itemIdent, curFormat,
+ false, overwrite, outTable);
block.setPosition(parserPosition);
err = parseAndAddBag(bundle, in, &block, pseudoParams, myPackage,
curType, ident, parentIdent, itemIdent, curFormat, true,
block.setPosition(parserPosition);
err = parseAndAddBag(bundle, in, &block, pseudoParams, myPackage,
curType, ident, parentIdent, itemIdent, curFormat, true,
block.getPosition(&parserPosition);
err = parseAndAddEntry(bundle, in, &block, curParams, myPackage, curType, ident,
block.getPosition(&parserPosition);
err = parseAndAddEntry(bundle, in, &block, curParams, myPackage, curType, ident,
- *curTag, curIsStyled, curFormat, false, outTable);
+ *curTag, curIsStyled, curFormat, false, overwrite, outTable);
if (err < NO_ERROR) { // Why err < NO_ERROR instead of err != NO_ERROR?
hasErrors = localHasErrors = true;
if (err < NO_ERROR) { // Why err < NO_ERROR instead of err != NO_ERROR?
hasErrors = localHasErrors = true;
// pseudolocalize here
block.setPosition(parserPosition);
err = parseAndAddEntry(bundle, in, &block, pseudoParams, myPackage, curType,
// pseudolocalize here
block.setPosition(parserPosition);
err = parseAndAddEntry(bundle, in, &block, pseudoParams, myPackage, curType,
- ident, *curTag, curIsStyled, curFormat, true, outTable);
+ ident, *curTag, curIsStyled, curFormat, true, false, outTable);
const Vector<StringPool::entry_style_span>* style,
const ResTable_config* params,
const bool doSetIndex,
const Vector<StringPool::entry_style_span>* style,
const ResTable_config* params,
const bool doSetIndex,
{
// Check for adding entries in other packages... for now we do
// nothing. We need to do the right thing here to support skinning.
{
// Check for adding entries in other packages... for now we do
// nothing. We need to do the right thing here to support skinning.
- status_t err = e->setItem(sourcePos, value, style, format);
+ status_t err = e->setItem(sourcePos, value, style, format, overwrite);
// Look for strings with no default localization
if (configSet.count(defaultLocale) == 0) {
fprintf(stdout, "aapt: warning: string '%s' has no default translation in %s; found:",
// Look for strings with no default localization
if (configSet.count(defaultLocale) == 0) {
fprintf(stdout, "aapt: warning: string '%s' has no default translation in %s; found:",
// consider that string to have fulfilled the localization requirement.
String8 region(config.string(), 2);
if (configSet.find(region) == configSet.end()) {
// consider that string to have fulfilled the localization requirement.
String8 region(config.string(), 2);
if (configSet.find(region) == configSet.end()) {
"*** string '%s' has no default or required localization "
"for '%s' in %s\n",
String8(nameIter->first).string(),
config.string(),
"*** string '%s' has no default or required localization "
"for '%s' in %s\n",
String8(nameIter->first).string(),
config.string(),
status_t ResourceTable::Entry::setItem(const SourcePos& sourcePos,
const String16& value,
const Vector<StringPool::entry_style_span>* style,
status_t ResourceTable::Entry::setItem(const SourcePos& sourcePos,
const String16& value,
const Vector<StringPool::entry_style_span>* style,
{
Item item(sourcePos, false, value, style);
{
Item item(sourcePos, false, value, style);
sourcePos.error("Resource entry %s is already defined.\n"
"%s:%d: Originally defined here.\n",
String8(mName).string(),
sourcePos.error("Resource entry %s is already defined.\n"
"%s:%d: Originally defined here.\n",
String8(mName).string(),