xiaodi8 v1.0.0版本的 MD5 值为:6b857c57f508176c5ba1afb422bbb5a9
以下内容为反编译后的 x.java 源代码,内容仅作参考
package com.bslyun.app.utils;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import androidx.core.content.FileProvider;
import com.luck.picture.lib.config.PictureMimeType;
import io.github.inflationx.calligraphy3.BuildConfig;
import java.io.File;
public class x {
public static final String[][] f4728a = {new String[]{".3gp", "video/3gpp"}, new String[]{".apk", "application/vnd.android.package-archive"}, new String[]{".asf", "video/x-ms-asf"}, new String[]{PictureMimeType.AVI, "video/x-msvideo"}, new String[]{".bin", "application/octet-stream"}, new String[]{PictureMimeType.BMP, "image/bmp"}, new String[]{".c", "text/plain"}, new String[]{".class", "application/octet-stream"}, new String[]{".conf", "text/plain"}, new String[]{".cpp", "text/plain"}, new String[]{".doc", "application/msword"}, new String[]{".exe", "application/octet-stream"}, new String[]{PictureMimeType.GIF, "image/gif"}, new String[]{".gtar", "application/x-gtar"}, new String[]{".gz", "application/x-gzip"}, new String[]{".h", "text/plain"}, new String[]{".htm", "text/html"}, new String[]{".html", "text/html"}, new String[]{".jar", "application/java-archive"}, new String[]{".java", "text/plain"}, new String[]{PictureMimeType.JPEG, "image/jpeg"}, new String[]{PictureMimeType.JPG, "image/jpeg"}, new String[]{".js", "application/x-javascript"}, new String[]{".log", "text/plain"}, new String[]{".m3u", "audio/x-mpegurl"}, new String[]{".m4a", "audio/mp4a-latm"}, new String[]{".m4b", "audio/mp4a-latm"}, new String[]{".m4p", "audio/mp4a-latm"}, new String[]{".m4u", "video/vnd.mpegurl"}, new String[]{".m4v", "video/x-m4v"}, new String[]{".mov", "video/quicktime"}, new String[]{".mp2", "audio/x-mpeg"}, new String[]{PictureMimeType.MP3, "audio/x-mpeg"}, new String[]{PictureMimeType.MP4, "video/mp4"}, new String[]{".mpc", "application/vnd.mpohun.certificate"}, new String[]{".mpe", "video/mpeg"}, new String[]{".mpeg", "video/mpeg"}, new String[]{".mpg", "video/mpeg"}, new String[]{".mpg4", "video/mp4"}, new String[]{".mpga", "audio/mpeg"}, new String[]{".msg", "application/vnd.ms-outlook"}, new String[]{".ogg", "audio/ogg"}, new String[]{".pdf", "application/pdf"}, new String[]{PictureMimeType.PNG, PictureMimeType.PNG_Q}, new String[]{".pps", "application/vnd.ms-powerpoint"}, new String[]{".ppt", "application/vnd.ms-powerpoint"}, new String[]{".prop", "text/plain"}, new String[]{".rar", "application/x-rar-compressed"}, new String[]{".rc", "text/plain"}, new String[]{".rmvb", "audio/x-pn-realaudio"}, new String[]{".rtf", "application/rtf"}, new String[]{".sh", "text/plain"}, new String[]{".tar", "application/x-tar"}, new String[]{".tgz", "application/x-compressed"}, new String[]{".txt", "text/plain"}, new String[]{PictureMimeType.WAV, PictureMimeType.WAV_Q}, new String[]{".wma", "audio/x-ms-wma"}, new String[]{".wmv", "audio/x-ms-wmv"}, new String[]{".wps", "application/vnd.ms-works"}, new String[]{".xml", "text/plain"}, new String[]{".z", "application/x-compress"}, new String[]{".zip", "application/zip"}, new String[]{".zip", "application/zip"}, new String[]{BuildConfig.FLAVOR, "*/*"}};
public static String[][] f4729b = {new String[]{"data:image/jpeg;", PictureMimeType.JPG}, new String[]{"data:image/png;", PictureMimeType.PNG}, new String[]{"data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;", ".docx"}, new String[]{"data:application/octet-stream;", ".rar"}, new String[]{"data:application/x-zip-compressed;", ".zip"}, new String[]{"data:application/msword;", ".doc"}, new String[]{"data:application/pdf;", ".pdf"}, new String[]{"data:image/gif;", PictureMimeType.GIF}, new String[]{"data:application/vnd.ms-excel;", ".xls"}, new String[]{"data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;", ".xlsx"}, new String[]{"data:video/mp4;", PictureMimeType.MP4}, new String[]{"data:application/vnd.ms-powerpoint;", ".ppt"}, new String[]{"data:application/vnd.openxmlformats-officedocument.presentationml.presentation;", ".pptx"}, new String[]{"data:text/csv;", ".pdf"}, new String[]{"data:application/pdf;", ".csv"}, new String[]{"data:image/svg+xml;", ".svg"}, new String[]{"data:image/x-icon;", ".ico"}, new String[]{"data:image/bmp;", PictureMimeType.BMP}, new String[]{"data:video/mpeg;", ".mpeg"}, new String[]{"data:video/avi;", PictureMimeType.AVI}, new String[]{"data:audio/x-ms-wma;", ".wma"}, new String[]{"data:application/octet-stream;", ".rm"}, new String[]{"data:video/vnd.rn-realvideo;", ".rmvb"}, new String[]{"data:application/x-shockwave-flash;", ".flash"}};
private static String a(File file) {
String name = file.getName();
int lastIndexOf = name.lastIndexOf(".");
String str = "*/*";
if (lastIndexOf < 0) {
return "*/*";
}
String lowerCase = name.substring(lastIndexOf, name.length()).toLowerCase();
if (lowerCase != null && !BuildConfig.FLAVOR.equals(lowerCase)) {
int i = 0;
while (true) {
String[][] strArr = f4728a;
if (i >= strArr.length) {
break;
}
if (lowerCase.equals(strArr[i][0])) {
str = strArr[i][1];
}
i++;
}
}
return str;
}
private static Uri b(Context context, Intent intent, File file) {
if (Build.VERSION.SDK_INT >= 24) {
Uri uriForFile = FileProvider.getUriForFile(context, context.getPackageName() + ".fileprovider", file);
intent.addFlags(1);
return uriForFile;
}
return Uri.fromFile(file);
}
public static void c(Context context, File file) {
try {
Intent intent = new Intent();
intent.addFlags(268435456);
intent.setAction("android.intent.action.VIEW");
intent.setDataAndType(b(context, intent, file), a(file));
context.startActivity(intent);
} catch (Exception e2) {
e2.printStackTrace();
m0.u0(context, "没有可打开此文件的应用");
}
}
}