adb: delete FDEVENT_DONTCLOSE.
The only existing usage of this doesn't actually need it.
Bug: http://b/79786774
Test: mma
Change-Id: If5e665705393e938cfdbf1526beb5496a8b99a9b
diff --git a/adb/daemon/jdwp_service.cpp b/adb/daemon/jdwp_service.cpp
index 89577cb..211d8f3 100644
--- a/adb/daemon/jdwp_service.cpp
+++ b/adb/daemon/jdwp_service.cpp
@@ -139,8 +139,6 @@
fatal("could not create fdevent for new JDWP process");
}
- this->fde->state |= FDE_DONT_CLOSE;
-
/* start by waiting for the PID */
fdevent_add(this->fde, FDE_READ);
}
@@ -148,7 +146,6 @@
~JdwpProcess() {
if (this->socket >= 0) {
adb_shutdown(this->socket);
- adb_close(this->socket);
this->socket = -1;
}
diff --git a/adb/fdevent.cpp b/adb/fdevent.cpp
index b3ff457..f9e262c 100644
--- a/adb/fdevent.cpp
+++ b/adb/fdevent.cpp
@@ -111,9 +111,6 @@
if (fde->state & FDE_ERROR) {
state += "E";
}
- if (fde->state & FDE_DONT_CLOSE) {
- state += "D";
- }
return android::base::StringPrintf("(fdevent %d %s)", fde->fd, state.c_str());
}
@@ -157,10 +154,8 @@
if (fde->state & FDE_PENDING) {
g_pending_list.remove(fde);
}
- if (!(fde->state & FDE_DONT_CLOSE)) {
- adb_close(fde->fd);
- fde->fd = -1;
- }
+ adb_close(fde->fd);
+ fde->fd = -1;
fde->state = 0;
fde->events = 0;
}
diff --git a/adb/fdevent.h b/adb/fdevent.h
index 2d8efd8..9c6e069 100644
--- a/adb/fdevent.h
+++ b/adb/fdevent.h
@@ -27,9 +27,6 @@
#define FDE_WRITE 0x0002
#define FDE_ERROR 0x0004
-/* features that may be set (via the events set/add/del interface) */
-#define FDE_DONT_CLOSE 0x0080
-
typedef void (*fd_func)(int fd, unsigned events, void *userdata);
struct fdevent {