Skip to content
Commit 38bb5081 authored by Jin Seok Park's avatar Jin Seok Park
Browse files

Fix ExifInterface#saveAttributes behavior

cherry-pick from aosp/1015050, aosp/1079822

1. Currently, calling ExifInterface#saveAttributes with StrictMode
   that detects unbuffered I/O throws an exception. Change
   saveJpegAttributes to take BufferedInput/OutputStreams
   as parameters.
2. Change saveAttributes so that when an exception is thrown, the
   original image file is not deleted but restored.
3. Distinguish between two identical exception messages in
   saveAttributes.
4. Add test for checking StrictMode.

Bug: 137139466
Test: Run atest CtsMediaTestCases:android.media.cts.ExifInterfaceTest
Change-Id: I9e4111ec35740198bdbdba0c9b609875b6231474
parent 26f2c379
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment