正在查看: OLX India v19.42.007 应用的 w.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OLX India v19.42.007 应用的 w.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.naspers.advertising.baxterandroid.domain.manager;
import android.app.Activity;
import android.content.Context;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleCoroutineScope;
import androidx.lifecycle.LifecycleKt;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.naspers.advertising.baxterandroid.data.entities.AdvertisingConfig;
import com.naspers.advertising.baxterandroid.data.entities.InterstitialDisplaySetting;
import com.naspers.advertising.baxterandroid.domain.downloader.a0;
import com.naspers.advertising.baxterandroid.ui.BaxterAdView;
import java.util.Map;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.MapsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
public final class w {
private final Context a;
private final Lifecycle b;
private Map c;
private final String d;
private final int e;
private final com.naspers.advertising.baxterandroid.data.repository.a f;
private String g;
private boolean h;
private final LifecycleCoroutineScope i;
private final Lazy j;
private final Lazy k;
private final Lazy l;
private final io.reactivex.disposables.b m;
public static final class a {
private final Context a;
private final Lifecycle b;
private final String c;
private final Map d;
private final String e;
private int f;
public a(Context context, Lifecycle lifecycle, String str, Map map, String str2) {
this.a = context;
this.b = lifecycle;
this.c = str;
this.d = map;
this.e = str2;
this.f = 30;
}
public final w a() {
return new w(this.a, this.b, this.d, this.c, this.f, com.naspers.advertising.baxterandroid.di.o.a.u(), this.e, null);
}
public final a b(int i) {
this.f = i;
return this;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof a)) {
return false;
}
a aVar = (a) obj;
return Intrinsics.d(this.a, aVar.a) && Intrinsics.d(this.b, aVar.b) && Intrinsics.d(this.c, aVar.c) && Intrinsics.d(this.d, aVar.d) && Intrinsics.d(this.e, aVar.e);
}
public int hashCode() {
int hashCode = ((((((this.a.hashCode() * 31) + this.b.hashCode()) * 31) + this.c.hashCode()) * 31) + this.d.hashCode()) * 31;
String str = this.e;
return hashCode + (str == null ? 0 : str.hashCode());
}
public String toString() {
return "Builder(context=" + this.a + ", lifecycle=" + this.b + ", page=" + this.c + ", targetingMap=" + this.d + ", contentUrl=" + this.e + ")";
}
public a(Context context, Lifecycle lifecycle, String str, Map map, String str2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(context, lifecycle, str, map, (i & 16) != 0 ? null : str2);
}
}
public w(Context context, Lifecycle lifecycle, Map map, String str, int i, com.naspers.advertising.baxterandroid.data.repository.a aVar, String str2, DefaultConstructorMarker defaultConstructorMarker) {
this(context, lifecycle, map, str, i, aVar, str2);
}
private final com.naspers.advertising.baxterandroid.domain.downloader.i C() {
return (com.naspers.advertising.baxterandroid.domain.downloader.i) this.j.getValue();
}
private final com.naspers.advertising.baxterandroid.domain.downloader.r D() {
return (com.naspers.advertising.baxterandroid.domain.downloader.r) this.l.getValue();
}
private final a0 E() {
return (a0) this.k.getValue();
}
public static boolean I(w wVar, int i, String str, int i2, Object obj) {
if ((i2 & 1) != 0) {
i = 0;
}
if ((i2 & 2) != 0) {
str = "top";
}
return wVar.H(i, str);
}
public static final Unit M() {
return Unit.a;
}
public static final Unit N() {
return Unit.a;
}
public static final Unit O() {
return Unit.a;
}
private final void P(final BaxterAdView baxterAdView, final int i, final String str, Map map, final Function0 function0, final Function0 function02, int i2) {
com.naspers.advertising.baxterandroid.di.o oVar = com.naspers.advertising.baxterandroid.di.o.a;
com.naspers.advertising.baxterandroid.domain.tracking.a.b(oVar.H(), "ad_requested", this.d, str, i, null, 16, null);
if (!com.naspers.advertising.baxterandroid.g.a.D()) {
oVar.H().a("ad_failed", this.d, str, i, MapsKt.m(new Pair[]{TuplesKt.a("error_message", "Baxter not Initialized")}));
function02.invoke();
com.naspers.advertising.baxterandroid.common.i.a.c("Baxter not Initialized.Can not load the ad without initialization. Refer read me https://git.naspersclassifieds.com/shared-services/payment-solutions/advertising/baxter-android ");
return;
}
AdvertisingConfig g = this.f.g();
if (g == null || !Intrinsics.d(g.getEnabled(), Boolean.TRUE)) {
oVar.H().a("ad_failed", this.d, str, i, MapsKt.m(new Pair[]{TuplesKt.a("error_message", "Ads are not enabled")}));
function02.invoke();
com.naspers.advertising.baxterandroid.common.i.a.c("Ads are not enabled");
return;
}
if (map != null) {
this.c = map;
}
baxterAdView.A();
baxterAdView.setTag(com.naspers.advertising.baxterandroid.common.h.j(i, this.d));
io.reactivex.disposables.b bVar = this.m;
io.reactivex.r t = C().t(i, this.a, this.c, str, i2, this.g);
final Function1 function1 = new Function1() {
public final Object invoke(Object obj) {
Unit R;
R = w.R(BaxterAdView.this, i, this, str, function0, (com.naspers.advertising.baxterandroid.data.providers.contract.a) obj);
return R;
}
};
io.reactivex.functions.g gVar = new io.reactivex.functions.g() {
public final void accept(Object obj) {
w.S(function1, obj);
}
};
final Function1 function12 = new Function1() {
public final Object invoke(Object obj) {
Unit T;
T = w.T(BaxterAdView.this, i, this, str, function02, (Throwable) obj);
return T;
}
};
bVar.c(t.subscribe(gVar, new io.reactivex.functions.g() {
public final void accept(Object obj) {
w.U(function12, obj);
}
}));
}
static void Q(w wVar, BaxterAdView baxterAdView, int i, String str, Map map, Function0 function0, Function0 function02, int i2, int i3, Object obj) {
wVar.P(baxterAdView, i, str, (i3 & 8) != 0 ? null : map, function0, function02, (i3 & 64) != 0 ? 1 : i2);
}
public static final Unit R(BaxterAdView baxterAdView, int i, w wVar, String str, Function0 function0, com.naspers.advertising.baxterandroid.data.providers.contract.a aVar) {
if (Intrinsics.d(baxterAdView.getTag(), com.naspers.advertising.baxterandroid.common.h.j(i, wVar.d))) {
baxterAdView.removeAllViews();
aVar.b(wVar.a, baxterAdView);
com.naspers.advertising.baxterandroid.domain.tracking.a.b(com.naspers.advertising.baxterandroid.di.o.a.H(), "ad_success", wVar.d, str, i, null, 16, null);
function0.invoke();
}
return Unit.a;
}
public static final void S(Function1 function1, Object obj) {
function1.invoke(obj);
}
public static final Unit T(BaxterAdView baxterAdView, int i, w wVar, String str, Function0 function0, Throwable th) {
if (Intrinsics.d(baxterAdView.getTag(), com.naspers.advertising.baxterandroid.common.h.j(i, wVar.d))) {
com.naspers.advertising.baxterandroid.di.o.a.H().a("ad_failed", wVar.d, str, i, MapsKt.m(new Pair[]{TuplesKt.a("error_message", String.valueOf(th.getMessage()))}));
com.naspers.advertising.baxterandroid.common.i.a.c("Failed to load ad for position " + i);
function0.invoke();
}
return Unit.a;
}
public static final void U(Function1 function1, Object obj) {
function1.invoke(obj);
}
public static final Unit W() {
return Unit.a;
}
public static final Unit X() {
return Unit.a;
}
private final void Y(final BaxterAdView baxterAdView, final int i, String str, int i2, final Function0 function0, final Function0 function02) {
if (!com.naspers.advertising.baxterandroid.g.a.D()) {
function02.invoke();
com.naspers.advertising.baxterandroid.common.i.a.c("Baxter not Initialized.Can not load the ad without initialization. Refer read me https://git.naspersclassifieds.com/shared-services/payment-solutions/advertising/baxter-android ");
return;
}
AdvertisingConfig g = this.f.g();
if (g == null || !Intrinsics.d(g.getFullPageNativeAdEnabled(), Boolean.TRUE)) {
function02.invoke();
com.naspers.advertising.baxterandroid.common.i.a.c("Ads are not enabled");
return;
}
this.c = this.c;
baxterAdView.removeAllViews();
baxterAdView.setTag(com.naspers.advertising.baxterandroid.common.h.j(i, this.d));
io.reactivex.disposables.b bVar = this.m;
io.reactivex.r r = D().r(i, this.a, this.c, str, i2, this.g);
final Function1 function1 = new Function1() {
public final Object invoke(Object obj) {
Unit Z;
Z = w.Z(BaxterAdView.this, i, this, function0, (com.naspers.advertising.baxterandroid.data.providers.contract.a) obj);
return Z;
}
};
io.reactivex.functions.g gVar = new io.reactivex.functions.g() {
public final void accept(Object obj) {
w.a0(function1, obj);
}
};
final Function1 function12 = new Function1() {
public final Object invoke(Object obj) {
Unit b0;
b0 = w.b0(BaxterAdView.this, i, this, function02, (Throwable) obj);
return b0;
}
};
bVar.c(r.subscribe(gVar, new io.reactivex.functions.g() {
public final void accept(Object obj) {
w.c0(function12, obj);
}
}));
}
public static final Unit Z(BaxterAdView baxterAdView, int i, w wVar, Function0 function0, com.naspers.advertising.baxterandroid.data.providers.contract.a aVar) {
if (Intrinsics.d(baxterAdView.getTag(), com.naspers.advertising.baxterandroid.common.h.j(i, wVar.d))) {
aVar.b(wVar.a, baxterAdView);
function0.invoke();
}
return Unit.a;
}
public static final void a0(Function1 function1, Object obj) {
function1.invoke(obj);
}
public static final Unit b0(BaxterAdView baxterAdView, int i, w wVar, Function0 function0, Throwable th) {
if (Intrinsics.d(baxterAdView.getTag(), com.naspers.advertising.baxterandroid.common.h.j(i, wVar.d))) {
com.naspers.advertising.baxterandroid.common.i.a.c("Failed to load ad for position $0");
function0.invoke();
}
return Unit.a;
}
public static final void c0(Function1 function1, Object obj) {
function1.invoke(obj);
}
public static void e0(w wVar, Activity activity, int i, String str, com.naspers.advertising.baxterandroid.domain.manager.a aVar, int i2, Object obj) {
if ((i2 & 2) != 0) {
i = 0;
}
if ((i2 & 4) != 0) {
str = "top";
}
wVar.d0(activity, i, str, aVar);
}
public static final Unit f0(w wVar, com.naspers.advertising.baxterandroid.domain.manager.a aVar, Activity activity, int i, com.naspers.advertising.baxterandroid.data.providers.contract.d dVar) {
wVar.h = false;
aVar.a().invoke();
if (!Intrinsics.d(dVar.getTag(), com.naspers.advertising.baxterandroid.common.h.j(i, wVar.d))) {
dVar = null;
}
if (dVar != null) {
dVar.a(activity, aVar);
} else {
aVar.c().invoke();
}
return Unit.a;
}
public static final void g0(Function1 function1, Object obj) {
function1.invoke(obj);
}
public static final Unit h0(w wVar, com.naspers.advertising.baxterandroid.domain.manager.a aVar, Throwable th) {
wVar.h = false;
aVar.c().invoke();
return Unit.a;
}
public static final void i0(Function1 function1, Object obj) {
function1.invoke(obj);
}
public static void k0(w wVar, Activity activity, int i, String str, int i2, Object obj) {
if ((i2 & 2) != 0) {
i = 0;
}
if ((i2 & 4) != 0) {
str = "top";
}
wVar.j0(activity, i, str);
}
public static void m0(w wVar, Activity activity, int i, String str, int i2, Object obj) {
if ((i2 & 2) != 0) {
i = 0;
}
if ((i2 & 4) != 0) {
str = "top";
}
wVar.l0(activity, i, str);
}
public static final Unit v(w wVar) {
wVar.z();
return Unit.a;
}
public static final com.naspers.advertising.baxterandroid.domain.downloader.i w(w wVar) {
com.naspers.advertising.baxterandroid.di.o oVar = com.naspers.advertising.baxterandroid.di.o.a;
return new com.naspers.advertising.baxterandroid.domain.downloader.i(oVar.D(), oVar.G(), wVar.f, wVar.b, wVar.d, wVar.e);
}
public static final com.naspers.advertising.baxterandroid.domain.downloader.r x(w wVar) {
com.naspers.advertising.baxterandroid.di.o oVar = com.naspers.advertising.baxterandroid.di.o.a;
return new com.naspers.advertising.baxterandroid.domain.downloader.r(oVar.B(), oVar.G(), wVar.f, wVar.b, wVar.d, wVar.e);
}
public static final a0 y(w wVar) {
return new a0(com.naspers.advertising.baxterandroid.di.o.a.C(), wVar.f, wVar.d, wVar.e);
}
private final void z() {
com.naspers.advertising.baxterandroid.common.i iVar = com.naspers.advertising.baxterandroid.common.i.a;
iVar.f("BaxterAdDownloader: dispose started");
if (!this.m.isDisposed()) {
this.m.dispose();
}
C().y();
iVar.f("BaxterAdDownloader: dispose completed");
E().x();
D().w();
}
public final void A() {
C().j();
E().j();
D().j();
com.naspers.advertising.baxterandroid.common.i.a.f("Ads flushed Successfully");
}
public final void B(Map map, String str) {
A();
this.c = map;
this.g = str;
com.naspers.advertising.baxterandroid.common.i.a.f("Targeting Map and Content Url updated Successfully");
}
public final LifecycleCoroutineScope F() {
return this.i;
}
public final InterstitialDisplaySetting G() {
JsonObject interstitialDisplaySettings;
if (!com.naspers.advertising.baxterandroid.g.a.D()) {
return null;
}
AdvertisingConfig g = this.f.g();
JsonElement s = (g == null || (interstitialDisplaySettings = g.getInterstitialDisplaySettings()) == null) ? null : com.naspers.advertising.baxterandroid.common.h.s(interstitialDisplaySettings, this.d, "default");
if (s != null) {
return (InterstitialDisplaySetting) new Gson().fromJson(s, InterstitialDisplaySetting.class);
}
return null;
}
public final boolean H(int i, String str) {
return E().q(i, str);
}
public final void J(BaxterAdView baxterAdView, int i, String str, int i2) {
P(baxterAdView, i, str, null, new Function0() {
public final Object invoke() {
Unit N;
N = w.N();
return N;
}
}, new Function0() {
public final Object invoke() {
Unit O;
O = w.O();
return O;
}
}, i2);
}
public final void K(BaxterAdView baxterAdView, int i, String str, Function0 function0) {
Q(this, baxterAdView, i, str, null, function0, new Function0() {
public final Object invoke() {
Unit M;
M = w.M();
return M;
}
}, 0, 64, null);
}
public final void L(BaxterAdView baxterAdView, int i, String str, Function0 function0, Function0 function02) {
Q(this, baxterAdView, i, str, null, function0, function02, 0, 64, null);
}
public final void V(BaxterAdView baxterAdView, int i, String str, int i2) {
Y(baxterAdView, i, str, i2, new Function0() {
public final Object invoke() {
Unit W;
W = w.W();
return W;
}
}, new Function0() {
public final Object invoke() {
Unit X;
X = w.X();
return X;
}
});
}
public final void d0(final Activity activity, final int i, String str, final com.naspers.advertising.baxterandroid.domain.manager.a aVar) {
AdvertisingConfig g;
if (!com.naspers.advertising.baxterandroid.g.a.D() || (g = this.f.g()) == null || !Intrinsics.d(g.getInterstitialAdEnabled(), Boolean.TRUE) || this.h) {
return;
}
this.h = true;
io.reactivex.disposables.b bVar = this.m;
io.reactivex.r s = E().s(i, activity, str, com.naspers.advertising.baxterandroid.common.h.j(i, this.d), this.c);
final Function1 function1 = new Function1() {
public final Object invoke(Object obj) {
Unit f0;
f0 = w.f0(w.this, aVar, activity, i, (com.naspers.advertising.baxterandroid.data.providers.contract.d) obj);
return f0;
}
};
io.reactivex.functions.g gVar = new io.reactivex.functions.g() {
public final void accept(Object obj) {
w.g0(function1, obj);
}
};
final Function1 function12 = new Function1() {
public final Object invoke(Object obj) {
Unit h0;
h0 = w.h0(w.this, aVar, (Throwable) obj);
return h0;
}
};
bVar.c(s.subscribe(gVar, new io.reactivex.functions.g() {
public final void accept(Object obj) {
w.i0(function12, obj);
}
}));
}
public final void j0(Activity activity, int i, String str) {
com.naspers.advertising.baxterandroid.g gVar = com.naspers.advertising.baxterandroid.g.a;
if (gVar.D() && gVar.F()) {
E().y(i, str, activity, com.naspers.advertising.baxterandroid.common.h.j(i, this.d), this.c);
}
}
public final void l0(Activity activity, int i, String str) {
AdvertisingConfig g;
if (com.naspers.advertising.baxterandroid.g.a.D() && (g = this.f.g()) != null && Intrinsics.d(g.getInterstitialAdEnabled(), Boolean.TRUE)) {
E().y(i, str, activity, com.naspers.advertising.baxterandroid.common.h.j(i, this.d), this.c);
}
}
private w(Context context, Lifecycle lifecycle, Map map, String str, int i, com.naspers.advertising.baxterandroid.data.repository.a aVar, String str2) {
this.a = context;
this.b = lifecycle;
this.c = map;
this.d = str;
this.e = i;
this.f = aVar;
this.g = str2;
this.i = LifecycleKt.getCoroutineScope(lifecycle);
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
this.j = LazyKt.a(lazyThreadSafetyMode, new Function0() {
public final Object invoke() {
com.naspers.advertising.baxterandroid.domain.downloader.i w;
w = w.w(w.this);
return w;
}
});
this.k = LazyKt.a(lazyThreadSafetyMode, new Function0() {
public final Object invoke() {
a0 y;
y = w.y(w.this);
return y;
}
});
this.l = LazyKt.a(lazyThreadSafetyMode, new Function0() {
public final Object invoke() {
com.naspers.advertising.baxterandroid.domain.downloader.r x;
x = w.x(w.this);
return x;
}
});
this.m = new io.reactivex.disposables.b();
lifecycle.addObserver(new x(new Function0() {
public final Object invoke() {
Unit v;
v = w.v(w.this);
return v;
}
}));
}
}