Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
package com.mbridge.msdk.splash;
/* loaded from: classes4.dex */
public final class BuildConfig {
public static final String BUILD_TYPE = "release";
public static final boolean DEBUG = false;
public static final String FLAVOR = "oversea";
public static final String LIBRARY_PACKAGE_NAME = "com.mbridge.msdk.splash";
}

View File

@@ -0,0 +1,271 @@
package com.mbridge.msdk.splash;
/* loaded from: classes4.dex */
public final class R {
public static final class attr {
public static int corner = 0x7f0400b4;
public static int mbridge_click = 0x7f040117;
public static int mbridge_data = 0x7f040118;
public static int mbridge_effect = 0x7f040119;
public static int mbridge_effect_strategy = 0x7f04011a;
public static int mbridge_report = 0x7f04011b;
public static int mbridge_strategy = 0x7f04011c;
private attr() {
}
}
public static final class color {
public static int mbridge_black = 0x7f0600ab;
public static int mbridge_black_66 = 0x7f0600ac;
public static int mbridge_black_alpha_50 = 0x7f0600ad;
public static int mbridge_cm_feedback_dialog_chice_bg_pressed = 0x7f0600ae;
public static int mbridge_cm_feedback_rb_text_color_color_list = 0x7f0600af;
public static int mbridge_common_white = 0x7f0600b3;
public static int mbridge_cpb_blue = 0x7f0600b4;
public static int mbridge_cpb_blue_dark = 0x7f0600b5;
public static int mbridge_cpb_green = 0x7f0600b6;
public static int mbridge_cpb_green_dark = 0x7f0600b7;
public static int mbridge_cpb_grey = 0x7f0600b8;
public static int mbridge_cpb_red = 0x7f0600b9;
public static int mbridge_cpb_red_dark = 0x7f0600ba;
public static int mbridge_cpb_white = 0x7f0600bb;
public static int mbridge_dd_grey = 0x7f0600bc;
public static int mbridge_ee_grey = 0x7f0600bd;
public static int mbridge_purple_200 = 0x7f0600c7;
public static int mbridge_purple_500 = 0x7f0600c8;
public static int mbridge_purple_700 = 0x7f0600c9;
public static int mbridge_splash_count_time_skip_text_color = 0x7f0600d9;
public static int mbridge_teal_200 = 0x7f0600da;
public static int mbridge_teal_700 = 0x7f0600db;
public static int mbridge_video_common_alertview_bg = 0x7f0600dc;
public static int mbridge_video_common_alertview_cancel_button_bg_default = 0x7f0600dd;
public static int mbridge_video_common_alertview_cancel_button_bg_pressed = 0x7f0600de;
public static int mbridge_video_common_alertview_cancel_button_textcolor = 0x7f0600df;
public static int mbridge_video_common_alertview_confirm_button_bg_default = 0x7f0600e0;
public static int mbridge_video_common_alertview_confirm_button_bg_pressed = 0x7f0600e1;
public static int mbridge_video_common_alertview_confirm_button_textcolor = 0x7f0600e2;
public static int mbridge_video_common_alertview_content_textcolor = 0x7f0600e3;
public static int mbridge_video_common_alertview_feedback_rb_bg = 0x7f0600e4;
public static int mbridge_video_common_alertview_title_textcolor = 0x7f0600e5;
public static int mbridge_white = 0x7f0600e6;
private color() {
}
}
public static final class dimen {
public static int mbridge_video_common_alertview_bg_padding = 0x7f0700fa;
public static int mbridge_video_common_alertview_button_height = 0x7f0700fb;
public static int mbridge_video_common_alertview_button_margintop = 0x7f0700fc;
public static int mbridge_video_common_alertview_button_radius = 0x7f0700fd;
public static int mbridge_video_common_alertview_button_textsize = 0x7f0700fe;
public static int mbridge_video_common_alertview_button_width = 0x7f0700ff;
public static int mbridge_video_common_alertview_content_margintop = 0x7f070100;
public static int mbridge_video_common_alertview_content_size = 0x7f070101;
public static int mbridge_video_common_alertview_contentview_maxwidth = 0x7f070102;
public static int mbridge_video_common_alertview_contentview_minwidth = 0x7f070103;
public static int mbridge_video_common_alertview_title_size = 0x7f070104;
private dimen() {
}
}
public static final class drawable {
public static int mbridge_arrow_down_white = 0x7f08019c;
public static int mbridge_arrow_down_white_blackbg = 0x7f08019d;
public static int mbridge_arrow_up_black = 0x7f08019e;
public static int mbridge_arrow_up_white = 0x7f08019f;
public static int mbridge_cm_alertview_bg = 0x7f0801a2;
public static int mbridge_cm_alertview_cancel_bg = 0x7f0801a3;
public static int mbridge_cm_alertview_cancel_bg_nor = 0x7f0801a4;
public static int mbridge_cm_alertview_cancel_bg_pressed = 0x7f0801a5;
public static int mbridge_cm_alertview_confirm_bg = 0x7f0801a6;
public static int mbridge_cm_alertview_confirm_bg_nor = 0x7f0801a7;
public static int mbridge_cm_alertview_confirm_bg_pressed = 0x7f0801a8;
public static int mbridge_cm_backward = 0x7f0801a9;
public static int mbridge_cm_backward_disabled = 0x7f0801aa;
public static int mbridge_cm_backward_nor = 0x7f0801ab;
public static int mbridge_cm_backward_selected = 0x7f0801ac;
public static int mbridge_cm_browser = 0x7f0801ad;
public static int mbridge_cm_btn_shake = 0x7f0801ae;
public static int mbridge_cm_circle_50black = 0x7f0801af;
public static int mbridge_cm_end_animation = 0x7f0801b0;
public static int mbridge_cm_exits = 0x7f0801b1;
public static int mbridge_cm_exits_nor = 0x7f0801b2;
public static int mbridge_cm_exits_selected = 0x7f0801b3;
public static int mbridge_cm_feedback_btn_bg = 0x7f0801b4;
public static int mbridge_cm_feedback_choice_btn_bg = 0x7f0801b5;
public static int mbridge_cm_feedback_choice_btn_bg_nor = 0x7f0801b6;
public static int mbridge_cm_feedback_choice_btn_bg_pressed = 0x7f0801b7;
public static int mbridge_cm_feedback_dialog_view_bg = 0x7f0801b8;
public static int mbridge_cm_feedback_dialog_view_btn_bg = 0x7f0801b9;
public static int mbridge_cm_forward = 0x7f0801ba;
public static int mbridge_cm_forward_disabled = 0x7f0801bb;
public static int mbridge_cm_forward_nor = 0x7f0801bc;
public static int mbridge_cm_forward_selected = 0x7f0801bd;
public static int mbridge_cm_head = 0x7f0801be;
public static int mbridge_cm_highlight = 0x7f0801bf;
public static int mbridge_cm_progress = 0x7f0801c0;
public static int mbridge_cm_progress_drawable = 0x7f0801c1;
public static int mbridge_cm_progress_icon = 0x7f0801c2;
public static int mbridge_cm_refresh = 0x7f0801c3;
public static int mbridge_cm_refresh_nor = 0x7f0801c4;
public static int mbridge_cm_refresh_selected = 0x7f0801c5;
public static int mbridge_cm_tail = 0x7f0801c6;
public static int mbridge_download_message_dialog_star_sel = 0x7f0801c9;
public static int mbridge_download_message_dilaog_star_nor = 0x7f0801ca;
public static int mbridge_reward_popview_close = 0x7f0801f8;
public static int mbridge_shape_btn = 0x7f08021c;
public static int mbridge_shape_corners_bg = 0x7f08021d;
public static int mbridge_shape_line = 0x7f08021e;
public static int mbridge_shape_splash_circle_14 = 0x7f08021f;
public static int mbridge_shape_splash_corners_14 = 0x7f080220;
public static int mbridge_shape_splash_rightbottom_corners_10 = 0x7f080221;
public static int mbridge_slide_hand = 0x7f080222;
public static int mbridge_slide_rightarrow = 0x7f080223;
public static int mbridge_splash_ad_right_bottom_corner_en = 0x7f080224;
public static int mbridge_splash_ad_right_bottom_corner_zh = 0x7f080225;
public static int mbridge_splash_btn_arrow_right = 0x7f080226;
public static int mbridge_splash_btn_circle = 0x7f080227;
public static int mbridge_splash_btn_finger = 0x7f080228;
public static int mbridge_splash_btn_go = 0x7f080229;
public static int mbridge_splash_btn_light = 0x7f08022a;
public static int mbridge_splash_button_bg_gray = 0x7f08022b;
public static int mbridge_splash_button_bg_gray_55 = 0x7f08022c;
public static int mbridge_splash_button_bg_green = 0x7f08022d;
public static int mbridge_splash_close_bg = 0x7f08022e;
public static int mbridge_splash_m_circle = 0x7f08022f;
public static int mbridge_splash_notice = 0x7f080230;
public static int mbridge_splash_pop_ad = 0x7f080231;
public static int mbridge_splash_pop_ad_en = 0x7f080232;
public static int mbridge_splash_popview_close = 0x7f080233;
public static int mbridge_splash_popview_default = 0x7f080234;
public static int mbridge_video_common_full_star = 0x7f080235;
public static int mbridge_video_common_full_while_star = 0x7f080236;
public static int mbridge_video_common_half_star = 0x7f080237;
private drawable() {
}
}
public static final class id {
public static int mbridge_interstitial_pb = 0x7f0a0187;
public static int mbridge_progressBar1 = 0x7f0a01bd;
public static int mbridge_splash_feedback = 0x7f0a01d6;
public static int mbridge_splash_iv_foregroundimage = 0x7f0a01d7;
public static int mbridge_splash_iv_icon = 0x7f0a01d8;
public static int mbridge_splash_iv_image = 0x7f0a01d9;
public static int mbridge_splash_iv_image_bg = 0x7f0a01da;
public static int mbridge_splash_iv_link = 0x7f0a01db;
public static int mbridge_splash_landscape_foreground = 0x7f0a01dc;
public static int mbridge_splash_layout_appinfo = 0x7f0a01dd;
public static int mbridge_splash_layout_foreground = 0x7f0a01de;
public static int mbridge_splash_topcontroller = 0x7f0a01df;
public static int mbridge_splash_tv_adcircle = 0x7f0a01e0;
public static int mbridge_splash_tv_adrect = 0x7f0a01e1;
public static int mbridge_splash_tv_app_desc = 0x7f0a01e2;
public static int mbridge_splash_tv_appinfo = 0x7f0a01e3;
public static int mbridge_splash_tv_click = 0x7f0a01e4;
public static int mbridge_splash_tv_permission = 0x7f0a01e5;
public static int mbridge_splash_tv_privacy = 0x7f0a01e6;
public static int mbridge_splash_tv_skip = 0x7f0a01e7;
public static int mbridge_splash_tv_title = 0x7f0a01e8;
public static int mbridge_textView = 0x7f0a01ed;
public static int mbridge_video_common_alertview_cancel_button = 0x7f0a020d;
public static int mbridge_video_common_alertview_confirm_button = 0x7f0a020e;
public static int mbridge_video_common_alertview_contentview = 0x7f0a020f;
public static int mbridge_video_common_alertview_contentview_scrollview = 0x7f0a0210;
public static int mbridge_video_common_alertview_private_action_button = 0x7f0a0211;
public static int mbridge_video_common_alertview_titleview = 0x7f0a0212;
private id() {
}
}
public static final class layout {
public static int loading_alert = 0x7f0d0055;
public static int mbridge_cm_alertview = 0x7f0d0066;
public static int mbridge_cm_feedback_notice_layout = 0x7f0d0067;
public static int mbridge_cm_feedbackview = 0x7f0d0068;
public static int mbridge_cm_loading_layout = 0x7f0d0069;
public static int mbridge_splash_landscape = 0x7f0d0090;
public static int mbridge_splash_portrait = 0x7f0d0091;
private layout() {
}
}
public static final class string {
public static int campaign_appName = 0x7f120080;
public static int campaign_iconUrl = 0x7f120081;
public static int campaign_imageUrl = 0x7f120082;
public static int defaults = 0x7f1200b7;
public static int dyAction_getClick = 0x7f1200b8;
public static int dyAction_getLogicClick = 0x7f1200b9;
public static int dyAction_getLongClick = 0x7f1200ba;
public static int dyAction_getMove = 0x7f1200bb;
public static int dyAction_getWobble = 0x7f1200bc;
public static int dyEffect_getCountDown = 0x7f1200bd;
public static int dyEffect_getVisible = 0x7f1200be;
public static int dyEffect_getVisibleParam = 0x7f1200bf;
public static int dyEffect_getWobble = 0x7f1200c0;
public static int dyStrategy_feedback = 0x7f1200c1;
public static int dyStrategy_getActivity = 0x7f1200c2;
public static int dyStrategy_getClose = 0x7f1200c3;
public static int dyStrategy_getDeeplink = 0x7f1200c4;
public static int dyStrategy_getDownload = 0x7f1200c5;
public static int dyStrategy_notice = 0x7f1200c6;
public static int dyStrategy_permissionInfo = 0x7f1200c7;
public static int dyStrategy_privateAddress = 0x7f1200c8;
public static int mSplashData_setAdClickText = 0x7f120136;
public static int mSplashData_setAppInfo = 0x7f120137;
public static int mSplashData_setCountDownText = 0x7f120138;
public static int mSplashData_setLogoImage = 0x7f120139;
public static int mSplashData_setLogoText = 0x7f12013a;
public static int mSplashData_setNoticeImage = 0x7f12013b;
public static int mbridge_cm_feedback_btn_text = 0x7f12013c;
public static int mbridge_cm_feedback_dialog_close_close = 0x7f12013d;
public static int mbridge_cm_feedback_dialog_close_submit = 0x7f12013e;
public static int mbridge_cm_feedback_dialog_content_fraud = 0x7f12013f;
public static int mbridge_cm_feedback_dialog_content_misleading = 0x7f120140;
public static int mbridge_cm_feedback_dialog_content_not_play = 0x7f120141;
public static int mbridge_cm_feedback_dialog_content_other = 0x7f120142;
public static int mbridge_cm_feedback_dialog_content_por_violence = 0x7f120143;
public static int mbridge_cm_feedback_dialog_content_sound_problems = 0x7f120144;
public static int mbridge_cm_feedback_dialog_privacy_des = 0x7f120145;
public static int mbridge_cm_feedback_dialog_submit_notice = 0x7f120146;
public static int mbridge_cm_feedback_dialog_title = 0x7f120147;
public static int mbridge_reward_heat_count_unit = 0x7f12014d;
public static int mbridge_reward_viewed_text_str = 0x7f120152;
public static int mbridge_splash_count_time_can_skip = 0x7f120153;
public static int mbridge_splash_count_time_can_skip_not = 0x7f120154;
public static int mbridge_splash_count_time_can_skip_s = 0x7f120155;
private string() {
}
}
public static final class style {
public static int AppBaseTheme = 0x7f130005;
public static int MBridgeAppTheme = 0x7f1300ec;
public static int mbridge_common_activity_style = 0x7f1301f8;
public static int mbridge_transparent_common_activity_style = 0x7f1301fa;
public static int myDialog = 0x7f1301fc;
private style() {
}
}
public static final class styleable {
public static int[] RoundRectImageView = {com.ea.games.r3_row.R.attr.corner};
public static int RoundRectImageView_corner;
private styleable() {
}
}
private R() {
}
}

View File

@@ -0,0 +1,94 @@
package com.mbridge.msdk.splash.a;
import android.content.Context;
import com.fyber.inneractive.sdk.external.InneractiveMediationDefs;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.same.DomainNameUtils;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.foundation.tools.f;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class a {
public String e;
public String f;
public String g;
public String h;
public String i;
public String j;
public String k;
public String l;
public String m;
public String n;
public String o;
public int p;
public int q;
public String c = "android";
public String a = ab.m();
public String b = ab.w();
public String d = f.c();
public a(Context context) {
int m = ab.m(context);
this.e = String.valueOf(m);
this.f = ab.a(context, m);
this.g = ab.g(context);
this.h = com.mbridge.msdk.foundation.controller.c.m().b();
this.i = com.mbridge.msdk.foundation.controller.c.m().k();
this.j = String.valueOf(ak.f(context));
this.k = String.valueOf(ak.e(context));
this.m = String.valueOf(ak.d(context));
if (context.getResources().getConfiguration().orientation == 2) {
this.l = "landscape";
} else {
this.l = "portrait";
}
this.n = ab.n();
this.o = f.d();
this.p = f.a();
this.q = com.mbridge.msdk.foundation.controller.authoritycontroller.b.b() ? 1 : 0;
}
public final JSONObject a() {
JSONObject jSONObject = new JSONObject();
try {
if (com.mbridge.msdk.foundation.controller.authoritycontroller.c.j().c(MBridgeConstans.AUTHORITY_GENERAL_DATA)) {
jSONObject.put("device", this.a);
jSONObject.put("system_version", this.b);
jSONObject.put("network_type", this.e);
jSONObject.put("network_type_str", this.f);
jSONObject.put("device_ua", this.g);
jSONObject.put("has_wx", ab.v(com.mbridge.msdk.foundation.controller.c.m().c()));
jSONObject.put("integrated_wx", ab.z());
jSONObject.put("mnc", ab.l(com.mbridge.msdk.foundation.controller.c.m().c()));
jSONObject.put("mcc", ab.k(com.mbridge.msdk.foundation.controller.c.m().c()));
jSONObject.put("adid_limit", this.p);
jSONObject.put("adid_limit_dev", this.q);
}
jSONObject.put("plantform", this.c);
if (com.mbridge.msdk.foundation.controller.authoritycontroller.c.j().c(MBridgeConstans.AUTHORITY_DEVICE_ID)) {
jSONObject.put("google_ad_id", this.d);
jSONObject.put("az_aid_info", this.o);
}
jSONObject.put("appkey", this.h);
jSONObject.put("appId", this.i);
jSONObject.put("screen_width", this.j);
jSONObject.put("screen_height", this.k);
jSONObject.put("orientation", this.l);
jSONObject.put("scale", this.m);
if (ab.q() != 0) {
jSONObject.put("tun", ab.q());
}
jSONObject.put(InneractiveMediationDefs.GENDER_FEMALE, this.n);
if (DomainNameUtils.getInstance().isExcludeCNDomain()) {
jSONObject.put("re_domain", "1");
}
} catch (JSONException e) {
af.b("BaseDeviceInfo", e.getMessage());
}
return jSONObject;
}
}

View File

@@ -0,0 +1,131 @@
package com.mbridge.msdk.splash.a.a;
import android.text.TextUtils;
import com.ironsource.v8;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import java.util.Iterator;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class a {
private static final String a = "a";
public static CampaignEx a(String str, CampaignEx campaignEx) {
String str2;
String str3;
if (TextUtils.isEmpty(str)) {
return campaignEx;
}
if (TextUtils.isEmpty(str) && campaignEx == null) {
return null;
}
if (!str.contains("notice")) {
try {
JSONObject campaignToJsonObject = CampaignEx.campaignToJsonObject(campaignEx);
CampaignEx parseCampaignWithBackData = CampaignEx.parseCampaignWithBackData(campaignToJsonObject);
if (parseCampaignWithBackData == null) {
parseCampaignWithBackData = campaignEx;
}
if (!TextUtils.isEmpty(str)) {
String optString = campaignToJsonObject.optString("unitId");
if (!TextUtils.isEmpty(optString)) {
parseCampaignWithBackData.setCampaignUnitId(optString);
}
JSONObject optJSONObject = new JSONObject(str).optJSONObject(com.mbridge.msdk.foundation.same.a.j);
if (optJSONObject != null) {
String string = optJSONObject.getString(com.mbridge.msdk.foundation.same.a.h);
String string2 = optJSONObject.getString(com.mbridge.msdk.foundation.same.a.i);
if (TextUtils.isEmpty(string)) {
string = "-999";
}
int parseInt = Integer.parseInt(string);
if (TextUtils.isEmpty(string2)) {
string2 = "-999";
}
int parseInt2 = Integer.parseInt(string2);
str2 = parseInt != -999 ? String.valueOf(ak.a(c.m().c(), parseInt)) : "-999";
str3 = parseInt2 != -999 ? String.valueOf(ak.a(c.m().c(), parseInt2)) : "-999";
} else {
str2 = "-999";
str3 = str2;
}
parseCampaignWithBackData.setClickURL(com.mbridge.msdk.click.c.a(parseCampaignWithBackData.getClickURL(), str2, str3));
String noticeUrl = parseCampaignWithBackData.getNoticeUrl();
if (optJSONObject != null) {
Iterator<String> keys = optJSONObject.keys();
StringBuilder sb = new StringBuilder();
while (keys.hasNext()) {
sb.append(v8.i.c);
String next = keys.next();
String optString2 = optJSONObject.optString(next);
if (com.mbridge.msdk.foundation.same.a.h.equals(next) || com.mbridge.msdk.foundation.same.a.i.equals(next)) {
if (TextUtils.isEmpty(optString2)) {
optString2 = "-999";
}
int parseInt3 = Integer.parseInt(optString2);
optString2 = parseInt3 != -999 ? String.valueOf(ak.a(c.m().c(), parseInt3)) : "-999";
}
sb.append(next);
sb.append(v8.i.b);
sb.append(optString2);
}
parseCampaignWithBackData.setNoticeUrl(noticeUrl + ((Object) sb));
}
}
return parseCampaignWithBackData;
} catch (Throwable unused) {
return campaignEx;
}
}
try {
JSONObject campaignToJsonObject2 = CampaignEx.campaignToJsonObject(campaignEx);
JSONObject jSONObject = new JSONObject(str);
try {
if (!jSONObject.has(CampaignEx.JSON_KEY_DEEP_LINK_URL)) {
campaignToJsonObject2.put(CampaignEx.JSON_KEY_DEEP_LINK_URL, "");
}
} catch (Exception e) {
af.b(a, e.getMessage());
}
Iterator<String> keys2 = jSONObject.keys();
while (keys2.hasNext()) {
String next2 = keys2.next();
campaignToJsonObject2.put(next2, jSONObject.getString(next2));
}
CampaignEx parseCampaignWithBackData2 = CampaignEx.parseCampaignWithBackData(campaignToJsonObject2);
String optString3 = campaignToJsonObject2.optString("unitId");
if (!TextUtils.isEmpty(optString3)) {
parseCampaignWithBackData2.setCampaignUnitId(optString3);
}
return parseCampaignWithBackData2;
} catch (JSONException e2) {
af.b(a, e2.getMessage());
return campaignEx;
}
}
public static String a(int i, float f, float f2) {
JSONObject jSONObject = new JSONObject();
try {
JSONObject jSONObject2 = new JSONObject();
if (i == 4) {
jSONObject2.put(com.mbridge.msdk.foundation.same.a.h, -999);
jSONObject2.put(com.mbridge.msdk.foundation.same.a.i, -999);
} else {
jSONObject2.put(com.mbridge.msdk.foundation.same.a.h, ak.b(c.m().c(), f));
jSONObject2.put(com.mbridge.msdk.foundation.same.a.i, ak.b(c.m().c(), f2));
}
jSONObject2.put(com.mbridge.msdk.foundation.same.a.m, i);
jSONObject2.put(com.mbridge.msdk.foundation.same.a.k, c.m().c().getResources().getConfiguration().orientation);
jSONObject2.put(com.mbridge.msdk.foundation.same.a.l, ak.d(c.m().c()));
jSONObject.put(com.mbridge.msdk.foundation.same.a.j, jSONObject2);
} catch (Exception e) {
af.b(a, e.getMessage());
}
return jSONObject.toString();
}
}

View File

@@ -0,0 +1,10 @@
package com.mbridge.msdk.splash.a;
import android.content.Context;
/* loaded from: classes4.dex */
public final class b extends a {
public b(Context context) {
super(context);
}
}

View File

@@ -0,0 +1,179 @@
package com.mbridge.msdk.splash.a;
import com.mbridge.msdk.foundation.entity.CampaignEx;
/* loaded from: classes4.dex */
public final class c {
private String a;
private String b;
private CampaignEx c;
private String d;
private boolean e;
private int f;
private int g;
private int h;
private int i;
private int j;
private int k;
private int l;
private int m;
private int n;
public final String a() {
return this.a;
}
public final String b() {
return this.b;
}
public final CampaignEx c() {
return this.c;
}
public final boolean d() {
return this.e;
}
public final int e() {
return this.f;
}
public final int f() {
return this.g;
}
public final int g() {
return this.h;
}
public final int h() {
return this.i;
}
public final int i() {
return this.j;
}
public final int j() {
return this.k;
}
public final int k() {
return this.l;
}
public final int l() {
return this.n;
}
public final int m() {
return this.m;
}
public c(a aVar) {
this.g = 0;
this.h = 1;
this.i = 0;
this.j = 0;
this.k = 10;
this.l = 5;
this.m = 1;
this.a = aVar.a;
this.b = aVar.b;
this.c = aVar.c;
this.d = aVar.d;
this.e = aVar.e;
this.f = aVar.f;
this.g = aVar.g;
this.h = aVar.h;
this.i = aVar.i;
this.j = aVar.j;
this.k = aVar.k;
this.l = aVar.l;
this.n = aVar.n;
this.m = aVar.m;
}
public static class a {
private String a;
private String b;
private CampaignEx c;
private String d;
private boolean e;
private int f;
private int g = 0;
private int h = 1;
private int i = 0;
private int j = 0;
private int k = 10;
private int l = 5;
private int m = 1;
private int n;
public final a a(int i) {
this.f = i;
return this;
}
public final a a(CampaignEx campaignEx) {
this.c = campaignEx;
return this;
}
public final a a(String str) {
this.a = str;
return this;
}
public final a a(boolean z) {
this.e = z;
return this;
}
public final a b(int i) {
this.g = i;
return this;
}
public final a b(String str) {
this.b = str;
return this;
}
public final a c(int i) {
this.h = i;
return this;
}
public final a d(int i) {
this.i = i;
return this;
}
public final a e(int i) {
this.j = i;
return this;
}
public final a f(int i) {
this.k = i;
return this;
}
public final a g(int i) {
this.l = i;
return this;
}
public final a h(int i) {
this.n = i;
return this;
}
public final a i(int i) {
this.m = i;
return this;
}
}
}

