Skip to content

Commit 553bdcc

Browse files
committed
Fix minor thing
* Add log stub Signed-off-by: MuHong Byun <[email protected]>
1 parent 058f962 commit 553bdcc

File tree

6 files changed

+41
-20
lines changed

6 files changed

+41
-20
lines changed

shell/platform/tizen/BUILD.gn

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ _flutter_tizen_source = [
3737
"flutter_tizen_texture_registrar.cc",
3838
"key_event_handler.cc",
3939
"tizen_event_loop.cc",
40-
"tizen_log.cc",
4140
"tizen_renderer.cc",
4241
"touch_event_handler.cc",
4342
]
@@ -131,6 +130,7 @@ template("embedder_for_profile") {
131130
"channels/settings_channel.cc",
132131
"external_texture_pixel_gl.cc",
133132
"external_texture_surface_gl.cc",
133+
"tizen_log.cc",
134134
]
135135

136136
libs = _libs_minimum
@@ -242,6 +242,7 @@ template("embedder_executable") {
242242
"channels/localization_channel_stub.cc",
243243
"channels/platform_channel_stub.cc",
244244
"channels/settings_channel_stub.cc",
245+
"tizen_log_stub.cc",
245246
"tizen_renderer_evas_gl.cc",
246247
]
247248

@@ -346,9 +347,7 @@ group("tizen") {
346347
":publish_headers_tizen",
347348
]
348349
if (enable_desktop_embeddings) {
349-
deps += [
350-
":flutter_tizen_shell",
351-
]
350+
deps += [ ":flutter_tizen_shell" ]
352351
} else {
353352
deps += [
354353
":flutter_tizen_common",

shell/platform/tizen/channels/settings_channel.h

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

88
#ifndef __X64_SHELL__
99
#include <system/system_settings.h>
10+
#else
11+
typedef enum {
12+
SYSTEM_SETTINGS_KEY_MAX,
13+
} system_settings_key_e;
1014
#endif
1115

1216
#include <memory>
@@ -23,13 +27,11 @@ class SettingsChannel {
2327
virtual ~SettingsChannel();
2428

2529
private:
26-
#ifndef __X64_SHELL__
2730
static void OnSettingsChangedCallback(system_settings_key_e key,
2831
void* user_data);
2932
void SendSettingsEvent();
3033

3134
std::unique_ptr<BasicMessageChannel<rapidjson::Document>> channel_;
32-
#endif
3335
};
3436

3537
} // namespace flutter

shell/platform/tizen/channels/settings_channel_stub.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ SettingsChannel::SettingsChannel(BinaryMessenger* messenger) {}
1010

1111
SettingsChannel::~SettingsChannel() {}
1212

13+
void SettingsChannel::SendSettingsEvent() {}
14+
15+
void SettingsChannel::OnSettingsChangedCallback(system_settings_key_e key,
16+
void* user_data) {}
17+
1318
} // namespace flutter

shell/platform/tizen/tizen_log.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ static pthread_t stderr_thread;
1414
static bool is_running = false;
1515
static log_priority min_log_priority = DLOG_ERROR;
1616

17-
#ifdef __X64_SHELL__
18-
int dlog_print(log_priority prio, const char* tag, const char* fmt, ...) {
19-
va_list arglist;
20-
va_start(arglist, fmt);
21-
printf(fmt, arglist);
22-
va_end(arglist);
23-
return 0;
24-
}
25-
#endif
26-
2717
namespace flutter {
2818

2919
void SetMinLoggingLevel(log_priority p) {

shell/platform/tizen/tizen_log.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#ifndef __X64_SHELL__
99
#include <dlog.h>
1010
#else
11-
#include <stdio.h>
1211
#define log_priority int
1312
#define DLOG_DEBUG 0
1413
#define DLOG_WARN 1
@@ -39,9 +38,7 @@ log_priority GetMinLoggingLevel();
3938

4039
#undef __LOG
4140

42-
#ifdef __X64_SHELL__
43-
#define __LOG(prio, fmt, args...) dlog_print(prio, LOG_TAG, fmt, ##args)
44-
#elif TV_PROFILE
41+
#ifdef TV_PROFILE
4542
// dlog_print() cannot be used because it implicitly passes LOG_ID_APPS as
4643
// a log id, which is ignored by TV devices. Instead, an internal function
4744
// __dlog_print() that takes a log id as a parameter is used.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright 2021 Samsung Electronics Co., Ltd. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
#include "tizen_log.h"
6+
#include <stdio.h>
7+
8+
int dlog_print(log_priority prio, const char* tag, const char* fmt, ...) {
9+
va_list arglist;
10+
va_start(arglist, fmt);
11+
printf(fmt, arglist);
12+
va_end(arglist);
13+
return 0;
14+
}
15+
16+
namespace flutter {
17+
18+
void SetMinLoggingLevel(log_priority p) {
19+
};
20+
21+
log_priority GetMinLoggingLevel() {
22+
return DLOG_ERROR;
23+
};
24+
25+
void StartLogging() {
26+
}
27+
28+
} // namespace flutter

0 commit comments

Comments
 (0)