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

Commit d5a93ac3 authored by Ying Wang's avatar Ying Wang
Browse files

Apply --extra-packages in case --custom-pacakge is also specified.

Change-Id: Ic4e7b417cf83ca75dc706b88dfcd814bb85eb1d8
parent bf8348d1
Loading
Loading
Loading
Loading
+17 −14
Original line number Diff line number Diff line
@@ -1740,6 +1740,13 @@ int doPackage(Bundle* bundle)
            // Write the R.java file into the appropriate class directory
            // e.g. gen/com/foo/app/R.java
            err = writeResourceSymbols(bundle, assets, assets->getPackage(), true);
        } else {
            const String8 customPkg(bundle->getCustomPackage());
            err = writeResourceSymbols(bundle, assets, customPkg, true);
        }
        if (err < 0) {
            goto bail;
        }
        // If we have library files, we're going to write our R.java file into
        // the appropriate class directory for those libraries as well.
        // e.g. gen/com/foo/app/lib/R.java
@@ -1750,17 +1757,13 @@ int doPackage(Bundle* bundle)
            while (packageString != NULL) {
                // Write the R.java file out with the correct package name
                err = writeResourceSymbols(bundle, assets, String8(packageString), true);
                if (err < 0) {
                    goto bail;
                }
                packageString = strtok(NULL, ":");
            }
            libs.unlockBuffer();
        }
        } else {
            const String8 customPkg(bundle->getCustomPackage());
            err = writeResourceSymbols(bundle, assets, customPkg, true);
        }
        if (err < 0) {
            goto bail;
        }
    } else {
        err = writeResourceSymbols(bundle, assets, assets->getPackage(), false);
        if (err < 0) {