OSDN Git Service

ExifInterfaceTest: Catch IOException
authorSungsoo <sungsoo@google.com>
Tue, 18 Oct 2016 01:06:01 +0000 (10:06 +0900)
committerSungsoo <sungsoo@google.com>
Tue, 18 Oct 2016 16:26:37 +0000 (01:26 +0900)
ExifInterface throws IOException instead of UnsupportedOperationException.

Bug: 32221877
Change-Id: I68a4a62f565a386434b774759271bf6f2af2b7db

media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ExifInterfaceTest.java

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