Fix misleading transcoding exception

When opening a file with the platform media APIs, we attempt to
convert the fd to the original fd. If the input fd is already the
original fd and not a transcoded one, we fail the conversion and use
the input fd directly. The conversion failure logged a misleading
exception:

04-28 13:26:58.409  3594 10238 E DatabaseUtils: Writing exception to parcel
04-28 13:26:58.409  3594 10238 E DatabaseUtils:
java.lang.IllegalArgumentException: Input file descriptor is already
original

Now, we removed this harmless and WAI log.

We also hardened the check for a file supporting transcode to actually
check the codec type and not just the file location and extension.

Test: atest TranscodeTest
Bug: 186672282
Change-Id: I7399bf10fd4de98512327f9b6d055b7417e54ef1
3 files changed