OSDN Git Service

SdkManager: handle missing platforms/ and add-ons/ folders.
authorRaphael Moll <ralf@android.com>
Mon, 2 May 2011 21:24:26 +0000 (14:24 -0700)
committerRaphael Moll <ralf@android.com>
Mon, 2 May 2011 21:30:29 +0000 (14:30 -0700)
commita77c147c9e7ed3ef0c99cb2cdf986603e6d229cf
treeeabee1ab84a53e372b122fa41f63fb866918e906
parentb364b31e2f3a27f2b1c853ddffcfe598bed38657
SdkManager: handle missing platforms/ and add-ons/ folders.

A while ago, when we were dealing with monolithics SDKs,
the strategy was that we wanted to make sure that
the 'android' command was invoked from a properly setup
SDK folder. Consequently the SdkManager required at least
the platforms/ and add-ons/ folders to be present, even if
empty.

I don't think that behavior is really necessary anymore.
The 'android' tool is invoked with knowledge from its tools
folder, so we can safely assume the top parent is "the SDK
folder" and create these directories if they are missing.

We do however try to create them as early as possible if
they are missing, so that the tool aborts early if we can't
create them. The other alternative would be to just try to
create them when we're actually installing a package.

Change-Id: I8ea58f23add89c2dac0a22142f6fb5e71b8203aa
sdkmanager/app/src/com/android/sdkmanager/internal/repository/AboutPage.java
sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java