Skip to content

Introduce assertion macros #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions shell/platform/tizen/channels/key_event_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <map>

#include "flutter/shell/platform/tizen/logger.h"
#include "flutter/shell/platform/tizen/tizen_log.h"

static constexpr char kChannelName[] = "flutter/keyevent";

Expand Down Expand Up @@ -221,7 +221,7 @@ KeyEventChannel::KeyEventChannel(flutter::BinaryMessenger* messenger)
KeyEventChannel::~KeyEventChannel() {}

void KeyEventChannel::SendKeyEvent(Ecore_Event_Key* key, bool is_down) {
LoggerD("code: %d, name: %s, mods: %d, type: %s", key->keycode, key->keyname,
FT_LOGD("code: %d, name: %s, mods: %d, type: %s", key->keycode, key->keyname,
key->modifiers, is_down ? kKeyDown : kKeyUp);

int gtk_keycode = 0;
Expand Down
10 changes: 5 additions & 5 deletions shell/platform/tizen/channels/lifecycle_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "lifecycle_channel.h"

#include "flutter/shell/platform/tizen/logger.h"
#include "flutter/shell/platform/tizen/tizen_log.h"

static constexpr char kChannelName[] = "flutter/lifecycle";
static constexpr char kInactive[] = "AppLifecycleState.inactive";
Expand All @@ -29,21 +29,21 @@ void LifecycleChannel::SendLifecycleMessage(const char message[]) {
}

void LifecycleChannel::AppIsInactive() {
LoggerD("send app lifecycle state inactive.");
FT_LOGD("send app lifecycle state inactive.");
SendLifecycleMessage(kInactive);
}

void LifecycleChannel::AppIsResumed() {
LoggerD("send app lifecycle state resumed.");
FT_LOGD("send app lifecycle state resumed.");
SendLifecycleMessage(kResumed);
}

void LifecycleChannel::AppIsPaused() {
LoggerD("send app lifecycle state paused.");
FT_LOGD("send app lifecycle state paused.");
SendLifecycleMessage(kPaused);
}

void LifecycleChannel::AppIsDetached() {
LoggerD("send app lifecycle state detached.");
FT_LOGD("send app lifecycle state detached.");
SendLifecycleMessage(kDetached);
}
10 changes: 5 additions & 5 deletions shell/platform/tizen/channels/localization_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <vector>

#include "flutter/shell/platform/tizen/logger.h"
#include "flutter/shell/platform/tizen/tizen_log.h"
#include "rapidjson/document.h"
#include "rapidjson/writer.h"

Expand Down Expand Up @@ -51,13 +51,13 @@ void LocalizationChannel::SendPlatformResolvedLocale() {
const char* locale;
int ret = i18n_ulocale_get_default(&locale);
if (ret != I18N_ERROR_NONE) {
LoggerE("i18n_ulocale_get_default() failed.");
FT_LOGE("i18n_ulocale_get_default() failed.");
return;
}

FlutterLocale* flutterLocale = GetFlutterLocale(locale);
if (!flutterLocale) {
LoggerE("Language code is required but not present.");
FT_LOGE("Language code is required but not present.");
return;
}

Expand Down Expand Up @@ -88,7 +88,7 @@ void LocalizationChannel::SendPlatformResolvedLocale() {
rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
if (!document.Accept(writer)) {
LoggerE("document.Accept failed!");
FT_LOGE("document.Accept failed!");
return;
}

Expand Down Expand Up @@ -120,7 +120,7 @@ FlutterLocale* LocalizationChannel::GetFlutterLocale(const char* locale) {
memcpy(language, buffer, bufSize);
language[bufSize] = '\0';
} else {
LoggerE("i18n_ulocale_get_language failed!");
FT_LOGE("i18n_ulocale_get_language failed!");
return nullptr;
}

Expand Down
4 changes: 2 additions & 2 deletions shell/platform/tizen/channels/platform_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <app.h>

#include "flutter/shell/platform/common/cpp/json_method_codec.h"
#include "flutter/shell/platform/tizen/logger.h"
#include "flutter/shell/platform/tizen/tizen_log.h"

static constexpr char kChannelName[] = "flutter/platform";

Expand Down Expand Up @@ -53,7 +53,7 @@ void PlatformChannel::HandleMethodCall(
} else if (method == "SystemChrome.setSystemUIOverlayStyle") {
result->NotImplemented();
} else {
LoggerI("Unimplemented method: %s", method.c_str());
FT_LOGI("Unimplemented method: %s", method.c_str());
result->NotImplemented();
}
}
18 changes: 9 additions & 9 deletions shell/platform/tizen/channels/platform_view_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "flutter/shell/platform/common/cpp/client_wrapper/include/flutter/standard_message_codec.h"
#include "flutter/shell/platform/common/cpp/client_wrapper/include/flutter/standard_method_codec.h"
#include "flutter/shell/platform/common/cpp/json_method_codec.h"
#include "flutter/shell/platform/tizen/logger.h"
#include "flutter/shell/platform/tizen/public/flutter_platform_view.h"
#include "flutter/shell/platform/tizen/tizen_log.h"

static constexpr char kChannelName[] = "flutter/platform_views";

Expand Down Expand Up @@ -122,7 +122,7 @@ void PlatformViewChannel::HandleMethodCall(
double width = ExtractDoubleFromMap(arguments, "width");
double height = ExtractDoubleFromMap(arguments, "height");

LoggerD(
FT_LOGD(
"PlatformViewChannel create viewType: %s id: %d width: %f height: %f ",
viewType.c_str(), viewId, width, height);

Expand Down Expand Up @@ -152,19 +152,19 @@ void PlatformViewChannel::HandleMethodCall(

result->Success(flutter::EncodableValue(viewInstance->GetTextureId()));
} else {
LoggerE("can't find view type = %s", viewType.c_str());
FT_LOGE("can't find view type = %s", viewType.c_str());
result->Error("0", "can't find view type");
}
} else {
int viewId = ExtractIntFromMap(arguments, "id");
auto it = view_instances_.find(viewId);
if (viewId >= 0 && it != view_instances_.end()) {
if (method == "dispose") {
LoggerD("PlatformViewChannel dispose");
FT_LOGD("PlatformViewChannel dispose");
it->second->Dispose();
result->Success();
} else if (method == "resize") {
LoggerD("PlatformViewChannel resize");
FT_LOGD("PlatformViewChannel resize");
double width = ExtractDoubleFromMap(arguments, "width");
double height = ExtractDoubleFromMap(arguments, "height");
it->second->Resize(width, height);
Expand All @@ -188,18 +188,18 @@ void PlatformViewChannel::HandleMethodCall(
it->second->Touch(type, button, x, y, dx, dy);
result->Success();
} else if (method == "setDirection") {
LoggerD("PlatformViewChannel setDirection");
FT_LOGD("PlatformViewChannel setDirection");
result->NotImplemented();
} else if (method == "clearFocus") {
LoggerD("PlatformViewChannel clearFocus");
FT_LOGD("PlatformViewChannel clearFocus");
it->second->ClearFocus();
result->NotImplemented();
} else {
LoggerD("Unimplemented method: %s", method.c_str());
FT_LOGD("Unimplemented method: %s", method.c_str());
result->NotImplemented();
}
} else {
LoggerE("can't find view id");
FT_LOGE("can't find view id");
result->Error("0", "can't find view id");
}
}
Expand Down
Loading