Skip to content
Snippets Groups Projects
Commit 0db48119 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

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
parent 10649bff
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@
?application/x-x509-server-cert crt
?application/x-x509-user-cert crt
?audio/3gpp 3gpp 3ga
?audio/3gpp 3ga 3gpp
?audio/aac-adts aac
?audio/ac3 ac3 a52
?audio/amr amr
......
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