未验证 提交 86aa0144 编写于 作者: A Amir Hardon 提交者: GitHub

Fix platform views channel regression (#9185)

This regression was introduced in #7847.

The PlatformViewsChannel method call handler was always setting the result to `notImplemented` even after handling a result, this resulted in a "Reply already submitted" exception being thrown.
Note that the method channel code is swallowing this exception and logging an error, so we didn't crash instead we were logging an error(this is why the integration test didn't fail).

Filed https://github.com/flutter/flutter/issues/33863 to make sure tests fail when such exceptions are thrown.

This PR also cleans up an unused `NoSuchPlatformViewException` that was introduced in #7847.

https://github.com/flutter/flutter/issues/33866
上级 bd358e79
......@@ -51,8 +51,9 @@ public class PlatformViewsChannel {
case "setDirection":
setDirection(call, result);
break;
default:
result.notImplemented();
}
result.notImplemented();
}
private void create(MethodCall call, MethodChannel.Result result) {
......@@ -429,9 +430,4 @@ public class PlatformViewsChannel {
this.flags = flags;
}
}
/**
* The provided platform view ID does not correspond to any existing platform view.
*/
public static class NoSuchPlatformViewException extends IllegalStateException {}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册