From 0db481191637494e570a9fd6e4362b9a212ba122 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 27 Apr 2020 11:53:10 -0600 Subject: 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 --- mime/java-res/android.mime.types | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mime') diff --git a/mime/java-res/android.mime.types b/mime/java-res/android.mime.types index c1f8b3f0e195..05a2e92ca080 100644 --- a/mime/java-res/android.mime.types +++ b/mime/java-res/android.mime.types @@ -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 -- cgit v1.2.3