Maxcredito v1.2.1版本的 MD5 值为:2605738f37f8ddb81288799ddcbfcbe8
以下内容为反编译后的 r.java 源代码,内容仅作参考
package h.a.b;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import android.webkit.URLUtil;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class r {
public static String f3301f = null;
public static r f3302g = null;
public static JSONObject f3303h = null;
public static String f3304i = null;
public static String f3305j = null;
public static boolean f3306k = false;
public SharedPreferences a;
public SharedPreferences.Editor b;
public final JSONObject c;
public final JSONObject d;
public final JSONObject f3307e;
public r(Context context) {
SharedPreferences sharedPreferences = context.getSharedPreferences("branch_referral_shared_pref", 0);
this.a = sharedPreferences;
this.b = sharedPreferences.edit();
this.c = new JSONObject();
this.d = new JSONObject();
this.f3307e = new JSONObject();
}
public static r G(Context context) {
if (f3302g == null) {
f3302g = new r(context);
}
return f3302g;
}
public static void a(String str) {
if (!f3306k || TextUtils.isEmpty(str)) {
return;
}
Log.i("BranchSDK", str);
}
public static void b(String str) {
if (TextUtils.isEmpty(str)) {
return;
}
Log.i("BranchSDK", str);
}
public static void c(String str, Throwable th) {
if (TextUtils.isEmpty(str)) {
return;
}
Log.e("BranchSDK", str, th);
}
public static void j(boolean z) {
f3306k = z;
}
public static String u() {
return !TextUtils.isEmpty(f3305j) ? f3305j : "https://cdn.branch.io/";
}
public String A() {
return W("bnc_google_search_install_identifier");
}
public void A0(boolean z) {
l0("bnc_is_full_app_conversion", Boolean.valueOf(z));
}
public String B() {
return W("bnc_identity");
}
public void B0() {
y0("bnc_is_referrable", 1);
}
public String C() {
return W("bnc_identity_id");
}
public void C0(String str) {
J0("bnc_link_click_id", str);
}
public String D(String str) {
if (str == null) {
return null;
}
try {
return this.d.get(str).toString();
} catch (JSONException unused) {
return null;
}
}
public void D0(String str) {
J0("bnc_link_click_identifier", str);
}
public JSONObject E() {
return this.d;
}
public void E0(String str, long j2) {
f3302g.b.putLong(str, j2);
f3302g.b.apply();
}
public String F() {
return W("bnc_install_params");
}
public void F0(String str) {
J0("bnc_push_identifier", str);
}
public void G0(String str, String str2) {
if (str == null) {
return;
}
if (this.c.has(str) && str2 == null) {
this.c.remove(str);
}
try {
this.c.put(str, str2);
} catch (JSONException unused) {
}
}
public int H(String str) {
return I(str, 0);
}
public void H0(String str) {
J0("bnc_session_id", str);
}
public int I(String str, int i2) {
return f3302g.a.getInt(str, i2);
}
public void I0(String str) {
J0("bnc_session_params", str);
}
public boolean J() {
return p("bnc_triggered_by_fb_app_link");
}
public void J0(String str, String str2) {
f3302g.b.putString(str, str2);
f3302g.b.apply();
}
public int K() {
return H("bnc_is_referrable");
}
public void K0(String str) {
J0("bnc_user_url", str);
}
public long L() {
return O("bnc_branch_strong_match_time");
}
public boolean L0() {
try {
return this.f3307e.length() != 0;
} catch (Exception unused) {
return false;
}
}
public String M() {
return W("bnc_link_click_id");
}
public void M0(String str) {
y0("bnc_branch_view_use_" + str, s(str) + 1);
}
public String N() {
return W("bnc_link_click_identifier");
}
public long O(String str) {
return f3302g.a.getLong(str, 0L);
}
public String P() {
return W("bnc_push_identifier");
}
public JSONObject Q() {
return this.c;
}
public int R() {
return I("bnc_retry_count", 3);
}
public int S() {
return I("bnc_retry_interval", 1000);
}
public String T(String str) {
if (str == null) {
return null;
}
try {
return this.f3307e.get(str).toString();
} catch (JSONException unused) {
return null;
}
}
public String U() {
return W("bnc_session_id");
}
public String V() {
return W("bnc_session_params");
}
public String W(String str) {
return f3302g.a.getString(str, "bnc_no_value");
}
public int X() {
return I("bnc_timeout", 5500);
}
public String Y() {
return W("bnc_user_url");
}
public boolean Z() {
return c0(r());
}
public boolean a0() {
return p("bnc_limit_facebook_tracking");
}
public boolean b0() {
return p("bnc_is_full_app_conversion");
}
public boolean c0(String str) {
if (str != null) {
if (str.startsWith(k.d() ? "key_test_" : "key_")) {
return true;
}
}
return false;
}
public void d(String str, String str2) {
if (str == null) {
return;
}
try {
this.d.putOpt(str, str2);
} catch (JSONException unused) {
}
}
public void d0(JSONObject jSONObject) {
JSONArray jSONArray;
String U = U();
if (U.equals("bnc_no_value")) {
return;
}
if (f3303h == null) {
f3303h = q();
}
try {
if (f3303h.has(U)) {
jSONArray = f3303h.getJSONArray(U);
} else {
JSONArray jSONArray2 = new JSONArray();
f3303h.put(U, jSONArray2);
jSONArray = jSONArray2;
}
jSONArray.put(jSONObject);
J0("bnc_branch_analytical_data", f3303h.toString());
} catch (JSONException unused) {
}
}
public void e() {
f3303h = null;
J0("bnc_branch_analytical_data", "");
}
public void e0(long j2) {
E0("bnc_branch_strong_match_time", j2);
}
public void f() {
y0("bnc_is_referrable", 0);
}
public final String f0(ArrayList<String> arrayList) {
Iterator<String> it = arrayList.iterator();
String str = "";
while (it.hasNext()) {
str = str + it.next() + ",";
}
return str.substring(0, str.length() - 1);
}
public final void g() {
String M = M();
String N = N();
String n2 = n();
String P = P();
this.b.clear();
C0(M);
D0(N);
j0(n2);
F0(P);
f3302g.b.apply();
}
public void g0(String str, int i2) {
ArrayList<String> l2 = l();
if (!l2.contains(str)) {
l2.add(str);
i0(l2);
}
y0("bnc_total_base_" + str, i2);
}
public void h() {
Iterator<String> it = t().iterator();
while (it.hasNext()) {
o0(it.next(), 0);
}
n0(new ArrayList<>());
Iterator<String> it2 = l().iterator();
while (it2.hasNext()) {
String next = it2.next();
g0(next, 0);
h0(next, 0);
}
i0(new ArrayList<>());
}
public void h0(String str, int i2) {
y0("bnc_balance_base_" + str, i2);
}
public final ArrayList<String> i(String str) {
ArrayList<String> arrayList = new ArrayList<>();
Collections.addAll(arrayList, str.split(","));
return arrayList;
}
public final void i0(ArrayList<String> arrayList) {
if (arrayList.size() == 0) {
J0("bnc_actions", "bnc_no_value");
} else {
J0("bnc_actions", f0(arrayList));
}
}
public void j0(String str) {
J0("bnc_app_link", str);
}
public String k() {
if (URLUtil.isHttpsUrl(f3304i)) {
return f3304i;
}
return Build.VERSION.SDK_INT >= 20 ? "https://api2.branch.io/" : "https://api.branch.io/";
}
public void k0(String str) {
J0("bnc_app_version", str);
}
public final ArrayList<String> l() {
String W = W("bnc_actions");
if (W.equals("bnc_no_value")) {
return new ArrayList<>();
}
return i(W);
}
public void l0(String str, Boolean bool) {
f3302g.b.putBoolean(str, bool.booleanValue());
f3302g.b.apply();
}
public boolean m() {
return p("bnc_ad_network_callouts_disabled");
}
public boolean m0(String str) {
f3301f = str;
if (W("bnc_branch_key").equals(str)) {
return false;
}
g();
J0("bnc_branch_key", str);
return true;
}
public String n() {
return W("bnc_app_link");
}
public final void n0(ArrayList<String> arrayList) {
if (arrayList.size() == 0) {
J0("bnc_buckets", "bnc_no_value");
} else {
J0("bnc_buckets", f0(arrayList));
}
}
public String o() {
return W("bnc_app_version");
}
public void o0(String str, int i2) {
ArrayList<String> t = t();
if (!t.contains(str)) {
t.add(str);
n0(t);
}
y0("bnc_credit_base_" + str, i2);
}
public boolean p(String str) {
return f3302g.a.getBoolean(str, false);
}
public void p0(String str) {
J0("bnc_device_fingerprint_id", str);
}
public JSONObject q() {
JSONObject jSONObject = f3303h;
if (jSONObject != null) {
return jSONObject;
}
String W = W("bnc_branch_analytical_data");
JSONObject jSONObject2 = new JSONObject();
if (!TextUtils.isEmpty(W) && !W.equals("bnc_no_value")) {
try {
return new JSONObject(W);
} catch (JSONException unused) {
}
}
return jSONObject2;
}
public void q0(String str) {
J0("bnc_external_intent_extra", str);
}
public String r() {
if (f3301f == null) {
f3301f = W("bnc_branch_key");
}
return f3301f;
}
public void r0(String str) {
J0("bnc_external_intent_uri", str);
}
public int s(String str) {
return I("bnc_branch_view_use_" + str, 0);
}
public void s0(String str) {
J0("bnc_google_play_install_referrer_extras", str);
}
public final ArrayList<String> t() {
String W = W("bnc_buckets");
if (W.equals("bnc_no_value")) {
return new ArrayList<>();
}
return i(W);
}
public void t0(String str) {
J0("bnc_google_search_install_identifier", str);
}
public void u0(String str) {
J0("bnc_identity", str);
}
public int v(String str) {
return H("bnc_credit_base_" + str);
}
public void v0(String str) {
J0("bnc_identity_id", str);
}
public String w() {
return W("bnc_device_fingerprint_id");
}
public void w0(String str) {
J0("bnc_install_params", str);
}
public String x() {
return W("bnc_external_intent_extra");
}
public void x0(String str) {
J0("bnc_install_referrer", str);
}
public String y() {
return W("bnc_external_intent_uri");
}
public void y0(String str, int i2) {
f3302g.b.putInt(str, i2);
f3302g.b.apply();
}
public String z() {
return W("bnc_google_play_install_referrer_extras");
}
public void z0(Boolean bool) {
l0("bnc_triggered_by_fb_app_link", bool);
}
}