Merge change 4261 into donut

* changes:
  SDK Updater: addon id is name+vendor, lower case
This commit is contained in:
Android (Google) Code Review
2009-06-15 16:55:20 -07:00
2 changed files with 8 additions and 4 deletions

View File

@@ -206,7 +206,8 @@ public class AddonPackage extends Package {
/**
* Computes whether the given addon package is a suitable update for the current package.
* The base method checks the class type.
* The addon package also tests that the name is the same and the revision number is greater.
* The addon package also tests that the name+vendor is the same and
* the revision number is greater.
* <p/>
* An update is just that: a new package that supersedes the current one. If the new
* package has the same revision as the current one, it's not an update.
@@ -221,7 +222,11 @@ public class AddonPackage extends Package {
}
AddonPackage newPkg = (AddonPackage) replacementPackage;
return newPkg.getName().equalsIgnoreCase(this.getName()) &&
String thisId = getName() + "+" + getVendor(); //$NON-NLS-1$
String newId = newPkg.getName() + "+" + newPkg.getVendor(); //$NON-NLS-1$
return thisId.equalsIgnoreCase(newId) &&
newPkg.getRevision() > this.getRevision();
}
}

View File

@@ -270,7 +270,6 @@ public class LocalSdkParser {
SdkRepository.NS_SDK_REPOSITORY.equals(child.getNamespaceURI()) &&
elementFilter.equals(child.getLocalName())) {
String name = child.getLocalName();
Package p = null;
try {
if (SdkRepository.NODE_ADD_ON.equals(name)) {