View File

@@ -0,0 +1,10 @@
package com.mbridge.msdk.splash.b;
import android.view.View;
/* loaded from: classes4.dex */
public interface a {
void a(View view);
void a(String str);
}

View File

@@ -0,0 +1,57 @@
package com.mbridge.msdk.splash.c;
import android.content.Context;
import android.text.TextUtils;
import com.mbridge.msdk.foundation.tools.o;
import com.mbridge.msdk.splash.view.MBSplashNativeView;
import com.mbridge.msdk.splash.view.MBSplashView;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes4.dex */
public class a {
public void a(List<String> list, MBSplashView mBSplashView, com.mbridge.msdk.splash.a.c cVar, com.mbridge.msdk.splash.b.a aVar) {
}
public final void a(MBSplashView mBSplashView, com.mbridge.msdk.splash.a.c cVar, com.mbridge.msdk.splash.b.a aVar) {
Context context = mBSplashView.getContext();
if (context == null) {
context = com.mbridge.msdk.foundation.controller.c.m().c();
}
if (cVar == null && aVar != null) {
aVar.a("The render parameters is unavailable.");
return;
}
String a = (cVar == null || cVar.c() == null) ? "" : o.a(cVar.c().getAdZip());
if (!TextUtils.isEmpty(a)) {
if (cVar == null || cVar.c() == null) {
return;
}
if (!TextUtils.isEmpty(cVar.c().getAdZip())) {
try {
ArrayList arrayList = new ArrayList();
arrayList.add(a);
a(arrayList, mBSplashView, cVar, aVar);
return;
} catch (Exception unused) {
}
}
a(context, mBSplashView, cVar, aVar);
return;
}
a(context, mBSplashView, cVar, aVar);
}
public final void a(Context context, MBSplashView mBSplashView, com.mbridge.msdk.splash.a.c cVar, com.mbridge.msdk.splash.b.a aVar) {
try {
MBSplashNativeView mBSplashNativeView = new MBSplashNativeView(context, mBSplashView, cVar);
if (aVar != null) {
aVar.a(mBSplashNativeView);
}
} catch (Throwable unused) {
if (aVar != null) {
aVar.a("View render error.");
}
}
}
}

View File

