FlixOlé v4.4.0版本的 MD5 值为:50e7f767ca3e8715936523e9ef089581

以下内容为反编译后的 h0.java 源代码,内容仅作参考


package i.c.q0;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Environmenu;
import android.os.Parcel;
import android.os.StatFs;
import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.WindowManager;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import com.swift.sandhook.utils.FileUtils;
import i.c.s;
import java.io.BufferedInputStream;
import java.io.Closeable;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigInteger;
import java.net.HttpURLConnection;
import java.net.URLConnection;
import java.net.URLDecoder;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.TimeZone;
import java.util.regex.Pattern;
public final class h0 {
    public static int a = 0;
    public static long b = -1;
    public static long c = -1;
    public static long d = -1;
    public static String e = "";
    public static String f3860f = "";
    public static String f3861g = "NoCarrier";

    public static class a implements s.f {
        public final c a;
        public final String b;

        public a(c cVar, String str) {
            this.a = cVar;
            this.b = str;
        }

        @Override
        public void b(i.c.v vVar) {
            if (vVar.g() != null) {
                this.a.b(vVar.g().f());
                return;
            }
            d0.b(this.b, vVar.h());
            this.a.a(vVar.h());
        }
    }

    public static class b implements FilenameFilter {
        @Override
        public boolean accept(File file, String str) {
            return Pattern.matches("cpu[0-9]+", str);
        }
    }

    public interface c {
        void a(o.b.c cVar);

        void b(i.c.l lVar);
    }

    public interface d<T, K> {
        K apply(T t);
    }

    public static class e {
        public List<String> a;
        public List<String> b;

        public e(List<String> list, List<String> list2) {
            this.a = list;
            this.b = list2;
        }

        public List<String> a() {
            return this.b;
        }

        public List<String> b() {
            return this.a;
        }
    }

    public static String A(String str, String str2) {
        return B(str, str2.getBytes());
    }

    public static String B(String str, byte[] bArr) {
        try {
            return z(MessageDigest.getInstance(str), bArr);
        } catch (NoSuchAlgorithmException unused) {
            return null;
        }
    }

    public static Object C(Object obj, Method method, Object... objArr) {
        try {
            return method.invoke(obj, objArr);
        } catch (IllegalAccessException | InvocationTargetException unused) {
            return null;
        }
    }

    public static boolean D(Uri uri) {
        return uri != null && "content".equalsIgnoreCase(uri.getScheme());
    }

    public static boolean E(i.c.a aVar) {
        if (aVar != null) {
            return aVar.equals(i.c.a.e());
        }
        return false;
    }

    public static boolean F(Uri uri) {
        return uri != null && "file".equalsIgnoreCase(uri.getScheme());
    }

    public static boolean G(String str) {
        return str == null || str.length() == 0;
    }

    public static <T> boolean H(Collection<T> collection) {
        return collection == null || collection.size() == 0;
    }

    public static boolean I(Uri uri) {
        return uri != null && ("http".equalsIgnoreCase(uri.getScheme()) || "https".equalsIgnoreCase(uri.getScheme()) || "fbstaging".equalsIgnoreCase(uri.getScheme()));
    }

    public static Set<String> J(o.b.a aVar) throws o.b.b {
        HashSet hashSet = new HashSet();
        for (int i2 = 0; i2 < aVar.r(); i2++) {
            hashSet.add(aVar.q(i2));
        }
        return hashSet;
    }

    public static List<String> K(o.b.a aVar) throws o.b.b {
        ArrayList arrayList = new ArrayList();
        for (int i2 = 0; i2 < aVar.r(); i2++) {
            arrayList.add(aVar.q(i2));
        }
        return arrayList;
    }

    public static void L(String str, Exception exc) {
        if (!i.c.p.q() || str == null || exc == null) {
            return;
        }
        Log.d(str, exc.getClass().getSimpleName() + ": " + exc.getMessage());
    }

    public static void M(String str, String str2) {
        if (!i.c.p.q() || str == null || str2 == null) {
            return;
        }
        Log.d(str, str2);
    }

    public static void N(String str, String str2, Throwable th) {
        if (!i.c.p.q() || G(str)) {
            return;
        }
        Log.d(str, str2, th);
    }

