RbChat v4.56630229版本的 MD5 值为:d137f4b55d6b64b50641a810905f5957
以下内容为反编译后的 bB.java 源代码,内容仅作参考
package com.paypal.android.sdk;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.SystemClock;
import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
import android.telephony.cdma.CdmaCellLocation;
import android.telephony.gsm.GsmCellLocation;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
import java.util.Timer;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONObject;
public final class bB implements LocationListener {
private static final Object v = new Object();
private static bB w;
private Context a;
private String b;
private boolean c;
private long d;
private long e;
private long f;
private int g;
private int h;
private long i;
private String j;
private by k;
private bA l;
private bA m;
private String n;
private Map o;
private Map p;
private Location q;
private Timer r;
private Handler s;
private String t;
private String u;
private bB() {
}
public static bB a() {
bB bBVar;
synchronized (v) {
if (w == null) {
w = new bB();
}
bBVar = w;
}
return bBVar;
}
private void a(bA bAVar, bA bAVar2) {
if (bAVar == null) {
return;
}
bAVar.Q = new HashMap(this.o);
this.p = new HashMap(this.o);
JSONObject a = bAVar2 != null ? bAVar.a(bAVar2) : bAVar.a();
ArrayList arrayList = new ArrayList();
arrayList.add(new BasicNameValuePair("appGuid", this.b));
arrayList.add(new BasicNameValuePair("libraryVersion", d()));
arrayList.add(new BasicNameValuePair("additionalData", a.toString()));
by byVar = this.k;
if (byVar != null) {
new bJ(byVar.g(), arrayList, this.s, !this.k.h()).a();
}
}
public static void a(bB bBVar, by byVar) {
bBVar.k = byVar;
bBVar.f();
bBVar.r = new Timer();
long c = bBVar.k.c();
long d = bBVar.k.d();
long e = bBVar.k.e();
bBVar.e = c * 1000;
long j = d * 1000;
bBVar.d = j;
bBVar.f = e * 1000;
bF.a(j);
bBVar.b();
}
public static bA b(bB bBVar, bA bAVar) {
bBVar.m = null;
return null;
}
public static int d(bB bBVar) {
int i = bBVar.g;
bBVar.g = i + 1;
return i;
}
public static String d() {
return String.format(Locale.US, "Dyson/%S (%S %S)", "2.1.0", "Android", Build.VERSION.RELEASE);
}
public static boolean e(bB bBVar) {
return System.currentTimeMillis() - bBVar.i > bBVar.f;
}
private void f() {
Timer timer = this.r;
if (timer != null) {
timer.cancel();
}
}
private bA g() {
TelephonyManager telephonyManager;
WifiInfo connectionInfo;
NetworkInfo activeNetworkInfo;
boolean z;
int phoneType;
String str;
GsmCellLocation gsmCellLocation;
CdmaCellLocation cdmaCellLocation;
ArrayList arrayList;
by byVar;
ArrayList arrayList2 = null;
if (this.a == null) {
return null;
}
bA bAVar = new bA();
try {
telephonyManager = (TelephonyManager) this.a.getSystemService("phone");
WifiManager wifiManager = (WifiManager) this.a.getSystemService("wifi");
ConnectivityManager connectivityManager = (ConnectivityManager) this.a.getSystemService("connectivity");
connectionInfo = bM.a(this.a, "ACCESS_WIFI_STATE") ? wifiManager.getConnectionInfo() : null;
activeNetworkInfo = bM.a(this.a, "ACCESS_NETWORK_STATE") ? connectivityManager.getActiveNetworkInfo() : null;
} catch (Throwable th) {
bM.a("RiskComponent", "Unknown error in RiskComponent", th);
}
if (!bM.a(this.a, "ACCESS_COARSE_LOCATION") && !bM.a(this.a, "ACCESS_FINE_LOCATION")) {
z = false;
boolean a = bM.a(this.a, "READ_PHONE_STATE");
phoneType = telephonyManager.getPhoneType();
if (phoneType == 0) {
if (phoneType == 1) {
bAVar.A = "gsm";
gsmCellLocation = z ? (GsmCellLocation) telephonyManager.getCellLocation() : null;
cdmaCellLocation = null;
} else if (phoneType != 2) {
str = "unknown (" + telephonyManager.getPhoneType() + ")";
} else {
bAVar.A = "cdma";
cdmaCellLocation = z ? (CdmaCellLocation) telephonyManager.getCellLocation() : null;
gsmCellLocation = null;
}
bAVar.a = this.b;
bAVar.O = this.t;
bAVar.P = this.u;
String packageName = this.a.getPackageName();
bAVar.b = packageName;
bAVar.c = this.a.getPackageManager().getPackageInfo(packageName, 0).versionName;
int i = -1;
bAVar.d = cdmaCellLocation == null ? -1 : cdmaCellLocation.getBaseStationId();
bAVar.M = cdmaCellLocation == null ? -1 : cdmaCellLocation.getNetworkId();
bAVar.L = cdmaCellLocation == null ? -1 : cdmaCellLocation.getSystemId();
bAVar.e = connectionInfo == null ? null : connectionInfo.getBSSID();
bAVar.f = gsmCellLocation == null ? -1 : gsmCellLocation.getCid();
bAVar.N = telephonyManager.getNetworkOperator();
bAVar.g = "2.1.0";
bAVar.h = this.j;
by byVar2 = this.k;
bAVar.i = byVar2 == null ? null : byVar2.b();
bAVar.j = activeNetworkInfo == null ? null : activeNetworkInfo.getTypeName();
bAVar.k = (a || !this.c) ? null : telephonyManager.getDeviceId();
bAVar.l = Build.MODEL;
bAVar.m = Build.DEVICE;
bAVar.n = SystemClock.uptimeMillis();
bAVar.o = bM.b();
bAVar.p = bM.a(true);
bAVar.r = this.c;
bAVar.s = (a || !this.c) ? null : telephonyManager.getLine1Number();
bAVar.t = bM.a();
bAVar.u = Locale.getDefault().getCountry();
bAVar.v = Locale.getDefault().getLanguage();
bAVar.w = this.q == null ? null : new Location(this.q);
if (gsmCellLocation != null) {
i = gsmCellLocation.getLac();
}
bAVar.x = i;
bAVar.y = connectionInfo == null ? null : connectionInfo.getMacAddress();
bAVar.z = Build.VERSION.RELEASE;
bAVar.B = bF.b();
bAVar.C = new ServiceState().getRoaming();
bAVar.D = telephonyManager.getSimOperatorName();
bAVar.E = a ? telephonyManager.getSimSerialNumber() : null;
bAVar.F = this.a.getPackageManager().hasSystemFeature("android.hardware.telephony");
bAVar.G = connectionInfo == null ? null : connectionInfo.getSSID();
bAVar.H = a ? telephonyManager.getSubscriberId() : null;
bAVar.I = System.currentTimeMillis();
bAVar.J = bM.c();
bAVar.K = TimeZone.getDefault().getDisplayName();
arrayList = new ArrayList();
byVar = this.k;
if (byVar != null) {
try {
for (String str2 : byVar.f()) {
if (bM.a(this.a.getPackageManager(), new Intent().setComponent(ComponentName.unflattenFromString(str2)))) {
arrayList.add(str2);
}
}
} catch (Exception unused) {
bM.a("RiskComponent", "knownApps error", null);
}
}
if (arrayList.size() != 0) {
arrayList2 = arrayList;
}
bAVar.q = arrayList2;
bAVar.Q = this.o;
return bAVar;
}
str = "none";
bAVar.A = str;
cdmaCellLocation = null;
gsmCellLocation = null;
bAVar.a = this.b;
bAVar.O = this.t;
bAVar.P = this.u;
String packageName2 = this.a.getPackageName();
bAVar.b = packageName2;
bAVar.c = this.a.getPackageManager().getPackageInfo(packageName2, 0).versionName;
int i2 = -1;
bAVar.d = cdmaCellLocation == null ? -1 : cdmaCellLocation.getBaseStationId();
bAVar.M = cdmaCellLocation == null ? -1 : cdmaCellLocation.getNetworkId();
bAVar.L = cdmaCellLocation == null ? -1 : cdmaCellLocation.getSystemId();
bAVar.e = connectionInfo == null ? null : connectionInfo.getBSSID();
bAVar.f = gsmCellLocation == null ? -1 : gsmCellLocation.getCid();
bAVar.N = telephonyManager.getNetworkOperator();
bAVar.g = "2.1.0";
bAVar.h = this.j;
by byVar22 = this.k;
bAVar.i = byVar22 == null ? null : byVar22.b();
bAVar.j = activeNetworkInfo == null ? null : activeNetworkInfo.getTypeName();
bAVar.k = (a || !this.c) ? null : telephonyManager.getDeviceId();
bAVar.l = Build.MODEL;
bAVar.m = Build.DEVICE;
bAVar.n = SystemClock.uptimeMillis();
bAVar.o = bM.b();
bAVar.p = bM.a(true);
bAVar.r = this.c;
bAVar.s = (a || !this.c) ? null : telephonyManager.getLine1Number();
bAVar.t = bM.a();
bAVar.u = Locale.getDefault().getCountry();
bAVar.v = Locale.getDefault().getLanguage();
bAVar.w = this.q == null ? null : new Location(this.q);
if (gsmCellLocation != null) {
}
bAVar.x = i2;
bAVar.y = connectionInfo == null ? null : connectionInfo.getMacAddress();
bAVar.z = Build.VERSION.RELEASE;
bAVar.B = bF.b();
bAVar.C = new ServiceState().getRoaming();
bAVar.D = telephonyManager.getSimOperatorName();
bAVar.E = a ? telephonyManager.getSimSerialNumber() : null;
bAVar.F = this.a.getPackageManager().hasSystemFeature("android.hardware.telephony");
bAVar.G = connectionInfo == null ? null : connectionInfo.getSSID();
bAVar.H = a ? telephonyManager.getSubscriberId() : null;
bAVar.I = System.currentTimeMillis();
bAVar.J = bM.c();
bAVar.K = TimeZone.getDefault().getDisplayName();
arrayList = new ArrayList();
byVar = this.k;
if (byVar != null) {
}
if (arrayList.size() != 0) {
}
bAVar.q = arrayList2;
bAVar.Q = this.o;
return bAVar;
}
z = true;
boolean a2 = bM.a(this.a, "READ_PHONE_STATE");
phoneType = telephonyManager.getPhoneType();
if (phoneType == 0) {
}
bAVar.A = str;
cdmaCellLocation = null;
gsmCellLocation = null;
bAVar.a = this.b;
bAVar.O = this.t;
bAVar.P = this.u;
String packageName22 = this.a.getPackageName();
bAVar.b = packageName22;
bAVar.c = this.a.getPackageManager().getPackageInfo(packageName22, 0).versionName;
int i22 = -1;
bAVar.d = cdmaCellLocation == null ? -1 : cdmaCellLocation.getBaseStationId();
bAVar.M = cdmaCellLocation == null ? -1 : cdmaCellLocation.getNetworkId();
bAVar.L = cdmaCellLocation == null ? -1 : cdmaCellLocation.getSystemId();
bAVar.e = connectionInfo == null ? null : connectionInfo.getBSSID();
bAVar.f = gsmCellLocation == null ? -1 : gsmCellLocation.getCid();
bAVar.N = telephonyManager.getNetworkOperator();
bAVar.g = "2.1.0";
bAVar.h = this.j;
by byVar222 = this.k;
bAVar.i = byVar222 == null ? null : byVar222.b();
bAVar.j = activeNetworkInfo == null ? null : activeNetworkInfo.getTypeName();
bAVar.k = (a2 || !this.c) ? null : telephonyManager.getDeviceId();
bAVar.l = Build.MODEL;
bAVar.m = Build.DEVICE;
bAVar.n = SystemClock.uptimeMillis();
bAVar.o = bM.b();
bAVar.p = bM.a(true);
bAVar.r = this.c;
bAVar.s = (a2 || !this.c) ? null : telephonyManager.getLine1Number();
bAVar.t = bM.a();
bAVar.u = Locale.getDefault().getCountry();
bAVar.v = Locale.getDefault().getLanguage();
bAVar.w = this.q == null ? null : new Location(this.q);
if (gsmCellLocation != null) {
}
bAVar.x = i22;
bAVar.y = connectionInfo == null ? null : connectionInfo.getMacAddress();
bAVar.z = Build.VERSION.RELEASE;
bAVar.B = bF.b();
bAVar.C = new ServiceState().getRoaming();
bAVar.D = telephonyManager.getSimOperatorName();
bAVar.E = a2 ? telephonyManager.getSimSerialNumber() : null;
bAVar.F = this.a.getPackageManager().hasSystemFeature("android.hardware.telephony");
bAVar.G = connectionInfo == null ? null : connectionInfo.getSSID();
bAVar.H = a2 ? telephonyManager.getSubscriberId() : null;
bAVar.I = System.currentTimeMillis();
bAVar.J = bM.c();
bAVar.K = TimeZone.getDefault().getDisplayName();
arrayList = new ArrayList();
byVar = this.k;
if (byVar != null) {
}
if (arrayList.size() != 0) {
}
bAVar.q = arrayList2;
bAVar.Q = this.o;
return bAVar;
}
public static void g(bB bBVar) {
if (bBVar.m != null) {
if ("full".equals(bBVar.n)) {
bBVar.a(bBVar.m, (bA) null);
return;
}
bBVar.a(bBVar.m, bBVar.g());
} else if (bF.c() && bBVar.l != null) {
bBVar.n = "incremental";
bA g = bBVar.g();
bBVar.a(bBVar.l, g);
bBVar.m = g;
} else {
bF.a();
bBVar.n = "full";
bA g2 = bBVar.g();
bBVar.a(g2, (bA) null);
bBVar.m = g2;
}
}
public static int h(bB bBVar) {
int i = bBVar.h;
bBVar.h = i + 1;
return i;
}
public final void a(Context context, String str, boolean z) {
this.a = context;
this.b = str;
try {
this.j = "https://www.paypalobjects.com/webstatic/risk/dyson_config_v2.json";
this.c = z;
this.i = System.currentTimeMillis();
if (this.s == null) {
this.s = new bC(this);
LocationManager locationManager = (LocationManager) this.a.getSystemService("location");
if (locationManager != null) {
onLocationChanged(bM.a(locationManager));
if (locationManager.isProviderEnabled("network")) {
locationManager.requestLocationUpdates("network", 0L, 0.0f, this);
}
}
}
this.l = null;
this.m = null;
this.o = new HashMap();
this.h = 0;
this.g = 0;
f();
} catch (Throwable th) {
bM.a("RiskComponent", null, th);
}
}
public final void a(String str, String str2) {
this.t = str;
this.u = str2;
}
public final void b() {
f();
this.r = new Timer();
by byVar = this.k;
if (byVar == null || !this.j.equals(byVar.a())) {
this.r.scheduleAtFixedRate(new bE(this), 0L, 600000L);
} else {
this.r.scheduleAtFixedRate(new bD(this), 0L, this.e);
}
}
public final JSONObject c() {
bF.a();
bA g = g();
this.l = g;
if (g == null) {
return null;
}
return g.a();
}
public final void e() {
this.i = System.currentTimeMillis();
}
@Override
public final void onLocationChanged(Location location) {
if (location != null) {
this.q = new Location(location);
}
}
@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) {
}
}