@@ -0,0 +1,781 @@
package com.mbridge.msdk.splash.c;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.BitmapDrawable;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import android.util.Base64;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.iab.omid.library.mmadbridge.adsession.AdEvents;
import com.iab.omid.library.mmadbridge.adsession.AdSession;
import com.mbridge.msdk.click.i;
import com.mbridge.msdk.foundation.db.j;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.entity.n;
import com.mbridge.msdk.foundation.same.report.h;
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.x;
import com.mbridge.msdk.out.Campaign;
import com.mbridge.msdk.out.MBridgeIds;
import com.mbridge.msdk.splash.view.MBSplashView;
import com.mbridge.msdk.splash.view.MBSplashWebview;
import com.mbridge.msdk.widget.FeedBackButton;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class b {
protected MBSplashView b;
protected com.mbridge.msdk.splash.d.d c;
protected com.mbridge.msdk.click.a d;
protected String e;
protected MBridgeIds f;
protected String h;
protected String i;
protected String j;
protected String k;
protected boolean l;
protected Context m;
private CampaignEx q;
private boolean r;
private TextView s;
private View t;
private String u;
private boolean v;
private ImageView w;
private a x;
protected final String a = "SplashShowManager";
protected int g = 5;
protected boolean n = true;
private View.OnClickListener y = new View.OnClickListener() { // from class: com.mbridge.msdk.splash.c.b.1
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (b.this.r) {
b.this.b(1);
b.a(b.this, -1);
}
}
};
public Handler o = new Handler(Looper.getMainLooper()) { // from class: com.mbridge.msdk.splash.c.b.2
@Override // android.os.Handler
public final void handleMessage(@NonNull Message message) {
MBSplashView mBSplashView;
MBSplashWebview splashWebview;
super.handleMessage(message);
int i = message.what;
if (i != 1) {
if (i != 2 || b.this.q == null || !b.this.q.isActiveOm() || (mBSplashView = b.this.b) == null || (splashWebview = mBSplashView.getSplashWebview()) == null) {
return;
}
try {
AdSession adSession = splashWebview.getAdSession();
if (adSession != null) {
AdEvents createAdEvents = AdEvents.createAdEvents(adSession);
createAdEvents.loaded();
createAdEvents.impressionOccurred();
}
af.a("OMSDK", "adSession.impressionOccurred()");
return;
} catch (Throwable th) {
af.a("OMSDK", th.getMessage());
if (b.this.q != null) {
String requestId = b.this.q.getRequestId();
String requestIdNotice = b.this.q.getRequestIdNotice();
String id = b.this.q.getId();
new h(splashWebview.getContext()).a(requestId, requestIdNotice, id, b.this.e, "fetch OM failed, exception" + th.getMessage());
return;
}
return;
}
}
if (!b.this.v) {
b.this.f();
}
b bVar = b.this;
if (bVar.g > 0) {
if (!com.mbridge.msdk.foundation.d.b.c) {
b bVar2 = b.this;
if (!bVar2.l) {
int i2 = bVar2.g - 1;
bVar2.g = i2;
b.a(bVar2, i2);
b bVar3 = b.this;
if (!bVar3.n) {
bVar3.c();
}
b.this.o.removeMessages(1);
sendEmptyMessageDelayed(1, 1000L);
return;
}
}
b.this.d();
b.this.o.removeMessages(1);
sendEmptyMessageDelayed(1, 1000L);
return;
}
bVar.b(2);
}
};
protected i p = new i() { // from class: com.mbridge.msdk.splash.c.b.4
@Override // com.mbridge.msdk.out.BaseTrackingListener
public final void onStartRedirection(Campaign campaign, String str) {
aj.b(campaign, b.this.b);
}
@Override // com.mbridge.msdk.out.BaseTrackingListener
public final void onFinishRedirection(Campaign campaign, String str) {
if (campaign == null) {
return;
}
aj.a(campaign, b.this.b);
}
@Override // com.mbridge.msdk.out.BaseTrackingListener
public final void onRedirectionFailed(Campaign campaign, String str) {
if (campaign == null) {
return;
}
aj.a(campaign, b.this.b);
}
};
public final void a(int i) {
this.g = i;
}
public void a(CampaignEx campaignEx, boolean z, String str) {
}
public final void a(com.mbridge.msdk.splash.d.d dVar) {
this.c = dVar;
}
public final void a(boolean z) {
this.r = z;
if (z) {
this.h = this.i;
} else {
this.h = this.k;
}
}
public b(Context context, String str, String str2) {
this.h = "点击跳过|";
this.i = "点击跳过|";
this.j = "";
this.k = "秒后自动关闭";
this.e = str2;
this.u = str;
this.f = new MBridgeIds(str, str2);
this.m = context;
if (this.s == null) {
TextView textView = new TextView(context);
this.s = textView;
textView.setGravity(1);
this.s.setTextIsSelectable(false);
this.s.setPadding(ak.a(context, 5.0f), ak.a(context, 5.0f), ak.a(context, 5.0f), ak.a(context, 5.0f));
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.s.getLayoutParams();
this.s.setLayoutParams(layoutParams == null ? new RelativeLayout.LayoutParams(ak.a(context, 100.0f), ak.a(context, 50.0f)) : layoutParams);
Context c = com.mbridge.msdk.foundation.controller.c.m().c();
if (c != null) {
String g = com.mbridge.msdk.foundation.controller.c.m().g();
int identifier = c.getResources().getIdentifier("mbridge_splash_count_time_can_skip", "string", g);
int identifier2 = c.getResources().getIdentifier("mbridge_splash_count_time_can_skip_not", "string", g);
int identifier3 = c.getResources().getIdentifier("mbridge_splash_count_time_can_skip_s", "string", g);
this.i = c.getResources().getString(identifier);
String string = c.getResources().getString(identifier2);
this.k = string;
this.h = string;
this.j = c.getResources().getString(identifier3);
this.s.setBackgroundResource(c.getResources().getIdentifier("mbridge_splash_close_bg", "drawable", com.mbridge.msdk.foundation.controller.c.m().g()));
this.s.setTextColor(c.getResources().getColor(c.getResources().getIdentifier("mbridge_splash_count_time_skip_text_color", "color", g)));
}
}
}
public final void a(ViewGroup viewGroup) {
if (viewGroup != null) {
viewGroup.setOnClickListener(this.y);
}
this.t = viewGroup;
}
public class a implements com.mbridge.msdk.splash.d.a {
private a() {
}
@Override // com.mbridge.msdk.splash.d.a
public final void a(int i) {
MBSplashView mBSplashView = b.this.b;
if (mBSplashView != null) {
mBSplashView.changeCloseBtnState(i);
}
}
@Override // com.mbridge.msdk.splash.d.a
public final void a(Object obj, String str) {
b.this.b(1);
}
@Override // com.mbridge.msdk.splash.d.a
public final void a(CampaignEx campaignEx) {
b.this.a(campaignEx, false, "");
}
@Override // com.mbridge.msdk.splash.d.a
public final void b(int i) {
af.b("SplashShowManager", "resetCountdown" + i);
b bVar = b.this;
bVar.g = i;
bVar.o.removeMessages(1);
b.this.o.sendEmptyMessageDelayed(1, 1000L);
}
@Override // com.mbridge.msdk.splash.d.a
public final void a() {
b.this.b(1);
}
@Override // com.mbridge.msdk.splash.d.a
public final void a(boolean z) {
if (z) {
b.this.o.removeMessages(1);
}
}
@Override // com.mbridge.msdk.splash.d.a
public final void a(boolean z, String str) {
try {
if (b.this.c != null) {
if (TextUtils.isEmpty(str)) {
b bVar = b.this;
bVar.c.b(bVar.f);
} else {
CampaignEx parseCampaignWithBackData = CampaignEx.parseCampaignWithBackData(CampaignEx.campaignToJsonObject(b.this.q));
parseCampaignWithBackData.setClickURL(str);
b.this.a(parseCampaignWithBackData, true, str);
}
}
} catch (Exception e) {
af.b("SplashShowManager", e.getMessage());
}
}
@Override // com.mbridge.msdk.splash.d.a
public final void a(int i, int i2) {
if (i == 1) {
b.this.o.removeMessages(1);
}
if (i == 2) {
b bVar = b.this;
bVar.g = i2;
bVar.o.removeMessages(1);
b.this.o.sendEmptyMessageDelayed(1, 1000L);
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void a(CampaignEx campaignEx, MBSplashView mBSplashView) {
MBSplashView mBSplashView2;
MBSplashView mBSplashView3;
Context context;
MBSplashWebview splashWebview;
a(this.r);
this.q = campaignEx;
this.b = mBSplashView;
com.mbridge.msdk.splash.signal.c splashSignalCommunicationImpl = mBSplashView.getSplashSignalCommunicationImpl();
if (splashSignalCommunicationImpl == null) {
splashSignalCommunicationImpl = new com.mbridge.msdk.splash.signal.c(mBSplashView.getContext(), this.u, this.e);
ArrayList arrayList = new ArrayList();
arrayList.add(campaignEx);
splashSignalCommunicationImpl.a(arrayList);
}
splashSignalCommunicationImpl.b(this.g);
splashSignalCommunicationImpl.a(this.r ? 1 : 0);
RelativeLayout.LayoutParams layoutParams = null;
Object[] objArr = 0;
if (this.x == null) {
this.x = new a();
}
splashSignalCommunicationImpl.a(this.x);
mBSplashView.setSplashSignalCommunicationImpl(splashSignalCommunicationImpl);
boolean isHasMBTplMark = campaignEx.isHasMBTplMark();
View view = this.t;
if (view == null) {
if (isHasMBTplMark) {
this.s.setVisibility(8);
}
g();
a(this.s);
mBSplashView.setCloseView(this.s);
} else {
if (isHasMBTplMark) {
view.setVisibility(8);
}
a(this.t);
mBSplashView.setCloseView(this.t);
}
mBSplashView.show();
CampaignEx campaignEx2 = this.q;
if (campaignEx2 != null && campaignEx2.isActiveOm() && (splashWebview = mBSplashView.getSplashWebview()) != null) {
try {
AdSession a2 = com.mbridge.msdk.a.b.a(com.mbridge.msdk.foundation.controller.c.m().c(), splashWebview, splashWebview.getUrl(), this.q);
if (a2 != null) {
splashWebview.setAdSession(a2);
a2.registerAdView(splashWebview);
a2.start();
}
af.a("OMSDK", "adSession.start()");
} catch (Throwable th) {
af.a("OMSDK", th.getMessage());
CampaignEx campaignEx3 = this.q;
if (campaignEx3 != null) {
String requestId = campaignEx3.getRequestId();
String requestIdNotice = this.q.getRequestIdNotice();
String id = this.q.getId();
new h(splashWebview.getContext()).a(requestId, requestIdNotice, id, this.e, "fetch OM failed, exception" + th.getMessage());
}
}
}
d.a(this.e);
this.o.removeMessages(1);
this.o.sendEmptyMessageDelayed(1, 1000L);
this.o.sendEmptyMessageDelayed(2, 1000L);
CampaignEx campaignEx4 = this.q;
if (campaignEx4 != null && campaignEx4.getPrivacyButtonTemplateVisibility() == 1 && (mBSplashView3 = this.b) != null && mBSplashView3.getSplashWebview() != null && !this.b.isDynamicView() && this.q.isMraid() && (context = this.b.getContext()) != null) {
try {
int a3 = x.a(context, "mbridge_splash_notice", "drawable");
int a4 = ak.a(context, 35.0f);
int a5 = ak.a(context, 9.0f);
ImageView imageView = new ImageView(context);
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(a4, a4);
layoutParams2.addRule(9);
layoutParams2.addRule(10);
layoutParams2.setMargins(a5, a5, a5, a5);
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setBackgroundResource(a3);
ak.a(3, imageView, this.q, context, true, new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.splash.c.b.7
@Override // com.mbridge.msdk.foundation.d.a
public final void showed() {
b.this.d();
}
@Override // com.mbridge.msdk.foundation.d.a
public final void close() {
b.this.c();
}
@Override // com.mbridge.msdk.foundation.d.a
public final void summit(String str) {
b.this.c();
}
});
this.b.addView(imageView);
} catch (Throwable th2) {
af.b("SplashShowManager", th2.getMessage());
}
}
if (!this.q.isMraid()) {
CampaignEx campaignEx5 = this.q;
if (campaignEx5 != null) {
campaignEx5.setCampaignUnitId(this.e);
com.mbridge.msdk.foundation.d.b.a().a(this.e, 3);
com.mbridge.msdk.foundation.d.b.a().a(this.e, this.q);
}
if (com.mbridge.msdk.foundation.d.b.a().b() && ((mBSplashView2 = this.b) == null || !mBSplashView2.isDynamicView())) {
com.mbridge.msdk.foundation.d.b.a().a(this.e, new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.splash.c.b.3
@Override // com.mbridge.msdk.foundation.d.a
public final void showed() {
String str;
b.this.d();
try {
JSONObject jSONObject = new JSONObject();
if (com.mbridge.msdk.foundation.controller.c.m().c() != null) {
jSONObject.put("status", 1);
}
str = jSONObject.toString();
} catch (Throwable th3) {
af.b("SplashShowManager", th3.getMessage(), th3);
str = "";
}
com.mbridge.msdk.mbsignalcommon.windvane.g.a().a((WebView) b.this.b.getSplashWebview(), "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2));
}
@Override // com.mbridge.msdk.foundation.d.a
public final void close() {
String str;
b.this.c();
try {
JSONObject jSONObject = new JSONObject();
if (com.mbridge.msdk.foundation.controller.c.m().c() != null) {
jSONObject.put("status", 2);
}
str = jSONObject.toString();
} catch (Throwable th3) {
af.b("SplashShowManager", th3.getMessage(), th3);
str = "";
}
com.mbridge.msdk.mbsignalcommon.windvane.g.a().a((WebView) b.this.b.getSplashWebview(), "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2));
}
@Override // com.mbridge.msdk.foundation.d.a
public final void summit(String str) {
String str2;
b.this.c();
try {
JSONObject jSONObject = new JSONObject();
if (com.mbridge.msdk.foundation.controller.c.m().c() != null) {
jSONObject.put("status", 2);
}
str2 = jSONObject.toString();
} catch (Throwable th3) {
af.b("SplashShowManager", th3.getMessage(), th3);
str2 = "";
}
com.mbridge.msdk.mbsignalcommon.windvane.g.a().a((WebView) b.this.b.getSplashWebview(), "onFeedbackAlertStatusNotify", Base64.encodeToString(str2.getBytes(), 2));
}
});
FeedBackButton b = com.mbridge.msdk.foundation.d.b.a().b(this.e);
if (b != null) {
try {
layoutParams = (RelativeLayout.LayoutParams) b.getLayoutParams();
} catch (Exception e) {
e.printStackTrace();
}
if (layoutParams == null) {
layoutParams = new RelativeLayout.LayoutParams(com.mbridge.msdk.foundation.d.b.b, com.mbridge.msdk.foundation.d.b.a);
}
layoutParams.topMargin = ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 10.0f);
layoutParams.leftMargin = ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 10.0f);
ViewGroup viewGroup = (ViewGroup) b.getParent();
if (viewGroup != null) {
viewGroup.removeView(b);
}
MBSplashView mBSplashView4 = this.b;
if (mBSplashView4 != null) {
mBSplashView4.addView(b, layoutParams);
}
}
}
}
com.mbridge.msdk.click.c.a(com.mbridge.msdk.foundation.controller.c.m().c(), this.q.getMaitve(), this.q.getMaitve_src());
try {
BitmapDrawable a6 = com.mbridge.msdk.foundation.controller.c.m().a(this.e, this.q.getAdType());
if (a6 != null) {
if (this.w == null) {
this.w = new ImageView(com.mbridge.msdk.foundation.controller.c.m().c());
}
if (this.w.getVisibility() != 0) {
this.w.setVisibility(0);
}
ak.a(this.w, a6, mBSplashView.getResources().getDisplayMetrics());
if (this.w.getParent() == null) {
mBSplashView.addView(this.w, new ViewGroup.LayoutParams(-1, -1));
}
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
public final String a() {
CampaignEx campaignEx = this.q;
return (campaignEx == null || campaignEx.getRequestId() == null) ? "" : this.q.getRequestId();
}
public final String b() {
ArrayList arrayList = new ArrayList();
CampaignEx campaignEx = this.q;
if (campaignEx != null) {
arrayList.add(campaignEx);
}
return com.mbridge.msdk.foundation.same.c.a(arrayList);
}
/* JADX INFO: Access modifiers changed from: private */
public synchronized void f() {
MBSplashView mBSplashView;
if (this.q == null) {
return;
}
this.v = true;
if (this.c != null && (mBSplashView = this.b) != null) {
if (mBSplashView.getContext() != null && (this.b.getContext() instanceof Activity) && ((Activity) this.b.getContext()).isFinishing()) {
this.c.a(this.f, "Activity is finishing");
return;
} else if (this.b.isShown()) {
this.c.a(this.f);
} else {
this.c.a(this.f, "SplashView or container is not visibility");
}
}
if (!this.q.isReport()) {
MBSplashView mBSplashView2 = this.b;
if (mBSplashView2 != null && !mBSplashView2.isDynamicView()) {
CampaignEx campaignEx = this.q;
if (!campaignEx.isHasMBTplMark()) {
c(campaignEx, com.mbridge.msdk.foundation.controller.c.m().c(), this.e);
campaignEx.setReport(true);
com.mbridge.msdk.foundation.same.a.b.a(this.e, campaignEx, "splash");
b(campaignEx, com.mbridge.msdk.foundation.controller.c.m().c(), this.e);
a(campaignEx, com.mbridge.msdk.foundation.controller.c.m().c(), this.e);
}
} else {
CampaignEx campaignEx2 = this.q;
b(campaignEx2, com.mbridge.msdk.foundation.controller.c.m().c(), this.e);
c(campaignEx2, com.mbridge.msdk.foundation.controller.c.m().c(), this.e);
a(campaignEx2, com.mbridge.msdk.foundation.controller.c.m().c(), this.e);
campaignEx2.setReport(true);
com.mbridge.msdk.foundation.same.a.b.a(this.e, campaignEx2, "splash");
}
Context c = com.mbridge.msdk.foundation.controller.c.m().c();
CampaignEx campaignEx3 = this.q;
String str = this.e;
if (campaignEx3 != null) {
try {
if (campaignEx3.isMraid()) {
n nVar = new n();
nVar.f(campaignEx3.getRequestId());
nVar.g(campaignEx3.getRequestIdNotice());
nVar.e(campaignEx3.getId());
nVar.d(campaignEx3.isMraid() ? n.a : n.b);
com.mbridge.msdk.foundation.same.report.g.d(nVar, c.getApplicationContext(), str);
}
} catch (Exception e) {
af.b("SplashReport", e.getMessage());
}
}
}
}
public final void b(CampaignEx campaignEx, boolean z, String str) {
if (this.d == null) {
com.mbridge.msdk.click.a aVar = new com.mbridge.msdk.click.a(com.mbridge.msdk.foundation.controller.c.m().c(), this.e);
this.d = aVar;
aVar.a(this.p);
}
campaignEx.setCampaignUnitId(this.e);
this.d.a(campaignEx);
if (!this.q.isReportClick()) {
this.q.setReportClick(true);
com.mbridge.msdk.splash.e.a.a(com.mbridge.msdk.foundation.controller.c.m().c(), campaignEx);
}
com.mbridge.msdk.splash.d.d dVar = this.c;
if (dVar != null) {
dVar.b(this.f);
b(3);
}
if (!z || TextUtils.isEmpty(str)) {
return;
}
String str2 = this.e;
try {
if (TextUtils.isEmpty(str) || !campaignEx.isMraid()) {
return;
}
new h(com.mbridge.msdk.foundation.controller.c.m().c()).a(campaignEx.getRequestId(), campaignEx.getRequestIdNotice(), campaignEx.getId(), str2, str, campaignEx.isBidCampaign());
} catch (Exception e) {
af.b("SplashReport", e.getMessage());
}
}
private void g() {
String str;
if (this.r) {
str = this.i + this.g + this.j;
} else {
str = this.g + this.k;
}
this.s.setText(str);
}
private void a(View view) {
if (view != null) {
view.setOnClickListener(this.y);
}
}
public final void b(final int i) {
CampaignEx campaignEx;
MBSplashWebview splashWebview;
MBSplashView mBSplashView = this.b;
if (mBSplashView != null && (splashWebview = mBSplashView.getSplashWebview()) != null) {
splashWebview.finishAdSession();
}
if (this.o != null && (campaignEx = this.q) != null && campaignEx.isActiveOm()) {
this.o.postDelayed(new Runnable() { // from class: com.mbridge.msdk.splash.c.b.5
@Override // java.lang.Runnable
public final void run() {
b.this.c(i);
}
}, 1500L);
} else {
c(i);
}
}
/* JADX INFO: Access modifiers changed from: private */
public void c(int i) {
MBSplashView mBSplashView;
try {
com.mbridge.msdk.splash.d.d dVar = this.c;
if (dVar != null) {
dVar.a(this.f, i);
this.c = null;
com.mbridge.msdk.splash.e.a.a(this.e, this.q);
}
ImageView imageView = this.w;
if (imageView != null && imageView.getParent() != null && (mBSplashView = this.b) != null) {
mBSplashView.removeView(this.w);
this.w.setVisibility(8);
}
this.v = false;
com.mbridge.msdk.splash.e.a.a(this.e, i, this.q);
Handler handler = this.o;
if (handler != null) {
handler.removeCallbacksAndMessages(null);
}
} catch (Exception e) {
af.b("SplashShowManager", e.getMessage());
}
}
private void a(CampaignEx campaignEx, Context context, String str) {
if (campaignEx != null) {
try {
List<String> pv_urls = campaignEx.getPv_urls();
if (pv_urls == null || pv_urls.size() <= 0) {
return;
}
Iterator<String> it = pv_urls.iterator();
while (it.hasNext()) {
com.mbridge.msdk.click.a.a(context, campaignEx, str, it.next(), false, true);
}
} catch (Throwable th) {
af.b("SplashShowManager", th.getMessage());
}
}
}
private void b(CampaignEx campaignEx, Context context, String str) {
if (campaignEx != null) {
try {
if (TextUtils.isEmpty(campaignEx.getOnlyImpressionURL())) {
return;
}
com.mbridge.msdk.click.a.a(context, campaignEx, str, campaignEx.getOnlyImpressionURL(), false, true, com.mbridge.msdk.click.a.a.h);
} catch (Throwable th) {
af.b("SplashShowManager", th.getMessage());
}
}
}
private void c(final CampaignEx campaignEx, final Context context, String str) {
com.mbridge.msdk.foundation.controller.c.m().a(context);
if (!TextUtils.isEmpty(campaignEx.getImpressionURL())) {
new Thread(new Runnable() { // from class: com.mbridge.msdk.splash.c.b.6
@Override // java.lang.Runnable
public final void run() {
try {
j.a(com.mbridge.msdk.foundation.db.g.a(context)).a(campaignEx.getId());
} catch (Exception unused) {
af.b("SplashShowManager", "campain can't insert db");
}
}
}).start();
com.mbridge.msdk.click.a.a(context, campaignEx, str, campaignEx.getImpressionURL(), false, true, com.mbridge.msdk.click.a.a.g);
}
if (TextUtils.isEmpty(str) || campaignEx.getNativeVideoTracking() == null || campaignEx.getNativeVideoTracking().p() == null) {
return;
}
com.mbridge.msdk.click.a.a(context, campaignEx, str, campaignEx.getNativeVideoTracking().p(), false, false);
}
public final void c() {
MBSplashView mBSplashView;
Handler handler;
this.n = true;
if (this.b != null && this.g > 0 && (handler = this.o) != null) {
handler.removeMessages(1);
this.o.sendEmptyMessageDelayed(1, 1000L);
}
if (com.mbridge.msdk.foundation.d.b.c || (mBSplashView = this.b) == null) {
return;
}
mBSplashView.onResume();
MBSplashWebview splashWebview = this.b.getSplashWebview();
if (splashWebview == null || splashWebview.isDestoryed()) {
return;
}
com.mbridge.msdk.splash.signal.d.a(splashWebview, "onSystemPause", "");
}
public final void d() {
Handler handler;
this.n = false;
if (this.b != null && this.g > 0 && (handler = this.o) != null) {
handler.removeMessages(1);
}
MBSplashView mBSplashView = this.b;
if (mBSplashView != null) {
mBSplashView.onPause();
MBSplashWebview splashWebview = this.b.getSplashWebview();
if (splashWebview == null || splashWebview.isDestoryed()) {
return;
}
com.mbridge.msdk.splash.signal.d.a(splashWebview, "onSystemPause", "");
}
}
public final void e() {
if (this.c != null) {
this.c = null;
}
if (this.x != null) {
this.x = null;
}
if (this.y != null) {
this.y = null;
}
MBSplashView mBSplashView = this.b;
if (mBSplashView != null) {
mBSplashView.destroy();
}
com.mbridge.msdk.foundation.d.b.a().c(this.e);
}
public static /* synthetic */ void a(b bVar, int i) {
MBSplashView mBSplashView = bVar.b;
if (mBSplashView != null) {
mBSplashView.updateCountdown(i);
if (bVar.b.getSplashSignalCommunicationImpl() != null) {
bVar.b.getSplashSignalCommunicationImpl().c(i);
}
}
if (i < 0) {
bVar.g = i;
return;
}
com.mbridge.msdk.splash.d.d dVar = bVar.c;
if (dVar != null) {
dVar.a(bVar.f, i * 1000);
}
if (bVar.t == null) {
bVar.g();
}
}
}

View File

@@ -0,0 +1,197 @@
package com.mbridge.msdk.splash.c;
import android.content.Context;
import android.view.View;
import com.mbridge.msdk.c.h;
import com.mbridge.msdk.dycreator.binding.response.SplashResData;
import com.mbridge.msdk.dycreator.binding.response.base.BaseRespData;
import com.mbridge.msdk.dycreator.bridge.MBSplashData;
import com.mbridge.msdk.dycreator.listener.DyCountDownListener;
import com.mbridge.msdk.dycreator.listener.action.EAction;
import com.mbridge.msdk.dycreator.wrapper.DyAdType;
import com.mbridge.msdk.dycreator.wrapper.DyOption;
import com.mbridge.msdk.dycreator.wrapper.DynamicViewBackListener;
import com.mbridge.msdk.dycreator.wrapper.DynamicViewCreator;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.splash.view.MBSplashView;
import java.util.List;
/* loaded from: classes4.dex */
final class c extends com.mbridge.msdk.splash.c.a {
public static class a {
private static final c a = new c();
}
private c() {
}
@Override // com.mbridge.msdk.splash.c.a
public final void a(List<String> list, final MBSplashView mBSplashView, final com.mbridge.msdk.splash.a.c cVar, final com.mbridge.msdk.splash.b.a aVar) {
h.a().b(com.mbridge.msdk.foundation.controller.c.m().k());
final DyOption build = new DyOption.Builder().campaignEx(cVar.c()).fileDirs(list).dyAdType(DyAdType.SPLASH).canSkip(cVar.d()).isScreenClick(cVar.g() == 1).isClickButtonVisible(cVar.f() == 0).isShakeVisible(cVar.i() == 1).isApkInfoVisible(cVar.h() == 0).isLogoVisible(cVar.m() == 1).shakeStrenght(cVar.j()).shakeTime(cVar.k()).orientation(cVar.l()).countDownTime(cVar.e()).adChoiceLink(ak.a(cVar.c())).build();
mBSplashView.setDyCountDownListener(new DyCountDownListener() { // from class: com.mbridge.msdk.splash.c.c.1
@Override // com.mbridge.msdk.dycreator.listener.DyCountDownListener
public final void getCountDownValue(int i) {
build.setDyCountDownListener(i);
}
});
DynamicViewCreator.getInstance().createDynamicView(build, new DynamicViewBackListener() { // from class: com.mbridge.msdk.splash.c.c.2
@Override // com.mbridge.msdk.dycreator.wrapper.DynamicViewBackListener
public final void viewCreatedSuccess(View view) {
com.mbridge.msdk.splash.b.a aVar2 = aVar;
if (aVar2 != null) {
if (view != null) {
aVar2.a(view);
} else {
aVar2.a("View render error.");
}
}
}
@Override // com.mbridge.msdk.dycreator.wrapper.DynamicViewBackListener
public final void viewCreateFail(com.mbridge.msdk.dycreator.b.a aVar2) {
MBSplashView mBSplashView2 = mBSplashView;
if (mBSplashView2 != null) {
Context context = mBSplashView2.getContext();
if (context == null) {
context = com.mbridge.msdk.foundation.controller.c.m().c();
}
c.this.a(context, mBSplashView, cVar, aVar);
}
}
@Override // com.mbridge.msdk.dycreator.wrapper.DynamicViewBackListener
public final void viewClicked(BaseRespData baseRespData) {
float f;
float f2;
com.mbridge.msdk.splash.signal.c splashSignalCommunicationImpl;
MBSplashView mBSplashView2 = mBSplashView;
final com.mbridge.msdk.splash.d.a a2 = (mBSplashView2 == null || (splashSignalCommunicationImpl = mBSplashView2.getSplashSignalCommunicationImpl()) == null) ? null : splashSignalCommunicationImpl.a();
DyOption dyOption = build;
CampaignEx campaignEx = dyOption != null ? dyOption.getCampaignEx() : null;
EAction eAction = baseRespData instanceof SplashResData ? ((SplashResData) baseRespData).geteAction() : null;
if (eAction != null) {
int i = AnonymousClass3.a[eAction.ordinal()];
if (i == 1) {
if (a2 != null) {
if (baseRespData != null) {
if (baseRespData instanceof SplashResData) {
SplashResData splashResData = (SplashResData) baseRespData;
if (splashResData.getBaseViewData() != null) {
com.mbridge.msdk.dycreator.f.a.a baseViewData = splashResData.getBaseViewData();
if (baseViewData == null || !(baseViewData instanceof MBSplashData)) {
f = 0.0f;
f2 = 0.0f;
} else {
MBSplashData mBSplashData = (MBSplashData) baseViewData;
f = mBSplashData.getxInScreen();
float f3 = mBSplashData.getyInScreen();
r3 = mBSplashData.getClickType();
f2 = f3;
}
try {
a2.a(com.mbridge.msdk.splash.a.a.a.a(com.mbridge.msdk.splash.a.a.a.a(r3, f, f2), campaignEx));
return;
} catch (Throwable th) {
th.printStackTrace();
a2.a(campaignEx);
return;
}
}
return;
}
return;
}
a2.a(campaignEx);
return;
}
return;
}
if (i == 2) {
if (a2 != null) {
a2.a();
return;
}
return;
}
if (i == 3) {
if (build != null) {
com.mbridge.msdk.click.c.f(com.mbridge.msdk.foundation.controller.c.m().c(), build.getAdChoiceLink());
return;
}
return;
}
if (i == 4 && baseRespData != null && (baseRespData instanceof SplashResData)) {
SplashResData splashResData2 = (SplashResData) baseRespData;
if (splashResData2.getBaseViewData() != null) {
com.mbridge.msdk.dycreator.f.a.a baseViewData2 = splashResData2.getBaseViewData();
final c cVar2 = c.this;
if (campaignEx != null) {
String campaignUnitId = campaignEx.getCampaignUnitId();
String requestId = campaignEx.getRequestId();
r3 = baseViewData2 != null ? baseViewData2.getEffectData().getCurrentCountDown() : 0;
a2.a(1, r3);
com.mbridge.msdk.foundation.d.a.a a3 = com.mbridge.msdk.foundation.d.b.a().a(campaignUnitId + "_" + requestId);
if (a3 != null) {
a3.a(campaignEx);
com.mbridge.msdk.foundation.d.b.a().a(campaignUnitId + "_" + requestId, new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.splash.c.a.1
final /* synthetic */ com.mbridge.msdk.splash.d.a a;
final /* synthetic */ int b;
@Override // com.mbridge.msdk.foundation.d.a
public final void showed() {
}
public AnonymousClass1(final com.mbridge.msdk.splash.d.a a22, final int i2) {
r2 = a22;
r3 = i2;
}
@Override // com.mbridge.msdk.foundation.d.a
public final void close() {
r2.a(2, r3);
}
@Override // com.mbridge.msdk.foundation.d.a
public final void summit(String str) {
r2.a(2, r3);
}
});
a3.e();
}
}
}
}
}
}
});
}
/* renamed from: com.mbridge.msdk.splash.c.c$3, reason: invalid class name */
public static /* synthetic */ class AnonymousClass3 {
static final /* synthetic */ int[] a;
static {
int[] iArr = new int[EAction.values().length];
a = iArr;
try {
iArr[EAction.DOWNLOAD.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[EAction.CLOSE.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[EAction.NOTICE.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[EAction.FEEDBACK.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
}
}
}

View File

@@ -0,0 +1,253 @@
package com.mbridge.msdk.splash.c;
import android.graphics.Bitmap;
import android.text.TextUtils;
import com.mbridge.msdk.c.h;
import com.mbridge.msdk.c.i;
import com.mbridge.msdk.foundation.download.download.H5DownLoadManager;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.splash.c.g;
import com.mbridge.msdk.splash.view.MBSplashView;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
/* loaded from: classes4.dex */
public final class d {
public static com.mbridge.msdk.foundation.db.e a = com.mbridge.msdk.foundation.db.e.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
private static String b = "ResManager";
private static int c = 1;
public static CampaignEx a(MBSplashView mBSplashView, String str, String str2, String str3, boolean z, int i, boolean z2, boolean z3) {
if (a == null) {
a = com.mbridge.msdk.foundation.db.e.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
}
com.mbridge.msdk.c.g b2 = h.a().b(com.mbridge.msdk.foundation.controller.c.m().k());
if (b2 == null) {
h.a();
b2 = i.a();
}
long ac = b2.ac() * 1000;
long ad = b2.ad() * 1000;
if (a == null) {
a = com.mbridge.msdk.foundation.db.e.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
}
a.b(ad, str2);
List<CampaignEx> a2 = a.a(str2, 0, 0, c, !TextUtils.isEmpty(str3));
if (a2 == null || a2.size() <= 0) {
return null;
}
CampaignEx campaignEx = a2.get(0);
if (TextUtils.isEmpty(campaignEx.getAdZip()) && TextUtils.isEmpty(campaignEx.getAdHtml())) {
return null;
}
long currentTimeMillis = System.currentTimeMillis();
long j = currentTimeMillis - ac;
if (!z2) {
if (((campaignEx.getPlct() <= 0 || (campaignEx.getPlct() * 1000) + campaignEx.getTimestamp() < currentTimeMillis) && (campaignEx.getPlct() > 0 || campaignEx.getTimestamp() < j)) || !a(mBSplashView, campaignEx, str, str2, z, i, z3)) {
return null;
}
return a(campaignEx);
}
if ((campaignEx.getPlct() > 0 && (campaignEx.getPlct() * 1000) + campaignEx.getTimestamp() >= currentTimeMillis) || (campaignEx.getPlct() <= 0 && campaignEx.getTimestamp() >= j)) {
if (a(mBSplashView, campaignEx, str, str2, z, i, z3)) {
return a(campaignEx);
}
return null;
}
if (a(mBSplashView, campaignEx, str, str2, z, i, z3) && campaignEx.isSpareOffer(ac, ad)) {
return a(campaignEx);
}
return null;
}
private static CampaignEx a(CampaignEx campaignEx) {
if (!TextUtils.isEmpty(campaignEx.getAdZip()) || (!TextUtils.isEmpty(campaignEx.getAdHtml()) && campaignEx.getAdHtml().contains("<MBTPLMARK>"))) {
campaignEx.setHasMBTplMark(true);
campaignEx.setIsMraid(false);
} else {
campaignEx.setHasMBTplMark(false);
campaignEx.setIsMraid(true);
}
return campaignEx;
}
private static boolean a(MBSplashView mBSplashView, CampaignEx campaignEx, String str, String str2, boolean z, int i, boolean z2) {
boolean z3;
if (campaignEx == null) {
return false;
}
mBSplashView.clearResState();
if (TextUtils.isEmpty(campaignEx.getVideoUrlEncode())) {
z3 = true;
} else {
boolean z4 = mBSplashView.isVideoReady() || com.mbridge.msdk.videocommon.download.b.getInstance().a(297, str2, campaignEx.isBidCampaign());
if (!z4) {
a(mBSplashView, campaignEx, str2);
} else {
mBSplashView.setVideoReady(true);
}
z3 = z4;
}
if (!TextUtils.isEmpty(campaignEx.getAdZip()) && !mBSplashView.isH5Ready()) {
String h5ResAddress = H5DownLoadManager.getInstance().getH5ResAddress(campaignEx.getAdZip());
if (TextUtils.isEmpty(h5ResAddress)) {
z3 = false;
} else if (!z2) {
a(mBSplashView, h5ResAddress, campaignEx, str, str2, z, i);
}
}
if (TextUtils.isEmpty(campaignEx.getAdZip()) && !TextUtils.isEmpty(campaignEx.getAdHtml()) && !mBSplashView.isH5Ready()) {
String b2 = b(campaignEx.getAdHtml());
if (TextUtils.isEmpty(b2)) {
z3 = false;
} else if (!z2) {
a(mBSplashView, b2, campaignEx, str, str2, z, i);
}
}
if (campaignEx.isDynamicView()) {
if (TextUtils.isEmpty(campaignEx.getImageUrl()) || mBSplashView.isImageReady()) {
return false;
}
if (!com.mbridge.msdk.foundation.same.c.b.a(com.mbridge.msdk.foundation.controller.c.m().c()).b(campaignEx.getImageUrl())) {
a(mBSplashView, campaignEx, (com.mbridge.msdk.splash.view.nativeview.a) null);
} else {
mBSplashView.setImageReady(true);
return true;
}
}
return z3;
}
private static void a(final MBSplashView mBSplashView, CampaignEx campaignEx, String str) {
com.mbridge.msdk.videocommon.listener.a aVar = new com.mbridge.msdk.videocommon.listener.a() { // from class: com.mbridge.msdk.splash.c.d.1
@Override // com.mbridge.msdk.videocommon.listener.a
public final void a(String str2) {
MBSplashView.this.setVideoReady(true);
}
@Override // com.mbridge.msdk.videocommon.listener.a
public final void a(String str2, String str3) {
MBSplashView.this.setVideoReady(false);
}
};
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList = new CopyOnWriteArrayList<>();
copyOnWriteArrayList.add(campaignEx);
com.mbridge.msdk.videocommon.download.b.getInstance().createUnitCache(com.mbridge.msdk.foundation.controller.c.m().c(), str, copyOnWriteArrayList, 297, aVar);
if (!com.mbridge.msdk.videocommon.download.b.getInstance().a(297, str, campaignEx.isBidCampaign())) {
com.mbridge.msdk.videocommon.download.b.getInstance().load(str);
} else {
mBSplashView.setVideoReady(true);
}
}
public static void a(final MBSplashView mBSplashView, CampaignEx campaignEx, final com.mbridge.msdk.splash.view.nativeview.a aVar) {
com.mbridge.msdk.foundation.same.c.b.a(com.mbridge.msdk.foundation.controller.c.m().c()).a(campaignEx.getImageUrl(), new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.splash.c.d.2
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onSuccessLoad(Bitmap bitmap, String str) {
com.mbridge.msdk.splash.view.nativeview.a aVar2 = com.mbridge.msdk.splash.view.nativeview.a.this;
if (aVar2 != null) {
aVar2.a();
}
MBSplashView mBSplashView2 = mBSplashView;
if (mBSplashView2 != null) {
mBSplashView2.setImageReady(true);
}
}
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onFailedLoad(String str, String str2) {
com.mbridge.msdk.splash.view.nativeview.a aVar2 = com.mbridge.msdk.splash.view.nativeview.a.this;
if (aVar2 != null) {
aVar2.b();
}
MBSplashView mBSplashView2 = mBSplashView;
if (mBSplashView2 != null) {
mBSplashView2.setImageReady(false);
}
}
});
if (TextUtils.isEmpty(campaignEx.getIconUrl())) {
return;
}
com.mbridge.msdk.foundation.same.c.b.a(com.mbridge.msdk.foundation.controller.c.m().c()).a(campaignEx.getIconUrl(), new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.splash.c.d.3
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onFailedLoad(String str, String str2) {
}
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onSuccessLoad(Bitmap bitmap, String str) {
}
});
}
private static void a(MBSplashView mBSplashView, String str, CampaignEx campaignEx, String str2, String str3, boolean z, int i) {
g gVar;
g.c cVar = new g.c();
cVar.c(str3);
cVar.b(str2);
cVar.a(campaignEx);
cVar.a(str);
cVar.a(z);
cVar.a(i);
gVar = g.a.a;
gVar.a(mBSplashView, cVar, null);
}
private static String b(String str) {
try {
File file = new File(str);
if (!file.exists()) {
return "";
}
return "file:///" + file.getAbsolutePath();
} catch (Throwable th) {
try {
throw th;
} catch (Exception e) {
e.getMessage();
return "";
}
}
}
public static boolean a(MBSplashView mBSplashView, CampaignEx campaignEx) {
if (mBSplashView == null) {
return false;
}
boolean isVideoReady = !TextUtils.isEmpty(campaignEx.getVideoUrlEncode()) ? mBSplashView.isVideoReady() : true;
if (isVideoReady && !TextUtils.isEmpty(campaignEx.getAdZip())) {
isVideoReady = mBSplashView.isH5Ready();
}
if (isVideoReady && TextUtils.isEmpty(campaignEx.getAdZip()) && !TextUtils.isEmpty(campaignEx.getAdHtml())) {
isVideoReady = mBSplashView.isH5Ready();
}
if (TextUtils.isEmpty(campaignEx.getAdZip()) && TextUtils.isEmpty(campaignEx.getAdHtml())) {
isVideoReady = false;
}
if (!campaignEx.isDynamicView()) {
return isVideoReady;
}
if (TextUtils.isEmpty(campaignEx.getImageUrl())) {
return false;
}
return mBSplashView.isImageReady();
}
public static void a(CampaignEx campaignEx, String str) {
ArrayList arrayList = new ArrayList();
arrayList.add(campaignEx);
if (a == null) {
a = com.mbridge.msdk.foundation.db.e.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
}
a.b(arrayList, str);
}
public static void a(String str) {
if (a == null) {
a = com.mbridge.msdk.foundation.db.e.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
}
a.a(str, 0, c);
}
}

View File

@@ -0,0 +1,800 @@
package com.mbridge.msdk.splash.c;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.work.WorkRequest;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.c.k;
import com.mbridge.msdk.foundation.db.j;
import com.mbridge.msdk.foundation.download.DownloadError;
import com.mbridge.msdk.foundation.download.download.H5DownLoadManager;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.entity.CampaignUnit;
import com.mbridge.msdk.foundation.same.c;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.foundation.tools.ap;
import com.mbridge.msdk.foundation.tools.n;
import com.mbridge.msdk.foundation.tools.o;
import com.mbridge.msdk.out.MBridgeIds;
import com.mbridge.msdk.splash.a.c;
import com.mbridge.msdk.splash.c.c;
import com.mbridge.msdk.splash.c.g;
import com.mbridge.msdk.splash.view.MBSplashView;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
/* loaded from: classes4.dex */
public final class e {
private static String a = "SplashLoadManager";
private String b;
private String c;
private long d;
private long e;
private com.mbridge.msdk.splash.d.b f;
private MBSplashView h;
private k i;
private boolean j;
private int k;
private int l;
private int m;
private String n;
private int o;
private boolean p;
private volatile boolean q;
private com.mbridge.msdk.videocommon.listener.a r;
private H5DownLoadManager.ZipDownloadListener s;
private String t;
private int u;
private int w;
private List<CampaignEx> x;
private String v = "";
private String y = "";
private Handler z = new Handler(Looper.getMainLooper()) { // from class: com.mbridge.msdk.splash.c.e.1
@Override // android.os.Handler
public final void handleMessage(@NonNull Message message) {
super.handleMessage(message);
int i = message.what;
if (i == 1) {
Object obj = message.obj;
int i2 = message.arg1;
if (obj instanceof CampaignEx) {
CampaignEx campaignEx = (CampaignEx) obj;
e.this.a(H5DownLoadManager.getInstance().getH5ResAddress(campaignEx.getAdZip()), campaignEx, i2);
return;
}
return;
}
if (i != 2) {
if (i != 3) {
return;
}
Object obj2 = message.obj;
if (obj2 instanceof CampaignEx) {
e eVar = e.this;
eVar.b((CampaignEx) obj2, eVar.o);
return;
}
return;
}
Object obj3 = message.obj;
try {
if (obj3 instanceof Bundle) {
int i3 = ((Bundle) obj3).getInt("type");
String string = ((Bundle) obj3).getString("msg");
CampaignEx campaignEx2 = (CampaignEx) ((Bundle) obj3).getSerializable("campaignex");
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(i3 == 1 ? 880004 : i3 == 2 ? 880006 : 880027);
bVar.a(string);
e eVar2 = e.this;
eVar2.a(bVar, eVar2.n, e.this.o, campaignEx2);
}
} catch (Exception e) {
com.mbridge.msdk.foundation.c.b bVar2 = new com.mbridge.msdk.foundation.c.b(880024);
bVar2.a((Throwable) e);
e eVar3 = e.this;
eVar3.a(bVar2, eVar3.n, e.this.o, (CampaignEx) null);
}
}
};
private Runnable A = new Runnable() { // from class: com.mbridge.msdk.splash.c.e.4
@Override // java.lang.Runnable
public final void run() {
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880010);
e eVar = e.this;
eVar.a(bVar, eVar.n, e.this.o, (CampaignEx) null);
}
};
private Context g = com.mbridge.msdk.foundation.controller.c.m().c();
public final String a() {
return this.v;
}
public final void a(int i) {
this.k = i;
}
public final void a(int i, int i2) {
this.m = i;
this.l = i2;
}
public final void a(k kVar) {
this.i = kVar;
}
public final void a(com.mbridge.msdk.splash.d.b bVar) {
this.f = bVar;
}
public final void a(MBSplashView mBSplashView) {
this.h = mBSplashView;
}
public final void a(boolean z) {
this.j = z;
}
public final void b(int i) {
this.w = i;
}
public final void c() {
if (this.f != null) {
this.f = null;
}
if (this.r != null) {
this.r = null;
}
if (this.s != null) {
this.s = null;
}
}
public e(String str, String str2, long j) {
this.c = str;
this.b = str2;
this.e = j;
}
public final String b() {
return com.mbridge.msdk.foundation.same.c.a(this.x);
}
public final void a(String str, int i) {
this.q = false;
this.n = str;
this.o = i;
CampaignEx a2 = d.a(this.h, this.c, this.b, str, this.j, this.k, false, false);
long timestamp = a2 != null ? a2.getTimestamp() : 0L;
if (this.i.m() == 1 && i != 1 && a2 != null) {
a(a2, i);
return;
}
this.p = true;
if (i == 1) {
List<Integer> c = this.i.c();
if (c == null || c.size() <= 0) {
this.d = WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS;
} else {
this.d = c.get(0).intValue() * 1000;
}
} else {
long j = this.e;
if (j <= 0) {
this.d = this.i.r();
} else {
this.d = j;
}
}
if (this.i == null || timestamp <= 0 || !TextUtils.isEmpty(str)) {
a(this.d);
a(this.g, str, i);
return;
}
if (System.currentTimeMillis() - timestamp > this.i.o() * 1000) {
a(this.d);
a(this.g, str, i);
} else {
a(a2, i);
}
}
private void a(long j) {
this.z.postDelayed(this.A, j);
}
private void a(Context context, final String str, final int i) {
try {
if (context == null) {
a(new com.mbridge.msdk.foundation.c.b(880025), str, i, (CampaignEx) null);
return;
}
if (ap.a(this.b)) {
a(new com.mbridge.msdk.foundation.c.b(880032), str, i, (CampaignEx) null);
return;
}
MBridgeIds mBridgeIds = new MBridgeIds(this.c, this.b);
com.mbridge.msdk.splash.f.f fVar = new com.mbridge.msdk.splash.f.f();
fVar.a(i);
fVar.b(this.u);
fVar.a(this.t);
fVar.c(this.m);
fVar.d(this.l);
com.mbridge.msdk.foundation.same.net.f.e a2 = com.mbridge.msdk.splash.f.e.a(context, mBridgeIds, fVar);
if (a2 == null) {
a(new com.mbridge.msdk.foundation.c.b(880001), str, i, (CampaignEx) null);
return;
}
if (!TextUtils.isEmpty(str)) {
a2.a("token", str);
}
String d = ak.d(this.b);
if (!TextUtils.isEmpty(d)) {
a2.a("j", d);
}
com.mbridge.msdk.splash.f.c cVar = new com.mbridge.msdk.splash.f.c(context);
com.mbridge.msdk.splash.f.b bVar = new com.mbridge.msdk.splash.f.b(i) { // from class: com.mbridge.msdk.splash.c.e.5
@Override // com.mbridge.msdk.splash.f.b
public final void a(CampaignUnit campaignUnit, int i2) {
try {
e eVar = e.this;
e.a(eVar, campaignUnit, i2, eVar.b, str);
e.this.v = campaignUnit.getRequestId();
e.this.x = campaignUnit.getAds();
} catch (Exception e) {
e.printStackTrace();
com.mbridge.msdk.foundation.c.b bVar2 = new com.mbridge.msdk.foundation.c.b(880003);
bVar2.a((Throwable) e);
e.this.a(bVar2, str, i2, (campaignUnit == null || campaignUnit.getAds() == null || campaignUnit.getAds().size() == 0) ? null : campaignUnit.getAds().get(0));
e.this.u = 0;
}
}
@Override // com.mbridge.msdk.splash.f.b
public final void a(int i2, String str2) {
af.b(e.a, str2);
com.mbridge.msdk.foundation.c.b bVar2 = new com.mbridge.msdk.foundation.c.b(880002);
bVar2.a(str2);
e.this.a(bVar2, str, i, (CampaignEx) null);
e.this.u = 0;
}
};
bVar.a(str);
bVar.setUnitId(this.b);
bVar.setPlacementId(this.c);
bVar.setAdType(297);
cVar.choiceV3OrV5BySetting(1, a2, bVar, str, com.mbridge.msdk.foundation.same.c.a(this.d, WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS));
} catch (Exception e) {
af.b(a, e.getMessage());
com.mbridge.msdk.foundation.c.b bVar2 = new com.mbridge.msdk.foundation.c.b(880020);
bVar2.a((Throwable) e);
a(bVar2, str, i, (CampaignEx) null);
this.u = 0;
}
}
private void a(CampaignEx campaignEx, int i) {
MBSplashView mBSplashView = this.h;
if (mBSplashView != null) {
mBSplashView.setDynamicView(false);
}
if (campaignEx.isDynamicView()) {
d(campaignEx, i);
} else {
MBSplashView mBSplashView2 = this.h;
if (mBSplashView2 != null) {
mBSplashView2.setSplashWebView();
}
}
if (d.a(this.h, campaignEx)) {
b(campaignEx, i);
} else {
c(campaignEx, i);
}
}
/* JADX INFO: Access modifiers changed from: private */
public void b(CampaignEx campaignEx, int i) {
if (!d.a(this.h, campaignEx) || this.q) {
return;
}
e();
if (this.p) {
d.a(campaignEx, this.b);
}
this.q = true;
com.mbridge.msdk.splash.d.b bVar = this.f;
if (bVar != null) {
bVar.a(campaignEx, i);
}
}
/* JADX INFO: Access modifiers changed from: private */
public void a(com.mbridge.msdk.foundation.c.b bVar, String str, int i, CampaignEx campaignEx) {
if (this.p) {
this.p = false;
a(bVar, i, str, campaignEx);
} else {
a(bVar, i, campaignEx);
}
}
private void a(com.mbridge.msdk.foundation.c.b bVar, int i, String str, CampaignEx campaignEx) {
CampaignEx a2 = d.a(this.h, this.c, this.b, str, this.j, this.k, true, false);
if (a2 != null) {
a(a2, i);
} else {
a(bVar, i, campaignEx);
}
}
private void a(com.mbridge.msdk.foundation.c.b bVar, int i, CampaignEx campaignEx) {
if (this.q) {
return;
}
e();
this.q = true;
if (bVar != null) {
bVar.a(campaignEx);
}
com.mbridge.msdk.splash.d.b bVar2 = this.f;
if (bVar2 != null) {
bVar2.a(bVar, i);
}
}
private void e() {
this.z.removeCallbacks(this.A);
}
private void c(CampaignEx campaignEx, int i) {
this.h.clearResState();
if (!TextUtils.isEmpty(campaignEx.getAdZip())) {
f(campaignEx, i);
}
if (campaignEx.isDynamicView()) {
return;
}
if (!TextUtils.isEmpty(campaignEx.getAdHtml())) {
e(campaignEx, i);
}
if (!TextUtils.isEmpty(campaignEx.getVideoUrlEncode())) {
g(campaignEx, i);
}
if (TextUtils.isEmpty(campaignEx.getImageUrl())) {
return;
}
d(campaignEx, i);
}
private void d(final CampaignEx campaignEx, final int i) {
d.a(this.h, campaignEx, new com.mbridge.msdk.splash.view.nativeview.a() { // from class: com.mbridge.msdk.splash.c.e.8
@Override // com.mbridge.msdk.splash.view.nativeview.a
public final void a() {
if (campaignEx.isDynamicView() && e.this.h != null) {
e.this.h.setImageReady(true);
e.b(e.this, campaignEx, i);
}
e.this.b(campaignEx, i);
}
@Override // com.mbridge.msdk.splash.view.nativeview.a
public final void b() {
if (!campaignEx.isDynamicView() || e.this.h == null) {
return;
}
e.this.h.setImageReady(false);
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880027);
e eVar = e.this;
eVar.a(bVar, eVar.n, i, campaignEx);
}
});
}
/* JADX WARN: Code restructure failed: missing block: B:27:0x00bf, code lost:
if (r3 == null) goto L38;
*/
/* JADX WARN: Code restructure failed: missing block: B:29:0x00c6, code lost:
if (r7.exists() == false) goto L45;
*/
/* JADX WARN: Code restructure failed: missing block: B:31:0x00cc, code lost:
if (r7.isFile() == false) goto L45;
*/
/* JADX WARN: Code restructure failed: missing block: B:33:0x00d2, code lost:
if (r7.canRead() == false) goto L45;
*/
/* JADX WARN: Code restructure failed: missing block: B:34:0x00d4, code lost:
r10.setAdHtml(r7.getAbsolutePath());
a("file:////" + r7.getAbsolutePath(), r10, r11);
*/
/* JADX WARN: Code restructure failed: missing block: B:35:?, code lost:
return;
*/
/* JADX WARN: Code restructure failed: missing block: B:37:0x00f4, code lost:
a(new com.mbridge.msdk.foundation.c.b(880013), r9.n, r11, r10);
*/
/* JADX WARN: Code restructure failed: missing block: B:38:?, code lost:
return;
*/
/* JADX WARN: Code restructure failed: missing block: B:39:0x00aa, code lost:
r3.close();
*/
/* JADX WARN: Code restructure failed: missing block: B:47:0x00a8, code lost:
if (r3 != null) goto L31;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void e(com.mbridge.msdk.foundation.entity.CampaignEx r10, int r11) {
/*
Method dump skipped, instructions count: 272
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.splash.c.e.e(com.mbridge.msdk.foundation.entity.CampaignEx, int):void");
}
private void f(final CampaignEx campaignEx, final int i) {
if (campaignEx.isDynamicView()) {
o.a(5, "", campaignEx.getAdZip(), new o.a() { // from class: com.mbridge.msdk.splash.c.e.9
@Override // com.mbridge.msdk.foundation.tools.o.a
public final void a(String str, String str2, String str3, String str4, boolean z) {
if (z) {
return;
}
e.a(e.this, campaignEx, str, true, "");
}
@Override // com.mbridge.msdk.foundation.tools.o.a
public final void a(String str, DownloadError downloadError) {
String str2 = "";
if (downloadError != null) {
try {
if (downloadError.getException() != null) {
str2 = downloadError.getException().getMessage();
}
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
e.printStackTrace();
return;
}
return;
}
}
e.a(e.this, campaignEx, str, false, str2);
}
}, campaignEx);
return;
}
this.s = new H5DownLoadManager.ZipDownloadListener() { // from class: com.mbridge.msdk.splash.c.e.10
@Override // com.mbridge.msdk.foundation.download.download.H5DownLoadManager.H5ResDownloadListerInter
public final void onSuccess(String str, String str2, boolean z) {
Message obtain = Message.obtain();
obtain.what = 1;
obtain.obj = campaignEx;
obtain.arg1 = i;
e.this.z.sendMessage(obtain);
if (z) {
return;
}
CampaignEx campaignEx2 = campaignEx;
e.a(e.this, campaignEx, campaignEx2 != null ? campaignEx2.getAdZip() : "", true, "");
}
@Override // com.mbridge.msdk.foundation.download.download.H5DownLoadManager.H5ResDownloadListerInter
public final void onFailed(String str, String str2) {
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880006);
e eVar = e.this;
eVar.a(bVar, eVar.n, i, campaignEx);
Message obtain = Message.obtain();
obtain.what = 2;
Bundle bundle = new Bundle();
bundle.putSerializable("campaignex", campaignEx);
bundle.putString("msg", str);
bundle.putInt("type", 2);
obtain.obj = bundle;
e.this.z.sendMessage(obtain);
e.a(e.this, campaignEx, str2, false, str);
}
};
com.mbridge.msdk.foundation.same.report.d.c cVar = new com.mbridge.msdk.foundation.same.report.d.c();
cVar.b(297);
cVar.a(2);
cVar.a(campaignEx);
cVar.c(campaignEx.getAabEntity() != null ? campaignEx.getAabEntity().h3c : 0);
H5DownLoadManager.getInstance().downloadH5Res(cVar, campaignEx.getAdZip(), this.s);
}
/* JADX INFO: Access modifiers changed from: private */
public void a(String str, final CampaignEx campaignEx, final int i) {
g gVar;
g.c cVar = new g.c();
cVar.c(this.b);
cVar.b(this.c);
cVar.a(campaignEx);
cVar.a(str);
cVar.a(this.j);
cVar.a(this.k);
g.b bVar = new g.b() { // from class: com.mbridge.msdk.splash.c.e.2
@Override // com.mbridge.msdk.splash.c.g.b
public final void a() {
if (campaignEx.isHasMBTplMark()) {
return;
}
e.c(e.this, campaignEx, i);
}
@Override // com.mbridge.msdk.splash.c.g.b
public final void a(String str2) {
e.a(e.this, str2, i, campaignEx);
}
@Override // com.mbridge.msdk.splash.c.g.b
public final void a(int i2) {
if (i2 == 1) {
e.c(e.this, campaignEx, i);
} else {
e.a(e.this, "readyState 2", i, campaignEx);
}
}
};
gVar = g.a.a;
gVar.a(this.h, cVar, bVar);
}
private void g(final CampaignEx campaignEx, int i) {
this.r = new com.mbridge.msdk.videocommon.listener.a() { // from class: com.mbridge.msdk.splash.c.e.3
@Override // com.mbridge.msdk.videocommon.listener.a
public final void a(String str) {
e.this.h.setVideoReady(true);
Message obtain = Message.obtain();
obtain.obj = campaignEx;
obtain.what = 3;
e.this.z.sendMessage(obtain);
}
@Override // com.mbridge.msdk.videocommon.listener.a
public final void a(String str, String str2) {
e.this.h.setVideoReady(false);
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880004);
bVar.a(str);
e eVar = e.this;
eVar.a(bVar, eVar.n, e.this.o, campaignEx);
Message obtain = Message.obtain();
Bundle bundle = new Bundle();
bundle.putSerializable("campaignex", campaignEx);
bundle.putString("msg", str);
bundle.putInt("type", 1);
obtain.obj = bundle;
obtain.what = 2;
e.this.z.sendMessage(obtain);
}
};
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList = new CopyOnWriteArrayList<>();
copyOnWriteArrayList.add(campaignEx);
com.mbridge.msdk.videocommon.download.b.getInstance().createUnitCache(this.g, this.b, copyOnWriteArrayList, 297, this.r);
if (!com.mbridge.msdk.videocommon.download.b.getInstance().a(297, this.b, campaignEx.isBidCampaign())) {
com.mbridge.msdk.videocommon.download.b.getInstance().load(this.b);
} else {
this.h.setVideoReady(true);
b(campaignEx, i);
}
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r2v0, types: [com.mbridge.msdk.foundation.same.report.d.a.a] */
/* JADX WARN: Type inference failed for: r2v3, types: [com.mbridge.msdk.foundation.entity.CampaignEx] */
/* JADX WARN: Type inference failed for: r2v4 */
/* JADX WARN: Type inference failed for: r2v5 */
public static /* synthetic */ void a(e eVar, CampaignUnit campaignUnit, int i, String str, String str2) {
ArrayList arrayList;
com.mbridge.msdk.foundation.c.b bVar;
CampaignEx campaignEx;
int i2;
k kVar;
final CampaignEx campaignEx2 = 0;
campaignEx2 = 0;
campaignEx2 = 0;
if (campaignUnit == null || campaignUnit.getAds() == null) {
arrayList = null;
} else {
arrayList = new ArrayList();
final CampaignEx campaignEx3 = campaignUnit.getAds().get(0);
campaignEx3.setCampaignUnitId(eVar.b);
new Thread(new Runnable() { // from class: com.mbridge.msdk.splash.c.e.7
@Override // java.lang.Runnable
public final void run() {
j.a(com.mbridge.msdk.foundation.db.g.a(e.this.g)).a();
n.a(e.this.g, campaignEx3);
}
}).start();
eVar.t = campaignUnit.getSessionId();
if (campaignEx3.getOfferType() != 99 && (!TextUtils.isEmpty(campaignEx3.getAdZip()) || !TextUtils.isEmpty(campaignEx3.getAdHtml()))) {
if (ak.c(campaignEx3)) {
campaignEx3.setRtinsType(ak.c(eVar.g, campaignEx3.getPackageName()) ? 1 : 2);
}
if (com.mbridge.msdk.foundation.same.c.a(eVar.g, campaignEx3)) {
arrayList.add(campaignEx3);
} else {
ak.a(eVar.b, campaignEx3, com.mbridge.msdk.foundation.same.a.x);
eVar.y = "APP ALREADY INSTALLED";
}
try {
com.mbridge.msdk.foundation.same.c.a(campaignEx3, eVar.g, null, new c.a() { // from class: com.mbridge.msdk.splash.c.e.6
@Override // com.mbridge.msdk.foundation.same.c.a
public final void a(String str3, com.mbridge.msdk.foundation.same.report.d.c cVar) {
try {
com.mbridge.msdk.foundation.same.report.d.d.a().a(str3, cVar, campaignEx3, e.this.g, campaignEx2);
} catch (Exception e) {
af.b("SplashReport", e.getMessage());
}
}
});
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
e.printStackTrace();
}
}
}
}
if (arrayList == null || arrayList.size() <= 0) {
if (eVar.y.contains("INSTALLED")) {
bVar = new com.mbridge.msdk.foundation.c.b(880021, "APP ALREADY INSTALLED");
} else {
bVar = new com.mbridge.msdk.foundation.c.b(880003);
}
if (campaignUnit != null && campaignUnit.getAds() != null && campaignUnit.getAds().size() != 0) {
campaignEx2 = campaignUnit.getAds().get(0);
}
eVar.a(bVar, str2, i, campaignEx2);
return;
}
try {
i2 = eVar.u + 1;
eVar.u = i2;
kVar = eVar.i;
} catch (Exception e2) {
e2.printStackTrace();
}
if (kVar != null) {
if (i2 > kVar.w()) {
}
campaignEx = (CampaignEx) arrayList.get(0);
if (TextUtils.isEmpty(campaignEx.getAdZip()) || (!TextUtils.isEmpty(campaignEx.getAdHtml()) && campaignEx.getAdHtml().contains("<MBTPLMARK>"))) {
campaignEx.setHasMBTplMark(true);
campaignEx.setIsMraid(false);
} else {
campaignEx.setHasMBTplMark(false);
campaignEx.setIsMraid(true);
}
eVar.a(campaignEx, i);
}
eVar.u = 0;
campaignEx = (CampaignEx) arrayList.get(0);
if (TextUtils.isEmpty(campaignEx.getAdZip())) {
}
campaignEx.setHasMBTplMark(true);
campaignEx.setIsMraid(false);
eVar.a(campaignEx, i);
}
public static /* synthetic */ void b(e eVar, final CampaignEx campaignEx, final int i) {
c cVar;
if (campaignEx.isDynamicView()) {
c.a aVar = new c.a();
aVar.b(eVar.b).a(eVar.c).a(eVar.j).a(campaignEx).a(eVar.k).h(eVar.w);
try {
if (!TextUtils.isEmpty(campaignEx.getAdZip())) {
Uri parse = Uri.parse(campaignEx.getAdZip());
String queryParameter = parse.getQueryParameter("hdbtn");
String queryParameter2 = parse.getQueryParameter("alecfc");
String queryParameter3 = parse.getQueryParameter("hdinfo");
String queryParameter4 = parse.getQueryParameter("shake_show");
String queryParameter5 = parse.getQueryParameter("shake_strength");
String queryParameter6 = parse.getQueryParameter("shake_time");
String queryParameter7 = parse.getQueryParameter("n_logo");
if (!TextUtils.isEmpty(queryParameter)) {
aVar.b(Integer.parseInt(queryParameter));
}
if (!TextUtils.isEmpty(queryParameter2)) {
aVar.c(Integer.parseInt(queryParameter2));
}
if (!TextUtils.isEmpty(queryParameter3)) {
aVar.d(Integer.parseInt(queryParameter3));
}
if (!TextUtils.isEmpty(queryParameter4)) {
aVar.e(Integer.parseInt(queryParameter4));
}
if (!TextUtils.isEmpty(queryParameter5)) {
aVar.f(Integer.parseInt(queryParameter5));
}
if (!TextUtils.isEmpty(queryParameter6)) {
aVar.g(Integer.parseInt(queryParameter6));
}
if (!TextUtils.isEmpty(queryParameter7)) {
aVar.i(Integer.parseInt(queryParameter7) == 0 ? 0 : 1);
}
}
} catch (Throwable th) {
af.b(a, th.getMessage());
}
cVar = c.a.a;
cVar.a(eVar.h, new com.mbridge.msdk.splash.a.c(aVar), new com.mbridge.msdk.splash.b.a() { // from class: com.mbridge.msdk.splash.c.e.11
@Override // com.mbridge.msdk.splash.b.a
public final void a(View view) {
if (e.this.h != null) {
e.this.h.setDynamicView(true);
e.this.h.setSplashNativeView(view);
e.this.b(campaignEx, i);
}
}
@Override // com.mbridge.msdk.splash.b.a
public final void a(String str) {
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880034);
bVar.a(str);
e eVar2 = e.this;
eVar2.a(bVar, eVar2.n, i, campaignEx);
}
});
}
}
public static /* synthetic */ void a(e eVar, CampaignEx campaignEx, String str, boolean z, String str2) {
try {
com.mbridge.msdk.foundation.entity.n nVar = new com.mbridge.msdk.foundation.entity.n();
nVar.e(2);
nVar.a("m_download_end");
if (campaignEx != null) {
nVar.d(campaignEx.isMraid() ? com.mbridge.msdk.foundation.entity.n.a : com.mbridge.msdk.foundation.entity.n.b);
nVar.g(campaignEx.getRequestIdNotice());
}
nVar.a("url", str);
nVar.a("scenes", "1");
if (z) {
nVar.b(1);
} else {
nVar.b(3);
nVar.h(str2);
}
com.mbridge.msdk.foundation.same.report.d.d.a().a(nVar, campaignEx);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b(a, e.getMessage());
}
}
}
public static /* synthetic */ void c(e eVar, CampaignEx campaignEx, int i) {
if (eVar.h.isH5Ready()) {
return;
}
eVar.h.setH5Ready(true);
eVar.b(campaignEx, i);
}
public static /* synthetic */ void a(e eVar, String str, int i, CampaignEx campaignEx) {
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880009);
bVar.a(str);
eVar.a(bVar, eVar.n, i, campaignEx);
}
}

