diff --git a/testing/scenario_app/android/BUILD.gn b/testing/scenario_app/android/BUILD.gn index aa5107e725caf..31b3169ba9aff 100644 --- a/testing/scenario_app/android/BUILD.gn +++ b/testing/scenario_app/android/BUILD.gn @@ -10,7 +10,6 @@ _android_sources = [ "app/src/androidTest/java/dev/flutter/scenarios/ExampleInstrumentedTest.java", "app/src/androidTest/java/dev/flutter/scenariosui/DrawSolidBlueScreenTest.java", "app/src/androidTest/java/dev/flutter/scenariosui/ExternalTextureTests.java", - "app/src/androidTest/java/dev/flutter/scenariosui/GetBitmapTests.java", "app/src/androidTest/java/dev/flutter/scenariosui/MemoryLeakTests.java", "app/src/androidTest/java/dev/flutter/scenariosui/PlatformTextureUiTests.java", "app/src/androidTest/java/dev/flutter/scenariosui/PlatformViewUiTests.java", @@ -25,7 +24,6 @@ _android_sources = [ "app/src/main/AndroidManifest.xml", "app/src/main/assets/sample.mp4", "app/src/main/java/dev/flutter/scenarios/ExternalTextureFlutterActivity.java", - "app/src/main/java/dev/flutter/scenarios/GetBitmapActivity.java", "app/src/main/java/dev/flutter/scenarios/PlatformViewsActivity.java", "app/src/main/java/dev/flutter/scenarios/SpawnMultiEngineActivity.java", "app/src/main/java/dev/flutter/scenarios/SpawnedEngineActivity.java", diff --git a/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenariosui/GetBitmapTests.java b/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenariosui/GetBitmapTests.java deleted file mode 100644 index e4c68ee191d1f..0000000000000 --- a/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenariosui/GetBitmapTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package dev.flutter.scenariosui; - -import static org.junit.Assert.*; - -import android.content.Intent; -import android.graphics.Bitmap; -import androidx.annotation.NonNull; -import androidx.test.ext.junit.runners.AndroidJUnit4; -import androidx.test.filters.LargeTest; -import androidx.test.rule.ActivityTestRule; -import dev.flutter.scenarios.GetBitmapActivity; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -@RunWith(AndroidJUnit4.class) -@LargeTest -public class GetBitmapTests { - @Rule @NonNull - public ActivityTestRule activityRule = - new ActivityTestRule<>( - GetBitmapActivity.class, /*initialTouchMode=*/ false, /*launchActivity=*/ false); - - @Test - public void getBitmap() throws Exception { - Intent intent = new Intent(Intent.ACTION_MAIN); - intent.putExtra("scenario_name", "get_bitmap"); - GetBitmapActivity activity = activityRule.launchActivity(intent); - Bitmap bitmap = activity.getBitmap(); - - assertEquals(bitmap.getPixel(10, 10), 0xFFFF0000); - assertEquals(bitmap.getPixel(10, bitmap.getHeight() - 10), 0xFF0000FF); - } -} diff --git a/testing/scenario_app/android/app/src/main/AndroidManifest.xml b/testing/scenario_app/android/app/src/main/AndroidManifest.xml index e400c24567a89..3c194a37bf9c7 100644 --- a/testing/scenario_app/android/app/src/main/AndroidManifest.xml +++ b/testing/scenario_app/android/app/src/main/AndroidManifest.xml @@ -58,17 +58,5 @@ - - - - - - diff --git a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/GetBitmapActivity.java b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/GetBitmapActivity.java deleted file mode 100644 index 78bd2b9fa26ea..0000000000000 --- a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/GetBitmapActivity.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package dev.flutter.scenarios; - -import android.graphics.Bitmap; -import androidx.annotation.Nullable; - -public class GetBitmapActivity extends TestActivity { - - @Nullable private volatile Bitmap bitmap; - - @Nullable - public Bitmap getBitmap() { - waitUntilFlutterRendered(); - return bitmap; - } - - @Nullable - protected void notifyFlutterRendered() { - bitmap = getFlutterEngine().getRenderer().getBitmap(); - super.notifyFlutterRendered(); - } -}