导航菜单

页面标题

页面副标题

moonshot.企业版 v5.53.33 - C6634.java 源代码

正在查看: moonshot.企业版 v5.53.33 应用的 C6634.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package jnksI9k6J1HFuFo5YzBf.XiuvXGti2l5Gpvotr28R.UBVL9U3WwxbAPwDW6rA5.upyuhngDCr2AObMMnNNw;

import TCUcMtElLJnqSvqb7YcU.TCUcMtElLJnqSvqb7YcU.InterfaceC1753;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Environment;
import android.os.StatFs;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import jnksI9k6J1HFuFo5YzBf.XiuvXGti2l5Gpvotr28R.UBVL9U3WwxbAPwDW6rA5.C6669;

public class C6634 {

    public static class C6635 {

        public long f25490;

        public long f25491;

        public long f25492;

        public long f25493;

        public long f25494;

        public long f25495;

        public boolean f25496;

        public long f25497;

        public String toString() {
            return "isExist=" + this.f25496 + "\ntotalBlocks=" + this.f25490 + "\nfreeBlocks=" + this.f25495 + "\navailableBlocks=" + this.f25493 + "\nblockByteSize=" + this.f25497 + "\ntotalBytes=" + this.f25491 + "\nfreeBytes=" + this.f25492 + "\navailableBytes=" + this.f25494;
        }
    }

    public C6634() {
        throw new UnsupportedOperationException("UnInit this Lib");
    }

    @InterfaceC1753(api = 18)
    public static long m29947() {
        if (!m29968()) {
            return 0L;
        }
        StatFs statFs = new StatFs(m29959());
        return ((statFs.getFreeBlocksLong() * statFs.getBlockSizeLong()) / 1024) / 1024;
    }

    public static String m29948(String str) {
        return C6669.m30699().getDatabasePath(str).toString();
    }

    public static String m29949() {
        return C6669.m30699().getFilesDir().toString();
    }

    @InterfaceC1753(api = 18)
    public static long m29950() {
        if (!m29968()) {
            return 0L;
        }
        StatFs statFs = new StatFs(m29959());
        return statFs.getAvailableBlocksLong() * statFs.getBlockSizeLong();
    }

    public static String m29951(String str) {
        return C6669.m30699().getExternalFilesDir(str).getAbsolutePath();
    }

    public static boolean m29952(String str) {
        File file = new File(str);
        if (file.exists()) {
            try {
                file.delete();
                return true;
            } catch (Exception unused) {
            }
        }
        return false;
    }

    public static String m29953(String str) {
        return Environment.getExternalStoragePublicDirectory(str).toString();
    }

