| 568 | } |
| 569 | |
| 570 | status_t parseAndAddBag(Bundle* bundle, |
| 571 | const sp<AaptFile>& in, |
| 572 | ResXMLTree* block, |
| 573 | const ResTable_config& config, |
| 574 | const String16& myPackage, |
| 575 | const String16& curType, |
| 576 | const String16& ident, |
| 577 | const String16& parentIdent, |
| 578 | const String16& itemIdent, |
| 579 | int32_t curFormat, |
| 580 | bool isFormatted, |
| 581 | const String16& product, |
| 582 | bool pseudolocalize, |
| 583 | const bool overwrite, |
| 584 | ResourceTable* outTable) |
| 585 | { |
| 586 | status_t err; |
| 587 | const String16 item16("item"); |
| 588 | |
| 589 | String16 str; |
| 590 | Vector<StringPool::entry_style_span> spans; |
| 591 | err = parseStyledString(bundle, in->getPrintableSource().string(), |
| 592 | block, item16, &str, &spans, isFormatted, |
| 593 | pseudolocalize); |
| 594 | if (err != NO_ERROR) { |
| 595 | return err; |
| 596 | } |
| 597 | |
| 598 | NOISY(printf("Adding resource bag entry l=%c%c c=%c%c orien=%d d=%d " |
| 599 | " pid=%s, bag=%s, id=%s: %s\n", |
| 600 | config.language[0], config.language[1], |
| 601 | config.country[0], config.country[1], |
| 602 | config.orientation, config.density, |
| 603 | String8(parentIdent).string(), |
| 604 | String8(ident).string(), |
| 605 | String8(itemIdent).string(), |
| 606 | String8(str).string())); |
| 607 | |
| 608 | err = outTable->addBag(SourcePos(in->getPrintableSource(), block->getLineNumber()), |
| 609 | myPackage, curType, ident, parentIdent, itemIdent, str, |
| 610 | &spans, &config, overwrite, false, curFormat); |
| 611 | return err; |
| 612 | } |
| 613 | |
| 614 | /* |
| 615 | * Returns true if needle is one of the elements in the comma-separated list |
no test coverage detected