Preparation work for adb to support USB vendor Ids provided by SDK add-ons.
Added usb_vendors.* which handles creating (and deleting) a list of vendor ids.
This list is meant to be used everywhere the built-in lists (usb_osx), or the
built-in vendor IDs (transport_usb) were used.
For now the list is only built with the built-in VENDOR_ID_*. Next step
is to read a small file created from all the SDK add-on.
Other misc changes: made is_adb_interface present only if ADB_HOST is true
to prevent accessing a list that doesn't exist (usb_vendors is only
compiled for the host version of adb).
diff --git a/adb/adb.c b/adb/adb.c
index 7a2b299..0b5ebac 100644
--- a/adb/adb.c
+++ b/adb/adb.c
@@ -29,6 +29,8 @@
#if !ADB_HOST
#include <private/android_filesystem_config.h>
+#else
+#include "usb_vendors.h"
#endif
@@ -833,6 +835,7 @@
#if ADB_HOST
HOST = 1;
+ usb_vendors_init();
usb_init();
local_init();
@@ -916,6 +919,9 @@
fdevent_loop();
usb_cleanup();
+#if ADB_HOST
+ usb_vendors_cleanup();
+#endif
return 0;
}