diff options
| author | Tobias Thierer <tobiast@google.com> | 2019-04-26 15:24:19 +0100 |
|---|---|---|
| committer | Tobias Thierer <tobiast@google.com> | 2019-04-30 11:28:46 +0100 |
| commit | 696af1ab6b9862270a7ba29854f4fe36edeb4228 (patch) | |
| tree | 371bdac87b2563c1cd7b47855554fe198785d0a8 /annotations/generate_annotated_java_files.py | |
| parent | 8ae51365ee5182c6c97c9d2cb489e38ef809f4cc (diff) | |
Customizable MIME type <-> file extension mapping, step 2.
This CL topic replaces uses of MimeUtils with MimeMap.getDefault():
- Existing platform calls to MimeUtils are inlined.
- Other mentions of MimeUtils are changed to refer to MimeMap instead.
- MimeMap replaces MimeUtils in the CorePlatformApi.
- MimeMap.{get,compareAndSet}Default are added to the CorePlatformApi.
- The test_* methods from MimeUtilsTest that check what is now merely
the default implementation are moved to MimeMapTest and changed to
JUnit 4 style @Test defaultMap_*.
Some MimeUtils calls used to be on the graylist and used by some apps
through reflection; such apps can instead use this public API, for now:
android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension(String)
android.webkit.MimeTypeMap.getSingleton().getExtensionFromMimeType(String)
This CL still leaves MimeUtils in place because some internal uses remain;
a follow-up CL (step 3) will delete MimeUtils.java once those internal
calls have been inlined.
Bug: 120171727
Test: atest CtsLibcoreTestCases:libcore.libcore.net.MimeMapTest
Test: atest CtsLibcoreTestCases
Test: make droid cts
Change-Id: I8a58b9445fac1d22de14b5c56df99170a4bed332
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions
