From bca90754c8ecda3d8e59a93cb368268a2e3ccf24 Mon Sep 17 00:00:00 2001 From: James Rose Date: Fri, 18 Mar 2022 13:20:00 -0700 Subject: 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 --- .../idea/welcome/wizard/deprecated/SdkComponentsStep.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'android') 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() { -- cgit v1.2.3