From 32687beaf258d216115de51dbca89d1e9cbc376d Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 5 May 2015 12:50:26 -0700 Subject: [PATCH] Remove non-functional "adb persist". It isn't documented, it doesn't work, and it was only hacked into "adb shell" anyway. (It's not a bad idea, though, but if we do it we should do it properly.) Change-Id: I930a5c6dd1d2850bfdf131f2e989ae04100f7db9 --- adb/commandline.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/adb/commandline.cpp b/adb/commandline.cpp index aa31bfd83..f67fdbcb4 100644 --- a/adb/commandline.cpp +++ b/adb/commandline.cpp @@ -952,7 +952,6 @@ int adb_commandline(int argc, const char **argv) { int no_daemon = 0; int is_daemon = 0; int is_server = 0; - int persist = 0; int r; transport_type ttype = kTransportAny; const char* serial = NULL; @@ -993,8 +992,6 @@ int adb_commandline(int argc, const char **argv) { } else if (!strcmp(argv[0], "fork-server")) { /* this is a special flag used only when the ADB client launches the ADB Server */ is_daemon = 1; - } else if (!strcmp(argv[0],"persist")) { - persist = 1; } else if (!strncmp(argv[0], "-p", 2)) { const char *product = NULL; if (argv[0][2] == '\0') { @@ -1186,18 +1183,12 @@ int adb_commandline(int argc, const char **argv) { r = -1; } - if (persist) { - fprintf(stderr,"\n- waiting for device -\n"); - adb_sleep_ms(1000); - wait_for_device("wait-for-device", ttype, serial); - } else { - if (h) { - printf("\x1b[0m"); - fflush(stdout); - } - D("interactive shell loop. return r=%d\n", r); - return r; + if (h) { + printf("\x1b[0m"); + fflush(stdout); } + D("interactive shell loop. return r=%d\n", r); + return r; } } else if (!strcmp(argv[0], "exec-in") || !strcmp(argv[0], "exec-out")) {