正在查看: Chaupal v3.2 应用的 k.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Chaupal v3.2 应用的 k.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package io.branch.referral;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;
import android.text.TextUtils;
import android.webkit.URLUtil;
import androidx.annotation.NonNull;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.joda.time.DateTimeConstants;
import org.json.JSONException;
import org.json.JSONObject;
public class k {
private static k g = null;
private static String h = null;
private static String i = null;
private static boolean j = false;
public static String k;
private final SharedPreferences a;
private SharedPreferences.Editor b;
private final JSONObject c = new JSONObject();
private final JSONObject d = new JSONObject();
private final JSONObject e = new JSONObject();
final e f = new e();
private k(Context context) {
SharedPreferences sharedPreferences = context.getSharedPreferences("branch_referral_shared_pref", 0);
this.a = sharedPreferences;
this.b = sharedPreferences.edit();
}
private void c() {
String C = C();
String D = D();
String i2 = i();
String H = H();
this.b.clear();
u0(C);
v0(D);
g0(i2);
x0(H);
this.b.apply();
}
static void c0(JSONObject jSONObject, e eVar) throws JSONException {
if (jSONObject == null) {
return;
}
JSONObject jSONObject2 = new JSONObject();
for (Map.Entry<String, ConcurrentHashMap<String, String>> entry : eVar.a().entrySet()) {
JSONObject jSONObject3 = new JSONObject();
for (Map.Entry<String, String> entry2 : entry.getValue().entrySet()) {
jSONObject3.put(entry2.getKey(), entry2.getValue());
}
jSONObject2.put(entry.getKey(), jSONObject3);
}
jSONObject.put(Defines$Jsonkey.PartnerData.getKey(), jSONObject2);
}
static void e0(String str) {
h = str;
}
static String o() {
return !TextUtils.isEmpty(i) ? i : "https://cdn.branch.io/";
}
public static k z(Context context) {
if (g == null) {
g = new k(context);
}
return g;
}
public int A(String str, int i2) {
return this.a.getInt(str, i2);
}
public void A0(String str) {
F0("bnc_randomly_generated_uuid", str);
}
public boolean B() {
return m("bnc_is_meta_clickthrough");
}
public void B0(JSONObject jSONObject) {
if (jSONObject == null || jSONObject.length() == 0) {
F0("bnc_referringUrlQueryParameters", "bnc_no_value");
} else {
F0("bnc_referringUrlQueryParameters", jSONObject.toString());
}
}
public String C() {
return T("bnc_link_click_id");
}
public void C0(@NonNull String str, @NonNull 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 String D() {
return T("bnc_link_click_identifier");
}
public void D0(String str) {
F0("bnc_session_id", str);
}
public long E(String str) {
return F(str, 0L);
}
public void E0(String str) {
F0("bnc_session_params", str);
}
public long F(String str, long j2) {
return this.a.getLong(str, j2);
}
public void F0(String str, String str2) {
this.b.putString(str, str2).apply();
}
public int G() {
return A("bnc_no_connection_retry_max", 3);
}
public void G0(String str) {
F0("bnc_user_url", str);
}
public String H() {
return T("bnc_push_identifier");
}
public String I() {
String T = T("bnc_randomized_bundle_token");
return (TextUtils.isEmpty(T) || T.equals("bnc_no_value")) ? T("bnc_identity_id") : T;
}
public String J() {
String T = T("bnc_randomized_device_token");
return (TextUtils.isEmpty(T) || T.equals("bnc_no_value")) ? T("bnc_device_fingerprint_id") : T;
}
public String K() {
return T("bnc_randomly_generated_uuid");
}
public String L() {
String str = "bnc_gclid_json_object";
String T = T("bnc_gclid_json_object");
if (T.equals("bnc_no_value")) {
return "bnc_no_value";
}
String str2 = null;
try {
JSONObject jSONObject = new JSONObject(T);
if (((Long) jSONObject.get("bnc_gclid_expiration_date")).longValue() - System.currentTimeMillis() > 0) {
str = jSONObject.getString("bnc_gclid_value");
str2 = str;
} else {
d0("bnc_gclid_json_object");
}
} catch (JSONException e) {
d0(str);
e.printStackTrace();
}
return str2;
}
public long M() {
return F("bnc_gclid_expiration_window", 2592000000L);
}
public JSONObject N() {
String T = T("bnc_referringUrlQueryParameters");
JSONObject jSONObject = new JSONObject();
if (TextUtils.isEmpty(T) || "bnc_no_value".equals(T)) {
return jSONObject;
}
try {
return new JSONObject(T);
} catch (JSONException e) {
BranchLogger.m("Unable to get URL query parameters as string: " + e);
return jSONObject;
}
}
public JSONObject O() {
return this.c;
}
public int P() {
return A("bnc_retry_count", 3);
}
public int Q() {
return A("bnc_retry_interval", DateTimeConstants.MILLIS_PER_SECOND);
}
public String R() {
return T("bnc_session_id");
}
public String S() {
return T("bnc_session_params");
}
public String T(String str) {
return this.a.getString(str, "bnc_no_value");
}
public int U() {
return A("bnc_timeout", 5500) + A("bnc_connect_timeout", 10000);
}
public int V() {
return A("bnc_timeout", 5500);
}
public String W() {
return T("bnc_user_url");
}
public boolean X(String str) {
return this.a.contains(str);
}
boolean Y() {
return m("bnc_limit_facebook_tracking");
}
boolean Z() {
return X("bnc_dma_eea");
}
void a(String str, String str2) {
if (str == null) {
return;
}
try {
this.d.putOpt(str, str2);
} catch (JSONException e) {
BranchLogger.a(e.getMessage());
}
}
public boolean a0() {
return m("bnc_is_full_app_conversion");
}
public void b() {
d0("bnc_gclid_json_object");
}
public void b0(JSONObject jSONObject) throws JSONException {
c0(jSONObject, this.f);
}
public String d() {
return URLUtil.isHttpsUrl(h) ? h : j ? "https://api3-eu.branch.io/" : Build.VERSION.SDK_INT >= 20 ? "https://api2.branch.io/" : "https://api.branch.io/";
}
public void d0(String str) {
this.b.remove(str).apply();
}
public boolean e() {
return m("bnc_ad_network_callouts_disabled");
}
boolean f() {
return m("bnc_dma_ad_personalization");
}
public void f0(String str) {
F0("bnc_anon_id", str);
}
boolean g() {
return m("bnc_dma_ad_user_data");
}
public void g0(String str) {
F0("bnc_app_link", str);
}
public String h() {
return T("bnc_anon_id");
}
public void h0(String str) {
F0("bnc_google_play_install_referrer_extras", str);
}
public String i() {
return T("bnc_app_link");
}
public void i0(String str) {
if (TextUtils.isEmpty(str)) {
return;
}
F0("bnc_app_store_source", str);
}
public String j() {
return T("bnc_google_play_install_referrer_extras");
}
public void j0(String str) {
F0("bnc_app_version", str);
}
public String k() {
return T("bnc_app_store_source");
}
public void k0(String str, Boolean bool) {
this.b.putBoolean(str, bool.booleanValue()).apply();
}
public String l() {
return T("bnc_app_version");
}
public boolean l0(String str) {
if (T("bnc_branch_key").equals(str)) {
return false;
}
c();
F0("bnc_branch_key", str);
if (Branch.J() == null) {
return true;
}
Branch.J().i.clear();
Branch.J().h.e();
return true;
}
public boolean m(String str) {
return this.a.getBoolean(str, false);
}
public void m0(String str) {
F0("bnc_external_intent_extra", str);
}
public String n() {
return T("bnc_branch_key");
}
public void n0(String str) {
F0("bnc_external_intent_uri", str);
}
public void o0(String str) {
F0("bnc_google_search_install_identifier", str);
}
public int p() {
return A("bnc_connect_timeout", 10000);
}
public void p0(String str) {
F0("bnc_initial_referrer", str);
}
boolean q() {
return m("bnc_dma_eea");
}
public void q0(String str) {
F0("bnc_install_params", str);
}
public String r() {
return T("bnc_external_intent_extra");
}
public void r0(String str) {
F0("bnc_install_referrer", str);
}
public String s() {
return T("bnc_external_intent_uri");
}
public void s0(boolean z) {
k0("bnc_is_full_app_conversion", Boolean.valueOf(z));
}
public String t() {
return T("bnc_google_search_install_identifier");
}
public void t0(boolean z) {
k0("bnc_is_meta_clickthrough", Boolean.valueOf(z));
}
public String u() {
return T("bnc_identity");
}
public void u0(String str) {
F0("bnc_link_click_id", str);
}
public String v() {
return T("bnc_initial_referrer");
}
public void v0(String str) {
F0("bnc_link_click_identifier", str);
}
String w(String str) {
if (str == null) {
return null;
}
try {
return this.d.get(str).toString();
} catch (JSONException e) {
BranchLogger.a(e.getMessage());
return null;
}
}
public void w0(String str, long j2) {
this.b.putLong(str, j2).apply();
}
public JSONObject x() {
return this.d;
}
public void x0(String str) {
F0("bnc_push_identifier", str);
}
public String y() {
return T("bnc_install_params");
}
public void y0(String str) {
F0("bnc_randomized_bundle_token", str);
}
public void z0(String str) {
F0("bnc_randomized_device_token", str);
}
}