- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1077 lines
46 KiB
Java
1077 lines
46 KiB
Java
package com.mbridge.msdk.splash.view;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.Canvas;
|
|
import android.graphics.Paint;
|
|
import android.graphics.PorterDuff;
|
|
import android.graphics.PorterDuffXfermode;
|
|
import android.os.Handler;
|
|
import android.text.TextUtils;
|
|
import android.util.AttributeSet;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.ImageView;
|
|
import android.widget.RelativeLayout;
|
|
import android.widget.TextView;
|
|
import androidx.annotation.RequiresApi;
|
|
import androidx.core.view.ViewCompat;
|
|
import com.mbridge.msdk.MBridgeConstans;
|
|
import com.mbridge.msdk.click.i;
|
|
import com.mbridge.msdk.foundation.controller.c;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.same.c.b;
|
|
import com.mbridge.msdk.foundation.tools.ab;
|
|
import com.mbridge.msdk.foundation.tools.ae;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import com.mbridge.msdk.foundation.tools.aj;
|
|
import com.mbridge.msdk.foundation.tools.ak;
|
|
import com.mbridge.msdk.foundation.tools.p;
|
|
import com.mbridge.msdk.mbbid.common.BidResponsedEx;
|
|
import com.mbridge.msdk.out.Campaign;
|
|
import com.mbridge.msdk.out.MBridgeIds;
|
|
import com.mbridge.msdk.splash.d.d;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class BaseSplashPopView extends RelativeLayout {
|
|
public static final int TYPE_POP_DEFAULT = 1;
|
|
public static final int TYPE_POP_LARGE = 4;
|
|
public static final int TYPE_POP_MEDIUM = 3;
|
|
public static final int TYPE_POP_SMALL = 2;
|
|
private static final AtomicInteger h = new AtomicInteger(1);
|
|
protected String a;
|
|
protected String b;
|
|
protected d c;
|
|
protected Handler d;
|
|
protected com.mbridge.msdk.click.a e;
|
|
View.OnClickListener f;
|
|
View.OnClickListener g;
|
|
private int i;
|
|
private CampaignEx j;
|
|
private ImageView k;
|
|
private ImageView l;
|
|
private ImageView m;
|
|
private ImageView n;
|
|
private TextView o;
|
|
private TextView p;
|
|
private TextView q;
|
|
private int r;
|
|
private boolean s;
|
|
private i t;
|
|
private Runnable u;
|
|
private Runnable v;
|
|
|
|
public static /* synthetic */ int i(BaseSplashPopView baseSplashPopView) {
|
|
int i = baseSplashPopView.r;
|
|
baseSplashPopView.r = i - 1;
|
|
return i;
|
|
}
|
|
|
|
public BaseSplashPopView(Context context, a aVar, d dVar) {
|
|
super(context);
|
|
this.i = 1;
|
|
this.r = -1;
|
|
this.d = new Handler();
|
|
this.s = false;
|
|
this.t = new i() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.1
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onStartRedirection(Campaign campaign, String str) {
|
|
int i;
|
|
int i2;
|
|
if (BaseSplashPopView.this.i == 1) {
|
|
int min = Math.min(BaseSplashPopView.this.getWidth(), BaseSplashPopView.this.getHeight());
|
|
int a2 = (ak.a(BaseSplashPopView.this.getContext(), 60.0f) - Math.min(Math.max(min / 4, 70), min)) / 2;
|
|
i = ak.a(BaseSplashPopView.this.getContext(), 23.0f) + a2;
|
|
i2 = ak.a(BaseSplashPopView.this.getContext(), 10.0f) + a2;
|
|
} else {
|
|
i = 0;
|
|
i2 = 0;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this, i, i2);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onFinishRedirection(Campaign campaign, String str) {
|
|
if (campaign == null) {
|
|
return;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onRedirectionFailed(Campaign campaign, String str) {
|
|
if (campaign == null) {
|
|
return;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this);
|
|
}
|
|
};
|
|
this.u = new Runnable() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.5
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
if (BaseSplashPopView.this.q != null) {
|
|
if (BaseSplashPopView.this.r == 0) {
|
|
BaseSplashPopView.this.r = -1;
|
|
BaseSplashPopView.this.g();
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
baseSplashPopView.d.removeCallbacks(baseSplashPopView.u);
|
|
BaseSplashPopView baseSplashPopView2 = BaseSplashPopView.this;
|
|
d dVar2 = baseSplashPopView2.c;
|
|
if (dVar2 != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView2.a, baseSplashPopView2.b), 5);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
BaseSplashPopView.i(BaseSplashPopView.this);
|
|
BaseSplashPopView.this.q.setText(String.valueOf(BaseSplashPopView.this.r));
|
|
BaseSplashPopView baseSplashPopView3 = BaseSplashPopView.this;
|
|
baseSplashPopView3.d.postDelayed(baseSplashPopView3.u, 1000L);
|
|
}
|
|
}
|
|
};
|
|
this.v = new Runnable() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.6
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
d dVar2 = baseSplashPopView.c;
|
|
if (dVar2 != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView.a, baseSplashPopView.b), BaseSplashPopView.this.getWidth(), BaseSplashPopView.this.getHeight(), BaseSplashPopView.this.i);
|
|
}
|
|
}
|
|
};
|
|
this.f = new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.7
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
if (baseSplashPopView.c != null) {
|
|
baseSplashPopView.a(baseSplashPopView.j);
|
|
}
|
|
}
|
|
};
|
|
this.g = new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.8
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
BaseSplashPopView baseSplashPopView;
|
|
d dVar2;
|
|
if (BaseSplashPopView.this.r <= 0 && (dVar2 = (baseSplashPopView = BaseSplashPopView.this).c) != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView.a, baseSplashPopView.b), 4);
|
|
}
|
|
}
|
|
};
|
|
if (aVar == null) {
|
|
throw new IllegalArgumentException("Parameters is NULL, can't gen view.");
|
|
}
|
|
this.b = aVar.b();
|
|
this.a = aVar.a();
|
|
this.i = aVar.c();
|
|
this.j = aVar.d();
|
|
this.c = dVar;
|
|
a();
|
|
}
|
|
|
|
public BaseSplashPopView(Context context) {
|
|
super(context);
|
|
this.i = 1;
|
|
this.r = -1;
|
|
this.d = new Handler();
|
|
this.s = false;
|
|
this.t = new i() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.1
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onStartRedirection(Campaign campaign, String str) {
|
|
int i;
|
|
int i2;
|
|
if (BaseSplashPopView.this.i == 1) {
|
|
int min = Math.min(BaseSplashPopView.this.getWidth(), BaseSplashPopView.this.getHeight());
|
|
int a2 = (ak.a(BaseSplashPopView.this.getContext(), 60.0f) - Math.min(Math.max(min / 4, 70), min)) / 2;
|
|
i = ak.a(BaseSplashPopView.this.getContext(), 23.0f) + a2;
|
|
i2 = ak.a(BaseSplashPopView.this.getContext(), 10.0f) + a2;
|
|
} else {
|
|
i = 0;
|
|
i2 = 0;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this, i, i2);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onFinishRedirection(Campaign campaign, String str) {
|
|
if (campaign == null) {
|
|
return;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onRedirectionFailed(Campaign campaign, String str) {
|
|
if (campaign == null) {
|
|
return;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this);
|
|
}
|
|
};
|
|
this.u = new Runnable() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.5
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
if (BaseSplashPopView.this.q != null) {
|
|
if (BaseSplashPopView.this.r == 0) {
|
|
BaseSplashPopView.this.r = -1;
|
|
BaseSplashPopView.this.g();
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
baseSplashPopView.d.removeCallbacks(baseSplashPopView.u);
|
|
BaseSplashPopView baseSplashPopView2 = BaseSplashPopView.this;
|
|
d dVar2 = baseSplashPopView2.c;
|
|
if (dVar2 != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView2.a, baseSplashPopView2.b), 5);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
BaseSplashPopView.i(BaseSplashPopView.this);
|
|
BaseSplashPopView.this.q.setText(String.valueOf(BaseSplashPopView.this.r));
|
|
BaseSplashPopView baseSplashPopView3 = BaseSplashPopView.this;
|
|
baseSplashPopView3.d.postDelayed(baseSplashPopView3.u, 1000L);
|
|
}
|
|
}
|
|
};
|
|
this.v = new Runnable() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.6
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
d dVar2 = baseSplashPopView.c;
|
|
if (dVar2 != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView.a, baseSplashPopView.b), BaseSplashPopView.this.getWidth(), BaseSplashPopView.this.getHeight(), BaseSplashPopView.this.i);
|
|
}
|
|
}
|
|
};
|
|
this.f = new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.7
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
if (baseSplashPopView.c != null) {
|
|
baseSplashPopView.a(baseSplashPopView.j);
|
|
}
|
|
}
|
|
};
|
|
this.g = new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.8
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
BaseSplashPopView baseSplashPopView;
|
|
d dVar2;
|
|
if (BaseSplashPopView.this.r <= 0 && (dVar2 = (baseSplashPopView = BaseSplashPopView.this).c) != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView.a, baseSplashPopView.b), 4);
|
|
}
|
|
}
|
|
};
|
|
this.i = 1;
|
|
af.c("MBSplashPopView", "Please call setPopViewType() to init.");
|
|
}
|
|
|
|
public BaseSplashPopView(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
this.i = 1;
|
|
this.r = -1;
|
|
this.d = new Handler();
|
|
this.s = false;
|
|
this.t = new i() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.1
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onStartRedirection(Campaign campaign, String str) {
|
|
int i;
|
|
int i2;
|
|
if (BaseSplashPopView.this.i == 1) {
|
|
int min = Math.min(BaseSplashPopView.this.getWidth(), BaseSplashPopView.this.getHeight());
|
|
int a2 = (ak.a(BaseSplashPopView.this.getContext(), 60.0f) - Math.min(Math.max(min / 4, 70), min)) / 2;
|
|
i = ak.a(BaseSplashPopView.this.getContext(), 23.0f) + a2;
|
|
i2 = ak.a(BaseSplashPopView.this.getContext(), 10.0f) + a2;
|
|
} else {
|
|
i = 0;
|
|
i2 = 0;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this, i, i2);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onFinishRedirection(Campaign campaign, String str) {
|
|
if (campaign == null) {
|
|
return;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onRedirectionFailed(Campaign campaign, String str) {
|
|
if (campaign == null) {
|
|
return;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this);
|
|
}
|
|
};
|
|
this.u = new Runnable() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.5
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
if (BaseSplashPopView.this.q != null) {
|
|
if (BaseSplashPopView.this.r == 0) {
|
|
BaseSplashPopView.this.r = -1;
|
|
BaseSplashPopView.this.g();
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
baseSplashPopView.d.removeCallbacks(baseSplashPopView.u);
|
|
BaseSplashPopView baseSplashPopView2 = BaseSplashPopView.this;
|
|
d dVar2 = baseSplashPopView2.c;
|
|
if (dVar2 != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView2.a, baseSplashPopView2.b), 5);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
BaseSplashPopView.i(BaseSplashPopView.this);
|
|
BaseSplashPopView.this.q.setText(String.valueOf(BaseSplashPopView.this.r));
|
|
BaseSplashPopView baseSplashPopView3 = BaseSplashPopView.this;
|
|
baseSplashPopView3.d.postDelayed(baseSplashPopView3.u, 1000L);
|
|
}
|
|
}
|
|
};
|
|
this.v = new Runnable() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.6
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
d dVar2 = baseSplashPopView.c;
|
|
if (dVar2 != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView.a, baseSplashPopView.b), BaseSplashPopView.this.getWidth(), BaseSplashPopView.this.getHeight(), BaseSplashPopView.this.i);
|
|
}
|
|
}
|
|
};
|
|
this.f = new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.7
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
if (baseSplashPopView.c != null) {
|
|
baseSplashPopView.a(baseSplashPopView.j);
|
|
}
|
|
}
|
|
};
|
|
this.g = new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.8
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
BaseSplashPopView baseSplashPopView;
|
|
d dVar2;
|
|
if (BaseSplashPopView.this.r <= 0 && (dVar2 = (baseSplashPopView = BaseSplashPopView.this).c) != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView.a, baseSplashPopView.b), 4);
|
|
}
|
|
}
|
|
};
|
|
this.i = 1;
|
|
af.c("MBSplashPopView", "Please call setPopViewType() to init.");
|
|
}
|
|
|
|
public BaseSplashPopView(Context context, AttributeSet attributeSet, int i) {
|
|
super(context, attributeSet, i);
|
|
this.i = 1;
|
|
this.r = -1;
|
|
this.d = new Handler();
|
|
this.s = false;
|
|
this.t = new i() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.1
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onStartRedirection(Campaign campaign, String str) {
|
|
int i2;
|
|
int i22;
|
|
if (BaseSplashPopView.this.i == 1) {
|
|
int min = Math.min(BaseSplashPopView.this.getWidth(), BaseSplashPopView.this.getHeight());
|
|
int a2 = (ak.a(BaseSplashPopView.this.getContext(), 60.0f) - Math.min(Math.max(min / 4, 70), min)) / 2;
|
|
i2 = ak.a(BaseSplashPopView.this.getContext(), 23.0f) + a2;
|
|
i22 = ak.a(BaseSplashPopView.this.getContext(), 10.0f) + a2;
|
|
} else {
|
|
i2 = 0;
|
|
i22 = 0;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this, i2, i22);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onFinishRedirection(Campaign campaign, String str) {
|
|
if (campaign == null) {
|
|
return;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onRedirectionFailed(Campaign campaign, String str) {
|
|
if (campaign == null) {
|
|
return;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this);
|
|
}
|
|
};
|
|
this.u = new Runnable() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.5
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
if (BaseSplashPopView.this.q != null) {
|
|
if (BaseSplashPopView.this.r == 0) {
|
|
BaseSplashPopView.this.r = -1;
|
|
BaseSplashPopView.this.g();
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
baseSplashPopView.d.removeCallbacks(baseSplashPopView.u);
|
|
BaseSplashPopView baseSplashPopView2 = BaseSplashPopView.this;
|
|
d dVar2 = baseSplashPopView2.c;
|
|
if (dVar2 != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView2.a, baseSplashPopView2.b), 5);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
BaseSplashPopView.i(BaseSplashPopView.this);
|
|
BaseSplashPopView.this.q.setText(String.valueOf(BaseSplashPopView.this.r));
|
|
BaseSplashPopView baseSplashPopView3 = BaseSplashPopView.this;
|
|
baseSplashPopView3.d.postDelayed(baseSplashPopView3.u, 1000L);
|
|
}
|
|
}
|
|
};
|
|
this.v = new Runnable() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.6
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
d dVar2 = baseSplashPopView.c;
|
|
if (dVar2 != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView.a, baseSplashPopView.b), BaseSplashPopView.this.getWidth(), BaseSplashPopView.this.getHeight(), BaseSplashPopView.this.i);
|
|
}
|
|
}
|
|
};
|
|
this.f = new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.7
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
if (baseSplashPopView.c != null) {
|
|
baseSplashPopView.a(baseSplashPopView.j);
|
|
}
|
|
}
|
|
};
|
|
this.g = new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.8
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
BaseSplashPopView baseSplashPopView;
|
|
d dVar2;
|
|
if (BaseSplashPopView.this.r <= 0 && (dVar2 = (baseSplashPopView = BaseSplashPopView.this).c) != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView.a, baseSplashPopView.b), 4);
|
|
}
|
|
}
|
|
};
|
|
this.i = 1;
|
|
af.c("MBSplashPopView", "Please call setPopViewType() to init.");
|
|
}
|
|
|
|
@RequiresApi(api = 21)
|
|
public BaseSplashPopView(Context context, AttributeSet attributeSet, int i, int i2) {
|
|
super(context, attributeSet, i, i2);
|
|
this.i = 1;
|
|
this.r = -1;
|
|
this.d = new Handler();
|
|
this.s = false;
|
|
this.t = new i() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.1
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onStartRedirection(Campaign campaign, String str) {
|
|
int i22;
|
|
int i222;
|
|
if (BaseSplashPopView.this.i == 1) {
|
|
int min = Math.min(BaseSplashPopView.this.getWidth(), BaseSplashPopView.this.getHeight());
|
|
int a2 = (ak.a(BaseSplashPopView.this.getContext(), 60.0f) - Math.min(Math.max(min / 4, 70), min)) / 2;
|
|
i22 = ak.a(BaseSplashPopView.this.getContext(), 23.0f) + a2;
|
|
i222 = ak.a(BaseSplashPopView.this.getContext(), 10.0f) + a2;
|
|
} else {
|
|
i22 = 0;
|
|
i222 = 0;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this, i22, i222);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onFinishRedirection(Campaign campaign, String str) {
|
|
if (campaign == null) {
|
|
return;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.out.BaseTrackingListener
|
|
public final void onRedirectionFailed(Campaign campaign, String str) {
|
|
if (campaign == null) {
|
|
return;
|
|
}
|
|
aj.a(campaign, BaseSplashPopView.this);
|
|
}
|
|
};
|
|
this.u = new Runnable() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.5
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
if (BaseSplashPopView.this.q != null) {
|
|
if (BaseSplashPopView.this.r == 0) {
|
|
BaseSplashPopView.this.r = -1;
|
|
BaseSplashPopView.this.g();
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
baseSplashPopView.d.removeCallbacks(baseSplashPopView.u);
|
|
BaseSplashPopView baseSplashPopView2 = BaseSplashPopView.this;
|
|
d dVar2 = baseSplashPopView2.c;
|
|
if (dVar2 != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView2.a, baseSplashPopView2.b), 5);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
BaseSplashPopView.i(BaseSplashPopView.this);
|
|
BaseSplashPopView.this.q.setText(String.valueOf(BaseSplashPopView.this.r));
|
|
BaseSplashPopView baseSplashPopView3 = BaseSplashPopView.this;
|
|
baseSplashPopView3.d.postDelayed(baseSplashPopView3.u, 1000L);
|
|
}
|
|
}
|
|
};
|
|
this.v = new Runnable() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.6
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
d dVar2 = baseSplashPopView.c;
|
|
if (dVar2 != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView.a, baseSplashPopView.b), BaseSplashPopView.this.getWidth(), BaseSplashPopView.this.getHeight(), BaseSplashPopView.this.i);
|
|
}
|
|
}
|
|
};
|
|
this.f = new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.7
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
BaseSplashPopView baseSplashPopView = BaseSplashPopView.this;
|
|
if (baseSplashPopView.c != null) {
|
|
baseSplashPopView.a(baseSplashPopView.j);
|
|
}
|
|
}
|
|
};
|
|
this.g = new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.8
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
BaseSplashPopView baseSplashPopView;
|
|
d dVar2;
|
|
if (BaseSplashPopView.this.r <= 0 && (dVar2 = (baseSplashPopView = BaseSplashPopView.this).c) != null) {
|
|
dVar2.a(new MBridgeIds(baseSplashPopView.a, baseSplashPopView.b), 4);
|
|
}
|
|
}
|
|
};
|
|
this.i = 1;
|
|
af.c("MBSplashPopView", "Please call setPopViewType() to init.");
|
|
}
|
|
|
|
@Override // android.view.ViewGroup, android.view.View
|
|
public void onAttachedToWindow() {
|
|
super.onAttachedToWindow();
|
|
if (this.c != null) {
|
|
postDelayed(this.v, 500L);
|
|
}
|
|
}
|
|
|
|
@Override // android.view.ViewGroup, android.view.View
|
|
public void onDetachedFromWindow() {
|
|
super.onDetachedFromWindow();
|
|
release();
|
|
}
|
|
|
|
public void setPopViewType(a aVar, d dVar) {
|
|
if (aVar == null) {
|
|
throw new IllegalArgumentException("Parameters is NULL, can't gen view.");
|
|
}
|
|
this.b = aVar.b();
|
|
this.a = aVar.a();
|
|
this.i = aVar.c();
|
|
this.j = aVar.d();
|
|
this.c = dVar;
|
|
a();
|
|
}
|
|
|
|
public void startCountDown() {
|
|
this.d.removeCallbacks(this.u);
|
|
CampaignEx campaignEx = this.j;
|
|
if (campaignEx == null || this.i != 1) {
|
|
return;
|
|
}
|
|
int flbSkipTime = campaignEx.getFlbSkipTime();
|
|
if (flbSkipTime <= 0) {
|
|
g();
|
|
return;
|
|
}
|
|
this.r = flbSkipTime;
|
|
TextView textView = this.q;
|
|
if (textView != null) {
|
|
textView.setText(String.valueOf(flbSkipTime));
|
|
this.d.postDelayed(this.u, 1000L);
|
|
}
|
|
}
|
|
|
|
public void reStartCountDown() {
|
|
if (this.s) {
|
|
this.s = false;
|
|
int i = this.r;
|
|
if (i == -1 || i == 0) {
|
|
g();
|
|
return;
|
|
}
|
|
TextView textView = this.q;
|
|
if (textView != null) {
|
|
textView.setText(String.valueOf(i));
|
|
this.d.postDelayed(this.u, 1000L);
|
|
}
|
|
}
|
|
}
|
|
|
|
public void pauseCountDown() {
|
|
this.s = true;
|
|
if (this.q != null) {
|
|
this.d.removeCallbacks(this.u);
|
|
}
|
|
}
|
|
|
|
public void release() {
|
|
try {
|
|
this.d.removeCallbacks(this.v);
|
|
this.d.removeCallbacks(this.u);
|
|
this.u = null;
|
|
detachAllViewsFromParent();
|
|
this.j = null;
|
|
this.c = null;
|
|
} catch (Exception e) {
|
|
af.b("MBSplashPopView", e.getMessage());
|
|
}
|
|
}
|
|
|
|
private void a() {
|
|
if (this.j == null) {
|
|
return;
|
|
}
|
|
setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
|
|
int i = this.i;
|
|
if (i == 1) {
|
|
b();
|
|
return;
|
|
}
|
|
if (i == 2) {
|
|
c();
|
|
} else if (i == 3) {
|
|
d();
|
|
} else {
|
|
if (i != 4) {
|
|
return;
|
|
}
|
|
e();
|
|
}
|
|
}
|
|
|
|
private void b() {
|
|
View imageView = new ImageView(getContext());
|
|
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ak.a(getContext(), 80.0f), ak.a(getContext(), 80.0f));
|
|
layoutParams.addRule(9);
|
|
layoutParams.topMargin = ak.a(getContext(), 16.0f);
|
|
imageView.setId(generateViewId());
|
|
imageView.setLayoutParams(layoutParams);
|
|
imageView.setBackgroundResource(getResources().getIdentifier("mbridge_splash_popview_default", "drawable", c.m().g()));
|
|
this.k = new ImageView(getContext());
|
|
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(ak.a(getContext(), 60.0f), ak.a(getContext(), 60.0f));
|
|
layoutParams2.addRule(6, imageView.getId());
|
|
layoutParams2.topMargin = ak.a(getContext(), 7.0f);
|
|
layoutParams2.leftMargin = ak.a(getContext(), 10.0f);
|
|
this.k.setId(generateViewId());
|
|
this.k.setLayoutParams(layoutParams2);
|
|
this.k.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
|
CampaignEx campaignEx = this.j;
|
|
if (campaignEx != null && !TextUtils.isEmpty(campaignEx.getIconUrl())) {
|
|
a(this.j.getIconUrl(), true);
|
|
}
|
|
this.q = new TextView(getContext());
|
|
RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(-2, -2);
|
|
layoutParams3.addRule(5, imageView.getId());
|
|
layoutParams3.addRule(8, imageView.getId());
|
|
layoutParams3.leftMargin = ak.a(getContext(), 62.0f);
|
|
layoutParams3.bottomMargin = ak.a(getContext(), 70.0f);
|
|
this.q.setId(generateViewId());
|
|
this.q.setTextSize(10.0f);
|
|
this.q.setTextColor(-1);
|
|
this.q.setGravity(17);
|
|
this.q.setMinWidth(ak.a(getContext(), 16.0f));
|
|
this.q.setMaxHeight(ak.a(getContext(), 16.0f));
|
|
this.q.setLayoutParams(layoutParams3);
|
|
this.q.setBackgroundResource(getResources().getIdentifier("mbridge_cm_circle_50black", "drawable", c.m().g()));
|
|
addView(imageView);
|
|
addView(this.q);
|
|
addView(this.k);
|
|
CampaignEx campaignEx2 = this.j;
|
|
if (campaignEx2 != null && campaignEx2.getFlbSkipTime() <= 0) {
|
|
g();
|
|
}
|
|
setOnClickListener(this.f);
|
|
this.q.setOnClickListener(this.g);
|
|
}
|
|
|
|
private void c() {
|
|
int a2 = ak.a(getContext(), 4.0f);
|
|
this.k = new ImageView(getContext());
|
|
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ak.a(getContext(), 28.0f), ak.a(getContext(), 28.0f));
|
|
layoutParams.addRule(9);
|
|
this.k.setId(generateViewId());
|
|
this.k.setLayoutParams(layoutParams);
|
|
this.k.setPadding(a2, a2, a2, a2);
|
|
this.k.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
|
|
a(this.j.getIconUrl(), false);
|
|
TextView textView = new TextView(getContext());
|
|
this.o = textView;
|
|
textView.setId(generateViewId());
|
|
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(-2, -2);
|
|
layoutParams2.addRule(1, this.k.getId());
|
|
layoutParams2.addRule(6, this.k.getId());
|
|
layoutParams2.addRule(8, this.k.getId());
|
|
layoutParams2.leftMargin = ak.a(getContext(), 4.0f);
|
|
layoutParams2.rightMargin = ak.a(getContext(), 40.0f);
|
|
this.o.setLayoutParams(layoutParams2);
|
|
this.o.setGravity(16);
|
|
this.o.setTextSize(10.0f);
|
|
this.o.setSelected(true);
|
|
this.o.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
|
this.o.setMarqueeRepeatLimit(-1);
|
|
this.o.setSingleLine(true);
|
|
this.o.setTextColor(ViewCompat.MEASURED_STATE_MASK);
|
|
this.o.setText(this.j.getAppName());
|
|
setBackgroundResource(getResources().getIdentifier("mbridge_shape_corners_bg", "drawable", c.m().g()));
|
|
addView(this.k);
|
|
addView(this.o);
|
|
f();
|
|
setOnClickListener(this.f);
|
|
}
|
|
|
|
private void d() {
|
|
int a2 = ak.a(getContext(), 4.0f);
|
|
this.k = new ImageView(getContext());
|
|
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ak.a(getContext(), 50.0f), ak.a(getContext(), 50.0f));
|
|
layoutParams.addRule(9);
|
|
this.k.setId(generateViewId());
|
|
this.k.setLayoutParams(layoutParams);
|
|
this.k.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
|
|
this.k.setPadding(a2, a2, a2, a2);
|
|
a(this.j.getIconUrl(), false);
|
|
RelativeLayout relativeLayout = new RelativeLayout(getContext());
|
|
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(-1, -2);
|
|
layoutParams2.addRule(1, this.k.getId());
|
|
layoutParams2.addRule(6, this.k.getId());
|
|
layoutParams2.addRule(8, this.k.getId());
|
|
layoutParams2.leftMargin = ak.a(getContext(), 8.0f);
|
|
layoutParams2.rightMargin = ak.a(getContext(), 8.0f);
|
|
relativeLayout.setLayoutParams(layoutParams2);
|
|
relativeLayout.setGravity(16);
|
|
TextView textView = new TextView(getContext());
|
|
this.o = textView;
|
|
textView.setId(generateViewId());
|
|
this.o.setLayoutParams(new RelativeLayout.LayoutParams(-2, -2));
|
|
this.o.setGravity(16);
|
|
this.o.setTextSize(12.0f);
|
|
this.o.setSelected(true);
|
|
TextView textView2 = this.o;
|
|
TextUtils.TruncateAt truncateAt = TextUtils.TruncateAt.MARQUEE;
|
|
textView2.setEllipsize(truncateAt);
|
|
this.o.setMarqueeRepeatLimit(-1);
|
|
this.o.setSingleLine(true);
|
|
this.o.setTextColor(ViewCompat.MEASURED_STATE_MASK);
|
|
this.o.setText(this.j.getAppName());
|
|
TextView textView3 = new TextView(getContext());
|
|
this.p = textView3;
|
|
textView3.setId(generateViewId());
|
|
RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(-2, -2);
|
|
layoutParams3.addRule(5, this.o.getId());
|
|
layoutParams3.addRule(3, this.o.getId());
|
|
layoutParams3.topMargin = ak.a(getContext(), 4.0f);
|
|
layoutParams3.rightMargin = ak.a(getContext(), 36.0f);
|
|
this.p.setGravity(16);
|
|
this.p.setLayoutParams(layoutParams3);
|
|
this.p.setTextSize(8.0f);
|
|
this.p.setTextColor(-10066330);
|
|
this.p.setEllipsize(truncateAt);
|
|
this.p.setMarqueeRepeatLimit(-1);
|
|
this.p.setSelected(true);
|
|
this.p.setSingleLine(true);
|
|
this.p.setText(this.j.getAppDesc());
|
|
relativeLayout.addView(this.o);
|
|
relativeLayout.addView(this.p);
|
|
setBackgroundResource(getResources().getIdentifier("mbridge_shape_corners_bg", "drawable", c.m().g()));
|
|
addView(this.k);
|
|
addView(relativeLayout);
|
|
f();
|
|
setOnClickListener(this.f);
|
|
}
|
|
|
|
private void e() {
|
|
this.m = new ImageView(getContext());
|
|
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, ak.a(getContext(), 131.0f));
|
|
layoutParams.addRule(10);
|
|
layoutParams.addRule(14);
|
|
this.m.setScaleType(ImageView.ScaleType.FIT_XY);
|
|
this.m.setId(generateViewId());
|
|
this.m.setLayoutParams(layoutParams);
|
|
a(this.j.getImageUrl());
|
|
this.l = new ImageView(getContext());
|
|
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(-2, ak.a(getContext(), 131.0f));
|
|
layoutParams2.addRule(10);
|
|
layoutParams2.addRule(14);
|
|
this.l.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
|
this.l.setId(generateViewId());
|
|
this.l.setLayoutParams(layoutParams2);
|
|
b(this.j.getImageUrl());
|
|
this.k = new ImageView(getContext());
|
|
RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(ak.a(getContext(), 50.0f), ak.a(getContext(), 50.0f));
|
|
layoutParams3.addRule(9);
|
|
layoutParams3.addRule(3, this.m.getId());
|
|
layoutParams3.topMargin = 20;
|
|
this.k.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
|
|
this.k.setId(generateViewId());
|
|
this.k.setLayoutParams(layoutParams3);
|
|
a(this.j.getIconUrl(), false);
|
|
RelativeLayout relativeLayout = new RelativeLayout(getContext());
|
|
RelativeLayout.LayoutParams layoutParams4 = new RelativeLayout.LayoutParams(-1, -2);
|
|
layoutParams4.addRule(1, this.k.getId());
|
|
layoutParams4.addRule(6, this.k.getId());
|
|
layoutParams4.addRule(8, this.k.getId());
|
|
layoutParams4.leftMargin = ak.a(getContext(), 8.0f);
|
|
layoutParams4.rightMargin = ak.a(getContext(), 8.0f);
|
|
relativeLayout.setLayoutParams(layoutParams4);
|
|
relativeLayout.setGravity(16);
|
|
TextView textView = new TextView(getContext());
|
|
this.o = textView;
|
|
textView.setId(generateViewId());
|
|
this.o.setGravity(16);
|
|
this.o.setLayoutParams(new RelativeLayout.LayoutParams(-2, -2));
|
|
this.o.setTextSize(12.0f);
|
|
this.o.setTextColor(ViewCompat.MEASURED_STATE_MASK);
|
|
TextView textView2 = this.o;
|
|
TextUtils.TruncateAt truncateAt = TextUtils.TruncateAt.MARQUEE;
|
|
textView2.setEllipsize(truncateAt);
|
|
this.o.setMarqueeRepeatLimit(-1);
|
|
this.o.setSelected(true);
|
|
this.o.setSingleLine(true);
|
|
this.o.setText(this.j.getAppName());
|
|
TextView textView3 = new TextView(getContext());
|
|
this.p = textView3;
|
|
textView3.setId(generateViewId());
|
|
RelativeLayout.LayoutParams layoutParams5 = new RelativeLayout.LayoutParams(-2, -2);
|
|
layoutParams5.addRule(5, this.o.getId());
|
|
layoutParams5.addRule(3, this.o.getId());
|
|
layoutParams5.topMargin = ak.a(getContext(), 4.0f);
|
|
layoutParams5.rightMargin = ak.a(getContext(), 36.0f);
|
|
this.p.setGravity(16);
|
|
this.p.setLayoutParams(layoutParams5);
|
|
this.p.setTextSize(8.0f);
|
|
this.p.setTextColor(-10066330);
|
|
this.p.setEllipsize(truncateAt);
|
|
this.p.setMarqueeRepeatLimit(-1);
|
|
this.p.setSelected(true);
|
|
this.p.setSingleLine(true);
|
|
this.p.setText(this.j.getAppDesc());
|
|
relativeLayout.addView(this.o);
|
|
relativeLayout.addView(this.p);
|
|
addView(this.m);
|
|
addView(this.l);
|
|
addView(this.k);
|
|
addView(relativeLayout);
|
|
f();
|
|
setOnClickListener(this.f);
|
|
}
|
|
|
|
private void f() {
|
|
String str;
|
|
int identifier;
|
|
this.n = new ImageView(getContext());
|
|
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ak.a(getContext(), 32.0f), ak.a(getContext(), 13.0f));
|
|
layoutParams.addRule(11);
|
|
layoutParams.addRule(8, this.k.getId());
|
|
this.n.setLayoutParams(layoutParams);
|
|
try {
|
|
str = getResources().getConfiguration().locale.getLanguage();
|
|
} catch (Throwable th) {
|
|
af.b("MBSplashPopView", th.getMessage());
|
|
str = "ZH";
|
|
}
|
|
if (str.toUpperCase().equals("CN") || str.toUpperCase().equals("ZH")) {
|
|
identifier = getResources().getIdentifier("mbridge_splash_pop_ad", "drawable", c.m().g());
|
|
} else {
|
|
identifier = getResources().getIdentifier("mbridge_splash_pop_ad_en", "drawable", c.m().g());
|
|
}
|
|
this.n.setBackgroundResource(identifier);
|
|
addView(this.n);
|
|
}
|
|
|
|
private void a(String str, final boolean z) {
|
|
b.a(c.m().c()).a(str, new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.2
|
|
@Override // com.mbridge.msdk.foundation.same.c.c
|
|
public final void onSuccessLoad(Bitmap bitmap, String str2) {
|
|
Bitmap a2;
|
|
try {
|
|
if (bitmap.isRecycled()) {
|
|
return;
|
|
}
|
|
if (!z) {
|
|
a2 = ae.a(bitmap, 1, 16);
|
|
} else if (bitmap.isRecycled()) {
|
|
a2 = null;
|
|
} else {
|
|
int width = bitmap.getWidth();
|
|
a2 = Bitmap.createBitmap(width, width, Bitmap.Config.ARGB_4444);
|
|
Canvas canvas = new Canvas(a2);
|
|
Paint paint = new Paint();
|
|
paint.setAntiAlias(true);
|
|
canvas.drawCircle(width / 2, width / 2, width / 2, paint);
|
|
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
|
|
canvas.drawBitmap(bitmap, 0.0f, 0.0f, paint);
|
|
}
|
|
ImageView imageView = BaseSplashPopView.this.k;
|
|
if (a2 != null) {
|
|
bitmap = a2;
|
|
}
|
|
imageView.setImageBitmap(bitmap);
|
|
} catch (Throwable th) {
|
|
af.b("MBSplashPopView", th.getMessage());
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.same.c.c
|
|
public final void onFailedLoad(String str2, String str3) {
|
|
af.b("MBSplashPopView", str2);
|
|
}
|
|
});
|
|
}
|
|
|
|
private void a(String str) {
|
|
b.a(c.m().c()).a(str, new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.3
|
|
@Override // com.mbridge.msdk.foundation.same.c.c
|
|
public final void onSuccessLoad(Bitmap bitmap, String str2) {
|
|
try {
|
|
if (bitmap.isRecycled()) {
|
|
return;
|
|
}
|
|
BaseSplashPopView.this.m.setImageBitmap(p.a(bitmap, 10));
|
|
} catch (Throwable th) {
|
|
af.b("MBSplashPopView", th.getMessage());
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.same.c.c
|
|
public final void onFailedLoad(String str2, String str3) {
|
|
af.b("MBSplashPopView", str2);
|
|
}
|
|
});
|
|
}
|
|
|
|
private void b(String str) {
|
|
b.a(c.m().c()).a(str, new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.splash.view.BaseSplashPopView.4
|
|
@Override // com.mbridge.msdk.foundation.same.c.c
|
|
public final void onSuccessLoad(Bitmap bitmap, String str2) {
|
|
try {
|
|
if (bitmap.isRecycled()) {
|
|
return;
|
|
}
|
|
BaseSplashPopView.this.l.setImageBitmap(ae.a(bitmap, 1, 16));
|
|
} catch (Throwable th) {
|
|
af.b("MBSplashPopView", th.getMessage());
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.same.c.c
|
|
public final void onFailedLoad(String str2, String str3) {
|
|
af.b("MBSplashPopView", str2);
|
|
}
|
|
});
|
|
}
|
|
|
|
public static int generateViewId() {
|
|
AtomicInteger atomicInteger;
|
|
int i;
|
|
int i2;
|
|
do {
|
|
atomicInteger = h;
|
|
i = atomicInteger.get();
|
|
i2 = i + 1;
|
|
if (i2 > 16777215) {
|
|
i2 = 1;
|
|
}
|
|
} while (!atomicInteger.compareAndSet(i, i2));
|
|
return i;
|
|
}
|
|
|
|
public final void b(CampaignEx campaignEx) {
|
|
if (this.e == null) {
|
|
com.mbridge.msdk.click.a aVar = new com.mbridge.msdk.click.a(c.m().c(), this.b);
|
|
this.e = aVar;
|
|
aVar.a(this.t);
|
|
}
|
|
campaignEx.setCampaignUnitId(this.b);
|
|
this.e.a(campaignEx);
|
|
if (!campaignEx.isReportClick()) {
|
|
campaignEx.setReportClick(true);
|
|
com.mbridge.msdk.splash.e.a.a(c.m().c(), campaignEx);
|
|
}
|
|
d dVar = this.c;
|
|
if (dVar != null) {
|
|
dVar.b(new MBridgeIds(this.a, this.b));
|
|
this.c.a(new MBridgeIds(this.a, this.b), 6);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void g() {
|
|
TextView textView = this.q;
|
|
if (textView != null) {
|
|
ViewGroup.LayoutParams layoutParams = textView.getLayoutParams();
|
|
layoutParams.width = ak.a(getContext(), 16.0f);
|
|
layoutParams.height = ak.a(getContext(), 16.0f);
|
|
this.q.setLayoutParams(layoutParams);
|
|
this.q.setText("");
|
|
this.q.setSelected(true);
|
|
this.q.setBackgroundResource(getResources().getIdentifier("mbridge_splash_popview_close", "drawable", c.m().g()));
|
|
}
|
|
}
|
|
|
|
public static class a {
|
|
private String a;
|
|
private String b;
|
|
private int c;
|
|
private CampaignEx d;
|
|
|
|
public final String a() {
|
|
return this.a;
|
|
}
|
|
|
|
public final String b() {
|
|
return this.b;
|
|
}
|
|
|
|
public final int c() {
|
|
return this.c;
|
|
}
|
|
|
|
public final CampaignEx d() {
|
|
return this.d;
|
|
}
|
|
|
|
public a(String str, String str2, int i, CampaignEx campaignEx) {
|
|
this.a = str;
|
|
this.b = str2;
|
|
this.c = i;
|
|
this.d = campaignEx;
|
|
}
|
|
}
|
|
|
|
public void a(CampaignEx campaignEx) {
|
|
String str = this.b;
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
jSONObject.put("key", "2000092");
|
|
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
|
|
jSONObject.put("rid", campaignEx.getRequestId());
|
|
jSONObject.put(BidResponsedEx.KEY_CID, campaignEx.getId());
|
|
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
|
|
jSONObject.put("network_type", String.valueOf(ab.m(c.m().c())));
|
|
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
|
|
} catch (Exception e) {
|
|
af.b("SplashReport", e.getMessage());
|
|
}
|
|
}
|
|
}
|