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

Commit 53511e11 authored by Hans Boehm's avatar Hans Boehm Committed by android-build-merger
Browse files

Merge "Do not stack allocate RefBase object in AaptAssets::filter" am: d0197ac3 am: c97c9dbd

am: a33407d2

Change-Id: If98f629f0675a01e0c9f12eb0cd1b48f497357ce
parents 7d8bf06c a33407d2
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1309,8 +1309,8 @@ bail:

status_t AaptAssets::filter(Bundle* bundle)
{
    WeakResourceFilter reqFilter;
    status_t err = reqFilter.parse(bundle->getConfigurations());
    sp<WeakResourceFilter> reqFilter(new WeakResourceFilter());
    status_t err = reqFilter->parse(bundle->getConfigurations());
    if (err != NO_ERROR) {
        return err;
    }
@@ -1326,12 +1326,12 @@ status_t AaptAssets::filter(Bundle* bundle)
        preferredDensity = preferredConfig.density;
    }

    if (reqFilter.isEmpty() && preferredDensity == 0) {
    if (reqFilter->isEmpty() && preferredDensity == 0) {
        return NO_ERROR;
    }

    if (bundle->getVerbose()) {
        if (!reqFilter.isEmpty()) {
        if (!reqFilter->isEmpty()) {
            printf("Applying required filter: %s\n",
                    bundle->getConfigurations().string());
        }
@@ -1383,7 +1383,7 @@ status_t AaptAssets::filter(Bundle* bundle)
                    continue;
                }
                const ResTable_config& config(file->getGroupEntry().toParams());
                if (!reqFilter.match(config)) {
                if (!reqFilter->match(config)) {
                    if (bundle->getVerbose()) {
                        printf("Pruning unneeded resource: %s\n",
                                file->getPrintableSource().string());