- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
394 lines
16 KiB
Java
394 lines
16 KiB
Java
package com.mbridge.msdk.video.dynview.widget;
|
|
|
|
import android.content.Context;
|
|
import android.text.TextUtils;
|
|
import android.util.AttributeSet;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.view.animation.AlphaAnimation;
|
|
import android.view.animation.TranslateAnimation;
|
|
import android.widget.ImageView;
|
|
import android.widget.RelativeLayout;
|
|
import com.mbridge.msdk.c.g;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.same.report.d.d;
|
|
import com.mbridge.msdk.foundation.same.report.d.e;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import com.mbridge.msdk.video.bt.module.b.f;
|
|
import com.mbridge.msdk.video.dynview.e.b;
|
|
import com.mbridge.msdk.video.dynview.e.c;
|
|
import com.mbridge.msdk.video.dynview.e.h;
|
|
import com.mbridge.msdk.video.module.MBridgeBaseView;
|
|
import com.mbridge.msdk.widget.FeedBackButton;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class MBridgeOrderCampView extends MBridgeBaseView {
|
|
private MBridgeOrderCampView m;
|
|
private List<CampaignEx> n;
|
|
private int o;
|
|
private int p;
|
|
private int q;
|
|
private int r;
|
|
private String s;
|
|
private FeedBackButton t;
|
|
private ImageView u;
|
|
private boolean v;
|
|
private c w;
|
|
private b x;
|
|
private boolean y;
|
|
|
|
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
|
|
public void init(Context context) {
|
|
this.m = this;
|
|
}
|
|
|
|
public void setCampOrderViewBuildCallback(b bVar) {
|
|
this.x = bVar;
|
|
}
|
|
|
|
public void setCampaignExes(List<CampaignEx> list) {
|
|
this.n = list;
|
|
}
|
|
|
|
public void setRewarded(boolean z) {
|
|
this.y = z;
|
|
}
|
|
|
|
public MBridgeOrderCampView(Context context) {
|
|
super(context);
|
|
this.v = false;
|
|
this.w = new c() { // from class: com.mbridge.msdk.video.dynview.widget.MBridgeOrderCampView.1
|
|
@Override // com.mbridge.msdk.video.dynview.e.c
|
|
public final void a(CampaignEx campaignEx, int i) {
|
|
if (campaignEx != null) {
|
|
try {
|
|
MBridgeOrderCampView.this.setCampaign(campaignEx);
|
|
campaignEx.setClickTempSource(2);
|
|
campaignEx.setTriggerClickSource(2);
|
|
MBridgeOrderCampView.a(MBridgeOrderCampView.this, campaignEx, 0, i);
|
|
} catch (Exception e) {
|
|
af.b(MBridgeBaseView.TAG, e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.video.dynview.e.c
|
|
public final void a() {
|
|
MBridgeOrderCampView.a(MBridgeOrderCampView.this);
|
|
}
|
|
};
|
|
this.y = false;
|
|
}
|
|
|
|
public MBridgeOrderCampView(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
this.v = false;
|
|
this.w = new c() { // from class: com.mbridge.msdk.video.dynview.widget.MBridgeOrderCampView.1
|
|
@Override // com.mbridge.msdk.video.dynview.e.c
|
|
public final void a(CampaignEx campaignEx, int i) {
|
|
if (campaignEx != null) {
|
|
try {
|
|
MBridgeOrderCampView.this.setCampaign(campaignEx);
|
|
campaignEx.setClickTempSource(2);
|
|
campaignEx.setTriggerClickSource(2);
|
|
MBridgeOrderCampView.a(MBridgeOrderCampView.this, campaignEx, 0, i);
|
|
} catch (Exception e) {
|
|
af.b(MBridgeBaseView.TAG, e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.video.dynview.e.c
|
|
public final void a() {
|
|
MBridgeOrderCampView.a(MBridgeOrderCampView.this);
|
|
}
|
|
};
|
|
this.y = false;
|
|
}
|
|
|
|
public void createView(final ViewGroup viewGroup) {
|
|
if (this.n == null) {
|
|
b bVar = this.x;
|
|
if (bVar != null) {
|
|
bVar.b();
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
HashMap hashMap = new HashMap();
|
|
hashMap.put("order_view_callback", this.w);
|
|
com.mbridge.msdk.video.dynview.b.a().a(new com.mbridge.msdk.video.dynview.j.c().b(com.mbridge.msdk.foundation.controller.c.m().c(), this.n), new h() { // from class: com.mbridge.msdk.video.dynview.widget.MBridgeOrderCampView.2
|
|
@Override // com.mbridge.msdk.video.dynview.e.h
|
|
public final void viewInflaterSuccess(com.mbridge.msdk.video.dynview.a aVar) {
|
|
if (aVar != null) {
|
|
try {
|
|
MBridgeOrderCampView.this.m.addView(aVar.a());
|
|
MBridgeOrderCampView.this.v = aVar.c();
|
|
viewGroup.removeAllViews();
|
|
viewGroup.addView(MBridgeOrderCampView.this.m);
|
|
f.a(com.mbridge.msdk.foundation.controller.c.m().c(), (List<CampaignEx>) MBridgeOrderCampView.this.n, ((CampaignEx) MBridgeOrderCampView.this.n.get(0)).getCampaignUnitId());
|
|
MBridgeOrderCampView.this.setViewStatus();
|
|
if (MBridgeOrderCampView.this.x != null) {
|
|
MBridgeOrderCampView.this.x.a();
|
|
}
|
|
} catch (Exception e) {
|
|
af.b(MBridgeBaseView.TAG, e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.video.dynview.e.h
|
|
public final void viewInflaterFail(com.mbridge.msdk.video.dynview.c.a aVar) {
|
|
try {
|
|
f.a(com.mbridge.msdk.foundation.controller.c.m().c(), (List<CampaignEx>) MBridgeOrderCampView.this.n, ((CampaignEx) MBridgeOrderCampView.this.n.get(0)).getCampaignUnitId(), aVar.b());
|
|
if (MBridgeOrderCampView.this.x != null) {
|
|
MBridgeOrderCampView.this.x.b();
|
|
}
|
|
} catch (Exception e) {
|
|
af.b(MBridgeBaseView.TAG, e.getMessage());
|
|
}
|
|
}
|
|
}, hashMap);
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:15:0x002a */
|
|
/* JADX WARN: Removed duplicated region for block: B:18:0x002f A[SYNTHETIC] */
|
|
@Override // android.view.ViewGroup, android.view.View
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public void onAttachedToWindow() {
|
|
/*
|
|
r5 = this;
|
|
super.onAttachedToWindow()
|
|
java.util.List<com.mbridge.msdk.foundation.entity.CampaignEx> r0 = r5.n
|
|
if (r0 != 0) goto L8
|
|
return
|
|
L8:
|
|
r0 = 0
|
|
L9:
|
|
java.util.List<com.mbridge.msdk.foundation.entity.CampaignEx> r1 = r5.n
|
|
int r1 = r1.size()
|
|
if (r0 >= r1) goto L32
|
|
r1 = 0
|
|
org.json.JSONObject r2 = new org.json.JSONObject // Catch: org.json.JSONException -> L1f
|
|
r2.<init>() // Catch: org.json.JSONException -> L1f
|
|
java.lang.String r1 = "camp_position"
|
|
r2.put(r1, r0) // Catch: org.json.JSONException -> L1d
|
|
goto L26
|
|
L1d:
|
|
r1 = move-exception
|
|
goto L23
|
|
L1f:
|
|
r2 = move-exception
|
|
r4 = r2
|
|
r2 = r1
|
|
r1 = r4
|
|
L23:
|
|
r1.printStackTrace()
|
|
L26:
|
|
com.mbridge.msdk.video.module.a.a r1 = r5.notifyListener
|
|
if (r1 == 0) goto L2f
|
|
r3 = 110(0x6e, float:1.54E-43)
|
|
r1.a(r3, r2)
|
|
L2f:
|
|
int r0 = r0 + 1
|
|
goto L9
|
|
L32:
|
|
return
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.dynview.widget.MBridgeOrderCampView.onAttachedToWindow():void");
|
|
}
|
|
|
|
public void setViewStatus() {
|
|
MBridgeOrderCampView mBridgeOrderCampView = this.m;
|
|
if (mBridgeOrderCampView == null || !this.y) {
|
|
return;
|
|
}
|
|
RelativeLayout relativeLayout = (RelativeLayout) mBridgeOrderCampView.findViewById(filterFindViewId(this.v, "mbridge_native_order_camp_controller"));
|
|
this.t = (FeedBackButton) this.m.findViewById(filterFindViewId(this.v, "mbridge_native_order_camp_feed_btn"));
|
|
this.u = (ImageView) this.m.findViewById(filterFindViewId(this.v, "mbridge_iv_link"));
|
|
if (relativeLayout != null) {
|
|
relativeLayout.setPadding(this.o, this.q, this.p, this.r);
|
|
}
|
|
if (this.t != null) {
|
|
try {
|
|
List<CampaignEx> list = this.n;
|
|
if (list != null && list.get(0) != null) {
|
|
this.s = this.n.get(0).getCampaignUnitId();
|
|
this.b = this.n.get(0);
|
|
com.mbridge.msdk.foundation.d.b.a().a(this.s + "_2", this.b);
|
|
if (this.t != null) {
|
|
if (com.mbridge.msdk.foundation.d.b.a().b()) {
|
|
com.mbridge.msdk.foundation.d.b.a().a(this.s + "_2", new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.video.dynview.widget.MBridgeOrderCampView.3
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void close() {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void showed() {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.d.a
|
|
public final void summit(String str) {
|
|
}
|
|
});
|
|
com.mbridge.msdk.foundation.d.b.a().a(this.s + "_2", this.t);
|
|
} else {
|
|
this.t.setVisibility(8);
|
|
}
|
|
}
|
|
}
|
|
FeedBackButton feedBackButton = this.t;
|
|
if (feedBackButton != null) {
|
|
feedBackButton.setVisibility(8);
|
|
}
|
|
} catch (Exception e) {
|
|
af.b(MBridgeBaseView.TAG, e.getMessage());
|
|
}
|
|
}
|
|
ImageView imageView = this.u;
|
|
if (imageView == null || imageView == null) {
|
|
return;
|
|
}
|
|
try {
|
|
g b = com.mbridge.msdk.c.h.a().b(com.mbridge.msdk.foundation.controller.c.m().k());
|
|
if (b != null) {
|
|
final String j = b.j();
|
|
if (TextUtils.isEmpty(j)) {
|
|
this.u.setVisibility(8);
|
|
}
|
|
this.u.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.dynview.widget.MBridgeOrderCampView.4
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
com.mbridge.msdk.click.c.f(((MBridgeBaseView) MBridgeOrderCampView.this).a, j);
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
this.u.setVisibility(8);
|
|
} catch (Exception e2) {
|
|
af.b(MBridgeBaseView.TAG, e2.getMessage());
|
|
}
|
|
}
|
|
|
|
public void setNotchPadding(int i, int i2, int i3, int i4) {
|
|
this.o = i;
|
|
this.p = i2;
|
|
this.q = i3;
|
|
this.r = i4;
|
|
setViewStatus();
|
|
}
|
|
|
|
public void startAlphaAnimation() {
|
|
AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
|
|
alphaAnimation.setDuration(500L);
|
|
this.m.startAnimation(alphaAnimation);
|
|
}
|
|
|
|
public void startTranslateAnimation() {
|
|
TranslateAnimation translateAnimation = new TranslateAnimation(2, 1.0f, 2, 0.0f, 2, 0.0f, 2, 0.0f);
|
|
translateAnimation.setDuration(500L);
|
|
this.m.startAnimation(translateAnimation);
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:22:0x0082 */
|
|
/* JADX WARN: Removed duplicated region for block: B:25:? A[RETURN, SYNTHETIC] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public static /* synthetic */ void a(com.mbridge.msdk.video.dynview.widget.MBridgeOrderCampView r8, com.mbridge.msdk.foundation.entity.CampaignEx r9, int r10, int r11) {
|
|
/*
|
|
if (r9 == 0) goto L61
|
|
boolean r0 = r9.isDynamicView()
|
|
if (r0 == 0) goto L61
|
|
com.mbridge.msdk.foundation.entity.CampaignEx$c r0 = r9.getRewardTemplateMode() // Catch: java.lang.Exception -> L25
|
|
java.lang.String r1 = ""
|
|
if (r0 == 0) goto L23
|
|
java.lang.StringBuilder r2 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L25
|
|
r2.<init>() // Catch: java.lang.Exception -> L25
|
|
int r0 = r0.f() // Catch: java.lang.Exception -> L25
|
|
r2.append(r0) // Catch: java.lang.Exception -> L25
|
|
r2.append(r1) // Catch: java.lang.Exception -> L25
|
|
java.lang.String r1 = r2.toString() // Catch: java.lang.Exception -> L25
|
|
L23:
|
|
r7 = r1
|
|
goto L27
|
|
L25:
|
|
r9 = move-exception
|
|
goto L58
|
|
L27:
|
|
com.mbridge.msdk.foundation.controller.c r0 = com.mbridge.msdk.foundation.controller.c.m() // Catch: java.lang.Exception -> L25
|
|
android.content.Context r0 = r0.c() // Catch: java.lang.Exception -> L25
|
|
java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L25
|
|
r1.<init>() // Catch: java.lang.Exception -> L25
|
|
java.lang.String r2 = "order_view_click"
|
|
r1.append(r2) // Catch: java.lang.Exception -> L25
|
|
r1.append(r7) // Catch: java.lang.Exception -> L25
|
|
java.lang.String r1 = r1.toString() // Catch: java.lang.Exception -> L25
|
|
java.lang.String r2 = r9.getCampaignUnitId() // Catch: java.lang.Exception -> L25
|
|
boolean r3 = r9.isBidCampaign() // Catch: java.lang.Exception -> L25
|
|
java.lang.String r4 = r9.getRequestId() // Catch: java.lang.Exception -> L25
|
|
java.lang.String r5 = r9.getRequestIdNotice() // Catch: java.lang.Exception -> L25
|
|
java.lang.String r6 = r9.getId() // Catch: java.lang.Exception -> L25
|
|
com.mbridge.msdk.foundation.same.report.i.a(r0, r1, r2, r3, r4, r5, r6, r7) // Catch: java.lang.Exception -> L25
|
|
goto L61
|
|
L58:
|
|
java.lang.String r0 = "MBridgeBaseView"
|
|
java.lang.String r9 = r9.getMessage()
|
|
com.mbridge.msdk.foundation.tools.af.b(r0, r9)
|
|
L61:
|
|
r9 = 0
|
|
org.json.JSONObject r0 = new org.json.JSONObject // Catch: org.json.JSONException -> L78
|
|
r0.<init>() // Catch: org.json.JSONException -> L78
|
|
java.lang.String r9 = com.mbridge.msdk.foundation.same.a.j // Catch: org.json.JSONException -> L76
|
|
org.json.JSONObject r10 = r8.a(r10) // Catch: org.json.JSONException -> L76
|
|
r0.put(r9, r10) // Catch: org.json.JSONException -> L76
|
|
java.lang.String r9 = "camp_position"
|
|
r0.put(r9, r11) // Catch: org.json.JSONException -> L76
|
|
goto L7e
|
|
L76:
|
|
r9 = move-exception
|
|
goto L7b
|
|
L78:
|
|
r10 = move-exception
|
|
r0 = r9
|
|
r9 = r10
|
|
L7b:
|
|
r9.printStackTrace()
|
|
L7e:
|
|
com.mbridge.msdk.video.module.a.a r8 = r8.notifyListener
|
|
if (r8 == 0) goto L87
|
|
r9 = 105(0x69, float:1.47E-43)
|
|
r8.a(r9, r0)
|
|
L87:
|
|
return
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.dynview.widget.MBridgeOrderCampView.a(com.mbridge.msdk.video.dynview.widget.MBridgeOrderCampView, com.mbridge.msdk.foundation.entity.CampaignEx, int, int):void");
|
|
}
|
|
|
|
public static /* synthetic */ void a(MBridgeOrderCampView mBridgeOrderCampView) {
|
|
try {
|
|
e eVar = new e();
|
|
eVar.a("type", 2);
|
|
d.a().a("2000152", eVar);
|
|
d.a().a("2000134", mBridgeOrderCampView.b);
|
|
} catch (Throwable th) {
|
|
af.a(MBridgeBaseView.TAG, th.getMessage());
|
|
}
|
|
try {
|
|
com.mbridge.msdk.video.dynview.moffer.a.a().b();
|
|
} catch (Exception e) {
|
|
af.b(MBridgeBaseView.TAG, e.getMessage());
|
|
}
|
|
com.mbridge.msdk.video.module.a.a aVar = mBridgeOrderCampView.notifyListener;
|
|
if (aVar != null) {
|
|
aVar.a(104, "");
|
|
}
|
|
}
|
|
}
|