addFileType(“OGG”, FILE_TYPE_OGG, “audio/webm”, MtpConstants.FORMAT_OGG);
/// Add to support MP2, first add video/mp2p, so that use MP2 can return as audio type
addFileType(“MP2”, FILE_TYPE_MP2PS, “video/mp2p”);
addFileType(“MP2”, FILE_TYPE_MP2, “audio/mpeg”);
/// Add to support Monkey’s Audio APE(audio/ape)
if (SystemProperties.getBoolean(“ro.mtk_audio_ape_support”, false)) {
addFileType(“APE”, FILE_TYPE_APE, “audio/ape”);
}
/// Add to support OMA DRM audio type DCF
if (SystemProperties.getBoolean(“ro.mtk_oma_drm_support”, false)) {
addFileType(“DCF”, FILE_TYPE_MP3, “audio/mpeg”);
}
/// @}
addFileType(“MP3”, FILE_TYPE_MP3, “audio/mpeg”, MtpConstants.FORMAT_MP3);
addFileType(“MPGA”, FILE_TYPE_MP3, “audio/mpeg”, MtpConstants.FORMAT_MP3);
addFileType(“M4A”, FILE_TYPE_M4A, “audio/mp4”, MtpConstants.F
ORMAT_MPEG);
addFileType(“WAV”, FILE_TYPE_WAV, “audio/x-wav”, MtpConstants.FORMAT_WAV);
addFileType(“AMR”, FILE_TYPE_AMR, “audio/amr”);
addFileType(“AWB”, FILE_TYPE_AWB, “audio/amr-wb”);
if (isWMAEnabled()) {
addFileType(“WMA”, FILE_TYPE_WMA, “audio/x-ms-wma”, MtpConstants.FORMAT_WMA);
}
addFileType(“OGG”, FILE_TYPE_OGG, “audio/ogg”, MtpConstants.FORMAT_OGG);
addFileType(“OGG”, FILE_TYPE_OGG, “application/ogg”, MtpConstants.FORMAT_OGG);
addFileType(“OGA”, FILE_TYPE_OGG, “application/ogg”, MtpConstants.FORMAT_OGG);
addFileType(“AAC”, FILE_TYPE_AAC, “audio/aac”, MtpConstants.FORMAT_AAC);
addFileType(“AAC”, FILE_TYPE_AAC, “audio/aac-adts”, MtpConstants.FORMAT_AAC);
addFileType(“MKA”, FILE_TYPE_MKA, “audio/x-matroska”);
addFileType(“MID”, FILE_TYPE_MID, “audio/midi”);
addFileType(“MIDI”, FILE_TYPE_MID, “audio/midi”);
addFileType(“XMF”, FILE_TYPE_MID, “audio/midi”);
addFileType(“RTTTL”, FILE_TYPE_MID, “audio/midi”);
addFileType(“SMF”, FILE_TYPE_SMF, “audio/sp-midi”);
addFileType(“IMY”, FILE_TYPE_IMY, “audio/imelody”);
addFileType(“RTX”, FILE_TYPE_MID, “audio/midi”);
addFileType(“OTA”, FILE_TYPE_MID, “audio/midi”);
addFileType(“MXMF”, FILE_TYPE_MID, “audio/midi”);
/// M: Add more video file types to maps. {@
addFileType(“MTS”, FILE_TYPE_MP2TS, “video/mp2ts”);
addFileType(“M2TS”, FILE_TYPE_MP2TS, “video/mp2ts”);
addFileType(“MOV”, FILE_TYPE_QUICKTIME_VIDEO, “video/quicktime”);
addFileType(“QT”, FILE_TYPE_QUICKTIME_VIDEO, “video/quicktime”);
addFileType(“OGV”, FILE_TYPE_OGM, “video/ogm”);
addFileType(“OGM”, FILE_TYPE_OGM, “video/ogm”);
if (SystemProperties.getBoolean(“ro.mtk_flv_playback_support”, false)) {
addFileType(“FLV”, FILE_TYPE_FLV, “video/x-flv”);
addFileType(“F4V”, FILE_TYPE_FLV, “video/x-flv”);
addFileType(“PFV”, FILE_TYPE_FLV, “video/x-flv”);
addFileType(“FLA”, FILE_TYPE_FLA, “audio/x-flv”);
}
if (SystemProperties.getBoolean(“ro.mtk_mtkps_playback_support”, false)) {
addFileType(“PS”, FILE_TYPE_MP2PS, “video/mp2p”);
/// Only support VOB when mtkps feature option is enabled
addFileType(“VOB”, FILE_TYPE_MP2PS, “video/mp2p”);
/// DAT files should not be scanned as mpeg2 PS if PS is not supported.
addFileType(“DAT”, FILE_TYPE_MP2PS, “video/mp2p”);
}
/// @}
addFileType(“MPEG”, FILE_TYPE_MP4, “video/mpeg”, MtpConstants.FORMAT_MPEG);
addFileType(“MPG”, FILE_TYPE_MP4, “video/mpeg”, MtpConstants.FORMAT_MPEG);
addFileType(“MP4”, FILE_TYPE_MP4, “video/mp4”, MtpConstants.FORMAT_MPEG);
addFileType(“M4V”, FILE_TYPE_M4V, “video/mp4”, MtpConstants.FORMAT_MPEG);
addFileType(“3GP”, FILE_TYPE_3GPP, “video/3gpp”, MtpConstants.FORMAT_3GP_CONTAINER);
addFileType(“3GPP”, FILE_TYPE_3GPP, “video/3gpp”, MtpConstants.FORMAT_3GP_CONTAINER);
addFileType(“3G2”, FILE_TYPE_3GPP2, “video/3gpp2”, MtpConstants.FORMAT_3GP_CONTAINER);
addFileType(“3GPP2”, FILE_TYPE_3GPP2, “video/3gpp2”, MtpConstants.FORMAT_3GP_CONTAINER);
addFileType(“MKV”, FILE_TYPE_MKV, “video/x-matroska”);
addFileType(“WEBM”, FILE_TYPE_WEBM, “video/webm”);
addFileType(“TS”, FILE_TYPE_MP2TS, “video/mp2ts”);
addFileType(“AVI”, FILE_TYPE_AVI, “video/avi”);
if (isWMVEnabled()) {
addFileType(“WMV”, FILE_TYPE_WMV, “video/x-ms-wmv”, MtpConstants.FORMAT_WMV);
addFileType(“ASF”, FILE_TYPE_ASF, “video/x-ms-asf”);
}
/// M: Add more image file types to maps. {@
if (!SystemProperties.getBoolean(“ro.mtk_bsp_package”, false)) {
/// Mpo files should not be scanned as images in BSP
addFileType(“MPO”, FILE_TYPE_MPO, “image/mpo”);
}
/// @}
addFileType(“JPG”, FILE_TYPE_JPEG, “image/jpeg”, MtpConstants.FORMAT_EXIF_JPEG);
addFileType(“JPEG”, FILE_TYPE_JPEG, “image/jpeg”, MtpConstants.FORMAT_EXIF_JPEG);
addFileType(“GIF”, FILE_TYPE_GIF, “image/gif”, MtpConstants.FORMAT_GIF);
addFileType(“PNG”, FILE_TYPE_PNG, “image/png”, MtpConstants.FORMAT_PNG);
addFileType(“BMP”, FILE_TYPE_BMP, “image/x-ms-bmp”, MtpConstants.FORMAT_BMP);
addFileType(“WBMP”, FILE_TYPE_WBMP, “image/vnd.wap.wbmp”);
addFileType(“WEBP”, FILE_TYPE_WEBP, “image/webp”);
addFileType(“M3U”, FILE_TYPE_M3U, “audio/x-mpegurl”, MtpConstants.FORMAT_M3U_PLAYLIST);
addFileType(“M3U”, FILE_TYPE_M3U, “application/x-mpegurl”, MtpConstants.FORMAT_M3U_PLAYLIST);
addFileType(“PLS”, FILE_TYPE_PLS, “audio/x-scpls”, MtpConstants.FORMAT_PLS_PLAYLIST);
addFileType(“WPL”, FILE_TYPE_WPL, “application/vnd.ms-wpl”, MtpConstants.FORMAT_WPL_PLAYLIST);
addFileType(“M3U8”, FILE_TYPE_HTTPLIVE, “application/vnd.apple.mpegurl”);
addFileType(“M3U8”, FILE_TYPE_HTTPLIVE, “audio/mpegurl”);
addFileType(“M3U8”, FILE_TYPE_HTTPLIVE, “audio/x-mpegurl”);
addFileType(“FL”, FILE_TYPE_FL, “application/x-android-drm-fl”);
addFileType(“TXT”, FILE_TYPE_TEXT, “text/plain”, MtpConstants.FORMAT_TEXT);
addFileType(“HTM”, FILE_TYPE_HTML, “text/html”, MtpConstants.FORMAT_HTML);
addFileType(“HTML”, FILE_TYPE_HTML, “text/html”, MtpConstants.FORMAT_HTML);
addFileType(“PDF”, FILE_TYPE_PDF, “application/pdf”);
addFileType(“DOC”, FILE_TYPE_MS_WORD, “application/msword”, MtpConstants.FORMAT_MS_WORD_DOCUMENT);
addFileType(“XLS”, FILE_TYPE_MS_EXCEL, “application/vnd.ms-excel”, MtpConstants.FORMAT_MS_EXCEL_SPREADSHEET);
addFileType(“PPT”, FILE_TYPE_MS_POWERPOINT, “application/vnd.ms-powerpoint”, MtpConstants.FORMAT_MS_POWERPOINT_PRESENTATION);
addFileType(“FLAC”, FILE_TYPE_FLAC, “audio/flac”, MtpConstants.FORMAT_FLAC);
addFileType(“ZIP”, FILE_TYPE_ZIP, “application/zip”);
addFileType(“MPG”, FILE_TYPE_MP2PS, “video/mp2p”);
addFileType(“MPEG”, FILE_TYPE_MP2PS, “video/mp2p”);
/// M: Add more Other popular file types to maps. {@
addFileType(“ICS”, FILE_TYPE_ICS, “text/calendar”);
addFileType(“ICZ”, FILE_TYPE_ICZ, “text/calendar”);
addFileType(“VCF”, FILE_TYPE_VCF, “text/x-vcard”);
addFileType(“VCS”, FILE_TYPE_VCS, “text/x-vcalendar”);
addFileType(“APK”, FILE_TYPE_APK, “application/vnd.android.package-archive”);
addFileType(“DOCX”, FILE_TYPE_MS_WORD, “application/vnd.openxmlformats-officedocument.wordprocessingml.document”);
addFileType(“DOTX”, FILE_TYPE_MS_WORD, “application/vnd.openxmlformats-officedocument.wordprocessingml.template”);
addFileType(“XLSX”, FILE_TYPE_MS_EXCEL, “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”);
addFileType(“XLTX”, FILE_TYPE_MS_EXCEL, “application/vnd.openxmlformats-officedocument.spreadsheetml.template”);
addFileType(“PPTX”, FILE_TYPE_MS_POWERPOINT, “application/vnd.openxmlformats-officedocument.presentationml.presentation”);
addFileType(“POTX”, FILE_TYPE_MS_POWERPOINT, “application/vnd.openxmlformats-officedocument.presentationml.template”);
addFileType(“PPSX”, FILE_TYPE_MS_POWERPOINT, “application/vnd.openxmlformats-officedocument.presentationml.slideshow”);
/// @}
}