导航菜单

页面标题

页面副标题

迅 唔 v1.3.9 - d.java 源代码

正在查看: 迅 唔 v1.3.9 应用的 d.java JAVA 源代码文件

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


package p5;

import android.app.ActivityManager;
import android.content.Context;
import android.hardware.display.DisplayManager;
import android.os.Bundle;
import android.os.Looper;
import android.os.SystemClock;
import android.util.DisplayMetrics;
import i6.f;
import io.flutter.embedding.engine.FlutterJNI;
import io.flutter.view.p;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import p5.d;

public class d {

    public boolean f7160a;

    public c f7161b;

    public long f7162c;

    public p5.b f7163d;

    public FlutterJNI f7164e;

    public ExecutorService f7165f;

    public Future<b> f7166g;

    public class a implements Callable<b> {

        public final Context f7167a;

        public a(Context context) {
            this.f7167a = context;
        }

        public void c() {
            d.this.f7164e.prefetchDefaultFontManager();
        }

        @Override
        public b call() {
            f f8 = f.f("FlutterLoader initTask");
            try {
                d.a(d.this, this.f7167a);
                try {
                    d.this.f7164e.loadLibrary();
                    d.this.f7164e.updateRefreshRate();
                    d.this.f7165f.execute(new Runnable() {
                        @Override
                        public final void run() {
                            d.a.this.c();
                        }
                    });
                    b bVar = new b(i6.c.d(this.f7167a), i6.c.a(this.f7167a), i6.c.c(this.f7167a), null);
                    if (f8 != null) {
                        f8.close();
                    }
                    return bVar;
                } catch (UnsatisfiedLinkError e8) {
                    if (!e8.toString().contains("couldn't find \"libflutter.so\"") && !e8.toString().contains("dlopen failed: library \"libflutter.so\" not found")) {
                        throw e8;
                    }
                    String property = System.getProperty("os.arch");
                    File file = new File(d.this.f7163d.f7157f);
                    throw new UnsupportedOperationException("Could not load libflutter.so this is possibly because the application is running on an architecture that Flutter Android does not support (e.g. x86) see https://docs.flutter.dev/deployment/android#what-are-the-supported-target-architectures for more detail.\nApp is using cpu architecture: " + property + ", and the native libraries directory (with path " + file.getAbsolutePath() + ") contains the following files: " + Arrays.toString(file.list()), e8);
                }
            } catch (Throwable th) {
                if (f8 != null) {
                    try {
                        f8.close();
                    } catch (Throwable th2) {
                        th.addSuppressed(th2);
                    }
                }
                throw th;
            }
        }
    }

    public static class b {

        public final String f7169a;

        public final String f7170b;

        public final String f7171c;

        public b(String str, String str2, String str3) {
            this.f7169a = str;
            this.f7170b = str2;
            this.f7171c = str3;
        }

        public b(String str, String str2, String str3, a aVar) {
            this(str, str2, str3);
        }
    }

    public static class c {

        public String f7172a;

        public String a() {
            return this.f7172a;
        }
    }

    public d() {
        this(k5.a.e().d().a());
    }

    public d(FlutterJNI flutterJNI) {
        this(flutterJNI, k5.a.e().b());
    }

    public d(FlutterJNI flutterJNI, ExecutorService executorService) {
        this.f7160a = false;
        this.f7164e = flutterJNI;
        this.f7165f = executorService;
    }

    public static e a(d dVar, Context context) {
        dVar.k(context);
        return null;
    }

    public static boolean m(Bundle bundle) {
        if (bundle == null) {
            return true;
        }
        return bundle.getBoolean("io.flutter.embedding.android.LeakVM", true);
    }

    public boolean e() {
        return this.f7163d.f7158g;
    }