    public static <T, K> List<K> O(List<T> list, d<T, K> dVar) {
        if (list == null) {
            return null;
        }
        ArrayList arrayList = new ArrayList();
        for (T t : list) {
            K apply = dVar.apply(t);
            if (apply != null) {
                arrayList.add(apply);
            }
        }
        if (arrayList.size() == 0) {
            return null;
        }
        return arrayList;
    }

    public static String P(String str) {
        return A("MD5", str);
    }

    public static Bundle Q(String str) {
        Bundle bundle = new Bundle();
        if (!G(str)) {
            for (String str2 : str.split("&")) {
                String[] split = str2.split("=");
                try {
                    if (split.length == 2) {
                        bundle.putString(URLDecoder.decode(split[0], "UTF-8"), URLDecoder.decode(split[1], "UTF-8"));
                    } else if (split.length == 1) {
                        bundle.putString(URLDecoder.decode(split[0], "UTF-8"), "");
                    }
                } catch (UnsupportedEncodingException e2) {
                    L("FacebookSDK", e2);
                }
            }
        }
        return bundle;
    }

    public static boolean R(Bundle bundle, String str, Object obj) {
        String obj2;
        if (obj == null) {
            bundle.remove(str);
            return true;
        } else if (obj instanceof Boolean) {
            bundle.putBoolean(str, ((Boolean) obj).booleanValue());
            return true;
        } else if (obj instanceof boolean[]) {
            bundle.putBooleanArray(str, (boolean[]) obj);
            return true;
        } else if (obj instanceof Double) {
            bundle.putDouble(str, ((Double) obj).doubleValue());
            return true;
        } else if (obj instanceof double[]) {
            bundle.putDoubleArray(str, (double[]) obj);
            return true;
        } else if (obj instanceof Integer) {
            bundle.putInt(str, ((Integer) obj).intValue());
            return true;
        } else if (obj instanceof int[]) {
            bundle.putIntArray(str, (int[]) obj);
            return true;
        } else if (obj instanceof Long) {
            bundle.putLong(str, ((Long) obj).longValue());
            return true;
        } else if (obj instanceof long[]) {
            bundle.putLongArray(str, (long[]) obj);
            return true;
        } else {
            if (obj instanceof String) {
                obj2 = (String) obj;
            } else if (!(obj instanceof o.b.a) && !(obj instanceof o.b.c)) {
                return false;
            } else {
                obj2 = obj.toString();
            }
            bundle.putString(str, obj2);
            return true;
        }
    }

    public static void S(Bundle bundle, String str, String str2) {
        if (G(str2)) {
            return;
        }
        bundle.putString(str, str2);
    }

    public static void T(Bundle bundle, String str, Uri uri) {
        if (uri != null) {
            S(bundle, str, uri.toString());
        }
    }

    public static String U(InputStream inputStream) throws IOException {
        BufferedInputStream bufferedInputStream;
        Throwable th;
        InputStreamReader inputStreamReader;
        try {
            bufferedInputStream = new BufferedInputStream(inputStream);
            try {
                inputStreamReader = new InputStreamReader(bufferedInputStream);
                try {
                    StringBuilder sb = new StringBuilder();
                    char[] cArr = new char[FileUtils.FileMode.MODE_ISUID];
                    while (true) {
                        int read = inputStreamReader.read(cArr);
                        if (read == -1) {
                            String sb2 = sb.toString();
                            g(bufferedInputStream);
                            g(inputStreamReader);
                            return sb2;
                        }
                        sb.append(cArr, 0, read);
                    }
                } catch (Throwable th2) {
                    th = th2;
                    g(bufferedInputStream);
                    g(inputStreamReader);
                    throw th;
                }
            } catch (Throwable th3) {
                th = th3;
                inputStreamReader = null;
            }
        } catch (Throwable th4) {
            bufferedInputStream = null;
            th = th4;
            inputStreamReader = null;
        }
    }

    public static Map<String, String> V(Parcel parcel) {
        int readInt = parcel.readInt();
        if (readInt < 0) {
            return null;
        }
        HashMap hashMap = new HashMap();
        for (int i2 = 0; i2 < readInt; i2++) {
            hashMap.put(parcel.readString(), parcel.readString());
        }
        return hashMap;
    }

    public static void W() {
        try {
            if (m()) {
                StatFs statFs = new StatFs(Environment.getExternalStorageDirectory().getPath());
                d = statFs.getAvailableBlocks() * statFs.getBlockSize();
            }
            d = i(d);
        } catch (Exception unused) {
        }
    }