    public static boolean m29954(byte[] bArr, String str, String str2, Context context) {
        BufferedOutputStream bufferedOutputStream;
        if (!m29968()) {
            return false;
        }
        File externalFilesDir = context.getExternalFilesDir(str);
        BufferedOutputStream bufferedOutputStream2 = null;
        try {
            try {
                bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(new File(externalFilesDir, str2)));
            } catch (Throwable th) {
                th = th;
            }
        } catch (Exception e) {
            e = e;
        }
        try {
            bufferedOutputStream.write(bArr);
            bufferedOutputStream.flush();
            try {
                bufferedOutputStream.close();
            } catch (IOException e2) {
                e2.printStackTrace();
            }
            return true;
        } catch (Exception e3) {
            e = e3;
            bufferedOutputStream2 = bufferedOutputStream;
            e.printStackTrace();
            try {
                bufferedOutputStream2.close();
                return false;
            } catch (IOException e4) {
                e4.printStackTrace();
                return false;
            }
        } catch (Throwable th2) {
            th = th2;
            bufferedOutputStream2 = bufferedOutputStream;
            try {
                bufferedOutputStream2.close();
            } catch (IOException e5) {
                e5.printStackTrace();
            }
            throw th;
        }
    }

    public static boolean m29955() {
        return Environment.isExternalStorageRemovable();
    }

    public static boolean m29956() {
        return Environment.getExternalStorageState().equals("mounted");
    }

    public static String m29957() {
        if (!m29968()) {
            return null;
        }
        StringBuilder sb = new StringBuilder();
        sb.append(Environment.getExternalStorageDirectory().getPath());
        String str = File.separator;
        sb.append(str);
        sb.append("data");
        sb.append(str);
        return sb.toString();
    }

    public static String m29958() {
        return C6669.m30699().getExternalFilesDir(Environment.DIRECTORY_MOVIES).toString();
    }

    public static String m29959() {
        if (m29968()) {
            return Environment.getExternalStorageDirectory().getAbsolutePath();
        }
        return null;
    }

    public static String m29960() {
        return Environment.getDownloadCacheDirectory().toString();
    }

    @InterfaceC1753(api = 18)
    public static long m29961() {
        if (!m29968()) {
            return 0L;
        }
        StatFs statFs = new StatFs(m29959());
        return (statFs.getAvailableBlocksLong() * statFs.getBlockSizeLong()) / 1024;
    }

    @InterfaceC1753(api = 18)
    public static long m29962() {
        if (!m29968()) {
            return 0L;
        }
        StatFs statFs = new StatFs(m29959());
        return statFs.getBlockCountLong() * statFs.getBlockSizeLong();
    }

    @InterfaceC1753(api = 18)
    public static long m29963() {
        if (!m29968()) {
            return 0L;
        }
        StatFs statFs = new StatFs(m29959());
        return (statFs.getBlockCountLong() * statFs.getBlockSizeLong()) / 1024;
    }

    @InterfaceC1753(api = 18)
    public static long m29964() {
        if (!m29968()) {
            return 0L;
        }
        StatFs statFs = new StatFs(m29959());
        return ((statFs.getAvailableBlocksLong() * statFs.getBlockSizeLong()) / 1024) / 1024;
    }

    public static String m29965() {
        return C6669.m30699().getExternalCacheDir().getAbsolutePath();
    }

    public static String m29966() {
        return C6669.m30699().getExternalCacheDir().toString();
    }

    @TargetApi(18)
    public static String m29967() {
        if (!m29968()) {
            return null;
        }
        C6635 c6635 = new C6635();
        c6635.f25496 = true;
        StatFs statFs = new StatFs(Environment.getExternalStorageDirectory().getPath());
        c6635.f25490 = statFs.getBlockCountLong();
        c6635.f25497 = statFs.getBlockSizeLong();
        c6635.f25493 = statFs.getAvailableBlocksLong();
        c6635.f25494 = statFs.getAvailableBytes();
        c6635.f25495 = statFs.getFreeBlocksLong();
        c6635.f25492 = statFs.getFreeBytes();
        c6635.f25491 = statFs.getTotalBytes();
        return c6635.toString();
    }

    public static boolean m29968() {
        return "mounted".equals(Environment.getExternalStorageState());
    }

    public static boolean m29969(byte[] bArr, String str, Context context) {
        BufferedOutputStream bufferedOutputStream;
        if (!m29968()) {
            return false;
        }
        BufferedOutputStream bufferedOutputStream2 = null;
        try {
            try {
                bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(new File(context.getExternalCacheDir(), str)));
            } catch (Throwable th) {
                th = th;
            }
        } catch (Exception e) {
            e = e;
        }
        try {
            bufferedOutputStream.write(bArr);
            bufferedOutputStream.flush();
            try {
                bufferedOutputStream.close();
            } catch (IOException e2) {
                e2.printStackTrace();
            }
            return true;
        } catch (Exception e3) {
            e = e3;
            bufferedOutputStream2 = bufferedOutputStream;
            e.printStackTrace();
            try {
                bufferedOutputStream2.close();
                return false;
            } catch (IOException e4) {
                e4.printStackTrace();
                return false;
            }
        } catch (Throwable th2) {
            th = th2;
            bufferedOutputStream2 = bufferedOutputStream;
            try {
                bufferedOutputStream2.close();
            } catch (IOException e5) {
                e5.printStackTrace();
            }
            throw th;
        }
    }

    public static String m29970() {
        return C6669.m30699().getCacheDir().toString();
    }

    public static String m29971() {
        String str = null;
        if (!m29968()) {
            return null;
        }
        try {
            try {
                Process exec = Runtime.getRuntime().exec("cat /proc/mounts");
                BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new BufferedInputStream(exec.getInputStream())));
                while (true) {
                    try {
                        String readLine = bufferedReader.readLine();
                        if (readLine != null) {
                            if (readLine.contains("sdcard") && readLine.contains(".android_secure")) {
                                String[] split = readLine.split(" ");
                                if (split.length >= 5) {
                                    String str2 = split[1].replace("/.android_secure", "") + File.separator;
                                    C6645.m30160(bufferedReader);
                                    return str2;
                                }
                            }
                            if (exec.waitFor() != 0 && exec.exitValue() == 1) {
                                break;
                            }
                        } else {
                            break;
                        }
                    } catch (Exception e) {
                        e = e;
                        str = bufferedReader;
                        e.printStackTrace();
                        C6645.m30160(str);
                        StringBuilder sb = new StringBuilder();
                        sb.append(Environment.getExternalStorageDirectory().getPath());
                        str = File.separator;
                        sb.append(str);
                        return sb.toString();
                    } catch (Throwable th) {
                        th = th;
                        str = bufferedReader;
                        C6645.m30160(str);
                        throw th;
                    }
                }
                C6645.m30160(bufferedReader);
            } catch (Throwable th2) {
                th = th2;
            }
        } catch (Exception e2) {
            e = e2;
        }
        StringBuilder sb2 = new StringBuilder();
        sb2.append(Environment.getExternalStorageDirectory().getPath());
        str = File.separator;
        sb2.append(str);
        return sb2.toString();
    }

    @InterfaceC1753(api = 18)
    public static long m29972() {
        if (!m29968()) {
            return 0L;
        }
        StatFs statFs = new StatFs(m29959());
        return (statFs.getFreeBlocksLong() * statFs.getBlockSizeLong()) / 1024;
    }

    public static byte[] m29973(String str) {
        BufferedInputStream bufferedInputStream;
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        BufferedInputStream bufferedInputStream2 = null;
        try {
            bufferedInputStream = new BufferedInputStream(new FileInputStream(new File(str)));
            try {
                try {
                    byte[] bArr = new byte[8192];
                    while (true) {
                        int read = bufferedInputStream.read(bArr);
                        if (read == -1) {
                            break;
                        }
                        byteArrayOutputStream.write(bArr, 0, read);
                        byteArrayOutputStream.flush();
                    }
                    byte[] byteArray = byteArrayOutputStream.toByteArray();
                    try {
                        byteArrayOutputStream.close();
                        bufferedInputStream.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                    return byteArray;
                } catch (Exception e2) {
                    e = e2;
                    e.printStackTrace();
                    try {
                        byteArrayOutputStream.close();
                        bufferedInputStream.close();
                    } catch (IOException e3) {
                        e3.printStackTrace();
                    }
                    return null;
                }
            } catch (Throwable th) {
                th = th;
                bufferedInputStream2 = bufferedInputStream;
                try {
                    byteArrayOutputStream.close();
                    bufferedInputStream2.close();
                } catch (IOException e4) {
                    e4.printStackTrace();
                }
                throw th;
            }
        } catch (Exception e5) {
            e = e5;
            bufferedInputStream = null;
        } catch (Throwable th2) {
            th = th2;
            byteArrayOutputStream.close();
            bufferedInputStream2.close();
            throw th;
        }
    }

    public static boolean m29974(String str) {
        return new File(str).isFile();
    }

    public static boolean m29975(byte[] bArr, String str, String str2) {
        BufferedOutputStream bufferedOutputStream;
        if (!m29968()) {
            return false;
        }
        BufferedOutputStream bufferedOutputStream2 = null;
        try {
            try {
                bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(new File(Environment.getExternalStoragePublicDirectory(str), str2)));
            } catch (Throwable th) {
                th = th;
            }
        } catch (Exception e) {
            e = e;
        }
        try {
            bufferedOutputStream.write(bArr);
            bufferedOutputStream.flush();
            try {
                bufferedOutputStream.close();
            } catch (IOException e2) {
                e2.printStackTrace();
            }
            return true;
        } catch (Exception e3) {
            e = e3;
            bufferedOutputStream2 = bufferedOutputStream;
            e.printStackTrace();
            try {
                bufferedOutputStream2.close();
                return false;
            } catch (IOException e4) {
                e4.printStackTrace();
                return false;
            }
        } catch (Throwable th2) {
            th = th2;
            bufferedOutputStream2 = bufferedOutputStream;
            try {
                bufferedOutputStream2.close();
            } catch (IOException e5) {
                e5.printStackTrace();
            }
            throw th;
        }
    }

    @InterfaceC1753(api = 18)
    public static long m29976() {
        if (!m29968()) {
            return 0L;
        }
        StatFs statFs = new StatFs(m29959());
        return statFs.getFreeBlocksLong() * statFs.getBlockSizeLong();
    }

    public static String m29977() {
        return Environment.getExternalStorageState();
    }

    public static boolean m29978(Bitmap bitmap, String str, Context context) {
        BufferedOutputStream bufferedOutputStream;
        boolean z;
        if (!m29968()) {
            return false;
        }
        ?? r0 = 0;
        boolean z2 = false;
        BufferedOutputStream bufferedOutputStream2 = null;
        try {
            try {
                try {
                    bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(new File(context.getExternalCacheDir(), str)));
                } catch (Throwable th) {
                    th = th;
                }
            } catch (Exception e) {
                e = e;
            }
            if (str != null) {
                try {
                    boolean contains = str.contains(".png");
                    boolean z3 = contains;
                    if (!contains) {
                        ?? r02 = ".PNG";
                        z2 = r02;
                        z3 = r02;
                    }
                    bitmap.compress(Bitmap.CompressFormat.PNG, 100, bufferedOutputStream);
                    z = z3;
                    bufferedOutputStream.flush();
                    bufferedOutputStream.close();
                    r0 = z;
                } catch (Exception e2) {
                    e = e2;
                    bufferedOutputStream2 = bufferedOutputStream;
                    e.printStackTrace();
                    if (bufferedOutputStream2 == null) {
                        return true;
                    }
                    bufferedOutputStream2.close();
                    r0 = bufferedOutputStream2;
                    return true;
                } catch (Throwable th2) {
                    th = th2;
                    r0 = bufferedOutputStream;
                    if (r0 != 0) {
                        try {
                            r0.close();
                        } catch (IOException e3) {
                            e3.printStackTrace();
                        }
                    }
                    throw th;
                }
                return true;
            }
            bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bufferedOutputStream);
            z = z2;
            bufferedOutputStream.flush();
            bufferedOutputStream.close();
            r0 = z;
            return true;
        } catch (IOException e4) {
            e4.printStackTrace();
            return true;
        }
    }

    public static boolean m29979(byte[] bArr, String str, String str2) {
        BufferedOutputStream bufferedOutputStream;
        if (!m29968()) {
            return false;
        }
        File file = new File(m29959() + File.separator + str);
        if (!file.exists()) {
            file.mkdirs();
        }
        BufferedOutputStream bufferedOutputStream2 = null;
        try {
            try {
                bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(new File(file, str2)));
            } catch (Throwable th) {
                th = th;
            }
        } catch (Exception e) {
            e = e;
        }
        try {
            bufferedOutputStream.write(bArr);
            bufferedOutputStream.flush();
            try {
                bufferedOutputStream.close();
            } catch (IOException e2) {
                e2.printStackTrace();
            }
            return true;
        } catch (Exception e3) {
            e = e3;
            bufferedOutputStream2 = bufferedOutputStream;
            e.printStackTrace();
            try {
                bufferedOutputStream2.close();
                return false;
            } catch (IOException e4) {
                e4.printStackTrace();
                return false;
            }
        } catch (Throwable th2) {
            th = th2;
            bufferedOutputStream2 = bufferedOutputStream;
            try {
                bufferedOutputStream2.close();
            } catch (IOException e5) {
                e5.printStackTrace();
            }
            throw th;
        }
    }

    @InterfaceC1753(api = 18)
    public static long m29980() {
        if (!m29968()) {
            return 0L;
        }
        StatFs statFs = new StatFs(m29959());
        return ((statFs.getBlockCountLong() * statFs.getBlockSizeLong()) / 1024) / 1024;
    }

    public static String m29981() {
        return C6669.m30699().getPackageResourcePath();
    }

    public Bitmap m29982(String str) {
        Bitmap decodeByteArray;
        byte[] m29973 = m29973(str);
        if (m29973 == null || (decodeByteArray = BitmapFactory.decodeByteArray(m29973, 0, m29973.length)) == null) {
            return null;
        }
        return decodeByteArray;
    }
}