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
[HapticFeedback.vibrate] Minfor fixes
- use the proper "MOBILE_PROFILE" and "WEARABLE_PROFILE" names instead of
  "MOBILE" and "WEARABLE"
- reorder lines in BUILD.gn

Signed-off-by: Pawel Wasowski <[email protected]>
  • Loading branch information
pwasowski2 committed Apr 27, 2021
commit 15f8f3de88ff72009fb6d4aad0e5abe2b7b293de
2 changes: 1 addition & 1 deletion shell/platform/tizen/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ config("tizen_rootstrap_include_dirs") {
"$custom_sysroot/usr/include/emile-1",
"$custom_sysroot/usr/include/eo-1",
"$custom_sysroot/usr/include/evas-1",
"$custom_sysroot/usr/include/feedback",
"$custom_sysroot/usr/include/system",
"$custom_sysroot/usr/include/wayland-extension",
# For Evas_GL.
Expand All @@ -64,7 +65,6 @@ config("tizen_rootstrap_include_dirs") {
"$custom_sysroot/usr/include/elementary-1",
"$custom_sysroot/usr/include/ethumb-1",
"$custom_sysroot/usr/include/ethumb-client-1",
"$custom_sysroot/usr/include/feedback"
]

lib_dirs = [ "$custom_sysroot/usr/lib" ]
Expand Down
12 changes: 6 additions & 6 deletions shell/platform/tizen/channels/platform_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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

#if defined(MOBILE) || defined(WEARABLE)
#if defined(MOBILE_PROFILE) || defined(WEARABLE_PROFILE)
static constexpr char kUnsupportedHapticFeedbackError[] =
"HapticFeedback.vibrate() is not supported";
static constexpr char kPermissionDeniedHapticFeedbackError[] =
Expand All @@ -21,7 +21,7 @@ static constexpr char kPermissionDeniedHapticFeedbackError[] =
"to use this method";
static constexpr char kUnknownHapticFeedbackError[] =
"An unknown error on HapticFeedback.vibrate()";
#endif
#endif // defined(MOBILE_PROFILE) || defined(WEARABLE_PROFILE)

PlatformChannel::PlatformChannel(flutter::BinaryMessenger* messenger)
: channel_(std::make_unique<flutter::MethodChannel<rapidjson::Document>>(
Expand All @@ -36,7 +36,7 @@ PlatformChannel::PlatformChannel(flutter::BinaryMessenger* messenger)

PlatformChannel::~PlatformChannel() {}

#if defined(MOBILE) || defined(WEARABLE)
#if defined(MOBILE_PROFILE) || defined(WEARABLE_PROFILE)
namespace {

class FeedbackManager {
Expand Down Expand Up @@ -132,7 +132,7 @@ class FeedbackManager {
};

} // namespace
#endif
#endif // defined(MOBILE_PROFILE) || defined(WEARABLE_PROFILE)

void PlatformChannel::HandleMethodCall(
const flutter::MethodCall<rapidjson::Document>& call,
Expand All @@ -147,7 +147,7 @@ void PlatformChannel::HandleMethodCall(
} else if (method == "HapticFeedback.vibrate") {
FT_LOGD("HapticFeedback.vibrate() call received");

#if defined(MOBILE) || defined(WEARABLE)
#if defined(MOBILE_PROFILE) || defined(WEARABLE_PROFILE)
auto ret = FeedbackManager::GetInstance().Vibrate();
if (FeedbackManager::ResultCode::OK == ret) {
result->Success();
Expand All @@ -164,7 +164,7 @@ void PlatformChannel::HandleMethodCall(
}
#else
result->NotImplemented();
#endif
#endif // defined(MOBILE_PROFILE) || defined(WEARABLE_PROFILE)
} else if (method == "Clipboard.getData") {
result->NotImplemented();
} else if (method == "Clipboard.setData") {
Expand Down