- 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
147 lines
5.3 KiB
Java
147 lines
5.3 KiB
Java
package csdk.gluads;
|
|
|
|
import android.app.Activity;
|
|
import android.text.TextUtils;
|
|
import androidx.annotation.NonNull;
|
|
import csdk.gluads.util.Common;
|
|
import java.lang.ref.WeakReference;
|
|
import java.util.Map;
|
|
import java.util.concurrent.Callable;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class GluAdsNativeBridge implements IAdvertisingListener {
|
|
private static long mNativeData;
|
|
private IAdvertising mAdvertising;
|
|
private WeakReference<Activity> mLastActivity;
|
|
|
|
private static native void destroy(long j);
|
|
|
|
public static native void destroyAnzuSDK();
|
|
|
|
public static native void disableCallTracking();
|
|
|
|
public static native void discardNativeAd(long j, String str);
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static native Activity getCurrentActivity(long j);
|
|
|
|
public static long getNativeData() {
|
|
return mNativeData;
|
|
}
|
|
|
|
public static native void initAnzuSDK(String str, String str2, boolean z, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6);
|
|
|
|
public static native void initNativeAdImpl(long j, boolean z, String str);
|
|
|
|
public static native void loadNativeAd(long j, String str, String str2);
|
|
|
|
private static native void onCustomActionReceived(long j, String str);
|
|
|
|
private static native void onPlacementEvent(long j, String str, String str2, String str3, String str4, Map<String, Object> map, long j2);
|
|
|
|
private static native void onRewardReceived(long j, String str, String str2, String str3, int i, String str4);
|
|
|
|
public static native void pauseAnzu(long j);
|
|
|
|
public static native void resumeAnzu(long j);
|
|
|
|
public static native void setListener(long j, IAdvertisingListener iAdvertisingListener);
|
|
|
|
public static native void showNativeAd(long j, String str, String str2);
|
|
|
|
public GluAdsNativeBridge(long j, String str) {
|
|
if (!TextUtils.equals(BuildConfig.VERSION_NAME, str)) {
|
|
throw new RuntimeException("Bridge library is mismatched '7.6.4-ec99fc8' vs '" + str + "'");
|
|
}
|
|
this.mLastActivity = new WeakReference<>(getCurrentActivity(j));
|
|
mNativeData = j;
|
|
}
|
|
|
|
public void destroy() {
|
|
synchronized (this) {
|
|
try {
|
|
long j = mNativeData;
|
|
mNativeData = 0L;
|
|
if (j != 0) {
|
|
destroy(j);
|
|
}
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
public IAdvertising createGluAds(String str, Map<String, Object> map) {
|
|
IAdvertising createAdvertising = new GluAdsFactory().createAdvertising(new Callable<Activity>() { // from class: csdk.gluads.GluAdsNativeBridge.1
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // java.util.concurrent.Callable
|
|
public Activity call() throws Exception {
|
|
synchronized (GluAdsNativeBridge.this) {
|
|
try {
|
|
if (GluAdsNativeBridge.mNativeData == 0) {
|
|
return (Activity) GluAdsNativeBridge.this.mLastActivity.get();
|
|
}
|
|
Activity currentActivity = GluAdsNativeBridge.getCurrentActivity(GluAdsNativeBridge.mNativeData);
|
|
GluAdsNativeBridge.this.mLastActivity = new WeakReference(currentActivity);
|
|
return currentActivity;
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
}, Common.emptyToNull(str), map);
|
|
this.mAdvertising = createAdvertising;
|
|
return createAdvertising;
|
|
}
|
|
|
|
public void setAdvertisingListener() {
|
|
this.mAdvertising.setAdvertisingListener(this);
|
|
}
|
|
|
|
@Override // csdk.gluads.IAdvertisingListener
|
|
public void onCustomActionReceived(@NonNull CustomAction customAction) {
|
|
synchronized (this) {
|
|
try {
|
|
long j = mNativeData;
|
|
if (j != 0) {
|
|
onCustomActionReceived(j, customAction.action);
|
|
}
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // csdk.gluads.IAdvertisingListener
|
|
public void onPlacementEvent(@NonNull PlacementEvent placementEvent) {
|
|
synchronized (this) {
|
|
try {
|
|
long j = mNativeData;
|
|
if (j != 0) {
|
|
String str = placementEvent.advertisementType;
|
|
String str2 = placementEvent.placement;
|
|
String str3 = placementEvent.status;
|
|
Throwable th = placementEvent.error;
|
|
onPlacementEvent(j, str, str2, str3, th != null ? th.getMessage() : null, placementEvent.extra, placementEvent.textureInfo);
|
|
}
|
|
} catch (Throwable th2) {
|
|
throw th2;
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // csdk.gluads.IAdvertisingListener
|
|
public void onRewardReceived(@NonNull Reward reward) {
|
|
synchronized (this) {
|
|
try {
|
|
long j = mNativeData;
|
|
if (j != 0) {
|
|
onRewardReceived(j, reward.identifier, reward.advertisementType, reward.item, reward.amount, reward.placement);
|
|
}
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
}
|