From 8ae51365ee5182c6c97c9d2cb489e38ef809f4cc Mon Sep 17 00:00:00 2001 From: Tobias Thierer Date: Thu, 31 Jan 2019 11:57:11 +0000 Subject: Customizable MIME type <-> file extension mapping, step 1. This CL factors out MimeMap{,Impl} from MimeUtils. MimeMap supports customizing the implementation instance, but this is currently an internal implementation detail; this CL does not change the behavior of any API surface. In future CLs, I plan to do the following: 1.) Expose MimeMap, including {get,compareAndSet}Default, via a new @CorePlatformApi. 2.) Convert existing users of MimeUtils to use MimeMap.getDefault() instead. 3.) Delete MimeUtils. Bug: 120171727 Test: Checked that this CL does not change behavior of MimeUtils by checking that the test logic attached to http://b/122831291#comment7 passes both before and after this CL. Test: atest CtsLibcoreTestCases:libcore.libcore.net.Mime{Map,Utils}Test Change-Id: Idc27c29826a6eb2e4c9c54be058eb0577d525aec --- non_openjdk_java_files.bp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'non_openjdk_java_files.bp') diff --git a/non_openjdk_java_files.bp b/non_openjdk_java_files.bp index 3e4083fdef..9628017ad0 100644 --- a/non_openjdk_java_files.bp +++ b/non_openjdk_java_files.bp @@ -176,6 +176,8 @@ filegroup { "luni/src/main/java/libcore/io/Os.java", "luni/src/main/java/libcore/io/Streams.java", "luni/src/main/java/libcore/net/InetAddressUtils.java", + "luni/src/main/java/libcore/net/MimeMap.java", + "luni/src/main/java/libcore/net/MimeMapImpl.java", "luni/src/main/java/libcore/net/MimeUtils.java", "luni/src/main/java/libcore/net/NetworkSecurityPolicy.java", "luni/src/main/java/libcore/net/event/NetworkEventDispatcher.java", -- cgit v1.2.3