OSDN Git Service

SDK Manager: Fix detection of emulator in tools local folder.
authorRaphael Moll <ralf@android.com>
Mon, 11 Apr 2011 19:31:01 +0000 (12:31 -0700)
committerRaphael Moll <ralf@android.com>
Mon, 11 Apr 2011 19:46:46 +0000 (12:46 -0700)
That's because the constant used did not have
the extension anymore.

Note: this was only an issue on Windows since mac/linux
don't need the .exe extension in emulator.

Also this doesn't fix the missing "emulator.exe" in AOSP,
but digit has the CL for that. So in AOSP one need to manually
copy tools/emulator-arm to tools/emulator for the local tools
package to be correctly recognized.

Change-Id: I9ab254eec5c28c4d006ba4132d6b0c6d87c01e15

sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/LocalSdkParser.java

index eb00562..c4b92b5 100755 (executable)
@@ -303,8 +303,12 @@ public class LocalSdkParser {
                 names.add(file.getName());\r
             }\r
         }\r
+\r
+        final String emulatorBinName =\r
+            SdkConstants.FN_EMULATOR + SdkConstants.FN_EMULATOR_EXTENSION;\r
+\r
         if (!names.contains(SdkConstants.androidCmdName()) ||\r
-                !names.contains(SdkConstants.FN_EMULATOR)) {\r
+                !names.contains(emulatorBinName)) {\r
             return null;\r
         }\r
 \r