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

Commit c2252df2 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Don't send $TERM unless we're talking to a new adbd.

I put the conditional in the wrong place, not realizing that even the
old shell system allowed one 'argument'.

Bug: http://b/25765657
Change-Id: I2752fb838d6377bf24e5b4cf959462557a196c87
parent 9a6b8eeb
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -591,14 +591,15 @@ static std::string ShellServiceString(bool use_shell_protocol,
    std::vector<std::string> args;
    if (use_shell_protocol) {
        args.push_back(kShellServiceArgShellProtocol);
    }
    if (!type_arg.empty()) {
        args.push_back(type_arg);
    }

        const char* terminal_type = getenv("TERM");
        if (terminal_type != nullptr) {
            args.push_back(std::string("TERM=") + terminal_type);
        }
    }
    if (!type_arg.empty()) {
        args.push_back(type_arg);
    }

    // Shell service string can look like: shell[,arg1,arg2,...]:[command].
    return android::base::StringPrintf("shell%s%s:%s",