SDK Updater: fix wrong error when unable to get repository.xml

BUG 2095530

Change-Id: I19622378b8da049f1c3416b8e0951ecc1f7475f0
This commit is contained in:
Raphael
2009-09-14 15:24:47 -07:00
parent 48e8ca1f52
commit 8151879a7d
3 changed files with 5 additions and 2 deletions

View File

@@ -7,5 +7,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/AndroidPrefs"/> <classpathentry combineaccessrules="false" kind="src" path="/AndroidPrefs"/>
<classpathentry combineaccessrules="false" kind="src" path="/SdkUiLib"/> <classpathentry combineaccessrules="false" kind="src" path="/SdkUiLib"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/ANDROID_SWT"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

View File

@@ -192,8 +192,10 @@ public class RepoSource implements IDescription {
if (exception[0] != null) { if (exception[0] != null) {
if (exception[0] instanceof FileNotFoundException) { if (exception[0] instanceof FileNotFoundException) {
reason = "File not found"; reason = "File not found";
mFetchError += ": " + reason;
} else if (exception[0] instanceof SSLKeyException) { } else if (exception[0] instanceof SSLKeyException) {
reason = "SSL error. You might want to force download through http in the settings."; reason = "HTTPS SSL error. You might want to force download through HTTP in the settings.";
mFetchError += ": HTTPS SSL error";
} else if (exception[0].getMessage() != null) { } else if (exception[0].getMessage() != null) {
reason = exception[0].getMessage(); reason = exception[0].getMessage();
} }

View File

@@ -208,7 +208,7 @@ public class RepoSourcesAdapter {
packages = null; packages = null;
} }
if (packages != null && source.getFetchError() != null) { if (packages == null && source.getFetchError() != null) {
// Return a dummy entry to display the fetch error // Return a dummy entry to display the fetch error
return new Object[] { new RepoSourceError(source) }; return new Object[] { new RepoSourceError(source) };
} }