merge from open-source master

Change-Id: I686f28fcfcff1cca7cf254de9e4334cc4ea2fef7
This commit is contained in:
The Android Open Source Project 2010-04-21 09:11:15 -07:00
commit 775a8df614

View file

@ -920,10 +920,13 @@ int adb_main(int is_daemon)
} }
/* for the device, start the usb transport if the /* for the device, start the usb transport if the
** android usb device exists and "service.adb.tcp" ** android usb device exists and the "service.adb.tcp.port" and
** is not set, otherwise start the network transport. ** "persist.adb.tcp.port" properties are not set.
** Otherwise start the network transport.
*/ */
property_get("service.adb.tcp.port", value, "0"); property_get("service.adb.tcp.port", value, "");
if (!value[0])
property_get("persist.adb.tcp.port", value, "");
if (sscanf(value, "%d", &port) == 1 && port > 0) { if (sscanf(value, "%d", &port) == 1 && port > 0) {
// listen on TCP port specified by service.adb.tcp.port property // listen on TCP port specified by service.adb.tcp.port property
local_init(port); local_init(port);