View File

@@ -0,0 +1,16 @@
package com.mbridge.msdk.splash.c;
import android.content.Context;
import com.mbridge.msdk.foundation.entity.CampaignEx;
/* loaded from: classes4.dex */
public final class f extends b {
public f(Context context, String str, String str2) {
super(context, str, str2);
}
@Override // com.mbridge.msdk.splash.c.b
public final void a(CampaignEx campaignEx, boolean z, String str) {
b(campaignEx, z, str);
}
}

View File

@@ -0,0 +1,224 @@
package com.mbridge.msdk.splash.c;
import android.net.http.SslError;
import android.text.TextUtils;
import android.webkit.SslErrorHandler;
import android.webkit.WebView;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbbid.common.BidResponsedEx;
import com.mbridge.msdk.splash.view.MBSplashView;
import com.mbridge.msdk.splash.view.MBSplashWebview;
import java.util.ArrayList;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public final class g {
private boolean a;
private boolean b;
public static class a {
private static final g a = new g();
}
public interface b {
void a();
void a(int i);
void a(String str);
}
public static class c {
private String a;
private String b;
private CampaignEx c;
private String d;
private boolean e;
private int f;
public final String a() {
return this.d;
}
public final void a(int i) {
this.f = i;
}
public final void a(CampaignEx campaignEx) {
this.c = campaignEx;
}
public final void a(String str) {
this.d = str;
}
public final void a(boolean z) {
this.e = z;
}
public final String b() {
return this.a;
}
public final void b(String str) {
this.a = str;
}
public final String c() {
return this.b;
}
public final void c(String str) {
this.b = str;
}
public final CampaignEx d() {
return this.c;
}
public final boolean e() {
return this.e;
}
public final int f() {
return this.f;
}
}
public final void a() {
this.a = false;
this.b = false;
}
private g() {
this.a = false;
this.b = false;
}
public final void a(final MBSplashView mBSplashView, c cVar, final b bVar) {
String requestId;
if (mBSplashView == null || cVar == null) {
return;
}
final String c2 = cVar.c();
String b2 = cVar.b();
final CampaignEx d = cVar.d();
String a2 = cVar.a();
boolean e = cVar.e();
int f = cVar.f();
MBSplashWebview splashWebview = mBSplashView.getSplashWebview();
if (splashWebview == null) {
return;
}
com.mbridge.msdk.splash.signal.c cVar2 = new com.mbridge.msdk.splash.signal.c(mBSplashView.getContext(), b2, c2);
ArrayList arrayList = new ArrayList();
arrayList.add(d);
cVar2.a(arrayList);
cVar2.a(e ? 1 : 0);
cVar2.b(f);
mBSplashView.setSplashSignalCommunicationImpl(cVar2);
if (TextUtils.isEmpty(d.getRequestId())) {
requestId = d.getRequestIdNotice();
} else {
requestId = d.getRequestId();
}
String requestId2 = splashWebview.getRequestId();
af.b("WebViewRenderManager", "CampaignEx RequestId = " + requestId + " WebView RequestId = " + requestId2);
if (!TextUtils.isEmpty(requestId2) && requestId2.equals(requestId) && (this.a || this.b)) {
mBSplashView.setH5Ready(true);
if (bVar != null) {
bVar.a(1);
return;
}
return;
}
a();
splashWebview.setRequestId(requestId);
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000067");
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, c2);
jSONObject.put(BidResponsedEx.KEY_CID, d.getId());
jSONObject.put("rid", d.getRequestId());
jSONObject.put("rid_n", d.getRequestIdNotice());
jSONObject.put(CampaignEx.JSON_KEY_CREATIVE_ID, d.getCreativeId());
jSONObject.put("hb", d.isBidCampaign() ? 1 : 0);
jSONObject.put("network_type", ab.m(com.mbridge.msdk.foundation.controller.c.m().c()));
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
} catch (Throwable th) {
af.b("SplashReport", th.getMessage());
}
final long currentTimeMillis = System.currentTimeMillis();
splashWebview.setWebViewListener(new com.mbridge.msdk.mbsignalcommon.b.b() { // from class: com.mbridge.msdk.splash.c.g.1
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, int i) {
super.a(webView, i);
b bVar2 = bVar;
if (bVar2 != null) {
bVar2.a(i);
}
if (i == 1) {
g.this.a = true;
mBSplashView.setH5Ready(true);
com.mbridge.msdk.splash.e.a.a(com.mbridge.msdk.foundation.controller.c.m().c(), d, c2, "", currentTimeMillis, 1);
com.mbridge.msdk.splash.e.a.a(1, "", c2, d);
return;
}
g.this.a = false;
mBSplashView.setH5Ready(false);
com.mbridge.msdk.splash.e.a.a(2, "readyState 2", c2, d);
com.mbridge.msdk.splash.e.a.a(com.mbridge.msdk.foundation.controller.c.m().c(), d, c2, "readyState 2", currentTimeMillis, 3);
}
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, int i, String str, String str2) {
super.a(webView, i, str, str2);
b bVar2 = bVar;
if (bVar2 != null) {
bVar2.a(str);
}
g.this.a();
mBSplashView.setH5Ready(false);
com.mbridge.msdk.splash.e.a.a(2, "error code:" + i + str, c2, d);
com.mbridge.msdk.splash.e.a.a(com.mbridge.msdk.foundation.controller.c.m().c(), d, c2, "error code:" + i + str, currentTimeMillis, 3);
}
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
super.a(webView, sslErrorHandler, sslError);
if (bVar != null) {
throw null;
}
g.this.a();
mBSplashView.setH5Ready(false);
new StringBuilder().append("error url:");
throw null;
}
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, String str) {
super.a(webView, str);
b bVar2 = bVar;
if (bVar2 != null) {
bVar2.a();
}
g.this.b = true;
if (!d.isHasMBTplMark()) {
mBSplashView.setH5Ready(true);
com.mbridge.msdk.splash.e.a.a(1, "", c2, d);
com.mbridge.msdk.splash.e.a.a(com.mbridge.msdk.foundation.controller.c.m().c(), d, c2, "", currentTimeMillis, 1);
}
com.mbridge.msdk.splash.signal.d.a(webView);
}
});
if (!splashWebview.isDestoryed()) {
splashWebview.loadUrl(a2);
} else {
mBSplashView.setH5Ready(false);
com.mbridge.msdk.splash.e.a.a(com.mbridge.msdk.foundation.controller.c.m().c(), d, c2, "webview had destory", currentTimeMillis, 3);
}
}
}

View File