    public static int X() {
        int i2 = a;
        if (i2 > 0) {
            return i2;
        }
        try {
            File[] listFiles = new File("/sys/devices/system/cpu/").listFiles(new b());
            if (listFiles != null) {
                a = listFiles.length;
            }
        } catch (Exception unused) {
        }
        if (a <= 0) {
            a = Math.max(Runtime.getRuntime().availableProcessors(), 1);
        }
        return a;
    }

    public static void Y(Context context) {
        if (f3861g.equals("NoCarrier")) {
            try {
                f3861g = ((TelephonyManager) context.getSystemService("phone")).getNetworkOperatorName();
            } catch (Exception unused) {
            }
        }
    }

    public static void Z(Context context) {
        if (b == -1 || System.currentTimeMillis() - b >= 1800000) {
            b = System.currentTimeMillis();
            a0();
            Y(context);
            b0();
            W();
        }
    }

    public static <T> boolean a(T t, T t2) {
        return t == null ? t2 == null : t.equals(t2);
    }

    public static void a0() {
        try {
            TimeZone timeZone = TimeZone.getDefault();
            e = timeZone.getDisplayName(timeZone.inDaylightTime(new Date()), 0);
            f3860f = timeZone.getID();
        } catch (Exception unused) {
        }
    }

    public static <T> List<T> b(T... tArr) {
        ArrayList arrayList = new ArrayList();
        for (T t : tArr) {
            if (t != null) {
                arrayList.add(t);
            }
        }
        return arrayList;
    }

    public static void b0() {
        try {
            if (m()) {
                StatFs statFs = new StatFs(Environment.getExternalStorageDirectory().getPath());
                c = statFs.getBlockCount() * statFs.getBlockSize();
            }
            c = i(c);
        } catch (Exception unused) {
        }
    }

    public static o.b.c c(String str) {
        o.b.c a2 = d0.a(str);
        if (a2 != null) {
            return a2;
        }
        i.c.v f2 = r(str).f();
        if (f2.g() != null) {
            return null;
        }
        return f2.h();
    }

    public static String c0(o.b.c cVar, String str) {
        return cVar != null ? cVar.E(str, "") : "";
    }

    public static Uri d(String str, String str2, Bundle bundle) {
        Uri.Builder builder = new Uri.Builder();
        builder.scheme("https");
        builder.authority(str);
        builder.path(str2);
        if (bundle != null) {
            for (String str3 : bundle.keySet()) {
                Object obj = bundle.get(str3);
                if (obj instanceof String) {
                    builder.appendQueryParameter(str3, (String) obj);
                }
            }
        }
        return builder.build();
    }

    public static void d0(o.b.c cVar, i.c.q0.c cVar2, String str, boolean z) throws o.b.b {
        if (cVar2 != null && cVar2.g() != null) {
            cVar.J("attribution", cVar2.g());
        }
        if (cVar2 != null && cVar2.b() != null) {
            cVar.J("advertiser_id", cVar2.b());
            cVar.K("advertiser_tracking_enabled", !cVar2.j());
        }
        if (cVar2 != null && cVar2.f() != null) {
            cVar.J("installer_package", cVar2.f());
        }
        cVar.J("anon_id", str);
        cVar.K("application_tracking_enabled", !z);
    }

    public static void e(Context context, String str) {
        String[] split;
        CookieSyncManager.createInstance(context).sync();
        CookieManager cookieManager = CookieManager.getInstance();
        String cookie = cookieManager.getCookie(str);
        if (cookie == null) {
            return;
        }
        for (String str2 : cookie.split(";")) {
            if (str2.split("=").length > 0) {
                cookieManager.setCookie(str, split[0].trim() + "=;expires=Sat, 1 Jan 2000 00:00:01 UTC;");
            }
        }
        cookieManager.removeExpiredCookie();
    }

