diff options
author | Siva Velusamy <vsiva@google.com> | 2012-12-10 16:58:51 -0800 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2012-12-10 16:58:52 -0800 |
commit | f5129f903171de8aaf70608a9e7cfeef03fa5eec (patch) | |
tree | 9ef607b406ea5dfa5dd8ffa7c995dfe71330b000 | |
parent | a73442969f02619a27805957464a9006d9fb6080 (diff) | |
parent | 0e25f448812146e6a373c57adc42e09707e4cd3d (diff) | |
download | sdk-f5129f903171de8aaf70608a9e7cfeef03fa5eec.zip sdk-f5129f903171de8aaf70608a9e7cfeef03fa5eec.tar.gz sdk-f5129f903171de8aaf70608a9e7cfeef03fa5eec.tar.bz2 |
Merge "avd edit dialog: Warn if RAM > 512MB for Windows users."
-rw-r--r-- | sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/widgets/AvdCreationDialog.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/widgets/AvdCreationDialog.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/widgets/AvdCreationDialog.java index 89aa8ce..e9f2341 100644 --- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/widgets/AvdCreationDialog.java +++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/widgets/AvdCreationDialog.java @@ -922,6 +922,21 @@ public class AvdCreationDialog extends GridDialog { mAvdName.getText()); } + // On Windows, display a warning if attempting to create AVD's with RAM > 512 MB. + // This restriction should go away when we switch to using a 64 bit emulator. + if (SdkConstants.CURRENT_PLATFORM == SdkConstants.PLATFORM_WINDOWS) { + long ramSize = 0; + try { + ramSize = Long.parseLong(mRam.getText()); + } catch (NumberFormatException e) { + // ignore + } + + if (ramSize > 512) { + warning = "On Windows, set emulated RAM to be less than or equal to 512 MB."; + } + } + if (mGpuEmulation.getSelection() && mSnapshot.getSelection()) { valid = false; error = "GPU Emulation and Snapshot cannot be used simultaneously"; |