@@ -0,0 +1,22 @@
package com.mbridge.msdk.splash.d;
import com.mbridge.msdk.foundation.entity.CampaignEx;
/* loaded from: classes4.dex */
public interface a {
void a();
void a(int i);
void a(int i, int i2);
void a(CampaignEx campaignEx);
void a(Object obj, String str);
void a(boolean z);
void a(boolean z, String str);
void b(int i);
}

View File

@@ -0,0 +1,74 @@
package com.mbridge.msdk.splash.d;
import android.text.TextUtils;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.report.i;
import com.mbridge.msdk.out.MBSplashLoadListener;
import com.mbridge.msdk.out.MBridgeIds;
import java.util.ArrayList;
/* loaded from: classes4.dex */
public final class b {
private MBSplashLoadListener a;
private c b;
private String c;
private String d;
private MBridgeIds e;
public final void a(MBSplashLoadListener mBSplashLoadListener) {
this.a = mBSplashLoadListener;
}
public final void a(String str) {
this.d = str;
}
public b(c cVar, MBridgeIds mBridgeIds) {
this.b = cVar;
this.e = mBridgeIds;
if (mBridgeIds != null) {
this.c = mBridgeIds.getUnitId();
}
}
public final void a(CampaignEx campaignEx, int i) {
c cVar;
c cVar2 = this.b;
if (cVar2 == null || !cVar2.a() || campaignEx == null) {
return;
}
MBSplashLoadListener mBSplashLoadListener = this.a;
if (mBSplashLoadListener != null) {
mBSplashLoadListener.onLoadSuccessed(this.e, i);
this.a.isSupportZoomOut(this.e, campaignEx.getFlb() == 1);
}
this.b.a(false);
ArrayList arrayList = new ArrayList();
arrayList.add(campaignEx);
i.a(com.mbridge.msdk.foundation.controller.c.m().c(), arrayList, this.c, campaignEx.isBidCampaign());
if (i != 2 || (cVar = this.b) == null) {
return;
}
cVar.a(campaignEx, 0, true);
}
public final void a(com.mbridge.msdk.foundation.c.b bVar, int i) {
c cVar = this.b;
if (cVar == null || !cVar.a()) {
return;
}
String str = "";
if (bVar != null) {
String b = bVar.b();
if (!TextUtils.isEmpty(b)) {
str = b;
}
}
MBSplashLoadListener mBSplashLoadListener = this.a;
if (mBSplashLoadListener != null) {
mBSplashLoadListener.onLoadFailed(this.e, str, i);
}
this.b.a(false);
i.a(com.mbridge.msdk.foundation.controller.c.m().c(), str, this.c, !TextUtils.isEmpty(this.d), bVar != null ? bVar.c() : null);
}
}

View File

@@ -0,0 +1,564 @@
package com.mbridge.msdk.splash.d;
import android.R;
import android.app.Activity;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import com.mbridge.msdk.c.h;
import com.mbridge.msdk.c.j;
import com.mbridge.msdk.c.k;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.at;
import com.mbridge.msdk.out.MBSplashLoadListener;
import com.mbridge.msdk.out.MBSplashShowListener;
import com.mbridge.msdk.out.MBridgeIds;
import com.mbridge.msdk.out.ZoomOutTypeEnum;
import com.mbridge.msdk.splash.c.e;
import com.mbridge.msdk.splash.c.f;
import com.mbridge.msdk.splash.view.BaseSplashPopView;
import com.mbridge.msdk.splash.view.MBSplashPopView;
import com.mbridge.msdk.splash.view.MBSplashView;
/* loaded from: classes4.dex */
public final class c {
private static String b = "SplashProvider";
private boolean A;
private CampaignEx B;
private MBSplashPopView C;
private String c;
private String d;
private MBridgeIds e;
private long g;
private e h;
private f i;
private b j;
private MBSplashShowListener k;
private d l;
private MBSplashView m;
private ViewGroup n;
private View o;
private k p;
private boolean q;
private ViewGroup r;
private j s;
private boolean t;
private Activity z;
private int f = 5;
private int u = 1;
private int v = ab.j(com.mbridge.msdk.foundation.controller.c.m().c());
private int w = ab.h(com.mbridge.msdk.foundation.controller.c.m().c());
private Object x = new Object();
private Object y = new Object();
public boolean a = false;
private boolean D = false;
public final void a(int i) {
this.u = i;
}
public final void a(long j) {
this.g = j;
}
public final void a(ViewGroup viewGroup) {
this.r = viewGroup;
}
public final void a(MBSplashShowListener mBSplashShowListener) {
this.k = mBSplashShowListener;
}
public final void a(boolean z) {
this.q = z;
}
public final boolean a() {
return this.q;
}
public final long b() {
return this.g;
}
public final void b(int i) {
this.f = i;
}
public final void b(boolean z) {
this.t = z;
}
public final void c(boolean z) {
this.A = z;
}
public final boolean c() {
return this.t;
}
public final int d() {
return this.f;
}
public c(Activity activity, String str, String str2) {
this.d = TextUtils.isEmpty(str) ? "" : str;
this.c = str2;
this.e = new MBridgeIds(str, str2);
this.z = activity;
if (this.i == null) {
if (activity != null) {
this.i = new f(activity, this.d, this.c);
} else {
this.i = new f(com.mbridge.msdk.foundation.controller.c.m().c(), this.d, this.c);
}
}
if (this.m == null) {
if (activity != null) {
this.m = new MBSplashView(activity);
} else {
this.m = new MBSplashView(com.mbridge.msdk.foundation.controller.c.m().c());
}
}
if (this.s == null) {
this.s = new j();
}
this.s.a(com.mbridge.msdk.foundation.controller.c.m().c(), com.mbridge.msdk.foundation.controller.c.m().k(), com.mbridge.msdk.foundation.controller.c.m().b(), this.c);
}
public final void a(MBSplashLoadListener mBSplashLoadListener) {
if (this.j == null) {
this.j = new b(this, this.e);
}
this.j.a(mBSplashLoadListener);
}
public final void a(String str) {
if (!TextUtils.isEmpty(str)) {
a(str, 1);
} else if (this.j != null) {
this.j.a(new com.mbridge.msdk.foundation.c.b(880035), 1);
}
}
public final void b(String str) {
a(str, 1);
}
public final void a(String str, Activity activity) {
ViewGroup a = a(activity);
if (a != null) {
a(str, a);
} else if (this.j != null) {
this.j.a(new com.mbridge.msdk.foundation.c.b(880036), 1);
}
}
public final void a(String str, ViewGroup viewGroup) {
if (!TextUtils.isEmpty(str)) {
b(str, viewGroup);
} else if (this.j != null) {
this.j.a(new com.mbridge.msdk.foundation.c.b(880035), 1);
}
}
public final void b(String str, Activity activity) {
ViewGroup a = a(activity);
if (a != null) {
b(str, a);
} else if (this.j != null) {
this.j.a(new com.mbridge.msdk.foundation.c.b(880036), 1);
}
}
public final void b(String str, ViewGroup viewGroup) {
this.n = viewGroup;
MBSplashView mBSplashView = this.m;
if (mBSplashView != null) {
mBSplashView.setDevContainer(viewGroup);
}
a(str, 2);
}
public final boolean c(String str) {
return com.mbridge.msdk.splash.c.d.a(this.m, this.d, this.c, str, this.t, this.f, false, true) != null;
}
public final void a(int i, int i2) {
b(i2, i);
}
public final String e() {
if (this.a) {
f fVar = this.i;
return fVar != null ? fVar.a() : "";
}
e eVar = this.h;
return eVar != null ? eVar.a() : "";
}
public final String f() {
if (this.a) {
f fVar = this.i;
return fVar != null ? fVar.b() : "";
}
e eVar = this.h;
return eVar != null ? eVar.b() : "";
}
public final void c(String str, Activity activity) {
ViewGroup a = a(activity);
if (a != null) {
c(str, a);
return;
}
MBSplashShowListener mBSplashShowListener = this.k;
if (mBSplashShowListener != null) {
mBSplashShowListener.onShowFailed(this.e, "activity is except,please check it");
}
}
public final void c(String str, ViewGroup viewGroup) {
if (!TextUtils.isEmpty(str)) {
d(str, viewGroup);
return;
}
MBSplashShowListener mBSplashShowListener = this.k;
if (mBSplashShowListener != null) {
mBSplashShowListener.onShowFailed(this.e, "token is null or empty");
}
}
public final void d(String str, Activity activity) {
ViewGroup a = a(activity);
if (a != null) {
d(str, a);
return;
}
MBSplashShowListener mBSplashShowListener = this.k;
if (mBSplashShowListener != null) {
mBSplashShowListener.onShowFailed(this.e, "activity is except,please check it");
}
}
public final void d(String str, ViewGroup viewGroup) {
this.n = viewGroup;
MBSplashView mBSplashView = this.m;
if (mBSplashView != null) {
mBSplashView.setDevContainer(viewGroup);
}
CampaignEx a = com.mbridge.msdk.splash.c.d.a(this.m, this.d, this.c, str, this.t, this.f, true, false);
if (a == null) {
MBSplashShowListener mBSplashShowListener = this.k;
if (mBSplashShowListener != null) {
mBSplashShowListener.onShowFailed(this.e, "campaignEx is vali");
return;
}
return;
}
if (this.p == null) {
this.p = h.a().c(com.mbridge.msdk.foundation.controller.c.m().k(), this.c);
}
d dVar = new d(this, this.k, a);
this.l = dVar;
if (this.v == 0 || this.w == 0) {
dVar.a(this.e, "width or height is 0 or width or height is too small");
return;
}
int i = this.f;
if (i < 2 || i > 10) {
dVar.a(this.e, "countDownTime must in 2 - 10 ,but now is " + this.f);
return;
}
a(a, this.p.r(), false);
}
public final void a(CampaignEx campaignEx, int i, boolean z) {
if (campaignEx != null && z) {
if (this.p == null) {
this.p = h.a().c(com.mbridge.msdk.foundation.controller.c.m().k(), this.c);
}
this.l = new d(this, this.k, campaignEx);
}
ViewGroup viewGroup = this.n;
if (viewGroup == null) {
d dVar = this.l;
if (dVar != null) {
dVar.a(this.e, "container is null");
return;
}
return;
}
if (this.i == null) {
this.i = new f(viewGroup.getContext(), this.d, this.c);
}
this.B = campaignEx;
b(campaignEx, i, z);
}
/* JADX INFO: Access modifiers changed from: private */
public void b(final CampaignEx campaignEx, final int i, final boolean z) {
if (!com.mbridge.msdk.splash.c.d.a(this.m, campaignEx)) {
if (i > 0) {
this.i.o.postDelayed(new Runnable() { // from class: com.mbridge.msdk.splash.d.c.1
@Override // java.lang.Runnable
public final void run() {
c.this.b(campaignEx, i - 1, z);
}
}, 1L);
return;
}
d dVar = this.l;
if (dVar != null) {
dVar.a(this.e, "campaignEx is not ready");
return;
}
return;
}
d(true);
ViewGroup.LayoutParams layoutParams = this.n.getLayoutParams();
if (layoutParams == null) {
layoutParams = new ViewGroup.LayoutParams(-1, -1);
} else {
layoutParams.height = -1;
layoutParams.width = -1;
}
this.n.setLayoutParams(layoutParams);
this.n.removeAllViews();
this.i.a(this.f);
this.i.a(this.r);
this.i.a(this.l);
af.b(b, "start show process");
ViewGroup viewGroup = this.n;
if (viewGroup != null) {
viewGroup.removeAllViews();
at.a(this.m);
this.n.addView(this.m);
}
this.i.a(this.t);
this.i.a(campaignEx, this.m);
}
private void a(String str, int i) {
synchronized (this.x) {
try {
if (this.q) {
if (this.j != null) {
this.j.a(new com.mbridge.msdk.foundation.c.b(880016, "current unit is loading"), i);
this.q = true;
}
return;
}
this.q = true;
int i2 = this.f;
if (i2 < 2 || i2 > 10) {
if (this.j != null) {
com.mbridge.msdk.foundation.c.b bVar = new com.mbridge.msdk.foundation.c.b(880037);
bVar.a("countDownTime must in 2 - 10");
this.j.a(bVar, i);
return;
}
return;
}
if (this.v == 0 || this.w == 0) {
if (this.j != null) {
this.j.a(new com.mbridge.msdk.foundation.c.b(880028), i);
return;
}
return;
}
try {
if (com.mbridge.msdk.mbsignalcommon.webEnvCheck.a.a(com.mbridge.msdk.foundation.controller.c.m().c())) {
this.m.clearResState();
this.p = h.a().c(com.mbridge.msdk.foundation.controller.c.m().k(), this.c);
if (this.h == null) {
this.h = new e(this.d, this.c, this.g * 1000);
}
b bVar2 = this.j;
if (bVar2 != null) {
bVar2.a(str);
this.h.a(this.j);
}
this.m.resetLoadState();
this.h.a(this.f);
this.h.a(this.m);
this.h.a(this.p);
this.h.a(this.v, this.w);
this.h.a(this.t);
this.h.b(this.u);
this.h.a(str, i);
return;
}
} catch (Exception unused) {
}
if (this.j != null) {
this.j.a(new com.mbridge.msdk.foundation.c.b(880029), i);
}
} catch (Throwable th) {
throw th;
}
}
}
public final void a(View view, RelativeLayout.LayoutParams layoutParams) {
this.o = view;
if (view != null) {
b(layoutParams.width, layoutParams.height);
MBSplashView mBSplashView = this.m;
if (mBSplashView != null) {
mBSplashView.setIconVg(view, layoutParams);
}
}
}
public final ViewGroup a(ZoomOutTypeEnum zoomOutTypeEnum) {
MBSplashPopView mBSplashPopView = new MBSplashPopView(com.mbridge.msdk.foundation.controller.c.m().c(), new BaseSplashPopView.a(this.d, this.c, zoomOutTypeEnum.getIndex(), this.B), this.l);
this.C = mBSplashPopView;
return mBSplashPopView;
}
public final void g() {
this.D = true;
MBSplashPopView mBSplashPopView = this.C;
if (mBSplashPopView != null) {
mBSplashPopView.startCountDown();
}
}
public final void h() {
this.D = false;
MBSplashShowListener mBSplashShowListener = this.k;
if (mBSplashShowListener != null) {
mBSplashShowListener.onZoomOutPlayFinish(new MBridgeIds(this.d, this.c));
}
MBSplashPopView mBSplashPopView = this.C;
if (mBSplashPopView != null) {
mBSplashPopView.release();
}
}
private void b(int i, int i2) {
int j = ab.j(com.mbridge.msdk.foundation.controller.c.m().c());
int h = ab.h(com.mbridge.msdk.foundation.controller.c.m().c());
int i3 = this.u;
if (i3 == 1) {
if (h >= i2 * 4) {
this.w = h - i2;
this.v = j;
return;
} else {
this.w = 0;
this.v = 0;
return;
}
}
if (i3 == 2) {
if (j >= i * 4) {
this.v = j - i;
this.w = h;
} else {
this.w = 0;
this.v = 0;
}
}
}
public final void i() {
f fVar = this.i;
if (fVar != null) {
fVar.c();
}
MBSplashPopView mBSplashPopView = this.C;
if (mBSplashPopView == null || !this.D) {
return;
}
mBSplashPopView.reStartCountDown();
}
public final void d(boolean z) {
MBSplashView mBSplashView = this.m;
if (mBSplashView != null) {
mBSplashView.setAllowClickSplash(z);
}
}
private ViewGroup a(Activity activity) {
Throwable th;
ViewGroup viewGroup;
if (activity != null && activity.isFinishing()) {
activity = null;
}
if (activity == null) {
af.d(b, "splash can't show because, activity is null or activity is finishing");
return null;
}
try {
viewGroup = (ViewGroup) activity.getWindow().getDecorView().findViewById(R.id.content);
} catch (Throwable th2) {
th = th2;
viewGroup = null;
}
try {
try {
return (ViewGroup) viewGroup.getChildAt(0);
} catch (Exception e) {
e.printStackTrace();
return viewGroup;
}
} catch (Throwable th3) {
th = th3;
th.printStackTrace();
return viewGroup;
}
}
public final void a(int i, int i2, int i3, int i4) {
try {
MBSplashView mBSplashView = this.m;
if (mBSplashView != null) {
mBSplashView.setNotchPadding(i, i2, i3, i4);
}
} catch (Throwable th) {
af.b(b, th.getMessage());
}
}
public final void j() {
f fVar = this.i;
if (fVar != null) {
fVar.d();
}
MBSplashPopView mBSplashPopView = this.C;
if (mBSplashPopView == null || !this.D) {
return;
}
mBSplashPopView.pauseCountDown();
}
public final void k() {
this.B = null;
if (this.k != null) {
this.k = null;
}
if (this.j != null) {
this.j = null;
}
if (this.l != null) {
this.l = null;
}
e eVar = this.h;
if (eVar != null) {
eVar.c();
}
f fVar = this.i;
if (fVar != null) {
fVar.e();
}
if (this.z != null) {
this.z = null;
}
}
}

View File

@@ -0,0 +1,99 @@
package com.mbridge.msdk.splash.d;
import com.ironsource.v8;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.report.i;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.out.MBSplashShowListener;
import com.mbridge.msdk.out.MBridgeIds;
/* loaded from: classes4.dex */
public final class d {
private MBSplashShowListener a;
private CampaignEx b;
private c c;
public d(c cVar, MBSplashShowListener mBSplashShowListener, CampaignEx campaignEx) {
this.c = cVar;
this.a = mBSplashShowListener;
this.b = campaignEx;
}
public final void a(MBridgeIds mBridgeIds) {
c cVar = this.c;
if (cVar != null) {
cVar.a = true;
}
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("load_to=");
stringBuffer.append(this.c.b());
stringBuffer.append(v8.i.c);
stringBuffer.append("allow_skip=");
stringBuffer.append(this.c.c() ? 1 : 0);
stringBuffer.append(v8.i.c);
stringBuffer.append("countdown=");
stringBuffer.append(this.c.d());
stringBuffer.append(v8.i.c);
i.b(com.mbridge.msdk.foundation.controller.c.m().c(), this.b, mBridgeIds.getUnitId(), stringBuffer.toString());
MBSplashShowListener mBSplashShowListener = this.a;
if (mBSplashShowListener != null) {
mBSplashShowListener.onShowSuccessed(mBridgeIds);
}
}
public final void a(MBridgeIds mBridgeIds, String str) {
c cVar = this.c;
if (cVar != null) {
cVar.a = false;
}
i.a(com.mbridge.msdk.foundation.controller.c.m().c(), this.b, mBridgeIds.getUnitId(), str);
MBSplashShowListener mBSplashShowListener = this.a;
if (mBSplashShowListener != null) {
mBSplashShowListener.onShowFailed(mBridgeIds, str);
}
}
public final void b(MBridgeIds mBridgeIds) {
MBSplashShowListener mBSplashShowListener = this.a;
if (mBSplashShowListener != null) {
mBSplashShowListener.onAdClicked(mBridgeIds);
}
}
public final void a(MBridgeIds mBridgeIds, int i) {
MBSplashShowListener mBSplashShowListener = this.a;
if (mBSplashShowListener != null) {
mBSplashShowListener.onDismiss(mBridgeIds, i);
}
c cVar = this.c;
if (cVar != null) {
cVar.a = false;
}
if (i == 6 || i == 4 || i == 5) {
try {
com.mbridge.msdk.splash.e.a.a(mBridgeIds.getUnitId(), i, this.b);
} catch (Exception e) {
af.b("SplashReport", e.getMessage());
}
}
}
public final void a(MBridgeIds mBridgeIds, long j) {
MBSplashShowListener mBSplashShowListener = this.a;
if (mBSplashShowListener != null) {
mBSplashShowListener.onAdTick(mBridgeIds, j);
}
}
public final void a(MBridgeIds mBridgeIds, int i, int i2, int i3) {
MBSplashShowListener mBSplashShowListener = this.a;
if (mBSplashShowListener != null) {
mBSplashShowListener.onZoomOutPlayStart(mBridgeIds);
}
try {
i.b(com.mbridge.msdk.foundation.controller.c.m().c(), this.b, mBridgeIds.getUnitId(), "flb_size=" + i2 + "x" + i + "&flb_type=" + i3 + v8.i.c);
} catch (Exception e) {
af.b("SplashReport", e.getMessage());
}
}
}

View File

@@ -0,0 +1,95 @@
package com.mbridge.msdk.splash.e;
import android.content.Context;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.entity.n;
import com.mbridge.msdk.foundation.same.report.d.d;
import com.mbridge.msdk.foundation.same.report.g;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbbid.common.BidResponsedEx;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public final class a {
public static void a(Context context, CampaignEx campaignEx, String str, String str2, long j, int i) {
if (campaignEx != null) {
try {
if (campaignEx.isMraid()) {
n nVar = new n();
nVar.f(campaignEx.getRequestId());
nVar.g(campaignEx.getRequestIdNotice());
nVar.e(campaignEx.getId());
nVar.b(i);
nVar.l(String.valueOf(System.currentTimeMillis() - j));
nVar.n("");
nVar.h(str2);
nVar.d("6");
nVar.d(n.a);
g.b(nVar, str, campaignEx);
}
} catch (Exception e) {
af.b("SplashReport", e.getMessage());
}
}
}
public static void a(String str, CampaignEx campaignEx) {
if (campaignEx == null || !campaignEx.isMraid()) {
return;
}
n nVar = new n("2000061", campaignEx.getId(), campaignEx.getRequestId(), campaignEx.getRequestIdNotice(), str, ab.m(c.m().c()));
nVar.d(n.a);
g.b(nVar, c.m().c(), str);
}
public static void a(int i, String str, String str2, CampaignEx campaignEx) {
if (campaignEx != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000068");
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str2);
jSONObject.put(BidResponsedEx.KEY_CID, campaignEx.getId());
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put(CampaignEx.JSON_KEY_CREATIVE_ID, campaignEx.getCreativeId());
jSONObject.put("hb", campaignEx.isBidCampaign() ? 1 : 0);
jSONObject.put("network_type", ab.m(c.m().c()));
jSONObject.put("result", i);
jSONObject.put("reason", str);
d.a().a(jSONObject);
} catch (Throwable th) {
af.b("SplashReport", th.getMessage());
}
}
}
public static void a(String str, int i, CampaignEx campaignEx) {
if (campaignEx != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000069");
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
jSONObject.put(BidResponsedEx.KEY_CID, campaignEx.getId());
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put(CampaignEx.JSON_KEY_CREATIVE_ID, campaignEx.getCreativeId());
jSONObject.put("hb", campaignEx.isBidCampaign() ? 1 : 0);
jSONObject.put("network_type", ab.m(c.m().c()));
jSONObject.put("close_type", i);
d.a().a(jSONObject);
} catch (Throwable th) {
af.b("SplashReport", th.getMessage());
}
}
}
public static void a(Context context, CampaignEx campaignEx) {
if (campaignEx == null || campaignEx.getNativeVideoTracking() == null || campaignEx.getNativeVideoTracking().l() == null) {
return;
}
com.mbridge.msdk.click.a.a(context, campaignEx, campaignEx.getCampaignUnitId(), campaignEx.getNativeVideoTracking().l(), false, false);
}
}

View File

@@ -0,0 +1,6 @@
package com.mbridge.msdk.splash.f;
/* loaded from: classes4.dex */
public class a {
protected static final String a = "a";
}

View File

@@ -0,0 +1,33 @@
package com.mbridge.msdk.splash.f;
import com.mbridge.msdk.foundation.entity.CampaignUnit;
import com.mbridge.msdk.out.Frame;
import com.mbridge.msdk.tracker.network.h;
import java.util.List;
/* loaded from: classes4.dex */
public abstract class b extends d {
private int a;
public abstract void a(int i, String str);
public abstract void a(CampaignUnit campaignUnit, int i);
@Override // com.mbridge.msdk.splash.f.d
public final void a(List<Frame> list) {
}
public b(int i) {
this.a = i;
}
@Override // com.mbridge.msdk.splash.f.d
public final void a(List<h> list, CampaignUnit campaignUnit) {
a(campaignUnit, this.a);
}
@Override // com.mbridge.msdk.splash.f.d
public final void b(int i, String str) {
a(i, str);
}
}

View File

@@ -0,0 +1,44 @@
package com.mbridge.msdk.splash.f;
import android.content.Context;
import android.os.Build;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.k;
import com.mbridge.msdk.out.MBConfiguration;
/* loaded from: classes4.dex */
public final class c extends com.mbridge.msdk.foundation.same.net.f.b {
public c(Context context) {
super(context);
}
@Override // com.mbridge.msdk.foundation.same.net.f.a, com.mbridge.msdk.foundation.same.net.f.c
public final void addExtraParams(String str, com.mbridge.msdk.foundation.same.net.f.e eVar) {
super.addExtraParams(str, eVar);
eVar.a("platform", "1");
eVar.a("os_version", Build.VERSION.RELEASE);
eVar.a("package_name", ab.f(this.mContext));
eVar.a("app_version_name", ab.q(this.mContext));
eVar.a("app_version_code", ab.r(this.mContext) + "");
eVar.a("orientation", ab.s(this.mContext) + "");
eVar.a("model", ab.h());
eVar.a("brand", ab.x());
eVar.a("gaid", "");
eVar.a("gaid2", com.mbridge.msdk.foundation.tools.f.b());
int m = ab.m(this.mContext);
eVar.a("network_type", m + "");
eVar.a("network_str", ab.a(this.mContext, m) + "");
eVar.a("language", ab.t(this.mContext));
eVar.a("timezone", ab.y());
eVar.a("useragent", ab.g());
eVar.a("sdk_version", MBConfiguration.SDK_VERSION);
eVar.a("screen_size", ab.j(this.mContext) + "x" + ab.h(this.mContext));
eVar.a("version_flag", "1");
if (com.mbridge.msdk.e.b.a()) {
eVar.a("gp_version", k.d(this.mContext));
}
com.mbridge.msdk.foundation.same.net.f.f.a(eVar, this.mContext);
com.mbridge.msdk.foundation.same.net.f.f.a(eVar);
com.mbridge.msdk.foundation.same.net.f.f.e(eVar);
}
}

