From b77fc44ce57afeb2dcc4504bf486534feb031f8c Mon Sep 17 00:00:00 2001 From: Raphael Moll Date: Fri, 30 Jul 2010 15:37:25 -0700 Subject: 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 --- .../com/android/sdkmanager/internal/repository/AboutPage.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sdkmanager/app/src/com') 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 -- cgit v1.1