android tool: support --target symbolic target names

BUG 2056746

Change-Id: I579e58f7c63cf404cd11af394f41ed7f998593ce
This commit is contained in:
Raphael
2009-09-10 15:14:11 -07:00
parent 00a8a57a7a
commit 2196fd0317
4 changed files with 95 additions and 28 deletions

View File

@@ -88,6 +88,16 @@ public final class SdkManager {
private final String mSdkLocation;
private IAndroidTarget[] mTargets;
/**
* Create a new {@link SdkManager} instance.
* External users should use {@link #createManager(String, ISdkLog)}.
*
* @param sdkLocation the location of the SDK.
*/
private SdkManager(String sdkLocation) {
mSdkLocation = sdkLocation;
}
/**
* Creates an {@link SdkManager} for a given sdk location.
* @param sdkLocation the location of the SDK.
@@ -125,11 +135,23 @@ public final class SdkManager {
/**
* Returns the targets that are available in the SDK.
* <p/>
* The array can be empty but not null.
*/
public IAndroidTarget[] getTargets() {
return mTargets;
}
/**
* Sets the targets that are available in the SDK.
* <p/>
* The array can be empty but not null.
*/
private void setTargets(IAndroidTarget[] targets) {
assert targets != null;
mTargets = targets;
}
/**
* Returns a target from a hash that was generated by {@link IAndroidTarget#hashString()}.
*
@@ -202,14 +224,6 @@ public final class SdkManager {
setTargets(list.toArray(new IAndroidTarget[list.size()]));
}
private SdkManager(String sdkLocation) {
mSdkLocation = sdkLocation;
}
private void setTargets(IAndroidTarget[] targets) {
mTargets = targets;
}
/**
* Loads the Platforms from the SDK.
* @param location Location of the SDK