    public void f(Context context, String[] strArr) {
        if (this.f7160a) {
            return;
        }
        if (Looper.myLooper() != Looper.getMainLooper()) {
            throw new IllegalStateException("ensureInitializationComplete must be called on the main thread");
        }
        if (this.f7161b == null) {
            throw new IllegalStateException("ensureInitializationComplete must be called after startInitialization");
        }
        try {
            f f8 = f.f("FlutterLoader#ensureInitializationComplete");
            try {
                b bVar = this.f7166g.get();
                ArrayList arrayList = new ArrayList();
                arrayList.add("--icu-symbol-prefix=_binary_icudtl_dat");
                StringBuilder sb = new StringBuilder();
                sb.append("--icu-native-lib-path=");
                sb.append(this.f7163d.f7157f);
                String str = File.separator;
                sb.append(str);
                sb.append("libflutter.so");
                arrayList.add(sb.toString());
                if (strArr != null) {
                    Collections.addAll(arrayList, strArr);
                }
                arrayList.add("--aot-shared-library-name=" + this.f7163d.f7152a);
                arrayList.add("--aot-shared-library-name=" + this.f7163d.f7157f + str + this.f7163d.f7152a);
                StringBuilder sb2 = new StringBuilder();
                sb2.append("--cache-dir-path=");
                sb2.append(bVar.f7170b);
                arrayList.add(sb2.toString());
                if (this.f7163d.f7156e != null) {
                    arrayList.add("--domain-network-policy=" + this.f7163d.f7156e);
                }
                if (this.f7161b.a() != null) {
                    arrayList.add("--log-tag=" + this.f7161b.a());
                }
                Bundle bundle = context.getPackageManager().getApplicationInfo(context.getPackageName(), 128).metaData;
                int i8 = bundle != null ? bundle.getInt("io.flutter.embedding.android.OldGenHeapSize") : 0;
                if (i8 == 0) {
                    ((ActivityManager) context.getSystemService("activity")).getMemoryInfo(new ActivityManager.MemoryInfo());
                    i8 = (int) ((r6.totalMem / 1000000.0d) / 2.0d);
                }
                arrayList.add("--old-gen-heap-size=" + i8);
                DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
                arrayList.add("--resource-cache-max-bytes-threshold=" + (displayMetrics.widthPixels * displayMetrics.heightPixels * 12 * 4));
                arrayList.add("--prefetched-default-font-manager");
                if (bundle != null) {
                    if (bundle.getBoolean("io.flutter.embedding.android.EnableImpeller", false)) {
                        arrayList.add("--enable-impeller");
                    }
                    if (bundle.getBoolean("io.flutter.embedding.android.EnableVulkanValidation", false)) {
                        arrayList.add("--enable-vulkan-validation");
                    }
                    if (bundle.getBoolean("io.flutter.embedding.android.EnableOpenGLGPUTracing", false)) {
                        arrayList.add("--enable-opengl-gpu-tracing");
                    }
                    if (bundle.getBoolean("io.flutter.embedding.android.EnableVulkanGPUTracing", false)) {
                        arrayList.add("--enable-vulkan-gpu-tracing");
                    }
                    String string = bundle.getString("io.flutter.embedding.android.ImpellerBackend");
                    if (string != null) {
                        arrayList.add("--impeller-backend=" + string);
                    }
                }
                arrayList.add("--leak-vm=" + (m(bundle) ? "true" : "false"));
                this.f7164e.init(context, (String[]) arrayList.toArray(new String[0]), null, bVar.f7169a, bVar.f7170b, SystemClock.uptimeMillis() - this.f7162c);
                this.f7160a = true;
                if (f8 != null) {
                    f8.close();
                }
            } finally {
            }
        } catch (Exception e8) {
            k5.b.c("FlutterLoader", "Flutter initialization failed.", e8);
            throw new RuntimeException(e8);
        }
    }

    public String g() {
        return this.f7163d.f7155d;
    }

    public final String h(String str) {
        return this.f7163d.f7155d + File.separator + str;
    }

    public String i(String str) {
        return h(str);
    }

    public String j(String str, String str2) {
        StringBuilder sb = new StringBuilder();
        sb.append("packages");
        String str3 = File.separator;
        sb.append(str3);
        sb.append(str2);
        sb.append(str3);
        sb.append(str);
        return i(sb.toString());
    }

    public final e k(Context context) {
        return null;
    }

    public boolean l() {
        return this.f7160a;
    }

    public void n(Context context) {
        o(context, new c());
    }

    public void o(Context context, c cVar) {
        if (this.f7161b != null) {
            return;
        }
        if (Looper.myLooper() != Looper.getMainLooper()) {
            throw new IllegalStateException("startInitialization must be called on the main thread");
        }
        f f8 = f.f("FlutterLoader#startInitialization");
        try {
            Context applicationContext = context.getApplicationContext();
            this.f7161b = cVar;
            this.f7162c = SystemClock.uptimeMillis();
            this.f7163d = p5.a.e(applicationContext);
            p.f((DisplayManager) applicationContext.getSystemService("display"), this.f7164e).g();
            this.f7166g = this.f7165f.submit(new a(applicationContext));
            if (f8 != null) {
                f8.close();
            }
        } catch (Throwable th) {
            if (f8 != null) {
                try {
                    f8.close();
                } catch (Throwable th2) {
                    th.addSuppressed(th2);
                }
            }
            throw th;
        }
    }
}