From dc10c2e5a388f22fd0e061521dac61b6751b23f4 Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Fri, 22 May 2009 15:47:13 -0700 Subject: [PATCH] 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. --- .../src/com/android/sdklib/SdkManager.java | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java b/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java index 394b9e851..a1be66f7f 100644 --- a/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java +++ b/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java @@ -76,12 +76,10 @@ public final class SdkManager { /** Preference file containing the usb ids for adb */ private final static String ADB_INI_FILE = "adb_usb.ini"; //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" + "# USE 'android update adb' TO GENERATE.\n" + - "# FIRST NUMBER IS VENDOR ID COUNT.\n"; - private final static String ADB_INI_COMMENT2 = - "# FOLLOWING NUMBERS ARE VENDOR ID.\n"; + "# 1 USB VENDOR ID PER LINE.\n"; /** the location of the SDK */ private final String mSdkLocation; @@ -168,15 +166,8 @@ public final class SdkManager { } } - // write the file header - writer.write(ADB_INI_COMMENT1); - - // write the ID count - writer.write(Integer.toString(set.size())); - writer.write("\n"); - - // write header for 2nd section - writer.write(ADB_INI_COMMENT2); + // write file header. + writer.write(ADB_INI_HEADER); // now write the Id in a text file, one per line. for (Integer i : set) {