导航菜单

页面标题

页面副标题

Starpresta v4.0.3 - IiiII0I.java 源代码

正在查看: Starpresta v4.0.3 应用的 IiiII0I.java JAVA 源代码文件

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


package i0iiII;

import android.app.ActivityManager;
import android.content.Context;
import android.hardware.display.DisplayManager;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.util.DisplayMetrics;
import i00iI00i.i0II00I;
import i00iI00i.i0Ii0ii;
import i00ii00I.i00000;
import i00ii00I.i000IIi;
import i00ii00I.ii0i0Ii;
import i0iiII.IiiII0I;
import io.flutter.embedding.engine.FlutterJNI;
import io.flutter.view.Iiii000;
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;

public class IiiII0I {
    public boolean IiiI00i;
    public IiiI0II IiiI0I0;
    public long IiiI0II;
    public i0iiII.IiiI0II IiiI0Ii;
    public ExecutorService IiiI0i;
    public FlutterJNI IiiI0i0;
    public Future IiiI0iI;

    public class IiiI00i implements Callable {
        public final Context IiiIiI;

        public IiiI00i(Context context) {
            this.IiiIiI = context;
        }

        @Override
        public IiiI0I0 call() {
            String str;
            i00000 IiiI = i00000.IiiI("FlutterLoader initTask");
            try {
                IiiII0I.IiiI0II(IiiII0I.this, this.IiiIiI);
                try {
                    IiiII0I.this.IiiI0i0.loadLibrary(this.IiiIiI);
                    IiiII0I.this.IiiI0i0.updateRefreshRate();
                    IiiII0I.this.IiiI0i.execute(new Runnable() {
                        @Override
                        public final void run() {
                            IiiII0I.IiiI00i.this.IiiI0II();
                        }
                    });
                    IiiI0I0 iiiI0I0 = new IiiI0I0(i000IIi.IiiI0Ii(this.IiiIiI), i000IIi.IiiI00i(this.IiiIiI), i000IIi.IiiI0II(this.IiiIiI), null);
                    if (IiiI != null) {
                        IiiI.close();
                    }
                    return iiiI0I0;
                } catch (UnsatisfiedLinkError e) {
                    if (!e.toString().contains("couldn't find \"libflutter.so\"") && !e.toString().contains("dlopen failed: library \"libflutter.so\" not found")) {
                        throw e;
                    }
                    String property = System.getProperty("os.arch");
                    File file = new File(IiiII0I.this.IiiI0Ii.IiiI0i);
                    String[] list = file.list();
                    StringBuilder sb = new StringBuilder();
                    sb.append("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: ");
                    sb.append(property);
                    sb.append(", and the native libraries directory (with path ");
                    sb.append(file.getAbsolutePath());
                    sb.append(") ");
                    if (file.exists()) {
                        str = "contains the following files: " + Arrays.toString(list);
                    } else {
                        str = "does not exist.";
                    }
                    sb.append(str);
                    throw new UnsupportedOperationException(sb.toString(), e);
                }
            } catch (Throwable th) {
                if (IiiI != null) {
                    try {
                        IiiI.close();
                    } catch (Throwable th2) {
                        th.addSuppressed(th2);
                    }
                }
                throw th;
            }
        }

        public final void IiiI0II() {
            IiiII0I.this.IiiI0i0.prefetchDefaultFontManager();
        }
    }

    public static class IiiI0I0 {
        public final String IiiI00i;
        public final String IiiI0I0;
        public final String IiiI0II;

        public IiiI0I0(String str, String str2, String str3, IiiI00i iiiI00i) {
            this(str, str2, str3);
        }

        public IiiI0I0(String str, String str2, String str3) {
            this.IiiI00i = str;
            this.IiiI0I0 = str2;
            this.IiiI0II = str3;
        }
    }

    public static class IiiI0II {
        public String IiiI00i;

        public String IiiI00i() {
            return this.IiiI00i;
        }
    }

