Make 'android update adb' write the USB vendor IDs in hexa.

This commit is contained in:
Xavier Ducrohet
2009-05-22 13:47:07 -07:00
parent c35157377b
commit 774ac9a0dc

View File

@@ -77,11 +77,11 @@ public final class SdkManager {
private final static String ADB_INI_FILE = "adb_usb.ini"; private final static String ADB_INI_FILE = "adb_usb.ini";
//0--------90--------90--------90--------90--------90--------90--------90--------9 //0--------90--------90--------90--------90--------90--------90--------90--------9
private final static String ADB_INI_COMMENT1 = private final static String ADB_INI_COMMENT1 =
"# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT\n" + "# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.\n" +
"# USE 'android update adb' TO GENERATE\n" + "# USE 'android update adb' TO GENERATE.\n" +
"# FIRST NUMBER IS VENDOR ID COUNT\n"; "# FIRST NUMBER IS VENDOR ID COUNT.\n";
private final static String ADB_INI_COMMENT2 = private final static String ADB_INI_COMMENT2 =
"# FOLLOWING NUMBERS ARE VENDOR ID IN DECIMAL\n"; "# FOLLOWING NUMBERS ARE VENDOR ID.\n";
/** the location of the SDK */ /** the location of the SDK */
private final String mSdkLocation; private final String mSdkLocation;
@@ -180,8 +180,7 @@ public final class SdkManager {
// now write the Id in a text file, one per line. // now write the Id in a text file, one per line.
for (Integer i : set) { for (Integer i : set) {
writer.write(i.toString()); writer.write(String.format("0x%04x\n", i));
writer.write("\n");
} }
} finally { } finally {
writer.close(); writer.close();