正在查看: CAARD v1.1.19 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CAARD v1.1.19 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package fa;
import android.app.ActivityManager;
import android.content.Context;
import android.hardware.display.DisplayManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.util.DisplayMetrics;
import com.google.android.libraries.barhopper.RecognitionOptions;
import fa.f;
import io.flutter.embedding.engine.FlutterJNI;
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 f {
private boolean f8686a;
private c f8687b;
private long f8688c;
private fa.b f8689d;
private FlutterJNI f8690e;
private ExecutorService f8691f;
Future<b> f8692g;
class a implements Callable<b> {
final Context f8693a;
a(Context context) {
this.f8693a = context;
}
public void c() {
f.this.f8690e.prefetchDefaultFontManager();
}
@Override
public b call() {
mb.e A = mb.e.A("FlutterLoader initTask");
try {
f.c(f.this, this.f8693a);
try {
f.this.f8690e.loadLibrary();
f.this.f8690e.updateRefreshRate();
f.this.f8691f.execute(new Runnable() {
@Override
public final void run() {
f.a.this.c();
}
});
b bVar = new b(mb.b.d(this.f8693a), mb.b.a(this.f8693a), mb.b.c(this.f8693a), null);
if (A != null) {
A.close();
}
return bVar;
} catch (UnsatisfiedLinkError e10) {
if (!e10.toString().contains("couldn't find \"libflutter.so\"") && !e10.toString().contains("dlopen failed: library \"libflutter.so\" not found")) {
throw e10;
}
String property = System.getProperty("os.arch");
File file = new File(f.this.f8689d.f8673f);
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()), e10);
}
} catch (Throwable th) {
if (A != null) {
try {
A.close();
} catch (Throwable th2) {
th.addSuppressed(th2);
}
}
throw th;
}
}
}
private static class b {
final String f8695a;
final String f8696b;
final String f8697c;
private b(String str, String str2, String str3) {
this.f8695a = str;
this.f8696b = str2;
this.f8697c = str3;
}
b(String str, String str2, String str3, a aVar) {
this(str, str2, str3);
}
}
public static class c {
private String f8698a;
public String a() {
return this.f8698a;
}
}
public f() {
this(ca.a.e().d().a());
}
public f(FlutterJNI flutterJNI) {
this(flutterJNI, ca.a.e().b());
}
public f(FlutterJNI flutterJNI, ExecutorService executorService) {
this.f8686a = false;
this.f8690e = flutterJNI;
this.f8691f = executorService;
}
static g c(f fVar, Context context) {
fVar.n(context);
return null;
}
private String k(String str) {
return this.f8689d.f8671d + File.separator + str;
}
private g n(Context context) {
return null;
}
private static boolean p(Bundle bundle) {
if (bundle == null) {
return true;
}
return bundle.getBoolean("io.flutter.embedding.android.LeakVM", true);
}
public void q(Context context, String[] strArr, Handler handler, Runnable runnable) {
h(context.getApplicationContext(), strArr);
handler.post(runnable);
}
public void r(final Context context, final String[] strArr, final Handler handler, final Runnable runnable) {
try {
this.f8692g.get();
mb.a.a(Looper.getMainLooper()).post(new Runnable() {
@Override
public final void run() {
f.this.q(context, strArr, handler, runnable);
}
});
} catch (Exception e10) {
ca.b.c("FlutterLoader", "Flutter initialization failed.", e10);
throw new RuntimeException(e10);
}
}
public boolean g() {
return this.f8689d.f8674g;
}
public void h(Context context, String[] strArr) {
if (this.f8686a) {
return;
}
if (Looper.myLooper() != Looper.getMainLooper()) {
throw new IllegalStateException("ensureInitializationComplete must be called on the main thread");
}
if (this.f8687b == null) {
throw new IllegalStateException("ensureInitializationComplete must be called after startInitialization");
}
try {
mb.e A = mb.e.A("FlutterLoader#ensureInitializationComplete");
try {
b bVar = this.f8692g.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.f8689d.f8673f);
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.f8689d.f8668a);
arrayList.add("--aot-shared-library-name=" + this.f8689d.f8673f + str + this.f8689d.f8668a);
StringBuilder sb2 = new StringBuilder();
sb2.append("--cache-dir-path=");
sb2.append(bVar.f8696b);
arrayList.add(sb2.toString());
if (this.f8689d.f8672e != null) {
arrayList.add("--domain-network-policy=" + this.f8689d.f8672e);
}
if (this.f8687b.a() != null) {
arrayList.add("--log-tag=" + this.f8687b.a());
}
Bundle bundle = context.getPackageManager().getApplicationInfo(context.getPackageName(), RecognitionOptions.ITF).metaData;
int i10 = bundle != null ? bundle.getInt("io.flutter.embedding.android.OldGenHeapSize") : 0;
if (i10 == 0) {
((ActivityManager) context.getSystemService("activity")).getMemoryInfo(new ActivityManager.MemoryInfo());
i10 = (int) ((r6.totalMem / 1000000.0d) / 2.0d);
}
arrayList.add("--old-gen-heap-size=" + i10);
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=" + (p(bundle) ? "true" : "false"));
this.f8690e.init(context, (String[]) arrayList.toArray(new String[0]), null, bVar.f8695a, bVar.f8696b, SystemClock.uptimeMillis() - this.f8688c);
this.f8686a = true;
if (A != null) {
A.close();
}
} finally {
}
} catch (Exception e10) {
ca.b.c("FlutterLoader", "Flutter initialization failed.", e10);
throw new RuntimeException(e10);
}
}
public void i(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.f8687b == null) {
throw new IllegalStateException("ensureInitializationComplete must be called after startInitialization");
}
if (this.f8686a) {
handler.post(runnable);
} else {
this.f8691f.execute(new Runnable() {
@Override
public final void run() {
f.this.r(context, strArr, handler, runnable);
}
});
}
}
public String j() {
return this.f8689d.f8671d;
}
public String l(String str) {
return k(str);
}
public String m(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 l(sb.toString());
}
public boolean o() {
return this.f8686a;
}
public void s(Context context) {
t(context, new c());
}
public void t(Context context, c cVar) {
if (this.f8687b != null) {
return;
}
if (Looper.myLooper() != Looper.getMainLooper()) {
throw new IllegalStateException("startInitialization must be called on the main thread");
}
mb.e A = mb.e.A("FlutterLoader#startInitialization");
try {
Context applicationContext = context.getApplicationContext();
this.f8687b = cVar;
this.f8688c = SystemClock.uptimeMillis();
this.f8689d = fa.a.e(applicationContext);
io.flutter.view.g.f((DisplayManager) applicationContext.getSystemService("display"), this.f8690e).g();
this.f8692g = this.f8691f.submit(new a(applicationContext));
if (A != null) {
A.close();
}
} catch (Throwable th) {
if (A != null) {
try {
A.close();
} catch (Throwable th2) {
th.addSuppressed(th2);
}
}
throw th;
}
}
}