正在查看: OVO v3.139.0 应用的 vh.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OVO v3.139.0 应用的 vh.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package o.i;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import com.appsflyer.AppsFlyerLib;
import com.google.gson.Gson;
import com.oneb4nk.ovolibrary.android.model.customer.response.Customer;
import java.util.Map;
import o.i.l2a;
import okhttp3.HttpUrl;
import ovo.id.analytics.leanplum.domain.entity.AnalyticProperties;
import ovo.id.logger.LoggerType;
public final class vh implements i00 {
public final akb a;
public final pma b;
public final r2e c;
public final oye d;
public final oye e;
public static final class a extends ua8 implements zu5<me3> {
public a() {
super(0);
}
@Override
public final me3 invoke() {
return (me3) vh.this.a.b(vuc.a(me3.class));
}
}
public static final class b extends ua8 implements Function110<bma, bma> {
public b() {
super(1);
}
@Override
public final bma invoke(bma bmaVar) {
bma bmaVar2 = bmaVar;
vk7.f(bmaVar2, "$this$updateConfig");
String o2 = vh.this.b.o();
if (o2 == null) {
o2 = HttpUrl.FRAGMENT_ENCODE_SET;
}
return new bma(bmaVar2.a, o2);
}
}
public static final class c extends ua8 implements Function110<AnalyticProperties, AnalyticProperties> {
public final String b;
public final vh c;
public c(String str, vh vhVar) {
super(1);
this.b = str;
this.c = vhVar;
}
@Override
public final AnalyticProperties invoke(AnalyticProperties analyticProperties) {
AnalyticProperties analyticProperties2 = analyticProperties;
vk7.f(analyticProperties2, "$this$updateProperties");
String e = ((me3) this.c.e.getValue()).e();
if (e == null) {
e = HttpUrl.FRAGMENT_ENCODE_SET;
}
return new AnalyticProperties(this.b, e, analyticProperties2.getScribeProperties());
}
}
public static final class d extends ua8 implements zu5<k9g> {
public d() {
super(0);
}
@Override
public final k9g invoke() {
return (k9g) vh.this.a.b(vuc.a(k9g.class));
}
}
public vh(akb akbVar, pma pmaVar, r2e r2eVar) {
vk7.f(akbVar, "preferenceManager");
vk7.f(pmaVar, "ovoFeatureFlag");
vk7.f(r2eVar, "scribePreferences");
this.a = akbVar;
this.b = pmaVar;
this.c = r2eVar;
this.d = im8.b(new d());
this.e = im8.b(new a());
}
@Override
public final void a(Application application) {
AppsFlyerLib appsFlyerLib;
AppsFlyerLib appsFlyerLib2;
vk7.f(application, "application");
oye oyeVar = this.d;
Customer b2 = ((k9g) oyeVar.getValue()).b();
String ovoId = b2 != null ? b2.getOvoId() : null;
pma pmaVar = this.b;
String o2 = pmaVar.o();
if (o2 == null) {
o2 = HttpUrl.FRAGMENT_ENCODE_SET;
}
bma bmaVar = new bma(false, o2);
if (ovoId == null) {
ovoId = HttpUrl.FRAGMENT_ENCODE_SET;
}
oye oyeVar2 = this.e;
String e = ((me3) oyeVar2.getValue()).e();
if (e == null) {
e = HttpUrl.FRAGMENT_ENCODE_SET;
}
String e2 = ((k9g) oyeVar.getValue()).e();
if (e2 == null) {
e2 = HttpUrl.FRAGMENT_ENCODE_SET;
}
AnalyticProperties analyticProperties = new AnalyticProperties(ovoId, e, new sjd("ovo", e2, new ejd("https://agw.ovo.id", "https://portal.grab.com", 4)));
try {
if (pmaVar.k()) {
String S = pmaVar.S();
if (S == null) {
S = HttpUrl.FRAGMENT_ENCODE_SET;
}
if (S.length() > 0) {
this.c.a(S);
}
}
} catch (Exception unused) {
}
if (pmaVar.k()) {
try {
ijd.f = lc2.a(application, "android.permission.ACCESS_FINE_LOCATION") == 0;
} catch (Exception unused2) {
}
}
new AnalyticProperties(null, null, null, 7, null);
boolean m0 = pmaVar.m0();
boolean k = pmaVar.k();
if (k && analyticProperties.getScribeProperties() == null) {
b19.f("ERROR : Scribe is enabled but scribe properties is not set");
}
l2a l2aVar = new l2a(application, bmaVar, analyticProperties, m0, k);
lo.a = bmaVar;
l2a.b = m0;
l2a.c = k;
l2a.d = analyticProperties;
if (m0) {
m10 m10Var = m10.a;
String userId = analyticProperties.getUserId();
m10Var.getClass();
vk7.f(userId, "userId");
try {
appsFlyerLib = AppsFlyerLib.getInstance();
} catch (Exception unused3) {
appsFlyerLib = null;
}
if (appsFlyerLib != null) {
appsFlyerLib.setCustomerUserId(userId);
}
vk7.e(application.getApplicationContext(), "application.applicationContext");
try {
appsFlyerLib2 = AppsFlyerLib.getInstance();
} catch (Exception unused4) {
appsFlyerLib2 = null;
}
if (appsFlyerLib2 != null) {
bma bmaVar2 = lo.a;
if (bmaVar2 == null) {
vk7.m("ovoAnalyticConfig");
throw null;
}
appsFlyerLib2.start(application, bmaVar2.b);
appsFlyerLib2.setCollectIMEI(false);
appsFlyerLib2.setCollectAndroidID(false);
}
}
if (k) {
yid yidVar = mkd.a;
sjd scribeProperties = analyticProperties.getScribeProperties();
if (scribeProperties == null) {
scribeProperties = new sjd(0);
}
d8g d8gVar = new d8g(scribeProperties.c.a);
ejd ejdVar = scribeProperties.c;
ijd.e = new yl4(d8gVar, new d8g(ejdVar.b, ejdVar.c), (d8g) null);
yid b3 = ijd.b(application, HttpUrl.FRAGMENT_ENCODE_SET);
String str = scribeProperties.a;
b3.g(str);
b3.d(scribeProperties.b);
b3.i(str, l2aVar.a, true);
mkd.a = b3;
String userId2 = analyticProperties.getUserId();
vk7.f(userId2, "userId");
yid yidVar2 = mkd.a;
if (yidVar2 != null) {
yidVar2.e(userId2);
}
}
if (pmaVar.k()) {
yid yidVar3 = mkd.a;
if (yidVar3 == null) {
yidVar3 = null;
}
if (yidVar3 != null) {
yidVar3.f("prod");
}
if (pmaVar.h0()) {
try {
b19.j(LoggerType.DEBUG, "[SCRIBE] scribe started, with env: prod", (Map) null, (String) null, 28);
} catch (Exception unused5) {
}
}
}
String appsFlyerUID = AppsFlyerLib.getInstance().getAppsFlyerUID(application);
if (appsFlyerUID != null) {
me3 me3Var = (me3) oyeVar2.getValue();
me3Var.getClass();
Context context = me3Var.a.a;
vk7.f(context, "context");
SharedPreferences sharedPreferences = d2f.b;
if (sharedPreferences == null) {
sharedPreferences = context.getSharedPreferences("Ovo", 0);
d2f.b = sharedPreferences;
}
if (sharedPreferences != null) {
SharedPreferences.Editor edit = sharedPreferences.edit();
String j = new Gson().j(appsFlyerUID);
vk7.e(j, "Gson().toJson(value)");
edit.putString("appsflyer_id", j);
edit.apply();
}
}
}
@Override
public final void b(Application application) {
String str;
vk7.f(application, "application");
boolean z = l2a.b;
b bVar = new b();
bma bmaVar = lo.a;
if (bmaVar == null) {
vk7.m("ovoAnalyticConfig");
throw null;
}
lo.a = (bma) bVar.invoke(bmaVar);
oye oyeVar = this.d;
Customer b2 = ((k9g) oyeVar.getValue()).b();
if (b2 == null || (str = b2.getOvoId()) == null) {
str = "-";
}
l2a.a.a(str);
l2a.d = (AnalyticProperties) new c(str, this).invoke(l2a.d);
pma pmaVar = this.b;
if (pmaVar.k()) {
yid yidVar = mkd.a;
String e = ((k9g) oyeVar.getValue()).e();
if (e == null) {
e = HttpUrl.FRAGMENT_ENCODE_SET;
}
yid yidVar2 = mkd.a;
if (yidVar2 != null) {
if (yidVar2 == null) {
yidVar2 = null;
}
if (yidVar2 != null) {
yidVar2.d(e);
}
}
if (pmaVar.h0()) {
try {
b19.j(LoggerType.DEBUG, "[SCRIBE] scribe updated, updating user id and token", (Map) null, (String) null, 28);
} catch (Exception unused) {
}
}
}
}
}