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

Commit 6c857b71 authored by Alex Light's avatar Alex Light
Browse files

Make otapreopt actually print dexopt error messages

These messages were collected but then ignored, hindering
investigations of issues. Make sure that we print these errors if
the dexopt fails.

Bug: 181182967
Test: treehugger
Change-Id: I10c58bf42e90ef3ca10b18d2145272735f49366e
parent 75dbd5e9
Loading
Loading
Loading
Loading
+23 −18
Original line number Diff line number Diff line
@@ -473,8 +473,8 @@ private:
    // Run dexopt with the parameters of parameters_.
    // TODO(calin): embed the profile name in the parameters.
    int Dexopt() {
        std::string dummy;
        return dexopt(parameters_.apk_path,
        std::string error;
        int res = dexopt(parameters_.apk_path,
                         parameters_.uid,
                         parameters_.pkgName,
                         parameters_.instruction_set,
@@ -490,7 +490,12 @@ private:
                         parameters_.profile_name,
                         parameters_.dex_metadata_path,
                         parameters_.compilation_reason,
                      &dummy);
                         &error);
        if (res != 0) {
            LOG(ERROR) << "During preopt of " << parameters_.apk_path << " got result " << res
                       << " error: " << error;
        }
        return res;
    }

    int RunPreopt() {