| 3367 | } |
| 3368 | |
| 3369 | status_t ResourceTable::Entry::remapStringValue(StringPool* strings) |
| 3370 | { |
| 3371 | if (mType == TYPE_ITEM) { |
| 3372 | Item& it = mItem; |
| 3373 | if (it.parsedValue.dataType == Res_value::TYPE_STRING) { |
| 3374 | it.parsedValue.data = strings->mapOriginalPosToNewPos(it.parsedValue.data); |
| 3375 | } |
| 3376 | } else if (mType == TYPE_BAG) { |
| 3377 | const size_t N = mBag.size(); |
| 3378 | for (size_t i=0; i<N; i++) { |
| 3379 | Item& it = mBag.editValueAt(i); |
| 3380 | if (it.parsedValue.dataType == Res_value::TYPE_STRING) { |
| 3381 | it.parsedValue.data = strings->mapOriginalPosToNewPos(it.parsedValue.data); |
| 3382 | } |
| 3383 | } |
| 3384 | } else { |
| 3385 | mPos.error("Error: entry %s is not a single item or a bag.\n", |
| 3386 | String8(mName).string()); |
| 3387 | return UNKNOWN_ERROR; |
| 3388 | } |
| 3389 | return NO_ERROR; |
| 3390 | } |
| 3391 | |
| 3392 | ssize_t ResourceTable::Entry::flatten(Bundle* bundle, const sp<AaptFile>& data, bool isPublic) |
| 3393 | { |
no test coverage detected