- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
76 lines
2.7 KiB
Java
76 lines
2.7 KiB
Java
package com.google.firebase.crashlytics.internal;
|
|
|
|
import android.content.Context;
|
|
import com.google.firebase.crashlytics.internal.common.CommonUtils;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class DevelopmentPlatformProvider {
|
|
public final Context context;
|
|
public DevelopmentPlatform developmentPlatform = null;
|
|
|
|
public DevelopmentPlatformProvider(Context context) {
|
|
this.context = context;
|
|
}
|
|
|
|
public String getDevelopmentPlatform() {
|
|
return initDevelopmentPlatform().developmentPlatform;
|
|
}
|
|
|
|
public String getDevelopmentPlatformVersion() {
|
|
return initDevelopmentPlatform().developmentPlatformVersion;
|
|
}
|
|
|
|
public static boolean isUnity(Context context) {
|
|
return CommonUtils.getResourcesIdentifier(context, "com.google.firebase.crashlytics.unity_version", "string") != 0;
|
|
}
|
|
|
|
public final boolean assetFileExists(String str) {
|
|
if (this.context.getAssets() == null) {
|
|
return false;
|
|
}
|
|
try {
|
|
InputStream open = this.context.getAssets().open(str);
|
|
if (open == null) {
|
|
return true;
|
|
}
|
|
open.close();
|
|
return true;
|
|
} catch (IOException unused) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public final DevelopmentPlatform initDevelopmentPlatform() {
|
|
if (this.developmentPlatform == null) {
|
|
this.developmentPlatform = new DevelopmentPlatform();
|
|
}
|
|
return this.developmentPlatform;
|
|
}
|
|
|
|
public class DevelopmentPlatform {
|
|
public final String developmentPlatform;
|
|
public final String developmentPlatformVersion;
|
|
|
|
public DevelopmentPlatform() {
|
|
int resourcesIdentifier = CommonUtils.getResourcesIdentifier(DevelopmentPlatformProvider.this.context, "com.google.firebase.crashlytics.unity_version", "string");
|
|
if (resourcesIdentifier != 0) {
|
|
this.developmentPlatform = "Unity";
|
|
String string = DevelopmentPlatformProvider.this.context.getResources().getString(resourcesIdentifier);
|
|
this.developmentPlatformVersion = string;
|
|
Logger.getLogger().v("Unity Editor version is: " + string);
|
|
return;
|
|
}
|
|
if (!DevelopmentPlatformProvider.this.assetFileExists("flutter_assets/NOTICES.Z")) {
|
|
this.developmentPlatform = null;
|
|
this.developmentPlatformVersion = null;
|
|
} else {
|
|
this.developmentPlatform = "Flutter";
|
|
this.developmentPlatformVersion = null;
|
|
Logger.getLogger().v("Development platform is: Flutter");
|
|
}
|
|
}
|
|
}
|
|
}
|