Skip to content

Commit 14cbc5a

Browse files
[FIX] Remove Emulator Download
1 parent b622ffe commit 14cbc5a

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

mode/src/processing/mode/android/SDKDownloader.java

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ protected Object doInBackground() throws Exception {
200200
Platform.setenv("ANDROID_SDK", sdkFolder.getAbsolutePath());
201201
Preferences.set("android.sdk.path", sdkFolder.getAbsolutePath());
202202
Preferences.set("android.sdk.target",downloadUrls.platformVersion);
203-
sdk = AndroidSDK.load(false, null);
203+
sdk = AndroidSDK.load(false, null);
204204
} catch (IOException e) {
205205
// TODO Handle exceptions here somehow (ie show error message)
206206
// and handle at least mkdir() results (above)
@@ -352,32 +352,34 @@ private void getMainDownloadUrls(SDKUrlHolder urlHolder,
352352

353353
// -----------------------------------------------------------------------
354354
// emulator
355-
expr = xpath.compile("//remotePackage[@path=\"emulator\"]"); //Matches two items according to xml file
356-
remotePackages = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
357-
found = false;
358-
if (remotePackages != null) {
359-
ArrayList<String> recentsArray = getRecentVersion(remotePackages,2);
360-
361-
urlHolder.emulatorVersion = recentsArray.get(1);
362-
363-
NodeList childNodes = remotePackages.item(Integer.parseInt(recentsArray.get(0))).getChildNodes();
364-
365-
urlHolder.buildToolsVersion = recentsArray.get(1);
366-
367-
try {
368-
ArrayList<String> urlData = parseURL(childNodes, true, requiredHostOs);
369-
urlHolder.emulatorFilename = urlData.get(0);
370-
urlHolder.emulatorUrl = REPOSITORY_URL + urlHolder.buildToolsFilename;
371-
urlHolder.totalSize += Integer.parseInt(urlData.get(1));
372-
found = true;
373-
}
374-
catch (Error e){
375-
e.printStackTrace();
376-
}
377-
}
378-
if (!found) {
379-
throw new IOException(AndroidMode.getTextString("sdk_downloader.error_cannot_find_emulator"));
380-
}
355+
//NOTE: Emulator Download moved from SDK Download,
356+
//Will be done along with Emulator Image installation
357+
// expr = xpath.compile("//remotePackage[@path=\"emulator\"]"); //Matches two items according to xml file
358+
// remotePackages = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
359+
// found = false;
360+
// if (remotePackages != null) {
361+
// ArrayList<String> recentsArray = getRecentVersion(remotePackages,2);
362+
//
363+
// urlHolder.emulatorVersion = recentsArray.get(1);
364+
//
365+
// NodeList childNodes = remotePackages.item(Integer.parseInt(recentsArray.get(0))).getChildNodes();
366+
//
367+
// urlHolder.buildToolsVersion = recentsArray.get(1);
368+
//
369+
// try {
370+
// ArrayList<String> urlData = parseURL(childNodes, true, requiredHostOs);
371+
// urlHolder.emulatorFilename = urlData.get(0);
372+
// urlHolder.emulatorUrl = REPOSITORY_URL + urlHolder.buildToolsFilename;
373+
// urlHolder.totalSize += Integer.parseInt(urlData.get(1));
374+
// found = true;
375+
// }
376+
// catch (Error e){
377+
// e.printStackTrace();
378+
// }
379+
// }
380+
// if (!found) {
381+
// throw new IOException(AndroidMode.getTextString("sdk_downloader.error_cannot_find_emulator"));
382+
// }
381383
}
382384
}
383385

0 commit comments

Comments
 (0)