Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add SettingsChannel stub
  • Loading branch information
swift-kim authored and bwikbs committed Jul 5, 2021
commit 01650b74194b817312b9f656f5b9ba172cd81356
3 changes: 2 additions & 1 deletion shell/platform/tizen/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ _flutter_tizen_source = [
"channels/lifecycle_channel.cc",
"channels/navigation_channel.cc",
"channels/platform_view_channel.cc",
"channels/settings_channel.cc",
"channels/text_input_channel.cc",
"external_texture_pixel_gl.cc",
"external_texture_surface_gl.cc",
Expand Down Expand Up @@ -131,6 +130,7 @@ template("embedder_for_profile") {
sources += [
"channels/localization_channel.cc",
"channels/platform_channel.cc",
"channels/settings_channel.cc",
]

libs = _libs_minimum
Expand Down Expand Up @@ -241,6 +241,7 @@ template("embedder_executable") {
sources += [
"channels/localization_channel_stub.cc",
"channels/platform_channel_stub.cc",
"channels/settings_channel_stub.cc",
"tizen_renderer_evas_gl.cc",
]

Expand Down
16 changes: 0 additions & 16 deletions shell/platform/tizen/channels/settings_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,6 @@

#include "flutter/shell/platform/common/json_message_codec.h"

#ifdef __X64_SHELL__
int system_settings_set_changed_cb(system_settings_key_e key,
system_settings_changed_cb callback,
void* user_data) {
return 0;
}

int system_settings_unset_changed_cb(system_settings_key_e key) {
return 0;
}

int system_settings_get_value_bool(system_settings_key_e key, bool* value) {
return 0;
}
#endif

namespace flutter {

namespace {
Expand Down
17 changes: 2 additions & 15 deletions shell/platform/tizen/channels/settings_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,6 @@

#ifndef __X64_SHELL__
#include <system/system_settings.h>
#else
typedef enum {
SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, /**< (bool) Indicates whether
the 24-hour clock is used. If
the value is @c false, the
12-hour clock is used. */
SYSTEM_SETTINGS_KEY_MAX,
} system_settings_key_e;

typedef enum {
SYSTEM_SETTINGS_ERROR_NONE, /**< Successful */
} system_settings_error_e;

typedef void (*system_settings_changed_cb)(system_settings_key_e key,
void* user_data);
#endif

#include <memory>
Expand All @@ -38,11 +23,13 @@ class SettingsChannel {
virtual ~SettingsChannel();

private:
#ifndef __X64_SHELL__
static void OnSettingsChangedCallback(system_settings_key_e key,
void* user_data);
void SendSettingsEvent();

std::unique_ptr<BasicMessageChannel<rapidjson::Document>> channel_;
#endif
};

} // namespace flutter
Expand Down
13 changes: 13 additions & 0 deletions shell/platform/tizen/channels/settings_channel_stub.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "settings_channel.h"

namespace flutter {

SettingsChannel::SettingsChannel(BinaryMessenger* messenger) {}

SettingsChannel::~SettingsChannel() {}

} // namespace flutter