| 930 | } |
| 931 | |
| 932 | status_t XMLNode::parseValues(const sp<AaptAssets>& assets, |
| 933 | ResourceTable* table) |
| 934 | { |
| 935 | bool hasErrors = false; |
| 936 | |
| 937 | if (getType() == TYPE_ELEMENT) { |
| 938 | const size_t N = mAttributes.size(); |
| 939 | String16 defPackage(assets->getPackage()); |
| 940 | for (size_t i=0; i<N; i++) { |
| 941 | attribute_entry& e = mAttributes.editItemAt(i); |
| 942 | AccessorCookie ac(SourcePos(mFilename, getStartLineNumber()), String8(e.name), |
| 943 | String8(e.string)); |
| 944 | table->setCurrentXmlPos(SourcePos(mFilename, getStartLineNumber())); |
| 945 | if (!assets->getIncludedResources() |
| 946 | .stringToValue(&e.value, &e.string, |
| 947 | e.string.string(), e.string.size(), true, true, |
| 948 | e.nameResId, NULL, &defPackage, table, &ac)) { |
| 949 | hasErrors = true; |
| 950 | } |
| 951 | NOISY(printf("Attr %s: type=0x%x, str=%s\n", |
| 952 | String8(e.name).string(), e.value.dataType, |
| 953 | String8(e.string).string())); |
| 954 | } |
| 955 | } |
| 956 | const size_t N = mChildren.size(); |
| 957 | for (size_t i=0; i<N; i++) { |
| 958 | status_t err = mChildren.itemAt(i)->parseValues(assets, table); |
| 959 | if (err != NO_ERROR) { |
| 960 | hasErrors = true; |
| 961 | } |
| 962 | } |
| 963 | return hasErrors ? UNKNOWN_ERROR : NO_ERROR; |
| 964 | } |
| 965 | |
| 966 | status_t XMLNode::assignResourceIds(const sp<AaptAssets>& assets, |
| 967 | const ResourceTable* table) |
no test coverage detected