    public static void e0(o.b.c cVar, Context context) throws o.b.b {
        String str;
        Locale locale;
        int i2;
        int i3;
        WindowManager windowManager;
        o.b.a aVar = new o.b.a();
        aVar.J("a2");
        Z(context);
        String packageName = context.getPackageName();
        int i4 = -1;
        try {
            PackageInfo packageInfo = context.getPackageManager().getPackageInfo(packageName, 0);
            i4 = packageInfo.versionCode;
            str = packageInfo.versionName;
        } catch (PackageManager.NameNotFoundException unused) {
            str = "";
        }
        aVar.J(packageName);
        aVar.F(i4);
        aVar.J(str);
        aVar.J(Build.VERSION.RELEASE);
        aVar.J(Build.MODEL);
        try {
            locale = context.getResources().getConfiguration().locale;
        } catch (Exception unused2) {
            locale = Locale.getDefault();
        }
        aVar.J(locale.getLanguage() + "_" + locale.getCountry());
        aVar.J(e);
        aVar.J(f3861g);
        double d2 = 0.0d;
        try {
            windowManager = (WindowManager) context.getSystemService("window");
        } catch (Exception unused3) {
        }
        if (windowManager != null) {
            Display defaultDisplay = windowManager.getDefaultDisplay();
            DisplayMetrics displayMetrics = new DisplayMetrics();
            defaultDisplay.getMetrics(displayMetrics);
            i2 = displayMetrics.widthPixels;
            try {
                i3 = displayMetrics.heightPixels;
                try {
                    d2 = displayMetrics.density;
                } catch (Exception unused4) {
                }
            } catch (Exception unused5) {
            }
            aVar.F(i2);
            aVar.F(i3);
            aVar.J(String.format("%.2f", Double.valueOf(d2)));
            aVar.F(X());
            aVar.I(c);
            aVar.I(d);
            aVar.J(f3860f);
            cVar.J("extinfo", aVar.toString());
        }
        i2 = 0;
        i3 = 0;
        aVar.F(i2);
        aVar.F(i3);
        aVar.J(String.format("%.2f", Double.valueOf(d2)));
        aVar.F(X());
        aVar.I(c);
        aVar.I(d);
        aVar.J(f3860f);
        cVar.J("extinfo", aVar.toString());
    }

    public static void f(Context context) {
        e(context, "facebook.com");
        e(context, ".facebook.com");
        e(context, "https://facebook.com");
        e(context, "https://.facebook.com");
    }

    public static String f0(byte[] bArr) {
        return B("SHA-1", bArr);
    }

    public static void g(Closeable closeable) {
        if (closeable != null) {
            try {
                closeable.close();
            } catch (IOException unused) {
            }
        }
    }

    public static o.b.a g0(o.b.c cVar, String str) {
        if (cVar != null) {
            return cVar.z(str);
        }
        return null;
    }

    public static String h(String str, String str2) {
        return G(str) ? str2 : str;
    }

    public static o.b.c h0(o.b.c cVar, String str) {
        if (cVar != null) {
            return cVar.A(str);
        }
        return null;
    }

    public static long i(double d2) {
        return Math.round(d2 / 1.073741824E9d);
    }

    public static <T> Collection<T> i0(T... tArr) {
        return Collections.unmodifiableCollection(Arrays.asList(tArr));
    }

    public static int j(InputStream inputStream, OutputStream outputStream) throws IOException {
        BufferedInputStream bufferedInputStream = null;
        try {
            BufferedInputStream bufferedInputStream2 = new BufferedInputStream(inputStream);
            try {
                byte[] bArr = new byte[8192];
                int i2 = 0;
                while (true) {
                    int read = bufferedInputStream2.read(bArr);
                    if (read == -1) {
                        break;
                    }
                    outputStream.write(bArr, 0, read);
                    i2 += read;
                }
                bufferedInputStream2.close();
                if (inputStream != null) {
                    inputStream.close();
                }
                return i2;
            } catch (Throwable th) {
                th = th;
                bufferedInputStream = bufferedInputStream2;
                if (bufferedInputStream != null) {
                    bufferedInputStream.close();
                }
                if (inputStream != null) {
                    inputStream.close();
                }
                throw th;
            }
        } catch (Throwable th2) {
            th = th2;
        }
    }

    public static void j0(Parcel parcel, Map<String, String> map) {
        if (map == null) {
            parcel.writeInt(-1);
            return;
        }
        parcel.writeInt(map.size());
        for (Map.Entry<String, String> entry : map.entrySet()) {
            parcel.writeString(entry.getKey());
            parcel.writeString(entry.getValue());
        }
    }

    public static void k(File file) {
        File[] listFiles;
        if (file.exists()) {
            if (file.isDirectory() && (listFiles = file.listFiles()) != null) {
                for (File file2 : listFiles) {
                    k(file2);
                }
            }
            file.delete();
        }
    }

