mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Handle null bundlePaths in FlutterRunArguments (flutter/engine#7161)
This commit is contained in:
parent
398355981c
commit
4edb0f1f99
@ -76,15 +76,16 @@ public class FlutterNativeView implements BinaryMessenger {
|
||||
}
|
||||
|
||||
public void runFromBundle(FlutterRunArguments args) {
|
||||
if (args.bundlePath == null && args.bundlePaths.length == 0) {
|
||||
boolean hasBundlePaths = args.bundlePaths != null && args.bundlePaths.length != 0;
|
||||
if (args.bundlePath == null && !hasBundlePaths) {
|
||||
throw new AssertionError("Either bundlePath or bundlePaths must be specified");
|
||||
} else if ((args.bundlePath != null || args.defaultPath != null) &&
|
||||
args.bundlePaths.length != 0) {
|
||||
hasBundlePaths) {
|
||||
throw new AssertionError("Can't specify both bundlePath and bundlePaths");
|
||||
} else if (args.entrypoint == null) {
|
||||
throw new AssertionError("An entrypoint must be specified");
|
||||
}
|
||||
if (args.bundlePaths.length != 0) {
|
||||
if (hasBundlePaths) {
|
||||
runFromBundleInternal(args.bundlePaths, args.entrypoint, args.libraryPath);
|
||||
} else {
|
||||
runFromBundleInternal(new String[] {args.bundlePath, args.defaultPath},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user