正在查看: BAM Crawford v6.14.1 应用的 h.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: BAM Crawford v6.14.1 应用的 h.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.subsplash.thechurchapp.api;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.util.Pair;
import com.subsplash.thechurchapp.ReactPlatformBridge;
import com.subsplash.thechurchapp.TheChurchApp;
import com.subsplash.thechurchapp.handlers.app.AppHandler;
import com.subsplash.util.ApplicationInstance;
import com.subsplash.util.cache.LocalCache;
import com.subsplash.util.e0;
import com.subsplash.util.f0;
import com.subsplash.util.h0;
import com.subsplash.util.n0;
import com.subsplash.util.t;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
import okhttp3.HttpUrl;
public class h {
private static h a;
private static SimpleDateFormat b = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
class a extends xi.b {
final h a;
final b b;
final String c;
final String d;
a(h hVar, b bVar, String str, String str2) {
this.a = hVar;
this.b = bVar;
this.c = str;
this.d = str2;
}
@Override
public void a(byte[] bArr, int i, Map map, boolean z, boolean z2) {
this.a.d(bArr != null ? new String(bArr) : null, i, map, this.b, z);
}
@Override
public void c(Exception exc) {
this.a.e(exc, this.c, this.d, this.b);
}
@Override
public void d(byte[] bArr, Map map) {
this.a.f(bArr != null ? new String(bArr) : null, map, this.b);
}
}
private h() {
b.setTimeZone(TimeZone.getDefault());
Log.d("Subsplash", "android.os.Build.DEVICE: " + Build.DEVICE);
Log.d("Subsplash", "android.os.Build.MANUFACTURER: " + Build.MANUFACTURER);
Log.d("Subsplash", "android.os.Build.MODEL: " + Build.MODEL);
Log.d("Subsplash", "android.os.Build.PRODUCT: " + r());
Log.d("Subsplash", "android.os.Build.BRAND: " + Build.BRAND);
Log.d("Subsplash", "android.os.Build.DISPLAY: " + Build.DISPLAY);
Log.d("Subsplash", "android.os.Build.VERSION.RELEASE: " + Build.VERSION.RELEASE);
}
public static void C(AppHandler appHandler) {
D(appHandler != null ? appHandler.appKey : null);
}
public static void D(String str) {
SharedPreferences.Editor edit = TheChurchApp.t().edit();
edit.putString("defaultAppKey", str);
edit.commit();
}
public void d(String str, int i, Map map, b bVar, boolean z) {
Log.d("Subsplash", "Downloaded feed: \n" + str);
bVar.FeedLoaded(str, i, map, z);
}
public void e(Exception exc, String str, String str2, b bVar) {
Log.d("Subsplash", "Failed to download feed: " + str + " ERROR: " + exc.toString());
if (exc.getMessage().contains("Failed to connect") || exc.getMessage().contains("Chain validation failed") || exc.getMessage().contains("Cleartext HTTP traffic")) {
Bundle bundle = new Bundle();
bundle.putString("name", "sentry");
bundle.putString("error", String.format("SSL error: %s for %s", exc.getMessage(), str));
bundle.putString("appKey", ApplicationInstance.getCurrentInstance().appKey);
ReactPlatformBridge.dispatchCommonModuleCommand(bundle);
}
bVar.FeedLoadError(exc);
}
public void f(String str, Map map, b bVar) {
bVar.FeedNotModified(str, map);
}
public static void g(List list) {
String appKey = ApplicationInstance.getCurrentInstance().getAppKey();
list.add(Pair.create("app build version", Build.VERSION.RELEASE));
list.add(Pair.create("app release version", "6.14.1"));
list.add(Pair.create("app key", "HTF22N"));
if (!appKey.equals("HTF22N")) {
list.add(Pair.create("current app key", appKey));
}
HashMap<String, String> constants = ApplicationInstance.getCurrentInstance().getConstants();
if (constants.containsKey(ApplicationInstance.KEY_PUSH_TOKEN_URL)) {
list.add(Pair.create(ApplicationInstance.KEY_PUSH_TOKEN_URL, constants.get(ApplicationInstance.KEY_PUSH_TOKEN_URL)));
}
}
private String h(String str) {
try {
return URLEncoder.encode(str, "UTF-8");
} catch (UnsupportedEncodingException unused) {
return str;
}
}
public static ArrayList j() {
ArrayList arrayList = new ArrayList();
f0.d(arrayList);
g(arrayList);
TheChurchApp.i(arrayList);
LocalCache.debugAppendCacheData(arrayList);
return arrayList;
}
public static String k() {
ArrayList j = j();
StringBuilder sb = new StringBuilder();
Iterator it = j.iterator();
while (it.hasNext()) {
Pair pair = (Pair) it.next();
sb.append((String) pair.first);
sb.append(',');
sb.append((String) pair.second);
sb.append('\r');
}
return sb.toString();
}
public static String l() {
String s = s();
return (s == null || s.equals("HTF22N")) ? TheChurchApp.t().getString("defaultAppKey", HttpUrl.FRAGMENT_ENCODE_SET) : s;
}
public static String n() {
return String.format("https://subsplash.wufoo.com/forms/feedback/def/field139=%s", f0.e(k().replaceAll("/", HttpUrl.FRAGMENT_ENCODE_SET).replaceAll("\r", ",")));
}
public static h o() {
if (a == null) {
a = new h();
}
return a;
}
private String p() {
String format = String.format("%s/%s", HttpUrl.FRAGMENT_ENCODE_SET, HttpUrl.FRAGMENT_ENCODE_SET);
Log.d("Subsplash", "Checking to see if offline setup file exists: " + format);
if (e0.k(format)) {
return format;
}
return null;
}
private String q(String str) {
String format = String.format("%s/%s", HttpUrl.FRAGMENT_ENCODE_SET, str);
if (e0.k(format)) {
return format;
}
return null;
}
private String r() {
return Build.PRODUCT.replaceAll(" ", "_");
}
public static String s() {
return TheChurchApp.t().getString("SCREENSHOT_APP_KEY", null);
}
private String v() {
String i = com.subsplash.util.i.i();
String j = com.subsplash.util.i.j();
return i != null ? String.format("uid=%s&suiid=%s", i, j) : String.format("suiid=%s", j);
}
public static Boolean w() {
return Boolean.FALSE;
}
public static boolean x(AppHandler appHandler) {
String l = l();
return appHandler != null && appHandler.appKey != null && h0.d(l) && appHandler.appKey.equalsIgnoreCase(l);
}
public void A(String str, String str2, b bVar) {
xi.i iVar = new xi.i();
iVar.c = true;
B(str, str2, bVar, iVar);
}
public void B(String str, String str2, b bVar, xi.i iVar) {
if (str == null || str.equals(HttpUrl.FRAGMENT_ENCODE_SET)) {
e(new Exception("Feed URL cannot be empty!"), str, str2, bVar);
return;
}
iVar.g = str2;
Log.d("Subsplash", "Making API feed call: " + str);
String str3 = ApplicationInstance.getCurrentInstance().appKey;
t.a(new a(this, bVar, str, str2)).h(str, null, iVar);
}
public String i() {
String str = ApplicationInstance.getCurrentInstance().getConstants().get("callback_url");
if (h0.d(str)) {
return str;
}
String l = l();
if (!h0.d(l)) {
l = ApplicationInstance.getCurrentInstance().appKey;
}
return String.format("https://t.subsplash.com/callback/%s/", l);
}
public String m(String str, String str2) {
String q = q(str);
if (q != null) {
return q;
}
String str3 = ApplicationInstance.getCurrentInstance().getConstants().get("wrapper_url");
return str3 == null ? str : String.format("%s?destination=%s&device=%s&v=android_tca_%s&%s&appkey=%s&key=%s_%s&os_v=%s&handler=%s", str3, h(str), r(), "6.14.1", v(), "HTF22N", "SUB568HZF4927FHSGLKO348", "HTF22N", Build.VERSION.RELEASE, h(str2));
}
public String t() {
return ApplicationInstance.getCurrentInstance().getConstants().get("settings_url");
}
public String u(String str) {
String p = p();
if (p != null) {
return p;
}
String replace = "https://feeds.subsplash.com/v3/setup/{{app_key}}".replace("{{app_key}}", str);
return s() != null ? String.format("%s?analytics=0", replace) : replace;
}
public void y(Context context, String str, com.subsplash.thechurchapp.api.a aVar) {
if (h0.g(str)) {
Log.d("Subsplash", "App Key Missing");
return;
}
String str2 = ApplicationInstance.getCurrentInstance().appKey;
ApplicationInstance applicationInstance = ApplicationInstance.getInstance(str);
ApplicationInstance.setCurrentInstance(applicationInstance);
if (str2 != null && !n0.a(str2, applicationInstance.appKey) && !n0.a(str2, "HTF22N") && !n0.a(applicationInstance.appKey, "HTF22N")) {
Intent intent = new Intent("ActiveAppKeyChanged");
intent.putExtra("prevAppKey", str2);
p0.a.b(TheChurchApp.n()).d(intent);
}
applicationInstance.load(context, aVar);
}
public void z(String str, String str2, b bVar) {
byte[] cachedFile = str != null ? LocalCache.getCachedFile(str) : null;
if (cachedFile != null) {
d(new String(cachedFile), -1, null, bVar, false);
return;
}
Object[] objArr = new Object[1];
objArr[0] = str == null ? "key" : "file";
bVar.FeedLoadError(new Exception(String.format("Feed cache %s should not be empty!", objArr)));
}
}