diff options
author | Raphael <raphael@google.com> | 2012-03-06 19:18:37 -0800 |
---|---|---|
committer | Raphael <raphael@google.com> | 2012-03-06 19:48:31 -0800 |
commit | 09d4a9a0b4d3e20c30b08fee46d1c03ff45fdc0b (patch) | |
tree | 61d32a940078d2210e292673ce09ffcdc68012db /sdkmanager/libs/sdklib/src | |
parent | 53965f3f406f5a142b71753a4623a4d363795527 (diff) | |
download | sdk-09d4a9a0b4d3e20c30b08fee46d1c03ff45fdc0b.zip sdk-09d4a9a0b4d3e20c30b08fee46d1c03ff45fdc0b.tar.gz sdk-09d4a9a0b4d3e20c30b08fee46d1c03ff45fdc0b.tar.bz2 |
SDK Manager: display tooltip for update packages.
When an item is both installed AND has an update available,
this changes the SDK Manager tooltip to show info for both
packages. This becomes particularly helpful when an extra
or addon can suddenly change names after an update.
Change-Id: Id96f161c0c4b3ace39cb00b6910f26080e6c15a4
Diffstat (limited to 'sdkmanager/libs/sdklib/src')
-rwxr-xr-x | sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/AddonPackage.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/AddonPackage.java b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/AddonPackage.java index a784b34..56bf492 100755 --- a/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/AddonPackage.java +++ b/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/AddonPackage.java @@ -577,6 +577,17 @@ public class AddonPackage extends Package String name = displayName.toLowerCase(Locale.US);
name = name.replaceAll("[^a-z0-9_-]+", "_"); //$NON-NLS-1$ //$NON-NLS-2$
name = name.replaceAll("_+", "_"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // NOTE: ideally we would want to trim leading and trailing _ but in fact
+ // this MUST NOT be done, otherwise it will break <vendor-id> tags that were
+ // auto converted from the old <vendor> tag when switching from the addon
+ // schema v3 to v4.
+ // if (name.length() > 1) {
+ // name = name.replaceAll("^_+", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ // }
+ // if (name.length() > 1) {
+ // name = name.replaceAll("_+$", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ // }
return name;
}
|