Index: chrome/test/android/javatests/src/org/chromium/chrome/test/util/ApplicationTestUtils.java |
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/ApplicationTestUtils.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/ApplicationTestUtils.java |
index 6f425eff9e2b76dee1c41df8d4c15ebe7e99660f..b7402e37b0ebdc5d325aac51945f05ccc1af6c2d 100644 |
--- a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/ApplicationTestUtils.java |
+++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/ApplicationTestUtils.java |
@@ -123,23 +123,6 @@ |
/** Finishes the given activity and waits for its onDestroy() to be called. */ |
public static void finishActivity(final Activity activity) throws Exception { |
- closeActivity(activity, new ActivityCloser<Activity>() { |
- @Override |
- public void close(Activity activity) { |
- activity.finish(); |
- } |
- }); |
- } |
- |
- /** |
- * Encapsulates activity closing logic. Invoked on UI thread. |
- * @param <A> Activity type. |
- */ |
- public interface ActivityCloser<A extends Activity> { void close(A activity); } |
- |
- /** Closes the given activity and waits for its onDestroy() to be called. */ |
- public static <A extends Activity> void closeActivity( |
- final A activity, final ActivityCloser<A> closer) throws Exception { |
final CallbackHelper callbackHelper = new CallbackHelper(); |
final ApplicationStatus.ActivityStateListener activityStateListener = |
new ApplicationStatus.ActivityStateListener() { |
@@ -160,7 +143,7 @@ |
} |
ApplicationStatus.registerStateListenerForActivity( |
activityStateListener, activity); |
- closer.close(activity); |
+ activity.finish(); |
return false; |
} |
}); |