[flutter_tools] prevent creation of android devices if adb is not located (#65184)
More work to prevent current #2 crash issue on stable. If adb is not located do not list/create android devices.
This commit is contained in:
@@ -58,13 +58,18 @@ class AndroidWorkflow implements Workflow {
|
||||
bool get appliesToHostPlatform => _featureFlags.isAndroidEnabled;
|
||||
|
||||
@override
|
||||
bool get canListDevices => _androidSdk != null && _androidSdk.adbPath != null;
|
||||
bool get canListDevices => _androidSdk != null
|
||||
&& _androidSdk.adbPath != null;
|
||||
|
||||
@override
|
||||
bool get canLaunchDevices => _androidSdk != null && _androidSdk.validateSdkWellFormed().isEmpty;
|
||||
bool get canLaunchDevices => _androidSdk != null
|
||||
&& _androidSdk.adbPath != null
|
||||
&& _androidSdk.validateSdkWellFormed().isEmpty;
|
||||
|
||||
@override
|
||||
bool get canListEmulators => _androidSdk != null && _androidSdk.emulatorPath != null;
|
||||
bool get canListEmulators => _androidSdk != null
|
||||
&& _androidSdk.adbPath != null
|
||||
&& _androidSdk.emulatorPath != null;
|
||||
}
|
||||
|
||||
class AndroidValidator extends DoctorValidator {
|
||||
|
||||
Reference in New Issue
Block a user