Skip to content

Commit f19794a

Browse files
authored
Remove unused getMethod in Android UI tests (#272)
1 parent 13d4680 commit f19794a

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

example/android/app/src/androidTest/java/com/example/InstabugSample/InvokeInstabugUITest.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
import org.junit.Test;
88
import org.junit.runner.RunWith;
99

10-
import java.lang.reflect.InvocationTargetException;
11-
import java.lang.reflect.Method;
12-
1310
import static androidx.test.espresso.Espresso.onView;
1411
import static androidx.test.espresso.action.ViewActions.click;
1512
import static androidx.test.espresso.action.ViewActions.replaceText;
@@ -41,25 +38,5 @@ public void ensureInstabugInvocati1on() throws InterruptedException {
4138
private void disableScreenShotByMediaProjection() {
4239
InstabugFlutterPlugin.enableScreenShotByMediaProjection(false);
4340
}
44-
45-
public static Method getMethod(Class clazz, String methodName, Class... parameterType) {
46-
final Method[] methods = clazz.getDeclaredMethods();
47-
for (Method method : methods) {
48-
if (method.getName().equals(methodName) && method.getParameterTypes().length ==
49-
parameterType.length) {
50-
for (int i = 0; i < parameterType.length; i++) {
51-
if (method.getParameterTypes()[i] == parameterType[i]) {
52-
if (i == method.getParameterTypes().length - 1) {
53-
method.setAccessible(true);
54-
return method;
55-
}
56-
} else {
57-
break;
58-
}
59-
}
60-
}
61-
}
62-
return null;
63-
}
6441
}
6542

0 commit comments

Comments
 (0)