    public IiiII0I() {
        this(i0Ii0ii.IiiI0i0().IiiI0Ii().IiiI00i());
    }

    public static IiiIII0 IiiI0II(IiiII0I iiiII0I, Context context) {
        iiiII0I.IiiIII0(context);
        return null;
    }

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

    public void IiiI(final Context context, final String[] strArr, final Handler handler, final Runnable runnable) {
        if (Looper.myLooper() != Looper.getMainLooper()) {
            throw new IllegalStateException("ensureInitializationComplete must be called on the main thread");
        }
        if (this.IiiI0I0 == null) {
            throw new IllegalStateException("ensureInitializationComplete must be called after startInitialization");
        }
        if (this.IiiI00i) {
            handler.post(runnable);
        } else {
            this.IiiI0i.execute(new Runnable() {
                @Override
                public final void run() {
                    IiiII0I.this.IiiIIi0(context, strArr, handler, runnable);
                }
            });
        }
    }

    public boolean IiiI0iI() {
        return this.IiiI0Ii.IiiI0iI;
    }

    public void IiiI0ii(Context context, String[] strArr) {
        if (this.IiiI00i) {
            return;
        }
        if (Looper.myLooper() != Looper.getMainLooper()) {
            throw new IllegalStateException("ensureInitializationComplete must be called on the main thread");
        }
        if (this.IiiI0I0 == null) {
            throw new IllegalStateException("ensureInitializationComplete must be called after startInitialization");
        }
        try {
            i00000 IiiI = i00000.IiiI("FlutterLoader#ensureInitializationComplete");
            try {
                IiiI0I0 iiiI0I0 = (IiiI0I0) this.IiiI0iI.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.IiiI0Ii.IiiI0i);
                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.IiiI0Ii.IiiI00i);
                arrayList.add("--aot-shared-library-name=" + this.IiiI0Ii.IiiI0i + str + this.IiiI0Ii.IiiI00i);
                StringBuilder sb2 = new StringBuilder();
                sb2.append("--cache-dir-path=");
                sb2.append(iiiI0I0.IiiI0I0);
                arrayList.add(sb2.toString());
                if (this.IiiI0Ii.IiiI0i0 != null) {
                    arrayList.add("--domain-network-policy=" + this.IiiI0Ii.IiiI0i0);
                }
                if (this.IiiI0I0.IiiI00i() != null) {
                    arrayList.add("--log-tag=" + this.IiiI0I0.IiiI00i());
                }
                Bundle bundle = context.getPackageManager().getApplicationInfo(context.getPackageName(), 128).metaData;
                int i = bundle != null ? bundle.getInt("io.flutter.embedding.android.OldGenHeapSize") : 0;
                if (i == 0) {
                    ((ActivityManager) context.getSystemService("activity")).getMemoryInfo(new ActivityManager.MemoryInfo());
                    i = (int) ((r9.totalMem / 1000000.0d) / 2.0d);
                }
                arrayList.add("--old-gen-heap-size=" + i);
                DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
                arrayList.add("--resource-cache-max-bytes-threshold=" + (displayMetrics.widthPixels * displayMetrics.heightPixels * 48));
                arrayList.add("--prefetched-default-font-manager");
                if (bundle != null) {
                    if (bundle.containsKey("io.flutter.embedding.android.EnableImpeller")) {
                        if (bundle.getBoolean("io.flutter.embedding.android.EnableImpeller")) {
                            arrayList.add("--enable-impeller=true");
                        } else {
                            arrayList.add("--enable-impeller=false");
                        }
                    }
                    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");
                    }
                    if (bundle.containsKey("io.flutter.embedding.android.DisableMergedPlatformUIThread") && bundle.getBoolean("io.flutter.embedding.android.DisableMergedPlatformUIThread")) {
                        arrayList.add("--no-enable-merged-platform-ui-thread");
                    }
                    if (bundle.getBoolean("io.flutter.embedding.android.EnableSurfaceControl", false)) {
                        arrayList.add("--enable-surface-control");
                    }
                    String string = bundle.getString("io.flutter.embedding.android.ImpellerBackend");
                    if (string != null) {
                        arrayList.add("--impeller-backend=" + string);
                    }
                    if (bundle.getBoolean("io.flutter.embedding.android.ImpellerLazyShaderInitialization")) {
                        arrayList.add("--impeller-lazy-shader-mode");
                    }
                    if (bundle.getBoolean("io.flutter.embedding.android.ImpellerAntialiasLines")) {
                        arrayList.add("--impeller-antialias-lines");
                    }
                }
                arrayList.add("--leak-vm=" + (IiiIIII(bundle) ? "true" : "false"));
                this.IiiI0i0.init(context, (String[]) arrayList.toArray(new String[0]), null, iiiI0I0.IiiI00i, iiiI0I0.IiiI0I0, SystemClock.uptimeMillis() - this.IiiI0II, Build.VERSION.SDK_INT);
                this.IiiI00i = true;
                if (IiiI != null) {
                    IiiI.close();
                }
            } finally {
            }
        } catch (Exception e) {
            i0II00I.IiiI0II("FlutterLoader", "Flutter initialization failed.", e);
            throw new RuntimeException(e);
        }
    }

    public String IiiII0() {
        return this.IiiI0Ii.IiiI0Ii;
    }

    public final String IiiII0I(String str) {
        return this.IiiI0Ii.IiiI0Ii + File.separator + str;
    }

    public String IiiII0i(String str) {
        return IiiII0I(str);
    }

    public boolean IiiIII() {
        return this.IiiI00i;
    }

    public final IiiIII0 IiiIII0(Context context) {
        return null;
    }

    public final void IiiIIIi(Context context, String[] strArr, Handler handler, Runnable runnable) {
        IiiI0ii(context.getApplicationContext(), strArr);
        handler.post(runnable);
    }

    public void IiiIIi(Context context) {
        IiiIIii(context, new IiiI0II());
    }

    public final void IiiIIi0(final Context context, final String[] strArr, final Handler handler, final Runnable runnable) {
        try {
            ii0i0Ii.IiiI00i(Looper.getMainLooper()).post(new Runnable() {
                @Override
                public final void run() {
                    IiiII0I.this.IiiIIIi(context, strArr, handler, runnable);
                }
            });
        } catch (Exception e) {
            i0II00I.IiiI0II("FlutterLoader", "Flutter initialization failed.", e);
            throw new RuntimeException(e);
        }
    }

    public void IiiIIii(Context context, IiiI0II iiiI0II) {
        if (this.IiiI0I0 != null) {
            return;
        }
        if (Looper.myLooper() != Looper.getMainLooper()) {
            throw new IllegalStateException("startInitialization must be called on the main thread");
        }
        i00000 IiiI = i00000.IiiI("FlutterLoader#startInitialization");
        try {
            Context applicationContext = context.getApplicationContext();
            this.IiiI0I0 = iiiI0II;
            this.IiiI0II = SystemClock.uptimeMillis();
            this.IiiI0Ii = i0iiII.IiiI0I0.IiiI0i0(applicationContext);
            Iiii000.IiiI0i((DisplayManager) applicationContext.getSystemService("display"), this.IiiI0i0).IiiI0iI();
            this.IiiI0iI = this.IiiI0i.submit(new IiiI00i(applicationContext));
            if (IiiI != null) {
                IiiI.close();
            }
        } catch (Throwable th) {
            if (IiiI != null) {
                try {
                    IiiI.close();
                } catch (Throwable th2) {
                    th.addSuppressed(th2);
                }
            }
            throw th;
        }
    }

    public IiiII0I(FlutterJNI flutterJNI) {
        this(flutterJNI, i0Ii0ii.IiiI0i0().IiiI0I0());
    }

    public IiiII0I(FlutterJNI flutterJNI, ExecutorService executorService) {
        this.IiiI00i = false;
        this.IiiI0i0 = flutterJNI;
        this.IiiI0i = executorService;
    }
}