Update 'android update adb' to the new file format for 3rd USB Vendor IDs.
The new file format is simply 1 ID per line, no need for a count value. Lines starting with '#' are comments and therefore ignored.
This commit is contained in:
@@ -76,12 +76,10 @@ public final class SdkManager {
|
|||||||
/** Preference file containing the usb ids for adb */
|
/** Preference file containing the usb ids for adb */
|
||||||
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_HEADER =
|
||||||
"# 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";
|
"# 1 USB VENDOR ID PER LINE.\n";
|
||||||
private final static String ADB_INI_COMMENT2 =
|
|
||||||
"# FOLLOWING NUMBERS ARE VENDOR ID.\n";
|
|
||||||
|
|
||||||
/** the location of the SDK */
|
/** the location of the SDK */
|
||||||
private final String mSdkLocation;
|
private final String mSdkLocation;
|
||||||
@@ -168,15 +166,8 @@ public final class SdkManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// write the file header
|
// write file header.
|
||||||
writer.write(ADB_INI_COMMENT1);
|
writer.write(ADB_INI_HEADER);
|
||||||
|
|
||||||
// write the ID count
|
|
||||||
writer.write(Integer.toString(set.size()));
|
|
||||||
writer.write("\n");
|
|
||||||
|
|
||||||
// write header for 2nd section
|
|
||||||
writer.write(ADB_INI_COMMENT2);
|
|
||||||
|
|
||||||
// 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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user