Move host 'get-state' service up so that it works.
Due to previous bad merge, the get-state service was moved out of the
ADB_HOST #ifdef block.
(cherry picked from commit dc22c3c7a82ad1919c52dc4d00c601ad7210c61b)
Change-Id: I08465e7c666104a4c2d15eadef8a4d4be7f91456
diff --git a/adb/adb.c b/adb/adb.c
index 2c7793d..10a1e0d 100644
--- a/adb/adb.c
+++ b/adb/adb.c
@@ -1670,11 +1670,6 @@
/* we don't even need to send a reply */
return 0;
}
-#endif // ADB_HOST
-
- int ret = handle_forward_request(service, ttype, serial, reply_fd);
- if (ret >= 0)
- return ret - 1;
if(!strncmp(service,"get-state",strlen("get-state"))) {
transport = acquire_one_transport(CS_ANY, ttype, serial, NULL);
@@ -1682,6 +1677,11 @@
send_msg_with_okay(reply_fd, state, strlen(state));
return 0;
}
+#endif // ADB_HOST
+
+ int ret = handle_forward_request(service, ttype, serial, reply_fd);
+ if (ret >= 0)
+ return ret - 1;
return -1;
}