Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit fd49da4

Browse files
committed
merge conflicts
2 parents e6e217d + fac302b commit fd49da4

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,9 +828,9 @@ public FlutterOverlaySurface createOverlaySurface() {
828828
ensureRunningOnMainThread();
829829
if (platformViewsController == null) {
830830
throw new RuntimeException(
831-
"platformViewsController must be set before attempting to position an overlay surface");
831+
"platformViewsController must be set before attempting to create an overlay surface");
832832
}
833-
platformViewsController.onDisplayOverlaySurface(id, x, y, width, height);
833+
return platformViewsController.createOverlaySurface();
834834
}
835835
// ----- End Engine Lifecycle Support ----
836836

shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import androidx.annotation.NonNull;
1818
import androidx.annotation.UiThread;
1919
import androidx.annotation.VisibleForTesting;
20+
import io.flutter.embedding.engine.FlutterOverlaySurface;
2021
import io.flutter.embedding.engine.dart.DartExecutor;
2122
import io.flutter.embedding.engine.systemchannels.PlatformViewsChannel;
2223
import io.flutter.embedding.engine.FlutterOverlaySurface;

shell/platform/android/platform_view_android_jni_impl.cc

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,19 @@ static jmethodID g_on_first_frame_method = nullptr;
8080

8181
static jmethodID g_on_engine_restart_method = nullptr;
8282

83+
<<<<<<< HEAD
84+
=======
85+
static jmethodID g_on_begin_frame_method = nullptr;
86+
87+
static jmethodID g_on_end_frame_method = nullptr;
88+
89+
static jmethodID g_create_overlay_surface_method = nullptr;
90+
91+
static jmethodID g_flutter_overlay_layer_get_id_method = nullptr;
92+
93+
static jmethodID g_flutter_overlay_layer_get_surface_method = nullptr;
94+
95+
>>>>>>> fac302be46c3fa3a969884c223746c3054d73999
8396
static jmethodID g_create_overlay_surface_method = nullptr;
8497
static jmethodID g_flutter_overlay_layer_get_id_method = nullptr;
8598
static jmethodID g_flutter_overlay_layer_get_surface_method = nullptr;
@@ -771,9 +784,9 @@ bool PlatformViewAndroid::Register(JNIEnv* env) {
771784
FML_LOG(ERROR) << "Could not locate onEndFrame method";
772785
return false;
773786
}
774-
775-
g_create_overlay_surface_method =
776-
env->GetMethodID(g_flutter_jni_class->obj(), "createOverlaySurface", "()V");
787+
788+
g_create_overlay_surface_method = env->GetMethodID(
789+
g_flutter_jni_class->obj(), "createOverlaySurface", "()V");
777790

778791
if (g_create_overlay_surface_method == nullptr) {
779792
FML_LOG(ERROR) << "Could not locate createOverlaySurface method";

shell/platform/android/test/io/flutter/embedding/engine/FlutterJNITest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,15 @@ public void onEndFrame__callsPlatformViewsController() {
116116
public void createOverlaySurface__callsPlatformViewsController() {
117117
PlatformViewsController platformViewsController = mock(PlatformViewsController.class);
118118

119+
// --- Test Setup ---
119120
FlutterJNI flutterJNI = new FlutterJNI();
120121
flutterJNI.setPlatformViewsController(platformViewsController);
121122

122123
// --- Execute Test ---
123-
flutterJNI.onDisplayOverlaySurface(
124-
/*id=*/ 1, /*x=*/ 10, /*y=*/ 20, /*width=*/ 100, /*height=*/ 200);
124+
flutterJNI.createOverlaySurface();
125125

126126
// --- Verify Results ---
127-
verify(platformViewsController, times(1))
128-
.onDisplayOverlaySurface(/*id=*/ 1, /*x=*/ 10, /*y=*/ 20, /*width=*/ 100, /*height=*/ 200);
127+
verify(platformViewsController, times(1)).createOverlaySurface();
129128
}
130129
}
131130

0 commit comments

Comments
 (0)