View File

@@ -0,0 +1,112 @@
package com.mbridge.msdk.splash.f;
import android.text.TextUtils;
import com.mbridge.msdk.foundation.entity.CampaignUnit;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.out.Frame;
import com.mbridge.msdk.tracker.network.h;
import java.util.List;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public abstract class d extends com.mbridge.msdk.foundation.same.net.c<JSONObject> {
private static final String a = "d";
private int b;
private String c;
public final void a(String str) {
this.c = str;
}
public abstract void a(List<Frame> list);
public abstract void a(List<h> list, CampaignUnit campaignUnit);
public abstract void b(int i, String str);
@Override // com.mbridge.msdk.foundation.same.net.c
public void onPreExecute() {
super.onPreExecute();
}
@Override // com.mbridge.msdk.foundation.same.net.c, com.mbridge.msdk.foundation.same.net.b
public void onSuccess(com.mbridge.msdk.foundation.same.net.d<JSONObject> dVar) {
com.mbridge.msdk.foundation.same.net.d.a aVar;
CampaignUnit parseCampaignUnit;
super.onSuccess(dVar);
if (dVar == null || (aVar = dVar.b) == null) {
return;
}
int i = this.b;
if (i == 0) {
final List<h> list = aVar.b;
final JSONObject jSONObject = dVar.c;
final int optInt = jSONObject.optInt("status");
if (1 == optInt) {
calcRequestTime(System.currentTimeMillis());
final String optString = jSONObject.optString("version");
com.mbridge.msdk.foundation.same.f.a.b().execute(new Runnable() { // from class: com.mbridge.msdk.splash.f.d.1
@Override // java.lang.Runnable
public final void run() {
final CampaignUnit parseV5CampaignUnit = "v5".equals(optString) ? com.mbridge.msdk.foundation.entity.b.parseV5CampaignUnit(jSONObject.optJSONObject("data"), d.this.c) : com.mbridge.msdk.foundation.entity.b.parseCampaignUnit(jSONObject.optJSONObject("data"), d.this.c);
com.mbridge.msdk.foundation.same.f.a.c().post(new Runnable() { // from class: com.mbridge.msdk.splash.f.d.1.1
@Override // java.lang.Runnable
public final void run() {
CampaignUnit campaignUnit = parseV5CampaignUnit;
if (campaignUnit != null && campaignUnit.getAds() != null && parseV5CampaignUnit.getAds().size() > 0) {
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
d.this.a(list, parseV5CampaignUnit);
d.this.saveRequestTime(parseV5CampaignUnit.getAds().size());
} else {
CampaignUnit campaignUnit2 = parseV5CampaignUnit;
String msg = campaignUnit2 != null ? campaignUnit2.getMsg() : null;
if (TextUtils.isEmpty(msg)) {
msg = jSONObject.optString("msg");
}
AnonymousClass1 anonymousClass12 = AnonymousClass1.this;
d.this.b(optInt, msg);
}
}
});
}
});
return;
}
b(optInt, jSONObject.optString("msg"));
return;
}
if (i == 1) {
List<h> list2 = aVar.b;
JSONObject jSONObject2 = dVar.c;
int optInt2 = jSONObject2.optInt("status");
if (1 == optInt2) {
calcRequestTime(System.currentTimeMillis());
if ("v5".equals(jSONObject2.optString("version"))) {
parseCampaignUnit = com.mbridge.msdk.foundation.entity.b.parseV5CampaignUnit(jSONObject2.optJSONObject("data"), this.c);
} else {
parseCampaignUnit = com.mbridge.msdk.foundation.entity.b.parseCampaignUnit(jSONObject2.optJSONObject("data"), this.c);
}
if (parseCampaignUnit != null && parseCampaignUnit.getListFrames() != null && parseCampaignUnit.getListFrames().size() > 0) {
List<Frame> listFrames = parseCampaignUnit.getListFrames();
a(listFrames);
saveRequestTime(listFrames.size());
return;
} else {
String msg = parseCampaignUnit != null ? parseCampaignUnit.getMsg() : null;
if (TextUtils.isEmpty(msg)) {
msg = jSONObject2.optString("msg");
}
b(optInt2, msg);
return;
}
}
b(optInt2, jSONObject2.optString("msg"));
}
}
@Override // com.mbridge.msdk.foundation.same.net.c, com.mbridge.msdk.foundation.same.net.b
public void onError(com.mbridge.msdk.foundation.same.net.a.a aVar) {
af.b(a, "errorCode = " + aVar.a);
b(aVar.a, com.mbridge.msdk.foundation.same.net.e.a.a(aVar));
}
}

View File

@@ -0,0 +1,37 @@
package com.mbridge.msdk.splash.f;
import android.content.Context;
import android.text.TextUtils;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.tools.SameMD5;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.out.MBridgeIds;
/* loaded from: classes4.dex */
public final class e extends a {
public static com.mbridge.msdk.foundation.same.net.f.e a(Context context, MBridgeIds mBridgeIds, f fVar) {
String k = com.mbridge.msdk.foundation.controller.c.m().k();
String md5 = SameMD5.getMD5(com.mbridge.msdk.foundation.controller.c.m().k() + com.mbridge.msdk.foundation.controller.c.m().b());
com.mbridge.msdk.foundation.same.net.f.e eVar = new com.mbridge.msdk.foundation.same.net.f.e();
String a = com.mbridge.msdk.foundation.same.a.b.a(mBridgeIds.getUnitId(), "splash");
String a2 = ak.a(context, mBridgeIds.getUnitId());
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, "app_id", k);
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, MBridgeConstans.PROPERTIES_UNIT_ID, mBridgeIds.getUnitId());
if (!TextUtils.isEmpty(mBridgeIds.getPlacementId())) {
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, MBridgeConstans.PLACEMENT_ID, mBridgeIds.getPlacementId());
}
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, "sign", md5);
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, "req_type", fVar.a() + "");
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, "ad_num", "1");
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, "tnum", "1");
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, "only_impression", "1");
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, "ping_mode", "1");
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, com.mbridge.msdk.foundation.same.net.f.e.d, a);
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, com.mbridge.msdk.foundation.same.net.f.e.e, a2);
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, com.mbridge.msdk.foundation.same.net.f.e.f, fVar.b());
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, "ad_type", "297");
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, "offset", fVar.c() + "");
com.mbridge.msdk.foundation.same.net.e.b.a(eVar, com.mbridge.msdk.foundation.entity.b.JSON_KEY_UNIT_SIZE, fVar.d() + "x" + fVar.e());
return eVar;
}
}

View File

@@ -0,0 +1,57 @@
package com.mbridge.msdk.splash.f;
import androidx.annotation.NonNull;
/* loaded from: classes4.dex */
public final class f {
private int a;
private String b;
private int c;
private int d;
private int e;
public final int a() {
return this.a;
}
public final void a(int i) {
this.a = i;
}
public final void a(String str) {
this.b = str;
}
public final String b() {
return this.b;
}
public final void b(int i) {
this.c = i;
}
public final int c() {
return this.c;
}
public final void c(int i) {
this.d = i;
}
public final int d() {
return this.d;
}
public final void d(int i) {
this.e = i;
}
public final int e() {
return this.e;
}
@NonNull
public final String toString() {
return "NativeAdvancedV3ParamsEntity{reqType=" + this.a + ", session_id='" + this.b + "', offset=" + this.c + ", expectWidth=" + this.d + ", expectHeight=" + this.e + '}';
}
}

View File

@@ -0,0 +1,245 @@
package com.mbridge.msdk.splash.signal;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.webkit.ValueCallback;
import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.android.gms.ads.AdError;
import com.ironsource.nb;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.newreward.player.view.hybrid.util.MRAIDCommunicatorUtil;
import com.mbridge.msdk.widget.MBAdChoice;
import com.vungle.ads.internal.presenter.MRAIDPresenter;
import java.util.HashMap;
import java.util.List;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class SplashExpandDialog extends Dialog {
private final String a;
private String b;
private boolean c;
private FrameLayout d;
private WindVaneWebView e;
private TextView f;
private String g;
private List<CampaignEx> h;
private com.mbridge.msdk.splash.d.a i;
private com.mbridge.msdk.mbsignalcommon.mraid.b j;
public void setCampaignList(String str, List<CampaignEx> list) {
this.g = str;
this.h = list;
}
public SplashExpandDialog(Context context, Bundle bundle, com.mbridge.msdk.splash.d.a aVar) {
super(context);
this.a = "SplashExpandDialog";
this.j = new com.mbridge.msdk.mbsignalcommon.mraid.b() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.5
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final void expand(String str, boolean z) {
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final CampaignEx getMraidCampaign() {
return null;
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final void open(String str) {
try {
if (SplashExpandDialog.this.e == null || System.currentTimeMillis() - SplashExpandDialog.this.e.lastTouchTime <= com.mbridge.msdk.click.b.a.c || !com.mbridge.msdk.click.b.a.a((CampaignEx) SplashExpandDialog.this.h.get(0), SplashExpandDialog.this.e.getUrl(), com.mbridge.msdk.click.b.a.a)) {
af.b("SplashExpandDialog", str);
if (SplashExpandDialog.this.h.size() > 1) {
com.mbridge.msdk.foundation.controller.c.m().c().startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
str = null;
}
if (SplashExpandDialog.this.i != null) {
SplashExpandDialog.this.i.a(true, str);
}
}
} catch (Throwable th) {
af.b("SplashExpandDialog", MRAIDPresenter.OPEN, th);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final void close() {
SplashExpandDialog.this.dismiss();
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final void unload() {
close();
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final void useCustomClose(boolean z) {
try {
SplashExpandDialog.this.f.setVisibility(z ? 4 : 0);
} catch (Throwable th) {
af.b("SplashExpandDialog", "useCustomClose", th);
}
}
};
if (bundle != null) {
this.b = bundle.getString("url");
this.c = bundle.getBoolean("shouldUseCustomClose");
}
this.i = aVar;
}
@Override // android.app.Dialog
public void onCreate(Bundle bundle) {
CampaignEx campaignEx;
super.onCreate(bundle);
requestWindowFeature(1);
setCanceledOnTouchOutside(false);
setCancelable(true);
FrameLayout frameLayout = new FrameLayout(getContext());
this.d = frameLayout;
frameLayout.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
WindVaneWebView windVaneWebView = new WindVaneWebView(getContext().getApplicationContext());
this.e = windVaneWebView;
windVaneWebView.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
this.d.addView(this.e);
TextView textView = new TextView(getContext());
this.f = textView;
textView.setBackgroundColor(0);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(96, 96);
layoutParams.gravity = 8388661;
layoutParams.setMargins(30, 30, 30, 30);
this.f.setLayoutParams(layoutParams);
this.f.setVisibility(this.c ? 4 : 0);
this.f.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.1
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
SplashExpandDialog.this.dismiss();
}
});
this.d.addView(this.f);
setContentView(this.d);
a();
this.e.setWebViewListener(new com.mbridge.msdk.mbsignalcommon.b.b() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.2
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, String str) {
super.a(webView, str);
webView.evaluateJavascript("javascript:" + com.mbridge.msdk.c.b.a.a().b(), new ValueCallback<String>() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.2.1
@Override // android.webkit.ValueCallback
public final /* bridge */ /* synthetic */ void onReceiveValue(String str2) {
}
});
SplashExpandDialog.a(SplashExpandDialog.this);
}
});
this.e.setObject(this.j);
this.e.loadUrl(this.b);
List<CampaignEx> list = this.h;
if (list != null && !list.isEmpty() && (campaignEx = this.h.get(0)) != null && campaignEx.getPrivacyButtonTemplateVisibility() != 0) {
MBAdChoice mBAdChoice = new MBAdChoice(com.mbridge.msdk.foundation.controller.c.m().c());
mBAdChoice.setCampaign(campaignEx);
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 12.0f), ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 12.0f));
layoutParams2.gravity = 85;
layoutParams2.bottomMargin = layoutParams.topMargin;
layoutParams2.rightMargin = layoutParams.rightMargin;
mBAdChoice.setFeedbackDialogEventListener(new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.3
@Override // com.mbridge.msdk.foundation.d.a
public final void showed() {
}
@Override // com.mbridge.msdk.foundation.d.a
public final void close() {
SplashExpandDialog.this.a();
}
@Override // com.mbridge.msdk.foundation.d.a
public final void summit(String str) {
SplashExpandDialog.this.a();
}
});
this.d.addView(mBAdChoice, layoutParams2);
}
BitmapDrawable a = com.mbridge.msdk.foundation.controller.c.m().a(this.g, 297);
if (a != null) {
ImageView imageView = new ImageView(com.mbridge.msdk.foundation.controller.c.m().c());
ak.a(imageView, a, this.d.getResources().getDisplayMetrics());
this.d.addView(imageView, new ViewGroup.LayoutParams(-1, -1));
}
setOnDismissListener(new DialogInterface.OnDismissListener() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.4
@Override // android.content.DialogInterface.OnDismissListener
public final void onDismiss(DialogInterface dialogInterface) {
if (SplashExpandDialog.this.i != null) {
SplashExpandDialog.this.i.a(false);
SplashExpandDialog.this.i.a();
}
SplashExpandDialog.this.e.loadDataWithBaseURL(null, "", "text/html", nb.N, null);
SplashExpandDialog.this.d.removeView(SplashExpandDialog.this.e);
SplashExpandDialog.this.e.release();
SplashExpandDialog.this.e = null;
SplashExpandDialog.this.i = null;
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public void a() {
if (getWindow() != null) {
getWindow().setBackgroundDrawable(new ColorDrawable(0));
getWindow().getDecorView().setPadding(0, 0, 0, 0);
WindowManager.LayoutParams attributes = getWindow().getAttributes();
attributes.width = -1;
attributes.height = -1;
getWindow().setAttributes(attributes);
getWindow().getDecorView().setSystemUiVisibility(4615);
}
}
@Override // android.app.Dialog, android.content.DialogInterface
public void dismiss() {
super.dismiss();
}
public static /* synthetic */ void a(SplashExpandDialog splashExpandDialog) {
try {
int i = com.mbridge.msdk.foundation.controller.c.m().c().getResources().getConfiguration().orientation;
JSONObject jSONObject = new JSONObject();
jSONObject.put("orientation", i == 2 ? "landscape" : i == 1 ? "portrait" : AdError.UNDEFINED_DOMAIN);
jSONObject.put("locked", "true");
float j = ab.j(com.mbridge.msdk.foundation.controller.c.m().c());
float h = ab.h(com.mbridge.msdk.foundation.controller.c.m().c());
HashMap i2 = ab.i(com.mbridge.msdk.foundation.controller.c.m().c());
int intValue = ((Integer) i2.get("width")).intValue();
int intValue2 = ((Integer) i2.get("height")).intValue();
HashMap hashMap = new HashMap();
hashMap.put(MRAIDCommunicatorUtil.KEY_PLACEMENTTYPE, "Interstitial");
hashMap.put("state", MRAIDCommunicatorUtil.STATES_EXPANDED);
hashMap.put(MRAIDCommunicatorUtil.KEY_VIEWABLE, "true");
hashMap.put(MRAIDCommunicatorUtil.KEY_CURRENTORIENTATION, jSONObject);
splashExpandDialog.e.getLocationInWindow(new int[2]);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(splashExpandDialog.e, r1[0], r1[1], r11.getWidth(), splashExpandDialog.e.getHeight());
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(splashExpandDialog.e, r1[0], r1[1], r5.getWidth(), splashExpandDialog.e.getHeight());
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(splashExpandDialog.e, j, h);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().c(splashExpandDialog.e, intValue, intValue2);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(splashExpandDialog.e, hashMap);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(splashExpandDialog.e);
} catch (Throwable th) {
af.b("SplashExpandDialog", "notifyMraid", th);
}
}
}

View File

@@ -0,0 +1,185 @@
package com.mbridge.msdk.splash.signal;
import android.content.Context;
import android.text.TextUtils;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.windvane.AbsFeedBackForH5;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.unity3d.services.ads.gmascar.bridges.mobileads.MobileAdsBridgeBase;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class SplashSignal extends AbsFeedBackForH5 {
public static final /* synthetic */ int $r8$clinit = 0;
private static String a = "SplashSignal";
private c e;
@Override // com.mbridge.msdk.mbsignalcommon.windvane.h
public void initialize(Context context, WindVaneWebView windVaneWebView) {
super.initialize(context, windVaneWebView);
try {
if (windVaneWebView.getObject() == null || !(windVaneWebView.getObject() instanceof c)) {
return;
}
this.e = (c) windVaneWebView.getObject();
} catch (Throwable th) {
af.b(a, MobileAdsBridgeBase.initializeMethodName, th);
}
}
public void init(Object obj, String str) {
af.b(a, MobileAdsBridgeBase.initializeMethodName + str);
c cVar = this.e;
if (cVar != null) {
cVar.a(obj, str);
}
}
public void toggleCloseBtn(Object obj, String str) {
af.b(a, "toggleCloseBtn" + str);
c cVar = this.e;
if (cVar != null) {
cVar.b(obj, str);
}
}
public void triggerCloseBtn(Object obj, String str) {
af.b(a, "triggerCloseBtn" + str);
c cVar = this.e;
if (cVar != null) {
cVar.c(obj, str);
}
}
public void readyStatus(Object obj, String str) {
if (obj != null) {
try {
int optInt = new JSONObject(str).optInt("isReady", 1);
WindVaneWebView windVaneWebView = ((com.mbridge.msdk.mbsignalcommon.windvane.a) obj).b;
if (windVaneWebView == null || windVaneWebView.getWebViewListener() == null) {
return;
}
windVaneWebView.getWebViewListener().a(windVaneWebView, optInt);
} catch (Throwable th) {
af.b(a, "readyStatus", th);
}
}
}
public void install(Object obj, String str) {
c cVar = this.e;
if (cVar != null) {
cVar.d(obj, str);
}
}
public void resetCountdown(Object obj, String str) {
af.b(a, "resetCountdown" + str);
c cVar = this.e;
if (cVar != null) {
cVar.f(obj, str);
}
}
public void openURL(Object obj, String str) {
af.b(a, "openURL" + str);
c cVar = this.e;
if (cVar != null) {
cVar.e(obj, str);
}
}
public void handlerH5Exception(Object obj, String str) {
if (obj != null) {
try {
WindVaneWebView windVaneWebView = ((com.mbridge.msdk.mbsignalcommon.windvane.a) obj).b;
if (windVaneWebView == null || windVaneWebView.getWebViewListener() == null) {
return;
}
windVaneWebView.getWebViewListener().a(windVaneWebView, 0, str.toString(), windVaneWebView.getUrl());
} catch (Throwable th) {
af.b(a, "handlerH5Exception", th);
}
}
}
public void getFileInfo(Object obj, String str) {
try {
if (TextUtils.isEmpty(str)) {
return;
}
d.a(obj, new JSONObject(str));
} catch (JSONException e) {
e.printStackTrace();
}
}
public void sendImpressions(Object obj, String str) {
try {
af.b(a, "sendImpressions");
c cVar = this.e;
if (cVar != null) {
cVar.g(obj, str);
}
} catch (Throwable th) {
af.b(a, "sendImpressions", th);
}
}
public void reportUrls(Object obj, String str) {
try {
af.b(a, "reportUrls");
c cVar = this.e;
if (cVar != null) {
cVar.h(obj, str);
}
} catch (Throwable th) {
af.b(a, "reportUrls", th);
}
}
public void increaseOfferFrequence(Object obj, String str) {
try {
d.b(obj, new JSONObject(str));
} catch (JSONException e) {
e.printStackTrace();
}
}
public void onSignalCommunication(Object obj, String str) {
try {
af.b(a, "onSignalCommunication");
c cVar = this.e;
if (cVar != null) {
cVar.i(obj, str);
}
} catch (Throwable th) {
af.b(a, "onSignalCommunication", th);
}
}
public void pauseCountDown(Object obj, String str) {
try {
af.b(a, "pauseCountDown");
c cVar = this.e;
if (cVar != null) {
cVar.j(obj, str);
}
} catch (Throwable th) {
af.b(a, "pauseCountDown", th);
}
}
public void resumeCountDown(Object obj, String str) {
try {
af.b(a, "resumeCountDown");
c cVar = this.e;
if (cVar != null) {
cVar.k(obj, str);
}
} catch (Throwable th) {
af.b(a, "resumeCountDown", th);
}
}
}

View File

@@ -0,0 +1,455 @@
package com.mbridge.msdk.splash.signal;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Base64;
import com.ironsource.v8;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.c.h;
import com.mbridge.msdk.c.k;
import com.mbridge.msdk.foundation.db.j;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.mbbid.common.BidResponsedEx;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class a implements b {
private WeakReference<Context> b;
private List<CampaignEx> c;
private String d;
private String e;
private int f;
private int g;
private int i;
private com.mbridge.msdk.splash.d.a j;
private SplashExpandDialog k;
protected String a = "SplashSignalCommunicationImpl";
private int h = 5;
public final com.mbridge.msdk.splash.d.a a() {
return this.j;
}
public final void a(int i) {
this.g = i;
}
public final void a(com.mbridge.msdk.splash.d.a aVar) {
if (aVar != null) {
this.j = aVar;
}
}
public final void a(List<CampaignEx> list) {
this.c = list;
}
public final List<CampaignEx> b() {
return this.c;
}
public final void b(int i) {
this.h = i;
}
public final void c(int i) {
this.i = i;
}
public a(Context context, String str, String str2) {
this.e = str;
this.d = str2;
this.b = new WeakReference<>(context);
}
public final void a(Context context) {
this.b = new WeakReference<>(context);
}
public final void a(Object obj, String str) {
try {
JSONObject jSONObject = new JSONObject();
com.mbridge.msdk.splash.a.b bVar = new com.mbridge.msdk.splash.a.b(com.mbridge.msdk.foundation.controller.c.m().c());
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("dev_close_state", this.f);
jSONObject.put("sdkSetting", jSONObject2);
jSONObject.put("device", bVar.a());
jSONObject.put("campaignList", CampaignEx.parseCamplistToJson(this.c));
k d = h.a().d(com.mbridge.msdk.foundation.controller.c.m().k(), this.d);
if (d == null) {
d = k.d(this.d);
}
if (!TextUtils.isEmpty(this.e)) {
d.a(this.e);
}
d.b(this.d);
d.g(this.h);
d.b(this.g);
jSONObject.put("unitSetting", d.x());
String g = h.a().g(com.mbridge.msdk.foundation.controller.c.m().k());
if (!TextUtils.isEmpty(g)) {
jSONObject.put("appSetting", new JSONObject(g));
}
jSONObject.put("sdk_info", com.mbridge.msdk.mbsignalcommon.base.d.a);
af.b(this.a, v8.a.e + jSONObject.toString());
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Throwable th) {
af.b(this.a, v8.a.e, th);
}
}
public final void b(Object obj, String str) {
try {
if (TextUtils.isEmpty(str)) {
return;
}
int optInt = new JSONObject(str).optInt("state");
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(optInt);
}
} catch (Throwable th) {
af.b(this.a, "toggleCloseBtn", th);
}
}
public final void c(Object obj, String str) {
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(obj, str);
}
}
public final void d(Object obj, String str) {
af.b(this.a, "install");
try {
List<CampaignEx> list = this.c;
if (list == null) {
return;
}
CampaignEx campaignEx = (list == null || list.size() <= 0) ? null : this.c.get(0);
if (TextUtils.isEmpty(str)) {
return;
}
try {
JSONObject campaignToJsonObject = CampaignEx.campaignToJsonObject(campaignEx);
JSONObject jSONObject = new JSONObject(str);
Iterator<String> keys = jSONObject.keys();
while (keys.hasNext()) {
String next = keys.next();
campaignToJsonObject.put(next, jSONObject.getString(next));
}
CampaignEx parseCampaignWithBackData = CampaignEx.parseCampaignWithBackData(campaignToJsonObject);
String optString = campaignToJsonObject.optString("unitId");
if (!TextUtils.isEmpty(optString)) {
parseCampaignWithBackData.setCampaignUnitId(optString);
}
campaignEx = parseCampaignWithBackData;
} catch (JSONException e) {
e.printStackTrace();
}
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(campaignEx);
}
} catch (Throwable th) {
af.b(this.a, "click", th);
}
}
public final void e(Object obj, String str) {
WindVaneWebView windVaneWebView;
af.b(this.a, "openURL:" + str);
if (TextUtils.isEmpty(str)) {
com.mbridge.msdk.mbsignalcommon.communication.d.a(obj, "params is null");
return;
}
Context c = com.mbridge.msdk.foundation.controller.c.m().c();
if (TextUtils.isEmpty(str)) {
return;
}
if (c == null) {
try {
if ((obj instanceof com.mbridge.msdk.mbsignalcommon.windvane.a) && (windVaneWebView = ((com.mbridge.msdk.mbsignalcommon.windvane.a) obj).b) != null) {
c = windVaneWebView.getContext();
}
} catch (Exception e) {
af.b(this.a, e.getMessage());
}
}
if (c == null) {
return;
}
try {
JSONObject jSONObject = new JSONObject(str);
String optString = jSONObject.optString("url");
int optInt = jSONObject.optInt("type");
if (optInt == 1) {
com.mbridge.msdk.click.c.d(c, optString);
} else if (optInt == 2) {
com.mbridge.msdk.click.c.f(c, optString);
}
} catch (JSONException e2) {
af.b(this.a, e2.getMessage());
} catch (Throwable th) {
af.b(this.a, th.getMessage());
}
}
public final void f(Object obj, String str) {
try {
if (TextUtils.isEmpty(str)) {
return;
}
int i = new JSONObject(str).getInt("countdown");
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.b(i);
}
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void open(String str) {
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(true, str);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void close() {
af.b(this.a, "close");
try {
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a();
}
} catch (Throwable th) {
af.b(this.a, "close", th);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void unload() {
close();
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public CampaignEx getMraidCampaign() {
List<CampaignEx> list = this.c;
if (list == null || list.size() <= 0) {
return null;
}
return this.c.get(0);
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void useCustomClose(boolean z) {
int i = z ? 2 : 1;
try {
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(i);
}
} catch (Throwable th) {
af.b(this.a, "useCustomClose", th);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void expand(String str, boolean z) {
try {
Bundle bundle = new Bundle();
bundle.putString("url", str);
bundle.putBoolean("shouldUseCustomClose", z);
WeakReference<Context> weakReference = this.b;
if (weakReference == null || weakReference.get() == null) {
return;
}
SplashExpandDialog splashExpandDialog = this.k;
if (splashExpandDialog == null || !splashExpandDialog.isShowing()) {
SplashExpandDialog splashExpandDialog2 = new SplashExpandDialog(this.b.get(), bundle, this.j);
this.k = splashExpandDialog2;
splashExpandDialog2.setCampaignList(this.d, this.c);
this.k.show();
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(true);
}
String str2 = this.d;
CampaignEx mraidCampaign = getMraidCampaign();
try {
JSONObject jSONObject = new JSONObject();
if (mraidCampaign.isBidCampaign()) {
jSONObject.put("hb", 1);
}
jSONObject.put("key", "2000070");
jSONObject.put("rid_n", mraidCampaign.getRequestIdNotice());
jSONObject.put("rid", mraidCampaign.getRequestId());
jSONObject.put(BidResponsedEx.KEY_CID, mraidCampaign.getId());
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str2);
jSONObject.put(CampaignEx.JSON_KEY_CLICK_URL, str);
jSONObject.put("network_type", String.valueOf(ab.m(com.mbridge.msdk.foundation.controller.c.m().c())));
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
} catch (Exception e) {
af.b("SplashReport", e.getMessage());
}
}
} catch (Throwable th) {
af.b(this.a, "expand", th);
}
}
public final void g(Object obj, String str) {
af.a(this.a, "sendImpressions:" + str);
try {
if (TextUtils.isEmpty(str)) {
return;
}
JSONArray jSONArray = new JSONArray(str);
final ArrayList arrayList = new ArrayList();
for (int i = 0; i < jSONArray.length(); i++) {
String string = jSONArray.getString(i);
for (CampaignEx campaignEx : this.c) {
if (campaignEx.getId().equals(string)) {
com.mbridge.msdk.foundation.same.a.b.a(this.d, campaignEx, "splash");
arrayList.add(string);
}
}
}
new Thread(new Runnable() { // from class: com.mbridge.msdk.splash.signal.a.1
@Override // java.lang.Runnable
public final void run() {
try {
j a = j.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
Iterator it = arrayList.iterator();
while (it.hasNext()) {
a.a((String) it.next());
}
} catch (Exception unused) {
af.b(a.this.a, "campain can't insert db");
}
}
}).start();
} catch (Throwable th) {
af.b(this.a, "sendImpressions", th);
}
}
public final void h(Object obj, String str) {
af.a(this.a, "reportUrls:" + str);
if (TextUtils.isEmpty(str)) {
com.mbridge.msdk.mbsignalcommon.communication.d.a(obj, "params is null");
return;
}
if (TextUtils.isEmpty(str)) {
return;
}
try {
JSONArray jSONArray = new JSONArray(str);
for (int i = 0; i < jSONArray.length(); i++) {
JSONObject jSONObject = jSONArray.getJSONObject(i);
int optInt = jSONObject.optInt("type");
String a = ak.a(jSONObject.optString("url"), "&tun=", ab.q() + "");
int optInt2 = jSONObject.optInt("report");
if (optInt2 == 0) {
Context c = com.mbridge.msdk.foundation.controller.c.m().c();
List<CampaignEx> list = this.c;
com.mbridge.msdk.click.a.a(c, list != null ? list.get(0) : null, "", a, false, optInt != 0);
} else {
Context c2 = com.mbridge.msdk.foundation.controller.c.m().c();
List<CampaignEx> list2 = this.c;
com.mbridge.msdk.click.a.a(c2, list2 != null ? list2.get(0) : null, "", a, false, optInt != 0, optInt2);
}
}
g.a().a(obj, d.a(0));
} catch (Throwable th) {
af.b(this.a, "reportUrls", th);
}
}
public final void i(Object obj, String str) {
try {
if (obj instanceof com.mbridge.msdk.mbsignalcommon.windvane.a) {
g.a().a(((com.mbridge.msdk.mbsignalcommon.windvane.a) obj).b);
}
} catch (Throwable th) {
af.b(this.a, "onJSBridgeConnect", th);
}
}
public final void j(Object obj, String str) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("code", 0);
jSONObject.put("message", "Call pause count down success.");
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("countdown", this.i);
jSONObject.put("data", jSONObject2);
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
af.b(this.a, e.getMessage());
}
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(1, -1);
}
}
/* JADX WARN: Removed duplicated region for block: B:5:0x0030 */
/* JADX WARN: Removed duplicated region for block: B:8:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void k(java.lang.Object r3, java.lang.String r4) {
/*
r2 = this;
boolean r0 = android.text.TextUtils.isEmpty(r4)
r1 = 0
if (r0 != 0) goto L2c
org.json.JSONObject r0 = new org.json.JSONObject // Catch: java.lang.Exception -> L22
r0.<init>(r4) // Catch: java.lang.Exception -> L22
java.lang.String r4 = "countdown"
int r4 = r0.optInt(r4) // Catch: java.lang.Exception -> L22
com.mbridge.msdk.mbsignalcommon.windvane.g r0 = com.mbridge.msdk.mbsignalcommon.windvane.g.a() // Catch: java.lang.Exception -> L1f
java.lang.String r1 = com.mbridge.msdk.splash.signal.d.a(r1) // Catch: java.lang.Exception -> L1f
r0.a(r3, r1) // Catch: java.lang.Exception -> L1f
r1 = r4
goto L2c
L1f:
r3 = move-exception
r1 = r4
goto L23
L22:
r3 = move-exception
L23:
java.lang.String r4 = r2.a
java.lang.String r3 = r3.getMessage()
com.mbridge.msdk.foundation.tools.af.b(r4, r3)
L2c:
com.mbridge.msdk.splash.d.a r3 = r2.j
if (r3 == 0) goto L34
r4 = 2
r3.a(r4, r1)
L34:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.splash.signal.a.k(java.lang.Object, java.lang.String):void");
}
}

View File

@@ -0,0 +1,5 @@
package com.mbridge.msdk.splash.signal;
/* loaded from: classes4.dex */
public interface b extends com.mbridge.msdk.mbsignalcommon.mraid.b {
}

View File

@@ -0,0 +1,10 @@
package com.mbridge.msdk.splash.signal;
import android.content.Context;
/* loaded from: classes4.dex */
public final class c extends a {
public c(Context context, String str, String str2) {
super(context, str, str2);
}
}

View File

@@ -0,0 +1,301 @@
package com.mbridge.msdk.splash.signal;
import android.text.TextUtils;
import android.util.Base64;
import android.webkit.WebView;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.db.j;
import com.mbridge.msdk.foundation.db.n;
import com.mbridge.msdk.foundation.download.download.H5DownLoadManager;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.entity.m;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.aj;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import java.io.File;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public final class d {
private static String a = "SplashSignalUtils";
private static int b = 0;
private static int c = 1;
public static void a(Object obj, JSONObject jSONObject) {
String str;
JSONArray jSONArray;
String str2;
String str3;
JSONArray jSONArray2;
int i;
boolean z;
String str4;
File file;
String str5 = "";
JSONObject jSONObject2 = new JSONObject();
String str6 = "message";
int i2 = 1;
if (jSONObject == null) {
try {
jSONObject2.put("code", 1);
jSONObject2.put("message", "params is null");
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
return;
} catch (JSONException e) {
af.a(a, e.getMessage());
return;
}
}
try {
jSONObject2.put("code", 0);
jSONObject2.put("message", "");
jSONArray = jSONObject.getJSONArray("resource");
} catch (Throwable th) {
th = th;
str = "message";
}
try {
if (jSONArray != null) {
try {
if (jSONArray.length() > 0) {
JSONArray jSONArray3 = new JSONArray();
int length = jSONArray.length();
int i3 = 0;
while (i3 < length) {
JSONObject jSONObject3 = jSONArray.getJSONObject(i3);
String optString = jSONObject3.optString("ref", str5);
int i4 = jSONObject3.getInt("type");
JSONObject jSONObject4 = new JSONObject();
if (i4 == i2 && !TextUtils.isEmpty(optString)) {
JSONObject jSONObject5 = new JSONObject();
m a2 = n.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c())).a(optString);
if (a2 != null) {
jSONArray2 = jSONArray;
i = length;
af.a(a, "VideoBean not null");
jSONObject5.put("type", 1);
jSONObject5.put("videoDataLength", a2.d());
String e2 = a2.e();
str2 = str6;
if (TextUtils.isEmpty(e2)) {
af.a(a, "VideoPath null");
jSONObject5.put("path", str5);
jSONObject5.put("path4Web", str5);
str3 = str5;
} else {
str3 = str5;
af.a(a, "VideoPath not null");
jSONObject5.put("path", e2);
jSONObject5.put("path4Web", e2);
}
if (a2.b() == 5) {
jSONObject5.put("downloaded", 1);
z = false;
} else {
z = false;
jSONObject5.put("downloaded", 0);
}
jSONObject4.put(optString, jSONObject5);
jSONArray3.put(jSONObject4);
} else {
str3 = str5;
str2 = str6;
jSONArray2 = jSONArray;
i = length;
z = false;
af.a(a, "VideoBean null");
}
} else {
str3 = str5;
str2 = str6;
jSONArray2 = jSONArray;
i = length;
z = false;
if (i4 == 2 && !TextUtils.isEmpty(optString)) {
JSONObject jSONObject6 = new JSONObject();
jSONObject6.put("type", 2);
jSONObject6.put("path", H5DownLoadManager.getInstance().getH5ResAddress(optString) == null ? str3 : H5DownLoadManager.getInstance().getH5ResAddress(optString));
jSONObject4.put(optString, jSONObject6);
jSONArray3.put(jSONObject4);
} else if (i4 == 3 && !TextUtils.isEmpty(optString)) {
try {
file = new File(optString);
} catch (Throwable th2) {
if (MBridgeConstans.DEBUG) {
th2.printStackTrace();
}
}
if (file.exists() && file.isFile() && file.canRead()) {
af.a(a, "getFileInfo Mraid file " + optString);
str4 = "file:////" + optString;
JSONObject jSONObject7 = new JSONObject();
jSONObject7.put("type", 3);
jSONObject7.put("path", str4);
jSONObject4.put(optString, jSONObject7);
jSONArray3.put(jSONObject4);
}
str4 = str3;
JSONObject jSONObject72 = new JSONObject();
jSONObject72.put("type", 3);
jSONObject72.put("path", str4);
jSONObject4.put(optString, jSONObject72);
jSONArray3.put(jSONObject4);
} else if (i4 == 4 && !TextUtils.isEmpty(optString)) {
JSONObject jSONObject8 = new JSONObject();
jSONObject8.put("type", 4);
jSONObject8.put("path", aj.a(optString) == null ? str3 : aj.a(optString));
jSONObject4.put(optString, jSONObject8);
jSONArray3.put(jSONObject4);
}
}
i3++;
jSONArray = jSONArray2;
length = i;
str6 = str2;
str5 = str3;
i2 = 1;
}
jSONObject2.put("resource", jSONArray3);
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
return;
}
} catch (Throwable th3) {
th = th3;
str2 = str6;
str = str2;
try {
jSONObject2.put("code", 1);
jSONObject2.put(str, th.getLocalizedMessage());
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (JSONException e3) {
af.a(a, e3.getMessage());
return;
}
}
}
str = 1;
try {
try {
jSONObject2.put("code", 1);
str = "message";
try {
jSONObject2.put(str, "resource is null");
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (JSONException e4) {
e = e4;
af.a(a, e.getMessage());
}
} catch (Throwable th4) {
th = th4;
jSONObject2.put("code", 1);
jSONObject2.put(str, th.getLocalizedMessage());
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
}
} catch (JSONException e5) {
e = e5;
str = "message";
}
} catch (Throwable th5) {
th = th5;
str = str2;
jSONObject2.put("code", 1);
jSONObject2.put(str, th.getLocalizedMessage());
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
}
}
public static String a(int i) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", i);
String jSONObject2 = jSONObject.toString();
return !TextUtils.isEmpty(jSONObject2) ? Base64.encodeToString(jSONObject2.getBytes(), 2) : "";
} catch (Throwable unused) {
af.b(a, "code to string is error");
return "";
}
}
public static void b(Object obj, JSONObject jSONObject) {
try {
JSONObject optJSONObject = jSONObject.optJSONObject("data");
if (optJSONObject == null) {
a(obj, "data is empty");
return;
}
final CampaignEx parseCampaignWithBackData = CampaignEx.parseCampaignWithBackData(optJSONObject);
if (parseCampaignWithBackData == null) {
a(obj, "data camapign is empty");
return;
}
new Thread(new Runnable() { // from class: com.mbridge.msdk.splash.signal.d.1
@Override // java.lang.Runnable
public final void run() {
try {
j a2 = j.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
if (a2 != null) {
if (!a2.b(CampaignEx.this.getId())) {
com.mbridge.msdk.foundation.entity.g gVar = new com.mbridge.msdk.foundation.entity.g();
gVar.a(CampaignEx.this.getId());
gVar.b(CampaignEx.this.getFca());
gVar.c(CampaignEx.this.getFcb());
gVar.a(0);
gVar.d(1);
gVar.a(System.currentTimeMillis());
a2.a(gVar);
} else {
a2.a(CampaignEx.this.getId());
}
}
d.a(CampaignEx.this.getCampaignUnitId(), CampaignEx.this);
} catch (Throwable th) {
af.b(d.a, th.getMessage(), th);
}
}
}).start();
try {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("code", b);
JSONObject jSONObject3 = new JSONObject();
jSONObject3.put("id", "");
jSONObject2.put("data", jSONObject3);
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (Exception e) {
a(obj, e.getMessage());
af.a(a, e.getMessage());
}
} catch (Throwable th) {
a(obj, th.getMessage());
}
}
private static void a(Object obj, String str) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", c);
jSONObject.put("message", str);
jSONObject.put("data", new JSONObject());
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
af.a(a, e.getMessage());
}
}
public static void a(WebView webView, String str, String str2) {
g.a().a(webView, str, str2);
}
public static void a(WebView webView) {
af.b(a, "fireOnSignalCommunication");
g.a().a(webView);
}
public static /* synthetic */ void a(String str, CampaignEx campaignEx) {
if (com.mbridge.msdk.foundation.same.a.b.l == null || TextUtils.isEmpty(campaignEx.getId())) {
return;
}
com.mbridge.msdk.foundation.same.a.b.a(str, campaignEx, "splash");
}
}

