Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 6ccbdc5

Browse files
committed
Add SuccessResponse to ON_CALL
1 parent d7ee743 commit 6ccbdc5

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

shell/platform/linux/fl_platform_plugin.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,16 +353,12 @@ static void method_call_cb(FlMethodChannel* channel,
353353
response = clipboard_has_strings_async(self, method_call);
354354
} else if (strcmp(method, kExitApplicationMethod) == 0) {
355355
response = system_exit_application(self, method_call);
356-
} else if (strcmp(method, kInitializationComplete) == 0) {
356+
} else if (strcmp(method, kInitializationCompleteMethod) == 0) {
357357
response = system_intitialization_complete(self, method_call);
358358
} else if (strcmp(method, kPlaySoundMethod) == 0) {
359359
response = system_sound_play(self, args);
360360
} else if (strcmp(method, kSystemNavigatorPopMethod) == 0) {
361361
response = system_navigator_pop(self);
362-
} else if (strcmp(method, kInitializationCompleteMethod) == 0) {
363-
// TODO(gspencergoog): Handle this message to enable exit message listening.
364-
// https://github.com/flutter/flutter/issues/126033
365-
response = FL_METHOD_RESPONSE(fl_method_success_response_new(nullptr));
366362
} else {
367363
response = FL_METHOD_RESPONSE(fl_method_not_implemented_response_new());
368364
}

shell/platform/linux/fl_platform_plugin_test.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@ TEST(FlPlatformPluginTest, ExitApplication) {
114114
EXPECT_NE(plugin, nullptr);
115115
g_autoptr(FlJsonMethodCodec) codec = fl_json_method_codec_new();
116116

117+
g_autoptr(FlValue) null = fl_value_new_null();
117118
ON_CALL(messenger, fl_binary_messenger_send_response(
118119
::testing::Eq<FlBinaryMessenger*>(messenger),
119-
::testing::_, ::testing::_, ::testing::_))
120+
::testing::_, SuccessResponse(null), ::testing::_))
120121
.WillByDefault(testing::Return(TRUE));
121122

122123
// Indicate that the binding is initialized.

0 commit comments

Comments
 (0)