| 3163 | } |
| 3164 | |
| 3165 | status_t ResourceTable::Entry::makeItABag(const SourcePos& sourcePos) |
| 3166 | { |
| 3167 | if (mType == TYPE_BAG) { |
| 3168 | return NO_ERROR; |
| 3169 | } |
| 3170 | if (mType == TYPE_UNKNOWN) { |
| 3171 | mType = TYPE_BAG; |
| 3172 | return NO_ERROR; |
| 3173 | } |
| 3174 | sourcePos.error("Resource entry %s is already defined as a single item.\n" |
| 3175 | "%s:%d: Originally defined here.\n", |
| 3176 | String8(mName).string(), |
| 3177 | mItem.sourcePos.file.string(), mItem.sourcePos.line); |
| 3178 | return UNKNOWN_ERROR; |
| 3179 | } |
| 3180 | |
| 3181 | status_t ResourceTable::Entry::setItem(const SourcePos& sourcePos, |
| 3182 | const String16& value, |