[flutter_tools] shrink API surface of Android SDK (#63867)

Attempt to simplify the Android SDK interface ahead of refactoring it. The locateAndroidSdk static method is called at startup to locate the android SDK, returning null if it cannot be found. These helper methods attempted to first look up the AndroidSDK if it was already null - which could only cover the case where someone installed the Android SDK while flutter was running (possibly through an IDE)
This commit is contained in:
Jonah Williams
2020-08-19 14:44:56 -07:00
committed by GitHub
parent 6f78131474
commit 4954a46ff0
5 changed files with 53 additions and 82 deletions

View File

@@ -4,8 +4,6 @@
import 'dart:async';
import 'package:flutter_tools/src/android/android_sdk.dart'
show getEmulatorPath;
import 'package:flutter_tools/src/android/android_emulator.dart';
import 'package:flutter_tools/src/base/common.dart';
import 'package:flutter_tools/src/base/logger.dart';
@@ -144,8 +142,6 @@ void main() {
logger: BufferLogger.test(),
);
expect(getEmulatorPath(mockSdk), mockSdk.emulatorPath);
final Completer<void> completer = Completer<void>();
FakeAsync().run((FakeAsync time) {
unawaited(emulator.launch().whenComplete(completer.complete));