summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorJames Rose <rosej@google.com>2022-03-18 13:20:00 -0700
committerTreeHugger Robot <treehugger-gerrit@google.com>2022-03-18 22:50:31 +0000
commitbca90754c8ecda3d8e59a93cb368268a2e3ccf24 (patch)
tree2b3b12a84658150377bac92107c242ca4a207c3b /android
parent799327002f4bc059253bcc7f34f66c78359215b4 (diff)
downloadidea-bca90754c8ecda3d8e59a93cb368268a2e3ccf24.tar.gz
Don't show SDK page for standard setup
...even if the user already went to that page in the custom mode. But do continue showing it in standard setup if there was a problem with the path that the user had to correct. Fixes: 144218605 Test: manual Change-Id: Ib522c1fdbafedb60d5da65352cc82793d84c7510
Diffstat (limited to 'android')
-rwxr-xr-xandroid/src/com/android/tools/idea/welcome/wizard/deprecated/SdkComponentsStep.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/android/src/com/android/tools/idea/welcome/wizard/deprecated/SdkComponentsStep.java b/android/src/com/android/tools/idea/welcome/wizard/deprecated/SdkComponentsStep.java
index d0de82d80e0..4fe0a2a7b95 100755
--- a/android/src/com/android/tools/idea/welcome/wizard/deprecated/SdkComponentsStep.java
+++ b/android/src/com/android/tools/idea/welcome/wizard/deprecated/SdkComponentsStep.java
@@ -96,7 +96,7 @@ public class SdkComponentsStep extends FirstRunWizardStep implements Disposable
private boolean myUserEditedPath = false;
private PathValidator.Result mySdkDirectoryValidationResult;
- private boolean myWasVisible = false;
+ private boolean myWasForcedVisible = false;
private boolean myLoading;
public SdkComponentsStep(@NotNull ComponentTreeNode rootNode,
@@ -235,9 +235,10 @@ public class SdkComponentsStep extends FirstRunWizardStep implements Disposable
@Override
public boolean isStepVisible() {
- if (myWasVisible) {
- // If we showed it once (e.g. if we had a invalid path on the standard setup path) we want to be sure it shows again (e.g. if we
- // fix the path and then go backward and forward). Otherwise the experience is confusing.
+ if (myWasForcedVisible) {
+ // If we showed it once due to a validation error (e.g. if we had a invalid path on the standard setup path),
+ // we want to be sure it shows again (e.g. if we fix the path and then go backward and forward). Otherwise the experience is
+ // confusing.
return true;
}
else if (myMode.hasValidSdkLocation()) {
@@ -245,14 +246,13 @@ public class SdkComponentsStep extends FirstRunWizardStep implements Disposable
}
if (myState.getNotNull(myKeyCustomInstall, true)) {
- myWasVisible = true;
return true;
}
validate();
- myWasVisible = mySdkDirectoryValidationResult.getSeverity() != Validator.Severity.OK;
- return myWasVisible;
+ myWasForcedVisible = mySdkDirectoryValidationResult.getSeverity() != Validator.Severity.OK;
+ return myWasForcedVisible;
}
private void createUIComponents() {