正在查看: Clash Legends v0.0.1 应用的 ao.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 ao.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.paypal.android.sdk;
import android.content.Context;
import android.content.pm.PackageManager;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.net.Uri;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.telephony.TelephonyManager;
import com.onesignal.core.internal.config.InfluenceConfigModel;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Timer;
import kotlin.jvm.internal.IntCompanionObject;
import org.json.JSONObject;
public final class ao implements LocationListener {
private static ao f;
private boolean A = false;
private boolean B = false;
private Context g;
private String h;
private long i;
private long j;
private int k;
private int l;
private long m;
private String n;
private ax o;
private ba p;
private ba q;
private Map r;
private Location s;
private Timer t;
private Handler u;
private ar v;
private String w;
private String x;
private boolean y;
private String z;
private static final String c = ao.class.getSimpleName();
private static final Object d = new Object();
public static bh a = null;
public static bd b = null;
private static az e = new az();
private ao() {
}
static int a(ao aoVar) {
int i = aoVar.l;
aoVar.l = i + 1;
return i;
}
private static long a(Context context) {
if (context == null) {
return 0L;
}
try {
return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime;
} catch (PackageManager.NameNotFoundException e2) {
return 0L;
}
}
public static ao a() {
ao aoVar;
synchronized (d) {
if (f == null) {
f = new ao();
}
aoVar = f;
}
return aoVar;
}
private static String a(TelephonyManager telephonyManager) {
try {
return telephonyManager.getSimOperatorName();
} catch (SecurityException e2) {
aw.a(c, "Known SecurityException on some devices", e2);
return null;
}
}
private String a(String str, Map map) {
String h;
String str2;
this.r = null;
if (str != null && (str2 = this.x) != null && str.equals(str2)) {
return str;
}
if (str == null || str.trim().length() == 0) {
h = h();
} else {
h = str.trim();
aw.a(3, "PRD", "Using custom pairing id");
}
this.x = h;
e();
i();
return h;
}
private static ArrayList a(WifiManager wifiManager) {
String bssid;
int i;
ArrayList arrayList = new ArrayList();
List<ScanResult> scanResults = wifiManager.getScanResults();
if (scanResults == null || scanResults.size() == 0 || (bssid = wifiManager.getConnectionInfo().getBSSID()) == null || bssid.equals("00:00:00:00:00:00")) {
return null;
}
int i2 = IntCompanionObject.MIN_VALUE;
int i3 = -1;
for (int i4 = 0; i4 < scanResults.size(); i4++) {
if (!bssid.equals(scanResults.get(i4).BSSID) && i2 < (i = scanResults.get(i4).level)) {
i3 = i4;
i2 = i;
}
}
arrayList.add(bssid);
if (i3 != -1) {
arrayList.add(scanResults.get(i3).BSSID);
}
return arrayList;
}
private void a(ax axVar) {
this.o = axVar;
String str = c;
aw.a(str, "Configuration loaded");
aw.a(str, "URL: " + this.o.a());
aw.a(str, "Version: " + this.o.b());
j();
this.t = new Timer();
long c2 = this.o.c();
long d2 = this.o.d();
long e2 = this.o.e();
aw.a(str, "Sending logRiskMetadata every " + c2 + " seconds.");
aw.a(str, "sessionTimeout set to " + d2 + " seconds.");
aw.a(str, "compTimeout set to " + e2 + " seconds.");
this.i = c2 * 1000;
this.j = e2 * 1000;
bb.a(d2 * 1000);
}
private void a(ba baVar, ba baVar2) {
if (baVar == null) {
return;
}
baVar.ag = this.r;
JSONObject a2 = baVar2 != null ? baVar.a(baVar2) : baVar.a();
HashMap hashMap = new HashMap();
hashMap.put("appGuid", this.h);
hashMap.put("libraryVersion", d());
hashMap.put("additionalData", a2.toString());
String str = c;
aw.a(str, "Dyson Risk Data " + a2.toString());
ax axVar = this.o;
if (axVar != null) {
String g = axVar.g();
if ("release".equals("debug")) {
g = "https://svcs.paypal.com/AccessControl/LogRiskMetadata";
}
boolean h = this.o.h();
aw.a(str, "new LogRiskMetadataRequest to: " + g);
aw.a(str, "endpointIsStage: " + h + " (using SSL: " + (!h) + ")");
bl blVar = new bl(g, hashMap, this.u, !h);
if (this.B && this.A) {
blVar.a();
} else {
bo.a().a(blVar);
}
}
}
private static long b(Context context) {
if (context == null) {
return 0L;
}
try {
return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).lastUpdateTime;
} catch (PackageManager.NameNotFoundException e2) {
return 0L;
}
}
public static String d() {
return String.format(Locale.US, "Dyson/%S (%S %S)", "3.6.0.release", "Android", Build.VERSION.RELEASE);
}
private static String h() {
return aw.b(Boolean.FALSE.booleanValue());
}
private String i() {
StringBuilder sb = new StringBuilder("https://b.stats.paypal.com/counter.cgi?p=");
ar arVar = this.v;
if (arVar == null || arVar == ar.UNKNOWN) {
return "Beacon not recognize host app";
}
int a2 = this.v.a();
String str = this.x;
if (str == null) {
return "Beacon pairing id empty";
}
sb.append(str).append("&i=");
String b2 = aw.b();
if (b2.equals("")) {
try {
sb.append(az.a("emptyIp")).append("&t=");
} catch (IOException e2) {
aw.a(c, "error reading property file", e2);
}
} else {
sb.append(b2).append("&t=");
}
sb.append(String.valueOf(System.currentTimeMillis() / 1000)).append("&a=").append(a2);
aw.a(c, "Beacon Request URL " + sb.toString());
bj bjVar = new bj(sb.toString(), this.h, this.w, aw.a(this.g), this.u);
if (this.B && this.A) {
bjVar.a();
} else {
bo.a().a(bjVar);
}
return sb.toString();
}
private void j() {
Timer timer = this.t;
if (timer != null) {
timer.cancel();
}
}
private com.paypal.android.sdk.ba k() {
throw new UnsupportedOperationException("Method not decompiled: com.paypal.android.sdk.ao.k():com.paypal.android.sdk.ba");
}
public final String a(Context context, String str, ar arVar, String str2, Map map) {
String h;
ar arVar2 = arVar;
String a2 = aw.a(map, "RISK_MANAGER_CONF_URL", (String) null);
String a3 = aw.a(map, "RISK_MANAGER_PAIRING_ID", (String) null);
this.z = aw.a(map, "RISK_MANAGER_NOTIF_TOKEN", (String) null);
a = (bh) aw.a(map, bh.class, "RISK_MANAGER_NETWORK_ADAPTER", new bi());
b = (bd) aw.a(map, bd.class, "RISK_MANAGER_NETWORK_ADAPTER_BEACON", new be());
this.A = aw.a(map, "RISK_MANAGER_NETWORK_ADAPTER_SYNCHRONOUS", (Boolean) false);
if (map != null && map.containsKey("RISK_MANAGER_NETWORK_ADAPTER") && map.containsKey("RISK_MANAGER_NETWORK_ADAPTER_BEACON")) {
this.B = true;
}
boolean a4 = aw.a(map, "RISK_MANAGER_IS_DISABLE_REMOTE_CONFIG", (Boolean) false);
this.y = false;
this.g = context;
this.h = aw.c(context, str);
if (arVar2 == null) {
arVar2 = ar.UNKNOWN;
}
this.v = arVar2;
this.w = str2;
this.p = null;
this.q = null;
this.l = 0;
this.k = 0;
if (a3 == null || a3.trim().length() == 0) {
h = h();
} else {
aw.a(3, "PRD", "Using custom pairing id");
h = a3.trim();
}
this.x = h;
if (a2 == null) {
a2 = "https://www.paypalobjects.com/webstatic/risk/dyson_config_android_v3.json";
}
try {
this.n = a2;
aw.a(c, "Host activity detected");
this.m = System.currentTimeMillis();
if (this.u == null) {
this.u = new aq(this);
LocationManager locationManager = (LocationManager) this.g.getSystemService("location");
if (locationManager != null) {
onLocationChanged(aw.a(locationManager));
if (locationManager.isProviderEnabled("network")) {
locationManager.requestLocationUpdates("network", 3600000L, 10.0f, this);
}
}
}
j();
} catch (Exception e2) {
aw.a(c, (String) null, e2);
}
i();
a(new ax(this.g, !a4));
return this.x;
}
public final void a(Message message) {
String str;
String str2;
String str3;
String str4;
String str5;
try {
switch (message.what) {
case 0:
str = c;
str2 = "Dyson Async URL: " + message.obj;
aw.a(str, str2);
break;
case 1:
str = c;
str2 = "LogRiskMetadataRequest failed." + ((Exception) message.obj).getMessage();
aw.a(str, str2);
break;
case 2:
String str6 = (String) message.obj;
aw.a(c, "LogRiskMetadataRequest Server returned: " + str6);
try {
str3 = Uri.parse("?" + str6).getQueryParameter("responseEnvelope.ack");
} catch (UnsupportedOperationException e2) {
str3 = null;
}
if ("Success".equals(str3)) {
str4 = c;
str5 = "LogRiskMetadataRequest Success";
aw.a(str4, str5);
break;
}
break;
case InfluenceConfigModel.DEFAULT_NOTIFICATION_LIMIT:
str = c;
str2 = "Load Configuration URL: " + message.obj;
aw.a(str, str2);
break;
case 11:
str4 = c;
str5 = "LoadConfigurationRequest failed.";
aw.a(str4, str5);
break;
case 12:
ax axVar = (ax) message.obj;
if (axVar != null) {
a(axVar);
break;
}
break;
case 20:
str = c;
str2 = "Beacon URL: " + message.obj;
aw.a(str, str2);
break;
case 21:
aw.a(c, "BeaconRequest failed " + ((Exception) message.obj).getMessage());
break;
case 22:
str = c;
str2 = "Beacon returned: " + message.obj;
aw.a(str, str2);
break;
}
} catch (Exception e3) {
aw.a(c, (String) null, e3);
}
}
public final void b() {
new Timer().schedule(new ap(this), 0L);
}
public final JSONObject c() {
bb.a();
ba k = k();
this.p = k;
if (k == null) {
return null;
}
return k.a();
}
public final void e() {
bb.a();
ba k = k();
this.p = k;
a(k, (ba) null);
}
public final String f() {
return a((String) null, (Map) null);
}
@Override
public final void onLocationChanged(Location location) {
if (location != null) {
this.s = new Location(location);
aw.a(c, "Location Update: " + location.toString());
}
}
@Override
public final void onProviderDisabled(String str) {
}
@Override
public final void onProviderEnabled(String str) {
}
@Override
public final void onStatusChanged(String str, int i, Bundle bundle) {
}
}