diff options
author | Andrew Stadler <stadler@android.com> | 2009-09-28 09:23:53 -0700 |
---|---|---|
committer | Andrew Stadler <stadler@android.com> | 2009-09-28 09:23:53 -0700 |
commit | 6585fe004ed4db12661a934f874390ca4b1e79a4 (patch) | |
tree | 3319316d5f4469503a01be09bf6d7b8f8504266b /core/java/android/webkit/MimeTypeMap.java | |
parent | c18b0ebcfb905cc5001618c78890e884a859e069 (diff) | |
download | frameworks_base-6585fe004ed4db12661a934f874390ca4b1e79a4.zip frameworks_base-6585fe004ed4db12661a934f874390ca4b1e79a4.tar.gz frameworks_base-6585fe004ed4db12661a934f874390ca4b1e79a4.tar.bz2 |
Add extension->mime type mappings
* Microsoft Office common extensions
* .xml -> text/xml
* Change existing mapping of ".pot"->"text/plain" to ".po"
Note: We already had a definition for .pot to text/plain. Per the
information found at <http://www.fileinfo.com/extension/pot> this is the
rarely seen "portable object file", and is often named ".po" to avoid
this same conflict.
Addresses bug # 2097457
Change-Id: I964b853fdeae77d742f627c535a8b32e0e53516a
Diffstat (limited to 'core/java/android/webkit/MimeTypeMap.java')
-rw-r--r-- | core/java/android/webkit/MimeTypeMap.java | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/core/java/android/webkit/MimeTypeMap.java b/core/java/android/webkit/MimeTypeMap.java index a55dbc8..fffba1b 100644 --- a/core/java/android/webkit/MimeTypeMap.java +++ b/core/java/android/webkit/MimeTypeMap.java @@ -214,6 +214,34 @@ public class MimeTypeMap { "application/vnd.oasis.opendocument.text-template", "ott"); sMimeTypeMap.loadEntry( "application/vnd.oasis.opendocument.text-web", "oth"); + sMimeTypeMap.loadEntry("application/msword", "doc"); + sMimeTypeMap.loadEntry("application/msword", "dot"); + sMimeTypeMap.loadEntry( + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + "docx"); + sMimeTypeMap.loadEntry( + "application/vnd.openxmlformats-officedocument.wordprocessingml.template", + "dotx"); + sMimeTypeMap.loadEntry("application/vnd.ms-excel", "xls"); + sMimeTypeMap.loadEntry("application/vnd.ms-excel", "xlt"); + sMimeTypeMap.loadEntry( + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + "xlsx"); + sMimeTypeMap.loadEntry( + "application/vnd.openxmlformats-officedocument.spreadsheetml.template", + "xltx"); + sMimeTypeMap.loadEntry("application/vnd.ms-powerpoint", "ppt"); + sMimeTypeMap.loadEntry("application/vnd.ms-powerpoint", "pot"); + sMimeTypeMap.loadEntry("application/vnd.ms-powerpoint", "pps"); + sMimeTypeMap.loadEntry( + "application/vnd.openxmlformats-officedocument.presentationml.presentation", + "pptx"); + sMimeTypeMap.loadEntry( + "application/vnd.openxmlformats-officedocument.presentationml.template", + "potx"); + sMimeTypeMap.loadEntry( + "application/vnd.openxmlformats-officedocument.presentationml.slideshow", + "ppsx"); sMimeTypeMap.loadEntry("application/vnd.rim.cod", "cod"); sMimeTypeMap.loadEntry("application/vnd.smaf", "mmf"); sMimeTypeMap.loadEntry("application/vnd.stardivision.calc", "sdc"); @@ -411,12 +439,13 @@ public class MimeTypeMap { sMimeTypeMap.loadEntry("text/plain", "asc"); sMimeTypeMap.loadEntry("text/plain", "text"); sMimeTypeMap.loadEntry("text/plain", "diff"); - sMimeTypeMap.loadEntry("text/plain", "pot"); + sMimeTypeMap.loadEntry("text/plain", "po"); // reserve "pot" for vnd.ms-powerpoint sMimeTypeMap.loadEntry("text/richtext", "rtx"); sMimeTypeMap.loadEntry("text/rtf", "rtf"); sMimeTypeMap.loadEntry("text/texmacs", "ts"); sMimeTypeMap.loadEntry("text/text", "phps"); sMimeTypeMap.loadEntry("text/tab-separated-values", "tsv"); + sMimeTypeMap.loadEntry("text/xml", "xml"); sMimeTypeMap.loadEntry("text/x-bibtex", "bib"); sMimeTypeMap.loadEntry("text/x-boo", "boo"); sMimeTypeMap.loadEntry("text/x-c++hdr", "h++"); |