5#include "flutter/shell/platform/android/platform_message_response_android.h"
9#include "flutter/fml/make_copyable.h"
10#include "flutter/shell/platform/android/jni/platform_view_android_jni.h"
14PlatformMessageResponseAndroid::PlatformMessageResponseAndroid(
16 std::shared_ptr<PlatformViewAndroidJNI> jni_facade,
18 : response_id_(response_id),
19 jni_facade_(
std::move(jni_facade)),
20 platform_task_runner_(
std::move(platform_task_runner)) {}
22PlatformMessageResponseAndroid::~PlatformMessageResponseAndroid() =
default;
25void PlatformMessageResponseAndroid::Complete(
26 std::unique_ptr<fml::Mapping>
data) {
27 platform_task_runner_->PostTask(
30 jni_facade = jni_facade_]()
mutable {
31 jni_facade->FlutterViewHandlePlatformMessageResponse(response_id,
37void PlatformMessageResponseAndroid::CompleteEmpty() {
38 platform_task_runner_->PostTask(
40 jni_facade = jni_facade_
43 jni_facade->FlutterViewHandlePlatformMessageResponse(response_id,
internal::CopyableLambda< T > MakeCopyable(T lambda)
std::shared_ptr< const fml::Mapping > data