Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
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
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ private FlutterView(
super(context, attrs);

this.flutterTextureView = flutterTextureView;
this.renderSurface = flutterSurfaceView;
this.renderSurface = flutterTextureView;

init();
}
Expand Down
3 changes: 2 additions & 1 deletion shell/platform/android/test/io/flutter/FlutterTestSuite.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

package io.flutter;

import io.flutter.embedding.android.FlutterActivityAndFragmentDelegateTest;
import io.flutter.embedding.android.FlutterActivityTest;
import io.flutter.embedding.android.FlutterAndroidComponentTest;
import io.flutter.embedding.android.FlutterFragmentTest;
Expand Down Expand Up @@ -32,8 +33,8 @@

@RunWith(Suite.class)
@SuiteClasses({
// FlutterActivityAndFragmentDelegateTest.class, //TODO(mklim): Fix and re-enable this
DartExecutorTest.class,
FlutterActivityAndFragmentDelegateTest.class,
FlutterActivityTest.class,
FlutterAndroidComponentTest.class,
FlutterEngineCacheTest.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,18 @@ public void itGivesHostAnOpportunityToConfigureFlutterSurfaceView() {
public void itGivesHostAnOpportunityToConfigureFlutterTextureView() {
// ---- Test setup ----
Host customMockHost = mock(Host.class);
when(customMockHost.getContext()).thenReturn(RuntimeEnvironment.application);
when(customMockHost.getActivity()).thenReturn(Robolectric.setupActivity(Activity.class));
when(customMockHost.getLifecycle()).thenReturn(mock(Lifecycle.class));
when(customMockHost.getFlutterShellArgs()).thenReturn(new FlutterShellArgs(new String[] {}));
when(customMockHost.getDartEntrypointFunctionName()).thenReturn("main");
when(customMockHost.getAppBundlePath()).thenReturn("/fake/path");
when(customMockHost.getInitialRoute()).thenReturn("/");
when(customMockHost.getRenderMode()).thenReturn(RenderMode.texture);
when(customMockHost.getTransparencyMode()).thenReturn(TransparencyMode.transparent);
when(customMockHost.provideFlutterEngine(any(Context.class))).thenReturn(mockFlutterEngine);
when(customMockHost.shouldAttachEngineToActivity()).thenReturn(true);
when(customMockHost.shouldDestroyEngineWithHost()).thenReturn(true);
Comment on lines +223 to +234
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even with these additional lines, the test fails without the change in FlutterView.java


// Create the real object that we're testing.
FlutterActivityAndFragmentDelegate delegate =
Expand Down