summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2019-09-27 20:26:42 +0100
committerTobias Thierer <tobiast@google.com>2019-10-01 17:53:07 +0100
commit170dfcf71d899e3563adfc1f2ee21a4d4f1a6bc7 (patch)
tree241822c40827b53792422fd51f06cbf2ae005652 /annotations/generate_annotated_java_files.py
parent3d61eaf6615738cfec7055186f1f0b5b0a57294f (diff)
Make CTS more opinionated about the platform's default MimeMap.
Historically, the mapping implemented by MimeMap (formerly MimeUtils) was largely untested and therefore differed between Android devices. This CL topic makes CtsMimeMapTestCases a lot more opinionated by checking that: - MimeMap.getDefault() must respect all of the mappings supplied in stock Android. This is enforced via CTS bundling a copy of: - the {,android.,vendor.}mime.types data files - DefaultMimeMapFactory (rewritten via jarjar to android.content.type.cts.StockAndroidMimeMapFactory) MimeMap.getDefault() is allowed to implement _additional_ mappings, but changed or removed mappings are not allowed. - Public APIs android.webkit.MimeTypeMap and URLConnection.getFileNameMap() must behave consistently with MimeMap.getDefault() (in stock Android, those APIs are implemented directly on top of MimeMap.getDefault()). Test: atest CtsMimeMapTestCases Test: atest CtsLibcoreTestCases:libcore.libcore.net.MimeMapTest Test: The above atest runs pass on a device that contains an additional mapping in vendor.mime.types that is not present in CTS. Test: Checked that on a device that changes a mapping in android.mime.types, CtsLibcoreTestCases still passes but CtsMimeMapTestCases fails. Bug: 141842930 Bug: 139895945 Change-Id: Ie7492d6399b04b4b2765a02f58fe3e7e6352e41e
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions