Fix an error of endtoend test.

This commit is contained in:
youtaol
2013-01-05 10:40:53 +08:00
parent d7b4eeb05b
commit e6b67d941e
@@ -56,7 +56,7 @@ public class EndToEndTestUtils {
private static final String ANDROID_LOCAL_IP = "10.0.2.2"; private static final String ANDROID_LOCAL_IP = "10.0.2.2";
// usually 5554. // usually 5554.
public static int emulatorPort = 5554; public static int emulatorPort = 5568;
private static final int ORIENTATION_PORTRAIT = 1; private static final int ORIENTATION_PORTRAIT = 1;
private static final int ORIENTATION_LANDSCAPE = 0; private static final int ORIENTATION_LANDSCAPE = 0;
@@ -787,6 +787,7 @@ public class EndToEndTestUtils {
*/ */
public static TextView findTextView(String text) { public static TextView findTextView(String text) {
ArrayList<View> allViews = SOLO.getViews(); ArrayList<View> allViews = SOLO.getViews();
if (allViews != null) {
for (View view : allViews) { for (View view : allViews) {
if (view instanceof TextView) { if (view instanceof TextView) {
TextView textView = (TextView) view; TextView textView = (TextView) view;
@@ -796,6 +797,7 @@ public class EndToEndTestUtils {
} }
} }
} }
}
return null; return null;
} }