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

Commit d8f419d4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Address style and efficiency post-merge feedback from previous change...

Merge "Address style and efficiency post-merge feedback from previous change (ed409eae)."
parents e58548e5 7f51e007
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ int get_device_api_level() {

    int statusCode = capture_shell_command("getprop ro.build.version.sdk", &sdkVersionOutputBuffer,
                                           &sdkVersionErrorBuffer);
    if (statusCode == 0 && statusCode == 0 && sdkVersionOutputBuffer.size() > 0) {
    if (statusCode == 0 && sdkVersionOutputBuffer.size() > 0) {
        api_level = strtol((char*)sdkVersionOutputBuffer.data(), NULL, 10);
    }

@@ -107,7 +107,7 @@ static bool deploy_agent(bool checkTimeStamps, bool use_localagent, const char*
        const char* kChmodCommandPattern = "chmod 777 %sdeployagent.sh";
        std::string chmodCommand =
                android::base::StringPrintf(kChmodCommandPattern, kDeviceAgentPath);
        int ret = send_shell_command(chmodCommand.c_str());
        int ret = send_shell_command(chmodCommand);
        return (ret == 0);
    } else {
        return false;
@@ -248,7 +248,7 @@ int extract_metadata(const char* apkPath, FILE* outputFp) {
    std::vector<char> extractErrorBuffer;
    int statusCode;
    DeployAgentFileCallback cb(outputFp, &extractErrorBuffer, &statusCode);
    int ret = send_shell_command(extractCommand.c_str(), false, &cb);
    int ret = send_shell_command(extractCommand, false, &cb);

    if (ret == 0) {
        return cb.getBytesWritten();