Jeff Sharkey 0db4811916 Fix inconsistent MIME type mapping.
MediaProvider heavily relies on developers to provide a MIME type,
which it then translates into a file extension, and then later back
into a MIME type.

For this flow to work without apps losing access to the data they
just wrote, all MIME types need to consistently map back to the
same "major" type that they started with.

This change adds tests to verify this consistency for all audio,
video, and image MIME types, and fixes an obscure bug where the
"audio/3gpp" MIME type would end up translating to "video/3gpp".

Bug: 154667531
Test: atest CtsMimeMapTestCases
Change-Id: I47998d8f4b1f9922a7d9439014e2f7f51f401f04
2020-04-27 11:53:12 -06:00
..