View File

@@ -0,0 +1,236 @@
package com.mbridge.msdk.splash.view;
import android.content.Context;
import android.graphics.Bitmap;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ae;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.shake.MBShakeView;
import com.mbridge.msdk.shake.b;
import com.mbridge.msdk.splash.view.nativeview.MBNoRecycledCrashImageView;
import com.mbridge.msdk.splash.view.nativeview.MBSplashClickView;
import com.mbridge.msdk.widget.FeedBackButton;
/* loaded from: classes4.dex */
public class BaseMBSplashNativeView extends RelativeLayout {
private MBNoRecycledCrashImageView A;
private TextView B;
private MBNoRecycledCrashImageView C;
private TextView D;
private TextView E;
private int F;
private int G;
private int H;
private int I;
private int J;
private int K;
private float L;
private float M;
private boolean N;
private boolean O;
private String P;
private String Q;
private String R;
private String S;
protected TextView a;
protected RelativeLayout b;
protected TextView c;
protected TextView d;
protected TextView e;
protected TextView f;
protected MBSplashClickView g;
protected int h;
protected int i;
protected int j;
protected int k;
protected int l;
protected boolean m;
protected boolean n;
protected boolean o;
protected String p;
protected MBSplashView q;
protected CampaignEx r;
protected MBShakeView s;
protected b t;
private MBNoRecycledCrashImageView u;
private MBNoRecycledCrashImageView v;
private RelativeLayout w;
private ImageView x;
private FeedBackButton y;
private RelativeLayout z;
public void a() {
}
public void b() {
}
public void setIsPause(boolean z) {
this.n = z;
}
public BaseMBSplashNativeView(Context context) {
super(context);
this.n = false;
this.o = false;
}
public BaseMBSplashNativeView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public BaseMBSplashNativeView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.n = false;
this.o = false;
}
/* JADX WARN: Removed duplicated region for block: B:40:0x03cf */
/* JADX WARN: Removed duplicated region for block: B:43:0x03ee */
/* JADX WARN: Removed duplicated region for block: B:47:0x03f7 */
/* JADX WARN: Removed duplicated region for block: B:48:0x03d5 */
/* JADX WARN: Removed duplicated region for block: B:58:0x03bf */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public BaseMBSplashNativeView(android.content.Context r11, com.mbridge.msdk.splash.view.MBSplashView r12, com.mbridge.msdk.splash.a.c r13) {
/*
Method dump skipped, instructions count: 1052
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.splash.view.BaseMBSplashNativeView.<init>(android.content.Context, com.mbridge.msdk.splash.view.MBSplashView, com.mbridge.msdk.splash.a.c):void");
}
public final void a(int i) {
if (this.q.getSplashSignalCommunicationImpl() == null || this.q.getSplashSignalCommunicationImpl().a() == null) {
return;
}
try {
this.q.getSplashSignalCommunicationImpl().a().a(com.mbridge.msdk.splash.a.a.a.a(com.mbridge.msdk.splash.a.a.a.a(i, this.L, this.M), this.r));
} catch (Throwable th) {
af.b("MBSplashNativeView", th.getMessage());
this.q.getSplashSignalCommunicationImpl().a().a(this.r);
}
}
public void updateCountDown(int i) {
String str;
if (this.a != null) {
this.F = i;
if (this.m) {
str = this.R + " " + i + this.Q;
} else {
str = i + this.Q + " " + this.S;
}
this.a.setText(str);
}
}
public void setNotchPadding(int i, int i2, int i3, int i4) {
try {
RelativeLayout relativeLayout = this.w;
if (relativeLayout == null) {
return;
}
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) relativeLayout.getLayoutParams();
int i5 = this.K;
layoutParams.leftMargin = i + i5;
layoutParams.rightMargin = i2 + i5;
layoutParams.topMargin = i3 + i5;
layoutParams.bottomMargin = i5 + i4;
} catch (Throwable th) {
af.b("MBSplashNativeView", th.getMessage());
}
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
try {
if (this.j != 1 || this.s == null || this.t == null) {
return;
}
com.mbridge.msdk.shake.a.a().a(this.t);
} catch (Throwable th) {
af.b("MBSplashNativeView", th.getMessage());
}
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
release();
}
@Override // android.view.ViewGroup
public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
this.L = motionEvent.getRawX();
this.M = motionEvent.getRawY();
return super.onInterceptTouchEvent(motionEvent);
}
public void release() {
try {
if (this.t != null) {
com.mbridge.msdk.shake.a.a().b(this.t);
this.t = null;
}
com.mbridge.msdk.foundation.d.b.a().c(this.p);
detachAllViewsFromParent();
} catch (Exception e) {
af.b("MBSplashNativeView", e.getMessage());
}
}
public static /* synthetic */ void f(BaseMBSplashNativeView baseMBSplashNativeView) {
if (!TextUtils.isEmpty(baseMBSplashNativeView.r.getIconUrl())) {
com.mbridge.msdk.foundation.same.c.b.a(c.m().c()).a(baseMBSplashNativeView.r.getIconUrl(), new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.splash.view.BaseMBSplashNativeView.2
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onSuccessLoad(Bitmap bitmap, String str) {
Bitmap a;
if (bitmap != null) {
try {
if (bitmap.isRecycled()) {
return;
}
try {
if (BaseMBSplashNativeView.this.A == null || (a = ae.a(bitmap, 1, ak.a(c.m().c(), 40.0f))) == null || a.isRecycled()) {
return;
}
BaseMBSplashNativeView.this.A.setImageBitmap(a);
} catch (Throwable th) {
af.b("MBSplashNativeView", th.getMessage());
BaseMBSplashNativeView.this.A.setImageBitmap(bitmap);
}
} catch (Throwable th2) {
af.b("MBSplashNativeView", th2.getMessage());
}
}
}
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onFailedLoad(String str, String str2) {
BaseMBSplashNativeView.this.A.setVisibility(4);
}
});
} else {
baseMBSplashNativeView.A.setVisibility(4);
}
}
public static /* synthetic */ void b(BaseMBSplashNativeView baseMBSplashNativeView, boolean z) {
if (baseMBSplashNativeView.q.getSplashSignalCommunicationImpl() == null || baseMBSplashNativeView.q.getSplashSignalCommunicationImpl().a() == null) {
return;
}
baseMBSplashNativeView.q.getSplashSignalCommunicationImpl().a().a(z ? 2 : 1, baseMBSplashNativeView.F);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,65 @@
package com.mbridge.msdk.splash.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;
import com.mbridge.msdk.shake.MBShakeView;
import com.mbridge.msdk.shake.b;
import com.mbridge.msdk.splash.a.c;
/* loaded from: classes4.dex */
public class MBSplashNativeView extends BaseMBSplashNativeView {
public MBSplashNativeView(Context context) {
super(context);
}
public MBSplashNativeView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public MBSplashNativeView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
public MBSplashNativeView(Context context, MBSplashView mBSplashView, c cVar) {
super(context, mBSplashView, cVar);
}
@Override // com.mbridge.msdk.splash.view.BaseMBSplashNativeView
public final void a() {
this.b.setVisibility(8);
}
@Override // com.mbridge.msdk.splash.view.BaseMBSplashNativeView
public final void b() {
if (this.j == 1) {
MBShakeView mBShakeView = new MBShakeView(getContext());
this.s = mBShakeView;
mBShakeView.initView(this.r.getAdCall());
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);
layoutParams.addRule(13);
this.s.setLayoutParams(layoutParams);
addView(this.s);
this.g.setVisibility(4);
this.g.setEnabled(false);
this.s.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.MBSplashNativeView.1
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
MBSplashNativeView.this.a(0);
}
});
this.t = new b(this.k, this.l * 1000) { // from class: com.mbridge.msdk.splash.view.MBSplashNativeView.2
@Override // com.mbridge.msdk.shake.b
public final void a() {
MBSplashNativeView mBSplashNativeView = MBSplashNativeView.this;
if (mBSplashNativeView.o || mBSplashNativeView.n) {
return;
}
mBSplashNativeView.a(4);
com.mbridge.msdk.shake.a.a().b(this);
}
};
}
}
}

View File

@@ -0,0 +1,38 @@
package com.mbridge.msdk.splash.view;
import android.content.Context;
import android.util.AttributeSet;
import androidx.annotation.RequiresApi;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.splash.d.d;
import com.mbridge.msdk.splash.view.BaseSplashPopView;
/* loaded from: classes4.dex */
public class MBSplashPopView extends BaseSplashPopView {
public MBSplashPopView(Context context, BaseSplashPopView.a aVar, d dVar) {
super(context, aVar, dVar);
}
public MBSplashPopView(Context context) {
super(context);
}
public MBSplashPopView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public MBSplashPopView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
@RequiresApi(api = 21)
public MBSplashPopView(Context context, AttributeSet attributeSet, int i, int i2) {
super(context, attributeSet, i, i2);
}
@Override // com.mbridge.msdk.splash.view.BaseSplashPopView
public final void a(CampaignEx campaignEx) {
super.a(campaignEx);
b(campaignEx);
}
}

View File

