1010
1111#include " flutter/shell/platform/common/json_method_codec.h"
1212#include " flutter/shell/platform/tizen/channels/feedback_manager.h"
13+ #ifdef COMMON_PROFILE
1314#include " flutter/shell/platform/tizen/channels/tizen_shell.h"
15+ #endif
1416#include " flutter/shell/platform/tizen/logger.h"
1517
1618namespace flutter {
@@ -25,12 +27,10 @@ constexpr char kClipboardHasStringsMethod[] = "Clipboard.hasStrings";
2527constexpr char kPlaySoundMethod [] = " SystemSound.play" ;
2628constexpr char kHapticFeedbackVibrateMethod [] = " HapticFeedback.vibrate" ;
2729constexpr char kSystemNavigatorPopMethod [] = " SystemNavigator.pop" ;
28- #ifdef COMMON_PROFILE
2930constexpr char kRestoreSystemUiOverlaysMethod [] =
3031 " SystemChrome.restoreSystemUIOverlays" ;
3132constexpr char kSetEnabledSystemUiOverlaysMethod [] =
3233 " SystemChrome.setEnabledSystemUIOverlays" ;
33- #endif
3434constexpr char kSetPreferredOrientationsMethod [] =
3535 " SystemChrome.setPreferredOrientations" ;
3636
@@ -43,7 +43,9 @@ constexpr char kUnknownClipboardError[] =
4343 " Unknown error during clipboard data retrieval" ;
4444
4545constexpr char kSoundTypeClick [] = " SystemSoundType.click" ;
46+ #ifdef COMMON_PROFILE
4647constexpr char kSystemUiOverlayBottom [] = " SystemUiOverlay.bottom" ;
48+ #endif
4749constexpr char kPortraitUp [] = " DeviceOrientation.portraitUp" ;
4850constexpr char kPortraitDown [] = " DeviceOrientation.portraitDown" ;
4951constexpr char kLandscapeLeft [] = " DeviceOrientation.landscapeLeft" ;
@@ -120,7 +122,6 @@ void PlatformChannel::HandleMethodCall(
120122 document.AddMember (rapidjson::Value (kValueKey , allocator),
121123 rapidjson::Value (!text_clipboard.empty ()), allocator);
122124 result->Success (document);
123- #ifdef COMMON_PROFILE
124125 } else if (method == kRestoreSystemUiOverlaysMethod ) {
125126 RestoreSystemUiOverlays ();
126127 result->Success ();
@@ -132,7 +133,6 @@ void PlatformChannel::HandleMethodCall(
132133 }
133134 SetEnabledSystemUiOverlays (overlays);
134135 result->Success ();
135- #endif
136136 } else if (method == kSetPreferredOrientationsMethod ) {
137137 const rapidjson::Document& list = arguments[0 ];
138138 std::vector<std::string> orientations;
@@ -167,6 +167,8 @@ void PlatformChannel::RestoreSystemUiOverlays() {
167167 if (!renderer_) {
168168 return ;
169169 }
170+
171+ #ifdef COMMON_PROFILE
170172 auto & shell = TizenShell::GetInstance ();
171173 shell.InitializeSoftkey (renderer_->GetWindowId ());
172174
@@ -175,13 +177,16 @@ void PlatformChannel::RestoreSystemUiOverlays() {
175177 } else {
176178 shell.HideSoftkey ();
177179 }
180+ #endif
178181}
179182
180183void PlatformChannel::SetEnabledSystemUiOverlays (
181184 const std::vector<std::string>& overlays) {
182185 if (!renderer_) {
183186 return ;
184187 }
188+
189+ #ifdef COMMON_PROFILE
185190 auto & shell = TizenShell::GetInstance ();
186191 shell.InitializeSoftkey (renderer_->GetWindowId ());
187192
@@ -191,13 +196,15 @@ void PlatformChannel::SetEnabledSystemUiOverlays(
191196 } else {
192197 shell.HideSoftkey ();
193198 }
199+ #endif
194200}
195201
196202void PlatformChannel::SetPreferredOrientations (
197203 const std::vector<std::string>& orientations) {
198204 if (!renderer_) {
199205 return ;
200206 }
207+
201208 static const std::map<std::string, int > orientation_mapping = {
202209 {kPortraitUp , 0 },
203210 {kLandscapeLeft , 90 },
0 commit comments