Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75817ee3 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by The Android Open Source Project
Browse files

Merge branch 'readonly-p4-master'

parents 656ff983 235f4328
Loading
Loading
Loading
Loading
+21 −3
Original line number Diff line number Diff line
@@ -1109,7 +1109,8 @@ status_t compileResourceFile(Bundle* bundle,

                if (!localHasErrors) {
                    err = outTable->startBag(SourcePos(in->getPrintableSource(), block.getLineNumber()),
                                             myPackage, curType, ident, parentIdent, &curParams);
                                             myPackage, curType, ident, parentIdent, &curParams, 
                                             overwrite);
                    if (err != NO_ERROR) {
                        hasErrors = localHasErrors = true;
                    }
@@ -1409,6 +1410,8 @@ status_t ResourceTable::startBag(const SourcePos& sourcePos,
                                 const ResTable_config* params,
                                 bool replace, bool isId)
{
    status_t result = NO_ERROR;

    // Check for adding entries in other packages...  for now we do
    // nothing.  We need to do the right thing here to support skinning.
    uint32_t rid = mAssets->getIncludedResources()
@@ -1443,7 +1446,11 @@ status_t ResourceTable::startBag(const SourcePos& sourcePos,
        e->setParent(bagParent);
    }

    return e->makeItABag(sourcePos);
    if ((result = e->makeItABag(sourcePos)) != NO_ERROR) {
        return result;
    }
 
    return e->emptyBag(sourcePos);
}

status_t ResourceTable::addBag(const SourcePos& sourcePos,
@@ -2798,6 +2805,17 @@ status_t ResourceTable::Entry::addToBag(const SourcePos& sourcePos,
    return NO_ERROR;
}

status_t ResourceTable::Entry::emptyBag(const SourcePos& sourcePos)
{
    status_t err = makeItABag(sourcePos);
    if (err != NO_ERROR) {
        return err;
    }

    mBag.clear();
    return NO_ERROR;
}

status_t ResourceTable::Entry::generateAttributes(ResourceTable* table,
                                                  const String16& package)
{
+3 −1
Original line number Diff line number Diff line
@@ -255,6 +255,8 @@ public:

        status_t makeItABag(const SourcePos& sourcePos);

        status_t emptyBag(const SourcePos& sourcePos);
 
        status_t setItem(const SourcePos& pos,
                         const String16& value,
                         const Vector<StringPool::entry_style_span>* style = NULL,