aboutsummaryrefslogtreecommitdiffstats
path: root/sdkmanager/app
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2011-09-23 15:24:47 -0700
committerXavier Ducrohet <xav@android.com>2011-09-23 16:03:02 -0700
commitef33cfcef8082b20df0263101c4cef7d76e4102b (patch)
tree2102e4d19cf23ef3ca5fceb0cf69efd6e6979a06 /sdkmanager/app
parent9c7692151010d9ae4d52b645c5a2e7fea3fe9dda (diff)
downloadsdk-ef33cfcef8082b20df0263101c4cef7d76e4102b.zip
sdk-ef33cfcef8082b20df0263101c4cef7d76e4102b.tar.gz
sdk-ef33cfcef8082b20df0263101c4cef7d76e4102b.tar.bz2
Merge b927e75 from master. do not merge.
When creating AVDs, check ABI before prompting for hw config. The check verifies the number of available ABIs and the presence of the --abi option (required if 2+ ABIs). This avoid going through all the hardware config to then get an error because --abi is missing. Change-Id: I1c69dec3f2262e5faa8ce8a2d53d01fcafe8a20d
Diffstat (limited to 'sdkmanager/app')
-rw-r--r--sdkmanager/app/src/com/android/sdkmanager/Main.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/sdkmanager/app/src/com/android/sdkmanager/Main.java b/sdkmanager/app/src/com/android/sdkmanager/Main.java
index 0e4b1f8..4bf8867 100644
--- a/sdkmanager/app/src/com/android/sdkmanager/Main.java
+++ b/sdkmanager/app/src/com/android/sdkmanager/Main.java
@@ -1063,6 +1063,20 @@ public class Main {
}
}
+ String abiType = mSdkCommandLine.getParamAbi();
+ if (target != null && (abiType == null || abiType.length() == 0)) {
+ ISystemImage[] systemImages = target.getSystemImages();
+ if (systemImages != null && systemImages.length == 1) {
+ // Auto-select the single ABI available
+ abiType = systemImages[0].getAbiType();
+ mSdkLog.printf("Auto-selecting single ABI %1$s", abiType);
+ } else {
+ displayAbiList(target, "Valid ABIs: ");
+ errorAndExit("This platform has more than one ABI. Please specify one using --%1$s.",
+ SdkCommandLine.KEY_ABI);
+ }
+ }
+
Map<String, String> hardwareConfig = null;
if (target != null && target.isPlatform()) {
try {
@@ -1078,20 +1092,6 @@ public class Main {
oldAvdInfo = avdManager.getAvd(avdName, false /*validAvdOnly*/);
}
- String abiType = mSdkCommandLine.getParamAbi();
- if (target != null && (abiType == null || abiType.length() == 0)) {
- ISystemImage[] systemImages = target.getSystemImages();
- if (systemImages != null && systemImages.length == 1) {
- // Auto-select the single ABI available
- abiType = systemImages[0].getAbiType();
- mSdkLog.printf("Auto-selecting single ABI %1$s", abiType);
- } else {
- displayAbiList(target, "Valid ABIs: ");
- errorAndExit("This platform has more than one ABI. Please specify one using --%1$s.",
- SdkCommandLine.KEY_ABI);
- }
- }
-
@SuppressWarnings("unused") // newAvdInfo is never read, yet useful for debugging
AvdInfo newAvdInfo = avdManager.createAvd(avdFolder,
avdName,