diff options
author | Raphael Moll <ralf@android.com> | 2010-07-30 15:37:25 -0700 |
---|---|---|
committer | Raphael Moll <ralf@android.com> | 2010-07-30 15:45:01 -0700 |
commit | b77fc44ce57afeb2dcc4504bf486534feb031f8c (patch) | |
tree | f76a41069be234b04b9bade0793268d5246f9594 /sdkmanager/app/src/com | |
parent | 2e99f995cf6ac6496d83da3ffefb1a8e611af181 (diff) | |
download | sdk-b77fc44ce57afeb2dcc4504bf486534feb031f8c.zip sdk-b77fc44ce57afeb2dcc4504bf486534feb031f8c.tar.gz sdk-b77fc44ce57afeb2dcc4504bf486534feb031f8c.tar.bz2 |
SdkManager: support for upgrade to Schema #3.
This changes the way the sdk manager looks for schema upgrades:
- when trying to load an XML, parse the root element and scan
for our XLMNS. If it parses, get the version number at the end
and use this directly to try to load using the right schema.
- In turn this allows us to distinguish between an incorrectly
formatted XML (but using the right schema) versus something
that is not our XML schema or not an XML at all, and then we
can produce better errors for the user.
- We also then directly know when the schema version is above
the known value of the tool and can then create the upgrade
tools node accordingly.
Change-Id: I58c7d89d7b57dd4d5488f726e5f8b21cc4308451
Diffstat (limited to 'sdkmanager/app/src/com')
-rwxr-xr-x | sdkmanager/app/src/com/android/sdkmanager/internal/repository/AboutPage.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sdkmanager/app/src/com/android/sdkmanager/internal/repository/AboutPage.java b/sdkmanager/app/src/com/android/sdkmanager/internal/repository/AboutPage.java index 5d3e65a..fa05b29 100755 --- a/sdkmanager/app/src/com/android/sdkmanager/internal/repository/AboutPage.java +++ b/sdkmanager/app/src/com/android/sdkmanager/internal/repository/AboutPage.java @@ -19,6 +19,7 @@ package com.android.sdkmanager.internal.repository; import com.android.sdklib.SdkConstants;
import com.android.sdklib.internal.repository.Package;
+import com.android.sdklib.repository.SdkRepository;
import com.android.sdkmanager.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
@@ -64,8 +65,12 @@ public class AboutPage extends Composite { mLabel = new Label(parent, SWT.NONE);
mLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));
mLabel.setText(String.format(
- "Android SDK Updater.\nRevision %1$s\nCopyright (C) 2009 The Android Open Source Project.",
- getRevision()));
+ "Android SDK Updater.\n" +
+ "Revision %1$s\n" +
+ "Repository XML Schema #%2$d\n" +
+ "Copyright (C) 2009-2010 The Android Open Source Project.",
+ getRevision(),
+ SdkRepository.NS_LATEST_VERSION));
}
@Override
|