@@ -0,0 +1,468 @@
package com.mbridge.msdk.splash.view;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.RelativeLayout;
import com.google.android.gms.ads.AdError;
import com.mbridge.msdk.dycreator.listener.DyCountDownListener;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.foundation.tools.at;
import com.mbridge.msdk.foundation.tools.s;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.newreward.player.view.hybrid.util.MRAIDCommunicatorUtil;
import com.mbridge.msdk.splash.signal.c;
import com.mbridge.msdk.splash.signal.d;
import java.util.HashMap;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBSplashView extends RelativeLayout {
private static String a = "MBSplashView";
private int b;
private MBSplashWebview c;
private a d;
private ViewGroup e;
private View f;
private View g;
private int h;
private boolean i;
private boolean j;
private boolean k;
private ViewGroup l;
private View m;
private boolean n;
private boolean o;
private RelativeLayout.LayoutParams p;
private c q;
private DyCountDownListener r;
public void clearResState() {
this.k = false;
this.j = false;
this.i = false;
}
public View getCloseView() {
return this.f;
}
public ViewGroup getDevContainer() {
return this.l;
}
public View getIconVg() {
return this.g;
}
public c getSplashSignalCommunicationImpl() {
return this.q;
}
public MBSplashWebview getSplashWebview() {
return this.c;
}
public boolean isAttach() {
return this.o;
}
public boolean isDynamicView() {
return this.n;
}
public boolean isH5Ready() {
return this.i;
}
public boolean isImageReady() {
return this.k;
}
public boolean isVideoReady() {
return this.j;
}
public void resetLoadState() {
this.j = false;
this.i = false;
}
public void setDevContainer(ViewGroup viewGroup) {
this.l = viewGroup;
}
public void setDyCountDownListener(DyCountDownListener dyCountDownListener) {
this.r = dyCountDownListener;
}
public void setDynamicView(boolean z) {
this.n = z;
}
public void setH5Ready(boolean z) {
this.i = z;
}
public void setIconVg(View view, RelativeLayout.LayoutParams layoutParams) {
this.g = view;
this.p = layoutParams;
}
public void setImageReady(boolean z) {
this.k = z;
}
public void setSplashNativeView(View view) {
if (view != null) {
this.m = view;
}
}
public void setVideoReady(boolean z) {
this.j = z;
}
public void setSplashSignalCommunicationImpl(c cVar) {
this.q = cVar;
MBSplashWebview mBSplashWebview = this.c;
if (mBSplashWebview != null) {
mBSplashWebview.setObject(cVar);
}
}
public MBSplashView(Context context) {
this(context, null);
}
public MBSplashView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public MBSplashView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
b();
}
@Override // android.view.View
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
b();
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
this.o = true;
}
private void b() {
setBackgroundColor(0);
this.b = getResources().getConfiguration().orientation;
}
public void setSplashWebView() {
if (this.c == null) {
try {
MBSplashWebview mBSplashWebview = new MBSplashWebview(getContext());
this.c = mBSplashWebview;
c cVar = this.q;
if (cVar != null) {
mBSplashWebview.setObject(cVar);
}
a aVar = this.d;
if (aVar != null) {
this.c.setWebViewClient(aVar);
return;
}
a aVar2 = new a();
this.d = aVar2;
this.c.setWebViewClient(aVar2);
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
}
public void changeCloseBtnState(int i) {
View view = this.f;
if (view != null) {
if (i == 2) {
view.setVisibility(8);
} else {
view.setVisibility(0);
}
}
}
public void setCloseView(View view) {
this.f = view;
if (view != null) {
view.setContentDescription("closeButton");
}
}
public void show() {
View view;
View view2;
View view3;
ViewGroup viewGroup;
com.mbridge.msdk.splash.d.a a2;
if (this.q != null && (viewGroup = this.l) != null && (viewGroup.getContext() instanceof Activity)) {
this.q.a(this.l.getContext());
a aVar = this.d;
if (aVar != null && (a2 = this.q.a()) != null) {
aVar.a = a2;
}
}
if (this.g != null) {
if (this.e == null) {
RelativeLayout relativeLayout = new RelativeLayout(getContext());
this.e = relativeLayout;
relativeLayout.setId(2147482647);
}
if (this.b == 2) {
this.h = ak.f(getContext());
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
layoutParams.addRule(0, this.e.getId());
if (this.n && (view2 = this.m) != null) {
if (view2.getParent() != null) {
at.a(this.m);
}
addView(this.m, layoutParams);
} else {
MBSplashWebview mBSplashWebview = this.c;
if (mBSplashWebview != null && mBSplashWebview.getParent() == null) {
addView(this.c, layoutParams);
}
c();
}
ViewGroup viewGroup2 = this.e;
if (viewGroup2 != null && viewGroup2.getParent() == null) {
int i = this.p.width;
at.a(this.g);
int i2 = this.h;
if (i > i2 / 4) {
i = i2 / 4;
}
this.e.addView(this.g, i, -1);
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(i, -1);
layoutParams2.addRule(11);
layoutParams2.addRule(13);
addView(this.e, layoutParams2);
}
} else {
this.h = ak.e(getContext());
RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(-1, -1);
layoutParams3.addRule(2, this.e.getId());
if (this.n && (view = this.m) != null) {
if (view.getParent() != null) {
at.a(this.m);
}
addView(this.m, layoutParams3);
} else {
MBSplashWebview mBSplashWebview2 = this.c;
if (mBSplashWebview2 != null && mBSplashWebview2.getParent() == null) {
addView(this.c, layoutParams3);
}
c();
}
ViewGroup viewGroup3 = this.e;
if (viewGroup3 != null && viewGroup3.getParent() == null) {
int i3 = this.p.height;
int i4 = this.h;
if (i3 > i4 / 4) {
i3 = i4 / 4;
}
at.a(this.g);
this.e.addView(this.g, -1, i3);
RelativeLayout.LayoutParams layoutParams4 = new RelativeLayout.LayoutParams(-1, i3);
layoutParams4.addRule(12);
addView(this.e, layoutParams4);
}
}
} else if (this.n && (view3 = this.m) != null) {
if (view3.getParent() != null) {
at.a(this.m);
}
addView(this.m, new ViewGroup.LayoutParams(-1, -1));
} else {
MBSplashWebview mBSplashWebview3 = this.c;
if (mBSplashWebview3 != null && mBSplashWebview3.getParent() == null) {
addView(this.c, new ViewGroup.LayoutParams(-1, -1));
}
c();
}
View view4 = this.f;
if (view4 != null) {
if (view4.getParent() == null) {
RelativeLayout.LayoutParams layoutParams5 = new RelativeLayout.LayoutParams(ak.a(getContext(), 100.0f), ak.a(getContext(), 30.0f));
layoutParams5.addRule(10);
layoutParams5.addRule(11);
layoutParams5.rightMargin = ak.a(getContext(), 10.0f);
layoutParams5.topMargin = ak.a(getContext(), 10.0f);
addView(this.f, layoutParams5);
} else {
bringChildToFront(this.f);
}
}
clearResState();
}
public void updateCountdown(int i) {
DyCountDownListener dyCountDownListener;
View view;
if (this.c != null && !this.n) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("countdown", i);
g.a().a((WebView) this.c, "updateCountdown", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (JSONException e) {
e.printStackTrace();
}
}
if (this.n && (view = this.m) != null && (view instanceof MBSplashNativeView)) {
((MBSplashNativeView) view).updateCountDown(i);
}
if (!this.n || (dyCountDownListener = this.r) == null) {
return;
}
dyCountDownListener.getCountDownValue(i);
}
private void c() {
MBSplashWebview mBSplashWebview = this.c;
if (mBSplashWebview != null) {
mBSplashWebview.setObject(this.q);
this.c.post(new Runnable() { // from class: com.mbridge.msdk.splash.view.MBSplashView.1
@Override // java.lang.Runnable
public final void run() {
try {
af.a(MBSplashView.a, "webviewshow");
String str = "";
try {
int[] iArr = new int[2];
MBSplashView.this.c.getLocationOnScreen(iArr);
af.b(MBSplashView.a, "coordinate:" + iArr[0] + "--" + iArr[1]);
JSONObject jSONObject = new JSONObject();
jSONObject.put("startX", ak.b(com.mbridge.msdk.foundation.controller.c.m().c(), (float) iArr[0]));
jSONObject.put("startY", ak.b(com.mbridge.msdk.foundation.controller.c.m().c(), (float) iArr[1]));
str = jSONObject.toString();
} catch (Throwable th) {
af.b(MBSplashView.a, th.getMessage(), th);
}
int[] iArr2 = new int[2];
MBSplashView.this.c.getLocationInWindow(iArr2);
MBSplashView.transInfoForMraid(MBSplashView.this.c, iArr2[0], iArr2[1], MBSplashView.this.c.getWidth(), MBSplashView.this.c.getHeight());
g.a().a((WebView) MBSplashView.this.c, "webviewshow", Base64.encodeToString(str.toString().getBytes(), 2));
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
}
public static void transInfoForMraid(WebView webView, int i, int i2, int i3, int i4) {
af.b(a, "transInfoForMraid");
try {
int i5 = com.mbridge.msdk.foundation.controller.c.m().c().getResources().getConfiguration().orientation;
JSONObject jSONObject = new JSONObject();
jSONObject.put("orientation", i5 == 2 ? "landscape" : i5 == 1 ? "portrait" : AdError.UNDEFINED_DOMAIN);
jSONObject.put("locked", "true");
float j = ab.j(com.mbridge.msdk.foundation.controller.c.m().c());
float h = ab.h(com.mbridge.msdk.foundation.controller.c.m().c());
HashMap i6 = ab.i(com.mbridge.msdk.foundation.controller.c.m().c());
int intValue = ((Integer) i6.get("width")).intValue();
int intValue2 = ((Integer) i6.get("height")).intValue();
HashMap hashMap = new HashMap();
hashMap.put(MRAIDCommunicatorUtil.KEY_PLACEMENTTYPE, "Interstitial");
hashMap.put("state", MRAIDCommunicatorUtil.STATES_DEFAULT);
hashMap.put(MRAIDCommunicatorUtil.KEY_VIEWABLE, "true");
hashMap.put(MRAIDCommunicatorUtil.KEY_CURRENTORIENTATION, jSONObject);
float f = i;
float f2 = i2;
float f3 = i3;
float f4 = i4;
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(webView, f, f2, f3, f4);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(webView, f, f2, f3, f4);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(webView, j, h);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().c(webView, intValue, intValue2);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(webView, hashMap);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(webView);
} catch (Throwable th) {
af.b(a, "transInfoForMraid", th);
}
}
public void onResume() {
View view = this.m;
if (view == null || !(view instanceof MBSplashNativeView)) {
return;
}
((MBSplashNativeView) view).setIsPause(false);
}
public void onPause() {
View view = this.m;
if (view == null || !(view instanceof MBSplashNativeView)) {
return;
}
((MBSplashNativeView) view).setIsPause(true);
}
public void setNotchPadding(int i, int i2, int i3, int i4) {
View view = this.m;
if (view != null && (view instanceof MBSplashNativeView)) {
((MBSplashNativeView) view).setNotchPadding(i, i2, i3, i4);
}
if (this.c != null) {
g.a().a((WebView) this.c, "oncutoutfetched", Base64.encodeToString(s.a(-999, i, i2, i3, i4).getBytes(), 0));
}
}
@SuppressLint({"ClickableViewAccessibility"})
public void setAllowClickSplash(final boolean z) {
MBSplashWebview mBSplashWebview = this.c;
if (mBSplashWebview != null) {
mBSplashWebview.setOnTouchListener(new View.OnTouchListener() { // from class: com.mbridge.msdk.splash.view.MBSplashView.2
@Override // android.view.View.OnTouchListener
public final boolean onTouch(View view, MotionEvent motionEvent) {
return !z;
}
});
}
setOnTouchListener(new View.OnTouchListener() { // from class: com.mbridge.msdk.splash.view.MBSplashView.3
@Override // android.view.View.OnTouchListener
public final boolean onTouch(View view, MotionEvent motionEvent) {
return !z;
}
});
}
public void destroy() {
removeAllViews();
ViewGroup viewGroup = this.l;
if (viewGroup != null) {
viewGroup.removeAllViews();
}
MBSplashWebview mBSplashWebview = this.c;
if (mBSplashWebview == null || mBSplashWebview.isDestoryed()) {
return;
}
this.c.finishAdSession();
d.a(this.c, "onSystemDestory", "");
this.c.release();
this.c = null;
}
}

View File

@@ -0,0 +1,47 @@
package com.mbridge.msdk.splash.view;
import android.content.Context;
import com.iab.omid.library.mmadbridge.adsession.AdSession;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
/* loaded from: classes4.dex */
public class MBSplashWebview extends WindVaneWebView {
private static final String e = "MBSplashWebview";
private String f;
private AdSession g;
public AdSession getAdSession() {
return this.g;
}
public String getRequestId() {
return this.f;
}
public void setAdSession(AdSession adSession) {
this.g = adSession;
}
public void setRequestId(String str) {
this.f = str;
}
public MBSplashWebview(Context context) {
super(context);
setBackgroundColor(0);
}
public void finishAdSession() {
try {
AdSession adSession = this.g;
if (adSession != null) {
adSession.finish();
this.g = null;
af.a("OMSDK", "finish adSession");
}
} catch (Exception e2) {
af.a("OMSDK", e2.getMessage());
}
}
}

View File

@@ -0,0 +1,48 @@
package com.mbridge.msdk.splash.view;
import android.graphics.Bitmap;
import android.webkit.ValueCallback;
import android.webkit.WebView;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.base.b;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.splash.signal.c;
/* loaded from: classes4.dex */
public final class a extends b {
com.mbridge.msdk.splash.d.a a;
private final String b = "SplashWebViewClient";
@Override // android.webkit.WebViewClient
public final void onPageStarted(WebView webView, String str, Bitmap bitmap) {
super.onPageStarted(webView, str, bitmap);
try {
webView.evaluateJavascript("javascript:" + com.mbridge.msdk.c.b.a.a().b(), new ValueCallback<String>() { // from class: com.mbridge.msdk.splash.view.a.1
@Override // android.webkit.ValueCallback
public final /* bridge */ /* synthetic */ void onReceiveValue(String str2) {
}
});
} catch (Throwable th) {
af.b("SplashWebViewClient", "onPageStarted", th);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.base.b, android.webkit.WebViewClient
public final boolean shouldOverrideUrlLoading(WebView webView, String str) {
try {
WindVaneWebView windVaneWebView = (WindVaneWebView) webView;
if (System.currentTimeMillis() - windVaneWebView.lastTouchTime > com.mbridge.msdk.click.b.a.c && com.mbridge.msdk.click.b.a.a(((c) windVaneWebView.getObject()).b().get(0), windVaneWebView.getUrl(), com.mbridge.msdk.click.b.a.b)) {
return false;
}
com.mbridge.msdk.splash.d.a aVar = this.a;
if (aVar == null) {
return true;
}
aVar.a(false, str);
return true;
} catch (Throwable th) {
af.b("SplashWebViewClient", "shouldOverrideUrlLoading", th);
return false;
}
}
}

View File

@@ -0,0 +1,37 @@
package com.mbridge.msdk.splash.view.nativeview;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.widget.ImageView;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
/* loaded from: classes4.dex */
public class MBNoRecycledCrashImageView extends ImageView {
public MBNoRecycledCrashImageView(Context context) {
super(context);
}
public MBNoRecycledCrashImageView(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
}
public MBNoRecycledCrashImageView(Context context, @Nullable AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
@RequiresApi(api = 21)
public MBNoRecycledCrashImageView(Context context, @Nullable AttributeSet attributeSet, int i, int i2) {
super(context, attributeSet, i, i2);
}
@Override // android.widget.ImageView, android.view.View
public void onDraw(Canvas canvas) {
try {
super.onDraw(canvas);
} catch (RuntimeException e) {
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,376 @@
package com.mbridge.msdk.splash.view.nativeview;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
import android.graphics.drawable.GradientDrawable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.animation.Animation;
import android.view.animation.ScaleAnimation;
import android.view.animation.TranslateAnimation;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.RequiresApi;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.tools.ak;
/* loaded from: classes4.dex */
public class MBSplashClickView extends RelativeLayout {
public final int TYPE_SPLASH_BTN_CLICK;
public final int TYPE_SPLASH_BTN_GO;
public final int TYPE_SPLASH_BTN_OPEN;
private final String a;
private final String b;
private final String c;
private final String d;
private final String e;
private final String f;
private final String g;
private final String h;
private final String i;
private final String j;
private final String k;
private String l;
private int m;
private ImageView n;
private ImageView o;
private final RectF p;
private final Paint q;
private final Paint r;
public MBSplashClickView(Context context) {
super(context);
this.a = "浏览第三方应用";
this.b = "View";
this.c = "打开第三方应用";
this.d = "Open";
this.e = "下载第三方应用";
this.f = "Install";
this.g = "mbridge_splash_btn_arrow_right";
this.h = "mbridge_splash_btn_circle";
this.i = "mbridge_splash_btn_finger";
this.j = "mbridge_splash_btn_go";
this.k = "mbridge_splash_btn_light";
this.TYPE_SPLASH_BTN_OPEN = 1;
this.TYPE_SPLASH_BTN_GO = 2;
this.TYPE_SPLASH_BTN_CLICK = 3;
this.p = new RectF();
this.q = new Paint();
this.r = new Paint();
a();
}
public MBSplashClickView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.a = "浏览第三方应用";
this.b = "View";
this.c = "打开第三方应用";
this.d = "Open";
this.e = "下载第三方应用";
this.f = "Install";
this.g = "mbridge_splash_btn_arrow_right";
this.h = "mbridge_splash_btn_circle";
this.i = "mbridge_splash_btn_finger";
this.j = "mbridge_splash_btn_go";
this.k = "mbridge_splash_btn_light";
this.TYPE_SPLASH_BTN_OPEN = 1;
this.TYPE_SPLASH_BTN_GO = 2;
this.TYPE_SPLASH_BTN_CLICK = 3;
this.p = new RectF();
this.q = new Paint();
this.r = new Paint();
a();
}
public MBSplashClickView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.a = "浏览第三方应用";
this.b = "View";
this.c = "打开第三方应用";
this.d = "Open";
this.e = "下载第三方应用";
this.f = "Install";
this.g = "mbridge_splash_btn_arrow_right";
this.h = "mbridge_splash_btn_circle";
this.i = "mbridge_splash_btn_finger";
this.j = "mbridge_splash_btn_go";
this.k = "mbridge_splash_btn_light";
this.TYPE_SPLASH_BTN_OPEN = 1;
this.TYPE_SPLASH_BTN_GO = 2;
this.TYPE_SPLASH_BTN_CLICK = 3;
this.p = new RectF();
this.q = new Paint();
this.r = new Paint();
a();
}
@RequiresApi(api = 21)
public MBSplashClickView(Context context, AttributeSet attributeSet, int i, int i2) {
super(context, attributeSet, i, i2);
this.a = "浏览第三方应用";
this.b = "View";
this.c = "打开第三方应用";
this.d = "Open";
this.e = "下载第三方应用";
this.f = "Install";
this.g = "mbridge_splash_btn_arrow_right";
this.h = "mbridge_splash_btn_circle";
this.i = "mbridge_splash_btn_finger";
this.j = "mbridge_splash_btn_go";
this.k = "mbridge_splash_btn_light";
this.TYPE_SPLASH_BTN_OPEN = 1;
this.TYPE_SPLASH_BTN_GO = 2;
this.TYPE_SPLASH_BTN_CLICK = 3;
this.p = new RectF();
this.q = new Paint();
this.r = new Paint();
}
private void a() {
this.q.setAntiAlias(true);
this.q.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
this.r.setAntiAlias(true);
this.r.setColor(-1);
}
@Override // android.widget.RelativeLayout, android.view.ViewGroup, android.view.View
public void onLayout(boolean z, int i, int i2, int i3, int i4) {
super.onLayout(z, i, i2, i3, i4);
this.p.set(0.0f, 0.0f, getWidth(), getHeight());
}
@Override // android.view.View
public void draw(Canvas canvas) {
canvas.saveLayer(this.p, this.r, 31);
canvas.drawRoundRect(this.p, 200.0f, 200.0f, this.r);
canvas.saveLayer(this.p, this.q, 31);
super.draw(canvas);
canvas.restore();
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
int i = this.m;
if (i == 2) {
ScaleAnimation scaleAnimation = new ScaleAnimation(0.8f, 1.0f, 0.8f, 1.0f, 1, 0.5f, 1, 0.5f);
scaleAnimation.setDuration(500L);
scaleAnimation.setRepeatCount(-1);
scaleAnimation.setRepeatMode(2);
this.n.startAnimation(scaleAnimation);
return;
}
if (i == 1) {
TranslateAnimation translateAnimation = new TranslateAnimation(0, -100.0f, 0, 1000.0f, 0, 0.0f, 0, 0.0f);
translateAnimation.setDuration(1000L);
translateAnimation.setAnimationListener(new Animation.AnimationListener() { // from class: com.mbridge.msdk.splash.view.nativeview.MBSplashClickView.3
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationRepeat(Animation animation) {
}
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationStart(Animation animation) {
MBSplashClickView.this.n.setVisibility(0);
}
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationEnd(final Animation animation) {
MBSplashClickView.this.n.setVisibility(4);
MBSplashClickView.this.n.postDelayed(new Runnable() { // from class: com.mbridge.msdk.splash.view.nativeview.MBSplashClickView.3.1
@Override // java.lang.Runnable
public final void run() {
MBSplashClickView.this.n.startAnimation(animation);
}
}, 2000L);
}
});
this.n.startAnimation(translateAnimation);
return;
}
if (i == 3) {
ScaleAnimation scaleAnimation2 = new ScaleAnimation(1.0f, 0.7f, 1.0f, 0.7f, 1, 0.5f, 1, 0.5f);
scaleAnimation2.setDuration(400L);
scaleAnimation2.setRepeatCount(-1);
scaleAnimation2.setRepeatMode(2);
final ScaleAnimation scaleAnimation3 = new ScaleAnimation(0.0f, 0.5f, 0.0f, 0.5f, 1, 0.5f, 1, 0.5f);
scaleAnimation3.setDuration(200L);
scaleAnimation3.setAnimationListener(new Animation.AnimationListener() { // from class: com.mbridge.msdk.splash.view.nativeview.MBSplashClickView.1
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationRepeat(Animation animation) {
}
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationStart(Animation animation) {
MBSplashClickView.this.o.setVisibility(0);
}
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationEnd(Animation animation) {
MBSplashClickView.this.o.setVisibility(4);
MBSplashClickView.this.o.postDelayed(new Runnable() { // from class: com.mbridge.msdk.splash.view.nativeview.MBSplashClickView.1.1
@Override // java.lang.Runnable
public final void run() {
MBSplashClickView.this.o.startAnimation(scaleAnimation3);
}
}, 700L);
}
});
this.o.setVisibility(4);
this.n.startAnimation(scaleAnimation2);
this.o.postDelayed(new Runnable() { // from class: com.mbridge.msdk.splash.view.nativeview.MBSplashClickView.2
@Override // java.lang.Runnable
public final void run() {
MBSplashClickView.this.o.startAnimation(scaleAnimation3);
}
}, 500L);
}
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
public void initView(String str) {
char c;
RelativeLayout.LayoutParams layoutParams;
this.l = str;
str.hashCode();
int i = 0;
switch (str.hashCode()) {
case -672744069:
if (str.equals("Install")) {
c = 0;
break;
}
c = 65535;
break;
case 2464362:
if (str.equals("Open")) {
c = 1;
break;
}
c = 65535;
break;
case 2666181:
if (str.equals("View")) {
c = 2;
break;
}
c = 65535;
break;
case 855294846:
if (str.equals("下载第三方应用")) {
c = 3;
break;
}
c = 65535;
break;
case 1383132195:
if (str.equals("打开第三方应用")) {
c = 4;
break;
}
c = 65535;
break;
case 1681333335:
if (str.equals("浏览第三方应用")) {
c = 5;
break;
}
c = 65535;
break;
default:
c = 65535;
break;
}
switch (c) {
case 0:
case 3:
this.m = 3;
break;
case 1:
case 4:
this.m = 1;
break;
case 2:
case 5:
this.m = 2;
break;
default:
boolean contains = getContext().getResources().getConfiguration().locale.getLanguage().contains("zh");
if (TextUtils.isEmpty(this.l)) {
this.l = contains ? "浏览第三方应用" : "View";
}
this.m = 2;
break;
}
int i2 = this.m;
int parseColor = Color.parseColor("#666666");
int parseColor2 = Color.parseColor("#8FC31F");
int parseColor3 = Color.parseColor("#000000");
GradientDrawable gradientDrawable = new GradientDrawable();
if (i2 == 2) {
gradientDrawable.setColor(parseColor2);
} else {
gradientDrawable.setColor(parseColor3);
gradientDrawable.setStroke(2, parseColor);
}
gradientDrawable.setCornerRadius(200);
setBackground(gradientDrawable);
TextView textView = new TextView(getContext());
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(-1, -1);
layoutParams2.addRule(15);
textView.setLayoutParams(layoutParams2);
textView.setGravity(17);
textView.setTextSize(20.0f);
textView.setTextColor(-1);
textView.setText(this.l);
this.n = new ImageView(getContext());
int i3 = this.m;
if (i3 == 2) {
i = getResources().getIdentifier("mbridge_splash_btn_go", "drawable", c.m().g());
layoutParams = new RelativeLayout.LayoutParams(ak.a(getContext(), 35.0f), ak.a(getContext(), 35.0f));
layoutParams.addRule(11);
layoutParams.addRule(15);
layoutParams.rightMargin = ak.a(getContext(), 10.0f);
} else if (i3 == 1) {
i = getResources().getIdentifier("mbridge_splash_btn_light", "drawable", c.m().g());
layoutParams = new RelativeLayout.LayoutParams(-2, -1);
layoutParams.leftMargin = 20;
layoutParams.rightMargin = 20;
ImageView imageView = new ImageView(getContext());
RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(-2, -1);
layoutParams3.addRule(11);
layoutParams3.addRule(15);
layoutParams3.rightMargin = ak.a(getContext(), 50.0f);
imageView.setImageResource(getResources().getIdentifier("mbridge_splash_btn_arrow_right", "drawable", c.m().g()));
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setLayoutParams(layoutParams3);
addView(imageView);
} else if (i3 == 3) {
i = getResources().getIdentifier("mbridge_splash_btn_finger", "drawable", c.m().g());
layoutParams = new RelativeLayout.LayoutParams(ak.a(getContext(), 25.0f), ak.a(getContext(), 25.0f));
layoutParams.addRule(11);
layoutParams.rightMargin = ak.a(getContext(), 50.0f);
layoutParams.topMargin = ak.a(getContext(), 18.0f);
this.o = new ImageView(getContext());
RelativeLayout.LayoutParams layoutParams4 = new RelativeLayout.LayoutParams(ak.a(getContext(), 30.0f), ak.a(getContext(), 30.0f));
layoutParams4.addRule(11);
layoutParams4.rightMargin = ak.a(getContext(), 50.0f);
layoutParams4.topMargin = ak.a(getContext(), 5.0f);
this.o.setLayoutParams(layoutParams4);
this.o.setImageResource(getResources().getIdentifier("mbridge_splash_btn_circle", "drawable", c.m().g()));
addView(this.o);
} else {
layoutParams = null;
}
this.n.setLayoutParams(layoutParams);
this.n.setImageResource(i);
addView(textView);
addView(this.n);
invalidate();
}
}

View File

@@ -0,0 +1,8 @@
package com.mbridge.msdk.splash.view.nativeview;
/* loaded from: classes4.dex */
public interface a {
void a();
void b();
}