diff options
author | Raphael <raphael@google.com> | 2012-01-22 12:02:57 -0800 |
---|---|---|
committer | Raphael <raphael@google.com> | 2012-01-22 12:08:54 -0800 |
commit | 12523bc43ba8e25c542c09463ef0e44054b0f47d (patch) | |
tree | 52ffb3f7627a6de4e9dccbc1eabcdf6036fef180 /sdkmanager/libs/sdkuilib | |
parent | 121e7e305d8dc179bce1267b0ccef2741706262d (diff) | |
download | sdk-12523bc43ba8e25c542c09463ef0e44054b0f47d.zip sdk-12523bc43ba8e25c542c09463ef0e44054b0f47d.tar.gz sdk-12523bc43ba8e25c542c09463ef0e44054b0f47d.tar.bz2 |
ADT: Fix "Add compatability library"
2 issues:
- the code was still trying to look for the obsolete
"compatibility" export <path> instead of the new "support".
- the install filter did not support the <old-path> pkg attribute.
SDK Issue: 21488
Change-Id: Ie083b008d9ecdb9467a1b203c7602b5cc8c0580d
Diffstat (limited to 'sdkmanager/libs/sdkuilib')
-rwxr-xr-x | sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/AdtUpdateDialog.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/AdtUpdateDialog.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/AdtUpdateDialog.java index ca1159d..dce4110 100755 --- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/AdtUpdateDialog.java +++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/sdkman2/AdtUpdateDialog.java @@ -309,8 +309,18 @@ public class AdtUpdateDialog extends SwtBaseDialog { boolean accept(Package pkg) {
if (pkg instanceof ExtraPackage) {
ExtraPackage ep = (ExtraPackage) pkg;
- return ep.getVendor().equals(mVendor) &&
- ep.getPath().equals(mPath);
+ if (ep.getVendor().equals(mVendor)) {
+ // Check actual extra <path> field first
+ if (ep.getPath().equals(mPath)) {
+ return true;
+ }
+ // If not, check whether this is one of the <old-paths> values.
+ for (String oldPath : ep.getOldPaths()) {
+ if (oldPath.equals(mPath)) {
+ return true;
+ }
+ }
+ }
}
return false;
}
|