diff options
author | Elliott Hughes | 2015-11-18 14:55:40 -0600 |
---|---|---|
committer | Gerrit Code Review | 2015-11-18 14:55:40 -0600 |
commit | 9f903687011c195154b0c69c02e6aaa35c867242 (patch) | |
tree | f01907582da862724855fabdea9c34398bd0af6e | |
parent | 9a6b8eeb44a78064ffbe4c04928a3904b1be2ab3 (diff) | |
parent | c2252df25a9821b95e93b8842042a282574e7c5e (diff) | |
download | platform-system-core-9f903687011c195154b0c69c02e6aaa35c867242.tar.gz platform-system-core-9f903687011c195154b0c69c02e6aaa35c867242.tar.xz platform-system-core-9f903687011c195154b0c69c02e6aaa35c867242.zip |
Merge "Don't send $TERM unless we're talking to a new adbd."
-rw-r--r-- | adb/commandline.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/adb/commandline.cpp b/adb/commandline.cpp index c13872a3b..73c8912bd 100644 --- a/adb/commandline.cpp +++ b/adb/commandline.cpp | |||
@@ -591,14 +591,15 @@ static std::string ShellServiceString(bool use_shell_protocol, | |||
591 | std::vector<std::string> args; | 591 | std::vector<std::string> args; |
592 | if (use_shell_protocol) { | 592 | if (use_shell_protocol) { |
593 | args.push_back(kShellServiceArgShellProtocol); | 593 | args.push_back(kShellServiceArgShellProtocol); |
594 | |||
595 | const char* terminal_type = getenv("TERM"); | ||
596 | if (terminal_type != nullptr) { | ||
597 | args.push_back(std::string("TERM=") + terminal_type); | ||
598 | } | ||
594 | } | 599 | } |
595 | if (!type_arg.empty()) { | 600 | if (!type_arg.empty()) { |
596 | args.push_back(type_arg); | 601 | args.push_back(type_arg); |
597 | } | 602 | } |
598 | const char* terminal_type = getenv("TERM"); | ||
599 | if (terminal_type != nullptr) { | ||
600 | args.push_back(std::string("TERM=") + terminal_type); | ||
601 | } | ||
602 | 603 | ||
603 | // Shell service string can look like: shell[,arg1,arg2,...]:[command]. | 604 | // Shell service string can look like: shell[,arg1,arg2,...]:[command]. |
604 | return android::base::StringPrintf("shell%s%s:%s", | 605 | return android::base::StringPrintf("shell%s%s:%s", |