Skip to content

Commit 7ac0c65

Browse files
authored
Add getHandle method to the app control channel (#40)
1 parent 49e52fe commit 7ac0c65

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

flutter/shell/platform/tizen/channels/app_control.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#include <app.h>
99

10+
#include <cstdint>
11+
#include <memory>
1012
#include <string>
1113
#include <unordered_map>
1214

flutter/shell/platform/tizen/channels/app_control_channel.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
#include "app_control_channel.h"
66

7+
#include <cstdint>
8+
#include <string>
9+
#include <variant>
10+
#include <vector>
11+
712
#include "flutter/shell/platform/common/client_wrapper/include/flutter/event_stream_handler_functions.h"
813
#include "flutter/shell/platform/common/client_wrapper/include/flutter/standard_method_codec.h"
914
#include "flutter/shell/platform/tizen/channels/encodable_value_holder.h"
@@ -100,6 +105,9 @@ void AppControlChannel::HandleMethodCall(
100105
SendTerminateRequest(app_control, std::move(result));
101106
} else if (method_name == "setAppControlData") {
102107
SetAppControlData(app_control, arguments, std::move(result));
108+
} else if (method_name == "getHandle") {
109+
result->Success(
110+
EncodableValue(reinterpret_cast<int64_t>(app_control->handle())));
103111
} else {
104112
result->NotImplemented();
105113
}

flutter/shell/platform/tizen/channels/encodable_value_holder.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#ifndef EMBEDDER_ENCODABLE_VALUE_HOLDER_H_
66
#define EMBEDDER_ENCODABLE_VALUE_HOLDER_H_
77

8+
#include <string>
9+
#include <variant>
10+
811
#include "flutter/shell/platform/common/client_wrapper/include/flutter/encodable_value.h"
912

1013
namespace flutter {

0 commit comments

Comments
 (0)