diff options
Diffstat (limited to 'tests/src/com/android/gallery3d/exif/ExifXmlDataTestCase.java')
-rw-r--r-- | tests/src/com/android/gallery3d/exif/ExifXmlDataTestCase.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/src/com/android/gallery3d/exif/ExifXmlDataTestCase.java b/tests/src/com/android/gallery3d/exif/ExifXmlDataTestCase.java index 5f200ea92..da860208b 100644 --- a/tests/src/com/android/gallery3d/exif/ExifXmlDataTestCase.java +++ b/tests/src/com/android/gallery3d/exif/ExifXmlDataTestCase.java @@ -92,4 +92,17 @@ public class ExifXmlDataTestCase extends InstrumentationTestCase { return String.format(RES_ID_TITLE, mImageResourceId); } } + + protected InputStream reopenFileStream() throws Exception { + try { + if (mImagePath != null) { + return new FileInputStream(mImagePath); + } else { + Resources res = getInstrumentation().getContext().getResources(); + return res.openRawResource(mImageResourceId); + } + } catch (Exception e) { + throw new Exception(getImageTitle(), e); + } + } } |