am 775a8df6: merge from open-source master

Merge commit '775a8df614d364fcb82e280069a3f533381240b4' into kraken

* commit '775a8df614d364fcb82e280069a3f533381240b4':
  adb: Add persistent system property for running adb in TCPIP mode
This commit is contained in:
The Android Open Source Project 2010-04-21 09:15:05 -07:00 committed by Android Git Automerger
commit 9819bdb34e
1 changed files with 6 additions and 3 deletions

View File

@ -914,10 +914,13 @@ int adb_main(int is_daemon)
}
/* for the device, start the usb transport if the
** android usb device exists and "service.adb.tcp"
** is not set, otherwise start the network transport.
** android usb device exists and the "service.adb.tcp.port" and
** "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) {
// listen on TCP port specified by service.adb.tcp.port property
local_init(port);