- 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
134 lines
4.9 KiB
Java
134 lines
4.9 KiB
Java
package com.fyber.inneractive.sdk.network;
|
|
|
|
import android.app.Activity;
|
|
import android.app.Application;
|
|
import android.os.Bundle;
|
|
import android.os.HandlerThread;
|
|
import android.os.Message;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import com.fyber.inneractive.sdk.config.IAConfigManager;
|
|
import java.util.concurrent.LinkedBlockingQueue;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class d implements com.fyber.inneractive.sdk.util.o0 {
|
|
public com.fyber.inneractive.sdk.util.n0 d;
|
|
public int e;
|
|
public final LinkedBlockingQueue a = new LinkedBlockingQueue();
|
|
public JSONArray b = new JSONArray();
|
|
public boolean f = false;
|
|
public boolean g = false;
|
|
public final HandlerThread c = new HandlerThread("EventCollectorHandlerThread", 0);
|
|
|
|
public class a implements Application.ActivityLifecycleCallbacks {
|
|
public a() {
|
|
}
|
|
|
|
@Override // android.app.Application.ActivityLifecycleCallbacks
|
|
public final void onActivityCreated(@NonNull Activity activity, @Nullable Bundle bundle) {
|
|
}
|
|
|
|
@Override // android.app.Application.ActivityLifecycleCallbacks
|
|
public final void onActivityDestroyed(@NonNull Activity activity) {
|
|
}
|
|
|
|
@Override // android.app.Application.ActivityLifecycleCallbacks
|
|
public final void onActivitySaveInstanceState(@NonNull Activity activity, @NonNull Bundle bundle) {
|
|
}
|
|
|
|
@Override // android.app.Application.ActivityLifecycleCallbacks
|
|
public final void onActivityStarted(@NonNull Activity activity) {
|
|
}
|
|
|
|
@Override // android.app.Application.ActivityLifecycleCallbacks
|
|
public final void onActivityStopped(@NonNull Activity activity) {
|
|
}
|
|
|
|
@Override // android.app.Application.ActivityLifecycleCallbacks
|
|
public final void onActivityPaused(@NonNull Activity activity) {
|
|
d dVar = d.this;
|
|
com.fyber.inneractive.sdk.util.n0 n0Var = dVar.d;
|
|
if (n0Var != null) {
|
|
n0Var.post(new c(dVar, 20150330, 3500L));
|
|
}
|
|
}
|
|
|
|
@Override // android.app.Application.ActivityLifecycleCallbacks
|
|
public final void onActivityResumed(@NonNull Activity activity) {
|
|
com.fyber.inneractive.sdk.util.n0 n0Var = d.this.d;
|
|
if (n0Var != null) {
|
|
n0Var.removeMessages(20150330);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Type inference failed for: r8v22, types: [org.json.JSONObject] */
|
|
@Override // com.fyber.inneractive.sdk.util.o0
|
|
public final void handleMessage(Message message) {
|
|
String str;
|
|
int i = message.what;
|
|
if (i == 12312329 || i == 20150330) {
|
|
if (this.f && this.a.size() > 0) {
|
|
while (true) {
|
|
str = null;
|
|
if (this.a.size() <= 0) {
|
|
break;
|
|
}
|
|
try {
|
|
str = (JSONObject) this.a.poll();
|
|
} catch (Throwable unused) {
|
|
}
|
|
if (str != null) {
|
|
this.b.put(str);
|
|
}
|
|
}
|
|
if (this.b.length() > 0) {
|
|
JSONArray jSONArray = this.b;
|
|
String a2 = com.fyber.inneractive.sdk.config.a.a();
|
|
long currentTimeMillis = System.currentTimeMillis();
|
|
try {
|
|
str = jSONArray.toString();
|
|
} catch (Throwable unused2) {
|
|
}
|
|
if (str != null) {
|
|
IAConfigManager.L.r.a(new i0(new e(a2, jSONArray, currentTimeMillis), a2, str, x.c.b()));
|
|
}
|
|
this.b = new JSONArray();
|
|
}
|
|
}
|
|
com.fyber.inneractive.sdk.util.n0 n0Var = this.d;
|
|
if (n0Var != null) {
|
|
n0Var.removeMessages(12312329);
|
|
long j = this.e * 1000;
|
|
com.fyber.inneractive.sdk.util.n0 n0Var2 = this.d;
|
|
if (n0Var2 != null) {
|
|
n0Var2.post(new c(this, 12312329, j));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void a(Application application) {
|
|
if (!this.g) {
|
|
this.g = true;
|
|
this.c.start();
|
|
com.fyber.inneractive.sdk.util.n0 n0Var = new com.fyber.inneractive.sdk.util.n0(this.c.getLooper(), this);
|
|
this.d = n0Var;
|
|
this.f = true;
|
|
this.e = 30;
|
|
if (n0Var.hasMessages(12312329)) {
|
|
this.d.removeMessages(12312329);
|
|
}
|
|
long j = this.e * 1000;
|
|
com.fyber.inneractive.sdk.util.n0 n0Var2 = this.d;
|
|
if (n0Var2 != null) {
|
|
n0Var2.post(new c(this, 12312329, j));
|
|
}
|
|
}
|
|
application.registerActivityLifecycleCallbacks(new a());
|
|
}
|
|
}
|