Skip to content

Commit 47edd6a

Browse files
committed
Revert "[file_selector_android] Attempt to close system dialogs before integration tests run (#5805)"
This reverts commit c6b86c5. Touched to retrigger testing 2
1 parent d74d687 commit 47edd6a

File tree

1 file changed

+0
-19
lines changed
  • packages/file_selector/file_selector_android/example/android/app/src/androidTest/java/dev/flutter/packages/file_selector_android_example

1 file changed

+0
-19
lines changed

packages/file_selector/file_selector_android/example/android/app/src/androidTest/java/dev/flutter/packages/file_selector_android_example/FileSelectorAndroidTest.java

-19
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import android.content.ClipData;
2121
import android.content.Intent;
2222
import android.net.Uri;
23-
import androidx.test.core.app.ActivityScenario;
2423
import androidx.test.espresso.intent.rule.IntentsRule;
2524
import androidx.test.ext.junit.rules.ActivityScenarioRule;
2625
import org.junit.Rule;
@@ -33,28 +32,12 @@ public class FileSelectorAndroidTest {
3332

3433
@Rule public IntentsRule intentsRule = new IntentsRule();
3534

36-
public void clearAnySystemDialog() {
37-
myActivityTestRule
38-
.getScenario()
39-
.onActivity(
40-
new ActivityScenario.ActivityAction<DriverExtensionActivity>() {
41-
@Override
42-
public void perform(DriverExtensionActivity activity) {
43-
Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
44-
activity.sendBroadcast(closeDialog);
45-
}
46-
});
47-
}
48-
4935
@Test
5036
public void openImageFile() {
51-
clearAnySystemDialog();
52-
5337
final Instrumentation.ActivityResult result =
5438
new Instrumentation.ActivityResult(
5539
Activity.RESULT_OK,
5640
new Intent().setData(Uri.parse("content://file_selector_android_test/dummy.png")));
57-
5841
intending(hasAction(Intent.ACTION_OPEN_DOCUMENT)).respondWith(result);
5942
onFlutterWidget(withText("Open an image")).perform(click());
6043
onFlutterWidget(withText("Press to open an image file(png, jpg)")).perform(click());
@@ -65,8 +48,6 @@ public void openImageFile() {
6548

6649
@Test
6750
public void openImageFiles() {
68-
clearAnySystemDialog();
69-
7051
final ClipData.Item clipDataItem =
7152
new ClipData.Item(Uri.parse("content://file_selector_android_test/dummy.png"));
7253
final ClipData clipData = new ClipData("", new String[0], clipDataItem);

0 commit comments

Comments
 (0)