mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Merge pull request #776 from Nirothipan/master
Fixes Default parameters not working on Virtual Android Device installation
This commit is contained in:
commit
e7a5392aa2
@ -494,17 +494,29 @@ public class TryIt {
|
||||
/**
|
||||
* This method gets the Android SDK location if available and sets the SDK path else downloads the SDK.
|
||||
*/
|
||||
private int count = 0;
|
||||
|
||||
private void setAndroidSDK() {
|
||||
sdkConfigFile = new File("sdkConfigLocation");
|
||||
if (!(sdkConfigFile.exists() && !sdkConfigFile.isDirectory())) {
|
||||
//TODO
|
||||
Scanner read = new Scanner(System.in, StandardCharsets.UTF_8.toString());
|
||||
System.out.print("Do you have an Android SDK installed on your computer (y/N) ? : ");
|
||||
String response = read.next().toLowerCase();
|
||||
System.out.print("Do you have an Android SDK installed on your computer (y/n) ? : ");
|
||||
String response = read.nextLine().toLowerCase();
|
||||
if (response.matches("y")) {
|
||||
setSDKPath();
|
||||
} else {
|
||||
} else if (response.matches("n") ) {
|
||||
getAndroidSDK();
|
||||
} else {
|
||||
if (count < 5) {
|
||||
System.out.println("Please enter a valid parameter .");
|
||||
count++;
|
||||
setAndroidSDK();
|
||||
return;
|
||||
} else {
|
||||
System.out.println("Terminating process");
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Scanner scanner = null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user