MediaMetadataRetrieverTest: fix MediaDataSource finalizer crash

MediaDataSource impelments Closeable interface, so the finalizer
attempts to close the object. testExceptionWhileClosingMediaDataSource()
creates a MediaDataSource object that throws exception at close
to verify the behavior. Stop throwing the exception from the object
after verification so that the finalizer does not throw an exception
that brings down the test process.

Bug: 279658810
Test: atest CtsMediaMiscTestCases
(cherry picked from https://android-review.googlesource.com/q/commit:7d6276433dd9dd129302730467eb3384acb310e1)
Merged-In: I9157c930e7eaa316801291eaca9042aa616fd5cf
Change-Id: I9157c930e7eaa316801291eaca9042aa616fd5cf
1 file changed