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

Commit d3af590f authored by Marco Nelissen's avatar Marco Nelissen Committed by The Android Open Source Project
Browse files

Merge branch 'readonly-p4-master'

parents e7c71d3a 6a1fadea
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -125,7 +125,9 @@ public:
        {
            //printf("new AaptFile created %s\n", (const char*)sourceFile);
        }
    virtual ~AaptFile() { }
    virtual ~AaptFile() {
        free(mData);
    }

    const String8& getPath() const { return mPath; }
    const AaptGroupEntry& getGroupEntry() const { return mGroupEntry; }
@@ -441,7 +443,13 @@ private:
    AaptSymbolEntry                                 mDefSymbol;
};

class ResourceTypeSet;
class ResourceTypeSet : public RefBase,
                        public KeyedVector<String8,sp<AaptGroup> >
{
public:
    ResourceTypeSet();
};


/**
 * Asset hierarchy being operated on.
@@ -449,8 +457,8 @@ class ResourceTypeSet;
class AaptAssets : public AaptDir
{
public:
    AaptAssets() : AaptDir(String8(), String8()), mHaveIncludedAssets(false) { }
    virtual ~AaptAssets() { }
    AaptAssets() : AaptDir(String8(), String8()), mHaveIncludedAssets(false), mRes(NULL) { }
    virtual ~AaptAssets() { delete mRes; }

    const String8& getPackage() const { return mPackage; }
    void setPackage(const String8& package) { mPackage = package; mSymbolsPrivatePackage = package; }
@@ -498,7 +506,7 @@ public:
    
    inline KeyedVector<String8, sp<ResourceTypeSet> >* getResources() { return mRes; }
    inline void 
        setResources(KeyedVector<String8, sp<ResourceTypeSet> >* res) { mRes = res; }
        setResources(KeyedVector<String8, sp<ResourceTypeSet> >* res) { delete mRes; mRes = res; }

private:
    String8 mPackage;
+5 −0
Original line number Diff line number Diff line
@@ -44,6 +44,9 @@ struct image_info
            }
            free(allocRows);
        }
        free(info9Patch.xDivs);
        free(info9Patch.yDivs);
        free(info9Patch.colors);
    }

    png_uint_32 width;
@@ -833,6 +836,7 @@ static void write_png(const char* imageName,
    int i;

    png_unknown_chunk unknowns[1];
    unknowns[0].data = NULL;

    png_bytepp outRows = (png_bytepp) malloc((int) imageInfo.height * png_sizeof(png_bytep));
    if (outRows == (png_bytepp) 0) {
@@ -939,6 +943,7 @@ static void write_png(const char* imageName,
        free(outRows[i]);
    }
    free(outRows);
    free(unknowns[0].data);

    png_get_IHDR(write_ptr, write_info, &width, &height,
       &bit_depth, &color_type, &interlace_type,
+1 −8
Original line number Diff line number Diff line
@@ -45,13 +45,6 @@ static String8 parseResourceName(const String8& leaf)
    }
}

class ResourceTypeSet : public RefBase,
                        public KeyedVector<String8,sp<AaptGroup> >
{
public:
    ResourceTypeSet();
};

ResourceTypeSet::ResourceTypeSet()
    :RefBase(),
     KeyedVector<String8,sp<AaptGroup> >()
@@ -1055,6 +1048,7 @@ status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets)
                printf("  Writing public definitions to %s.\n", bundle->getPublicOutputFile());
            }
            table.writePublicDefinitions(String16(assets->getPackage()), fp);
            fclose(fp);
        }

        NOISY(
@@ -1072,7 +1066,6 @@ status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets)
            return err;
        }
    }

    return err;
}

+1 −0
Original line number Diff line number Diff line
@@ -486,6 +486,7 @@ XMLNode::XMLNode(const String8& filename, const String16& s1, const String16& s2
XMLNode::XMLNode(const String8& filename)
    : mFilename(filename)
{
    memset(&mCharsValue, 0, sizeof(mCharsValue));
}

XMLNode::type XMLNode::getType() const