diff options
author | Raphael Moll <ralf@android.com> | 2012-11-26 14:57:27 -0800 |
---|---|---|
committer | Raphael Moll <ralf@android.com> | 2012-11-26 15:01:53 -0800 |
commit | 15832585a03db4e9ccb0b9732c7c9fd2677f8529 (patch) | |
tree | 7c944b5a001cd1890dbd08608ae92fa84297ec96 /sdkmanager/libs/sdkuilib | |
parent | 3fae5f5a94d6b8ef9a6126bfc3e45823696b0542 (diff) | |
download | sdk-15832585a03db4e9ccb0b9732c7c9fd2677f8529.zip sdk-15832585a03db4e9ccb0b9732c7c9fd2677f8529.tar.gz sdk-15832585a03db4e9ccb0b9732c7c9fd2677f8529.tar.bz2 |
SDK Manager: auto-select Support Library at startup.
When the SDK Manager starts, it auto-selects the
Windows driver on Windows. This change makes it
also auto-select the Support library extra package.
The rationale is that a lot of code now depends on it
(ADT templates, docs' sample code) so sooner or later
the user will need to install it anyway. We can help
newcomers by selecting it upfront.
Change-Id: I292c2d324bf68fe6b60f901fa5ecde0176ea5ec1
Diffstat (limited to 'sdkmanager/libs/sdkuilib')
-rwxr-xr-x | sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/core/PackagesDiffLogic.java | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/core/PackagesDiffLogic.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/core/PackagesDiffLogic.java index f5a2ed3..a95c8ac 100755 --- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/core/PackagesDiffLogic.java +++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/core/PackagesDiffLogic.java @@ -252,18 +252,30 @@ public class PackagesDiffLogic { } } - if (selectTop && currentPlatform == SdkConstants.PLATFORM_WINDOWS) { - // On Windows, we'll also auto-select the USB driver + if (selectTop) { for (PkgItem item : getAllPkgItems(true /*byApi*/, true /*bySource*/)) { Package p = item.getMainPackage(); if (p instanceof ExtraPackage && item.getState() == PkgState.NEW && !item.getRevision().isPreview()) { ExtraPackage ep = (ExtraPackage) p; - if (ep.getVendorId().equals("google") && //$NON-NLS-1$ - ep.getPath().equals("usb_driver")) { //$NON-NLS-1$ + + // On Windows, we'll also auto-select the USB driver + if (currentPlatform == SdkConstants.PLATFORM_WINDOWS) { + if (ep.getVendorId().equals("google") && //$NON-NLS-1$ + ep.getPath().equals("usb_driver")) { //$NON-NLS-1$ + item.setChecked(true); + continue; + } + } + + // On all platforms, we'll auto-select the support library. + if (ep.getVendorId().equals("android") && //$NON-NLS-1$ + ep.getPath().equals("support")) { //$NON-NLS-1$ item.setChecked(true); + continue; } + } } } |