GoooBet v1.0版本的 MD5 值为:ff9748f16167bfd7735b669c0a9931c5
以下内容为反编译后的 AdsService.java 源代码,内容仅作参考
package com.appnext.core;
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.os.ResultReceiver;
import com.bytedance.sdk.openadsdk.preload.falconx.statistic.StatisticData;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class AdsService extends IntentService {
public static final int ADD_PACK = 8348;
public static final int START_APP = 8346;
private static HashMap<String, n> gf = new HashMap<>();
private Runnable gg;
private Handler mHandler;
Messenger mMessenger;
@Override
public boolean onUnbind(Intent intent) {
return false;
}
static Handler a(AdsService adsService, Handler handler) {
adsService.mHandler = null;
return null;
}
class a extends Handler {
a() {
}
@Override
public final void handleMessage(Message message) {
if (message.what == 8348) {
Bundle data = message.getData();
AdsService.this.addPack(data.getString("package"), data, (ResultReceiver) data.getParcelable("receiver"));
new StringBuilder("Package added: ").append(data.getString("package"));
return;
}
super.handleMessage(message);
}
}
public AdsService() {
super("AdsService");
this.mMessenger = new Messenger(new a());
this.gg = new Runnable() {
@Override
public final void run() {
try {
for (Map.Entry entry : new HashMap(AdsService.gf).entrySet()) {
n nVar = (n) entry.getValue();
if (AdsService.this.Q(nVar.am)) {
new Bundle().putAll(nVar.hz);
AdsService.this.a(nVar);
AdsService.gf.remove(entry.getKey());
AdsService.this.startActivity(AdsService.this.getPackageManager().getLaunchIntentForPackage(nVar.am));
}
}
if (AdsService.this.mHandler != null) {
if (AdsService.gf.entrySet().size() > 0) {
AdsService.this.mHandler.postDelayed(AdsService.this.gg, 10000L);
} else {
AdsService.this.mHandler.removeCallbacksAndMessages(null);
AdsService.a(AdsService.this, (Handler) null);
}
}
} catch (Throwable unused) {
}
}
};
}
@Override
public void onDestroy() {
super.onDestroy();
gf.clear();
Handler handler = this.mHandler;
if (handler != null) {
handler.removeCallbacksAndMessages(null);
}
this.mHandler = null;
}
@Override
protected void onHandleIntent(Intent intent) {
if (intent.getIntExtra("added_info", 0) == 8348) {
addPack(intent.getStringExtra("package"), intent.getExtras(), (ResultReceiver) intent.getParcelableExtra("receiver"));
new StringBuilder("Package added: ").append(intent.getStringExtra("package"));
}
}
public void addPack(String str, Bundle bundle, ResultReceiver resultReceiver) {
if (gf == null) {
gf = new HashMap<>();
}
if (!gf.containsKey(str)) {
n nVar = new n();
nVar.am = str;
nVar.hz = bundle;
gf.put(str, nVar);
if (this.mHandler == null) {
Handler handler = new Handler();
this.mHandler = handler;
handler.postDelayed(this.gg, 10000L);
return;
}
return;
}
n nVar2 = gf.get(str);
if (nVar2 == null) {
addPack(str, bundle, resultReceiver);
} else {
nVar2.hz = bundle;
gf.put(str, nVar2);
}
}
private void a(String str, Bundle bundle, ResultReceiver resultReceiver) {
n nVar = gf.get(str);
if (nVar == null) {
addPack(str, bundle, resultReceiver);
} else {
nVar.hz = bundle;
gf.put(str, nVar);
}
}
public boolean Q(String str) {
try {
getPackageManager().getPackageInfo(str, 128);
return true;
} catch (PackageManager.NameNotFoundException unused) {
return false;
}
}
protected final synchronized void a(final n nVar) {
new Thread(new Runnable() {
@Override
public final void run() {
HashMap hashMap = new HashMap();
hashMap.put("guid", nVar.hz.getString("guid"));
hashMap.put("zone", nVar.hz.getString("zone") == null ? "" : nVar.hz.getString("zone"));
hashMap.put("adsID", f.b((Context) AdsService.this, true));
hashMap.put("isApk", "0");
hashMap.put("bannerid", nVar.hz.getString("bannerid"));
hashMap.put("placementid", nVar.hz.getString("placementid"));
hashMap.put("vid", nVar.hz.getString("vid"));
hashMap.put("tid", nVar.hz.getString("tid", ""));
hashMap.put("osid", StatisticData.ERROR_CODE_NOT_FOUND);
hashMap.put("auid", nVar.hz.getString("auid", ""));
String installerPackageName = AdsService.this.getPackageManager().getInstallerPackageName(nVar.am);
hashMap.put("installer", installerPackageName != null ? installerPackageName : "");
try {
f.a("https://admin.appnext.com/AdminService.asmx/SetOpenV1", (HashMap<String, String>) hashMap);
} catch (IOException unused) {
}
}
}).start();
}
@Override
public IBinder onBind(Intent intent) {
return this.mMessenger.getBinder();
}
}