Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9208f2b6 authored by Mark Harman's avatar Mark Harman
Browse files

Fix tests for older Android emulator versions, due to lack of exif info in received photos.

parent f68021de
Loading
Loading
Loading
Loading
+23 −19
Original line number Diff line number Diff line
@@ -9469,8 +9469,11 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
        }
        assertNotNull(exif.getAttribute(ExifInterface.TAG_ORIENTATION));
        if( !(isEmulator() && Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) ) {
            // older Android emulator versions don't store exif info in photos
            assertNotNull(exif.getAttribute(ExifInterface.TAG_MAKE));
            assertNotNull(exif.getAttribute(ExifInterface.TAG_MODEL));
            if( expect_gps ) {
                assertNotNull(exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE));
                assertNotNull(exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF));
@@ -9489,6 +9492,7 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
                //assertTrue(exif.getAttribute(TAG_GPS_IMG_DIRECTION) == null);
                //assertTrue(exif.getAttribute(TAG_GPS_IMG_DIRECTION_REF) == null);
            }
        }
        if( inputStream != null ) {
            inputStream.close();