Loading app/src/androidTest/java/net/sourceforge/opencamera/test/MainActivityTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv super("net.sourceforge.opencamera", MainActivity.class); } private static boolean isEmulator() { static boolean isEmulator() { return Build.MODEL.contains("Android SDK built for x86"); } Loading app/src/androidTest/java/net/sourceforge/opencamera/test/Nexus7Tests.java +8 −1 Original line number Diff line number Diff line package net.sourceforge.opencamera.test; import android.os.Build; import junit.framework.Test; import junit.framework.TestSuite; Loading @@ -20,7 +22,12 @@ public class Nexus7Tests { // tests for testing Camera2 API with LEGACY Camera2 functionality suite.addTest(TestSuite.createTest(MainActivityTest.class, "testTakePhoto")); if( MainActivityTest.isEmulator() && Build.VERSION.SDK_INT == Build.VERSION_CODES.M ) { // video doesn't work on Android 6 emulator! } else { suite.addTest(TestSuite.createTest(MainActivityTest.class, "testTakeVideo")); } return suite; } Loading Loading
app/src/androidTest/java/net/sourceforge/opencamera/test/MainActivityTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv super("net.sourceforge.opencamera", MainActivity.class); } private static boolean isEmulator() { static boolean isEmulator() { return Build.MODEL.contains("Android SDK built for x86"); } Loading
app/src/androidTest/java/net/sourceforge/opencamera/test/Nexus7Tests.java +8 −1 Original line number Diff line number Diff line package net.sourceforge.opencamera.test; import android.os.Build; import junit.framework.Test; import junit.framework.TestSuite; Loading @@ -20,7 +22,12 @@ public class Nexus7Tests { // tests for testing Camera2 API with LEGACY Camera2 functionality suite.addTest(TestSuite.createTest(MainActivityTest.class, "testTakePhoto")); if( MainActivityTest.isEmulator() && Build.VERSION.SDK_INT == Build.VERSION_CODES.M ) { // video doesn't work on Android 6 emulator! } else { suite.addTest(TestSuite.createTest(MainActivityTest.class, "testTakeVideo")); } return suite; } Loading