ExifInterfaceTest: Catch IOException

ExifInterface throws IOException instead of UnsupportedOperationException.

Bug: 32221877
Change-Id: I68a4a62f565a386434b774759271bf6f2af2b7db
This commit is contained in:
Sungsoo
2016-10-18 10:06:01 +09:00
parent 01e42cf67c
commit c9ed3b8a5b

View File

@ -416,7 +416,7 @@ public class ExifInterfaceTest extends AndroidTestCase {
in = getContext().getAssets().open(imageFile.getName()); in = getContext().getAssets().open(imageFile.getName());
ExifInterface exifInterface = new ExifInterface(in); ExifInterface exifInterface = new ExifInterface(in);
exifInterface.saveAttributes(); exifInterface.saveAttributes();
} catch (UnsupportedOperationException e) { } catch (IOException e) {
// Expected. saveAttributes is not supported with an ExifInterface object which was // Expected. saveAttributes is not supported with an ExifInterface object which was
// created with InputStream. // created with InputStream.
return; return;