Skip to content

Commit 43be6f5

Browse files
authored
Exit application method is replaced by 'ui_app_exit' (flutter-tizen#3)
The function 'exit(EXIT_SUCCESS)' terminates the calling process immediately. The better way to exit process is to call 'ui_app_exit' which invokes the terminate callback on main thread so that the app can save its current status before exiting.
1 parent 8e09988 commit 43be6f5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

shell/platform/tizen/BUILD.gn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ source_set("flutter_tizen") {
6363

6464
include_dirs = [
6565
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include",
66+
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/appfw",
6667
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/base",
6768
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/dlog",
6869
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-1",
@@ -89,6 +90,7 @@ source_set("flutter_tizen") {
8990

9091
libs = [
9192
"base-utils-i18n",
93+
"capi-appfw-application",
9294
"capi-system-info",
9395
"capi-system-system-settings",
9496
"dlog",

shell/platform/tizen/channels/platform_channel.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
#include "platform_channel.h"
66

7+
#include <app.h>
8+
79
#include "flutter/shell/platform/common/cpp/json_method_codec.h"
810
#include "flutter/shell/platform/tizen/logger.h"
911

@@ -28,7 +30,7 @@ void PlatformChannel::HandleMethodCall(
2830
const auto method = call.method_name();
2931

3032
if (method == "SystemNavigator.pop") {
31-
exit(EXIT_SUCCESS);
33+
ui_app_exit();
3234
result->Success();
3335
} else if (method == "SystemSound.play") {
3436
result->NotImplemented();

0 commit comments

Comments
 (0)