    public static void l(URLConnection uRLConnection) {
        if (uRLConnection == null || !(uRLConnection instanceof HttpURLConnection)) {
            return;
        }
        ((HttpURLConnection) uRLConnection).disconnect();
    }

    public static boolean m() {
        return Environmenu.MEDIA_MOUNTED.equals(Environment.getExternalStorageState());
    }

    public static String n(int i2) {
        return new BigInteger(i2 * 5, new Random()).toString(32);
    }

    public static String o(Context context) {
        return context == null ? "null" : context == context.getApplicationContext() ? Environmenu.MEDIA_UNKNOWN : context.getClass().getSimpleName();
    }

    public static Date p(Bundle bundle, String str, Date date) {
        long parseLong;
        if (bundle == null) {
            return null;
        }
        Object obj = bundle.get(str);
        if (obj instanceof Long) {
            parseLong = ((Long) obj).longValue();
        } else if (!(obj instanceof String)) {
            return null;
        } else {
            try {
                parseLong = Long.parseLong((String) obj);
            } catch (NumberFormatException unused) {
                return null;
            }
        }
        return parseLong == 0 ? new Date(Long.MAX_VALUE) : new Date(date.getTime() + (parseLong * 1000));
    }

    public static long q(Uri uri) {
        Cursor cursor = null;
        try {
            cursor = i.c.p.b().getContentResolver().query(uri, null, null, null, null);
            int columnIndex = cursor.getColumnIndex("_size");
            cursor.moveToFirst();
            return cursor.getLong(columnIndex);
        } finally {
            if (cursor != null) {
                cursor.close();
            }
        }
    }

    public static i.c.s r(String str) {
        Bundle bundle = new Bundle();
        bundle.putString("fields", "id,name,first_name,middle_name,last_name,link");
        bundle.putString("access_token", str);
        return new i.c.s(null, "me", bundle, i.c.w.GET, null);
    }

    public static void s(String str, c cVar) {
        o.b.c a2 = d0.a(str);
        if (a2 != null) {
            cVar.a(a2);
            return;
        }
        a aVar = new a(cVar, str);
        i.c.s r = r(str);
        r.V(aVar);
        r.h();
    }

    public static String t(Context context) {
        i0.l(context, "context");
        i.c.p.y(context);
        return i.c.p.c();
    }

    public static Method u(Class<?> cls, String str, Class<?>... clsArr) {
        try {
            return cls.getMethod(str, clsArr);
        } catch (NoSuchMethodException unused) {
            return null;
        }
    }

    public static Method v(String str, String str2, Class<?>... clsArr) {
        try {
            return u(Class.forName(str), str2, clsArr);
        } catch (ClassNotFoundException unused) {
            return null;
        }
    }

    public static Object w(o.b.c cVar, String str, String str2) throws o.b.b {
        Object s = cVar.s(str);
        if (s != null && (s instanceof String)) {
            s = new o.b.e((String) s).i();
        }
        if (s == null || (s instanceof o.b.c) || (s instanceof o.b.a)) {
            return s;
        }
        if (str2 != null) {
            o.b.c cVar2 = new o.b.c();
            cVar2.M(str2, s);
            return cVar2;
        }
        throw new i.c.l("Got an unexpected non-JSON object.");
    }

    public static String x(Uri uri) {
        if (uri == null) {
            return null;
        }
        return uri.toString();
    }

    public static e y(o.b.c cVar) throws o.b.b {
        String D;
        o.b.a f2 = cVar.g("permissions").f("data");
        ArrayList arrayList = new ArrayList(f2.r());
        ArrayList arrayList2 = new ArrayList(f2.r());
        for (int i2 = 0; i2 < f2.r(); i2++) {
            o.b.c z = f2.z(i2);
            String D2 = z.D("permission");
            if (D2 != null && !D2.equals("installed") && (D = z.D("status")) != null) {
                if (D.equals("granted")) {
                    arrayList.add(D2);
                } else if (D.equals("declined")) {
                    arrayList2.add(D2);
                }
            }
        }
        return new e(arrayList, arrayList2);
    }

    public static String z(MessageDigest messageDigest, byte[] bArr) {
        messageDigest.update(bArr);
        byte[] digest = messageDigest.digest();
        StringBuilder sb = new StringBuilder();
        for (byte b2 : digest) {
            sb.append(Integer.toHexString((b2 >> 4) & 15));
            sb.append(Integer.toHexString((b2 >> 0) & 15));
        }
        return sb.toString();
    }
}