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.video;
/* 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.video";
}

View File

@@ -0,0 +1,398 @@
package com.mbridge.msdk.video;
/* loaded from: classes4.dex */
public final class R {
public static final class attr {
public static int corner = 0x7f0400b4;
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_color_999999 = 0x7f0600b0;
public static int mbridge_color_cc000000 = 0x7f0600b1;
public static int mbridge_color_cc0000001 = 0x7f0600b2;
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_more_offer_list_bg = 0x7f0600c0;
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_reward_black = 0x7f0600ca;
public static int mbridge_reward_cta_bg = 0x7f0600cb;
public static int mbridge_reward_desc_textcolor = 0x7f0600cc;
public static int mbridge_reward_endcard_hor_bg = 0x7f0600cd;
public static int mbridge_reward_endcard_land_bg = 0x7f0600ce;
public static int mbridge_reward_endcard_line_bg = 0x7f0600cf;
public static int mbridge_reward_endcard_vast_bg = 0x7f0600d0;
public static int mbridge_reward_layer_text_bg = 0x7f0600d2;
public static int mbridge_reward_minicard_bg = 0x7f0600d3;
public static int mbridge_reward_six_black_transparent = 0x7f0600d4;
public static int mbridge_reward_six_black_transparent1 = 0x7f0600d5;
public static int mbridge_reward_six_black_transparent2 = 0x7f0600d6;
public static int mbridge_reward_title_textcolor = 0x7f0600d7;
public static int mbridge_reward_white = 0x7f0600d8;
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_bottom_media_control = 0x7f0801a1;
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_finger_media_control = 0x7f0801cb;
public static int mbridge_icon_click_circle = 0x7f0801cc;
public static int mbridge_icon_click_hand = 0x7f0801cd;
public static int mbridge_icon_play_bg = 0x7f0801ce;
public static int mbridge_order_layout_list_bg = 0x7f0801eb;
public static int mbridge_reward_activity_ad_end_land_des_rl_hot = 0x7f0801ec;
public static int mbridge_reward_close = 0x7f0801ed;
public static int mbridge_reward_close_ec = 0x7f0801ee;
public static int mbridge_reward_end_card_shape_bg = 0x7f0801ef;
public static int mbridge_reward_end_close_shape_oval = 0x7f0801f0;
public static int mbridge_reward_end_land_shape = 0x7f0801f1;
public static int mbridge_reward_end_pager_logo = 0x7f0801f2;
public static int mbridge_reward_end_shape_oval = 0x7f0801f3;
public static int mbridge_reward_flag_cn = 0x7f0801f4;
public static int mbridge_reward_flag_en = 0x7f0801f5;
public static int mbridge_reward_more_offer_default_bg = 0x7f0801f6;
public static int mbridge_reward_notice = 0x7f0801f7;
public static int mbridge_reward_shape_choice = 0x7f0801f9;
public static int mbridge_reward_shape_choice_rl = 0x7f0801fa;
public static int mbridge_reward_shape_end_pager = 0x7f0801fb;
public static int mbridge_reward_shape_mf_selector = 0x7f0801fc;
public static int mbridge_reward_shape_mof_like_normal = 0x7f0801fd;
public static int mbridge_reward_shape_mof_like_pressed = 0x7f0801fe;
public static int mbridge_reward_shape_order = 0x7f0801ff;
public static int mbridge_reward_shape_order_history = 0x7f080200;
public static int mbridge_reward_shape_progress = 0x7f080201;
public static int mbridge_reward_shape_videoend_buttonbg = 0x7f080202;
public static int mbridge_reward_sound_close = 0x7f080203;
public static int mbridge_reward_sound_open = 0x7f080204;
public static int mbridge_reward_two_title_arabia_land = 0x7f080205;
public static int mbridge_reward_two_title_arabia_por = 0x7f080206;
public static int mbridge_reward_two_title_en_land = 0x7f080207;
public static int mbridge_reward_two_title_en_por = 0x7f080208;
public static int mbridge_reward_two_title_france_land = 0x7f080209;
public static int mbridge_reward_two_title_france_por = 0x7f08020a;
public static int mbridge_reward_two_title_germany_land = 0x7f08020b;
public static int mbridge_reward_two_title_germany_por = 0x7f08020c;
public static int mbridge_reward_two_title_japan_land = 0x7f08020d;
public static int mbridge_reward_two_title_japan_por = 0x7f08020e;
public static int mbridge_reward_two_title_korea_land = 0x7f08020f;
public static int mbridge_reward_two_title_korea_por = 0x7f080210;
public static int mbridge_reward_two_title_russian_land = 0x7f080211;
public static int mbridge_reward_two_title_russian_por = 0x7f080212;
public static int mbridge_reward_two_title_zh = 0x7f080213;
public static int mbridge_reward_two_title_zh_trad = 0x7f080214;
public static int mbridge_reward_user = 0x7f080215;
public static int mbridge_reward_vast_end_close = 0x7f080216;
public static int mbridge_reward_vast_end_ok = 0x7f080217;
public static int mbridge_reward_video_icon = 0x7f080218;
public static int mbridge_reward_video_progress_bg = 0x7f080219;
public static int mbridge_reward_video_progressbar_bg = 0x7f08021a;
public static int mbridge_reward_video_time_count_num_bg = 0x7f08021b;
public static int mbridge_shape_btn = 0x7f08021c;
public static int mbridge_shape_line = 0x7f08021e;
private drawable() {
}
}
public static final class id {
public static int item = 0x7f0a0157;
public static int mbridge_animation_click_view = 0x7f0a0169;
public static int mbridge_bottom_finger_bg = 0x7f0a016a;
public static int mbridge_bottom_icon_iv = 0x7f0a016b;
public static int mbridge_bottom_item_rl = 0x7f0a016c;
public static int mbridge_bottom_iv = 0x7f0a016d;
public static int mbridge_bottom_play_bg = 0x7f0a016e;
public static int mbridge_bottom_ration = 0x7f0a016f;
public static int mbridge_bottom_title_tv = 0x7f0a0170;
public static int mbridge_bt_container_root = 0x7f0a0172;
public static int mbridge_center_view = 0x7f0a0173;
public static int mbridge_choice_frl = 0x7f0a0174;
public static int mbridge_choice_one_countdown_tv = 0x7f0a0175;
public static int mbridge_cta_layout = 0x7f0a0176;
public static int mbridge_ec_layout_center = 0x7f0a0177;
public static int mbridge_ec_layout_top = 0x7f0a0178;
public static int mbridge_interstitial_pb = 0x7f0a0187;
public static int mbridge_iv_adbanner = 0x7f0a0189;
public static int mbridge_iv_adbanner_bg = 0x7f0a018a;
public static int mbridge_iv_appicon = 0x7f0a018b;
public static int mbridge_iv_close = 0x7f0a018c;
public static int mbridge_iv_flag = 0x7f0a018d;
public static int mbridge_iv_icon = 0x7f0a018e;
public static int mbridge_iv_iconbg = 0x7f0a018f;
public static int mbridge_iv_link = 0x7f0a0190;
public static int mbridge_iv_logo = 0x7f0a0191;
public static int mbridge_iv_vastclose = 0x7f0a0197;
public static int mbridge_iv_vastok = 0x7f0a0198;
public static int mbridge_layout_bottomLayout = 0x7f0a0199;
public static int mbridge_lv_desc_tv = 0x7f0a019c;
public static int mbridge_lv_icon_iv = 0x7f0a019d;
public static int mbridge_lv_item_rl = 0x7f0a019e;
public static int mbridge_lv_iv = 0x7f0a019f;
public static int mbridge_lv_iv_bg = 0x7f0a01a0;
public static int mbridge_lv_iv_burl = 0x7f0a01a1;
public static int mbridge_lv_iv_cover = 0x7f0a01a2;
public static int mbridge_lv_sv_starlevel = 0x7f0a01a3;
public static int mbridge_lv_title_tv = 0x7f0a01a4;
public static int mbridge_lv_tv_install = 0x7f0a01a5;
public static int mbridge_more_offer_ll_item = 0x7f0a01a6;
public static int mbridge_moreoffer_hls = 0x7f0a01a7;
public static int mbridge_native_ec_controller = 0x7f0a01a9;
public static int mbridge_native_ec_layer_layout = 0x7f0a01aa;
public static int mbridge_native_ec_layout = 0x7f0a01ab;
public static int mbridge_native_ec_rl = 0x7f0a01ac;
public static int mbridge_native_endcard_feed_btn = 0x7f0a01ad;
public static int mbridge_native_order_camp_controller = 0x7f0a01ae;
public static int mbridge_native_order_camp_feed_btn = 0x7f0a01af;
public static int mbridge_order_view_h_lv = 0x7f0a01b4;
public static int mbridge_order_view_iv_close = 0x7f0a01b5;
public static int mbridge_order_view_lv = 0x7f0a01b6;
public static int mbridge_order_viewed_tv = 0x7f0a01b7;
public static int mbridge_reward_bottom_layout = 0x7f0a01be;
public static int mbridge_reward_bottom_widget = 0x7f0a01bf;
public static int mbridge_reward_choice_one_like_iv = 0x7f0a01c0;
public static int mbridge_reward_click_tv = 0x7f0a01c1;
public static int mbridge_reward_cta_layout = 0x7f0a01c2;
public static int mbridge_reward_desc_tv = 0x7f0a01c3;
public static int mbridge_reward_end_card_item_iv = 0x7f0a01c4;
public static int mbridge_reward_end_card_item_title_tv = 0x7f0a01c5;
public static int mbridge_reward_end_card_like_tv = 0x7f0a01c6;
public static int mbridge_reward_end_card_more_offer_rl = 0x7f0a01c7;
public static int mbridge_reward_end_card_offer_title_rl = 0x7f0a01c8;
public static int mbridge_reward_header_layout = 0x7f0a01c9;
public static int mbridge_reward_icon_riv = 0x7f0a01ca;
public static int mbridge_reward_logo_iv = 0x7f0a01cb;
public static int mbridge_reward_popview = 0x7f0a01cc;
public static int mbridge_reward_scale_webview_layout = 0x7f0a01ce;
public static int mbridge_reward_segment_progressbar = 0x7f0a01cf;
public static int mbridge_reward_stars_mllv = 0x7f0a01d0;
public static int mbridge_reward_title_tv = 0x7f0a01d1;
public static int mbridge_rl_content = 0x7f0a01d2;
public static int mbridge_rl_playing_close = 0x7f0a01d4;
public static int mbridge_sound_switch = 0x7f0a01d5;
public static int mbridge_sv_starlevel = 0x7f0a01e9;
public static int mbridge_tag_icon = 0x7f0a01ea;
public static int mbridge_tag_title = 0x7f0a01eb;
public static int mbridge_text_layout = 0x7f0a01ee;
public static int mbridge_title_layout = 0x7f0a01f0;
public static int mbridge_top_control = 0x7f0a01f1;
public static int mbridge_top_finger_bg = 0x7f0a01f2;
public static int mbridge_top_icon_iv = 0x7f0a01f3;
public static int mbridge_top_item_rl = 0x7f0a01f4;
public static int mbridge_top_iv = 0x7f0a01f5;
public static int mbridge_top_play_bg = 0x7f0a01f6;
public static int mbridge_top_ration = 0x7f0a01f7;
public static int mbridge_top_title_tv = 0x7f0a01f8;
public static int mbridge_tv_appdesc = 0x7f0a01f9;
public static int mbridge_tv_apptitle = 0x7f0a01fa;
public static int mbridge_tv_count = 0x7f0a01fb;
public static int mbridge_tv_cta = 0x7f0a01fc;
public static int mbridge_tv_desc = 0x7f0a01fd;
public static int mbridge_tv_flag = 0x7f0a01fe;
public static int mbridge_tv_install = 0x7f0a01ff;
public static int mbridge_tv_number = 0x7f0a0200;
public static int mbridge_tv_number_layout = 0x7f0a0201;
public static int mbridge_tv_reward_status = 0x7f0a0202;
public static int mbridge_tv_title = 0x7f0a0203;
public static int mbridge_tv_vasttag = 0x7f0a0204;
public static int mbridge_tv_vasttitle = 0x7f0a0205;
public static int mbridge_vec_btn = 0x7f0a0206;
public static int mbridge_vec_iv_close = 0x7f0a0207;
public static int mbridge_vec_iv_icon = 0x7f0a0208;
public static int mbridge_vec_tv_desc = 0x7f0a0209;
public static int mbridge_vec_tv_title = 0x7f0a020a;
public static int mbridge_vfpv = 0x7f0a020b;
public static int mbridge_vfpv_fl = 0x7f0a020c;
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;
public static int mbridge_video_progress_bar = 0x7f0a0213;
public static int mbridge_videoview_bg = 0x7f0a0218;
public static int mbridge_viewgroup_ctaroot = 0x7f0a021a;
public static int mbridge_windwv_close = 0x7f0a021b;
public static int mbridge_windwv_content_rl = 0x7f0a021c;
private id() {
}
}
public static final class layout {
public static int mbridge_bt_container = 0x7f0d0065;
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_order_layout_item = 0x7f0d0070;
public static int mbridge_order_layout_list_landscape = 0x7f0d0071;
public static int mbridge_order_layout_list_portrait = 0x7f0d0072;
public static int mbridge_reward_clickable_cta = 0x7f0d0076;
public static int mbridge_reward_end_card_layout_landscape = 0x7f0d0077;
public static int mbridge_reward_end_card_layout_landscape_1302 = 0x7f0d0078;
public static int mbridge_reward_end_card_layout_portrait = 0x7f0d0079;
public static int mbridge_reward_end_card_layout_portrait_1302 = 0x7f0d007a;
public static int mbridge_reward_end_card_more_offer_item = 0x7f0d007b;
public static int mbridge_reward_endcard_h5 = 0x7f0d007c;
public static int mbridge_reward_endcard_native_half_landscape = 0x7f0d007d;
public static int mbridge_reward_endcard_native_half_portrait = 0x7f0d007e;
public static int mbridge_reward_endcard_native_hor = 0x7f0d007f;
public static int mbridge_reward_endcard_native_land = 0x7f0d0080;
public static int mbridge_reward_endcard_vast = 0x7f0d0081;
public static int mbridge_reward_layer_floor = 0x7f0d0082;
public static int mbridge_reward_layer_floor_302 = 0x7f0d0083;
public static int mbridge_reward_layer_floor_5002010 = 0x7f0d0084;
public static int mbridge_reward_layer_floor_802 = 0x7f0d0085;
public static int mbridge_reward_layer_floor_902 = 0x7f0d0086;
public static int mbridge_reward_layer_floor_904 = 0x7f0d0087;
public static int mbridge_reward_layer_floor_bottom = 0x7f0d0088;
public static int mbridge_reward_layer_floor_half_portrait = 0x7f0d0089;
public static int mbridge_reward_more_offer_view = 0x7f0d008a;
public static int mbridge_reward_videoend_cover = 0x7f0d008b;
public static int mbridge_reward_videoview_item = 0x7f0d008c;
public static int mbridge_reward_view_tag_item = 0x7f0d008d;
public static int mbridge_same_choice_one_layout_landscape = 0x7f0d008e;
public static int mbridge_same_choice_one_layout_portrait = 0x7f0d008f;
private layout() {
}
}
public static final class string {
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_appdesc = 0x7f120148;
public static int mbridge_reward_apptitle = 0x7f120149;
public static int mbridge_reward_clickable_cta_btntext = 0x7f12014a;
public static int mbridge_reward_endcard_ad = 0x7f12014b;
public static int mbridge_reward_endcard_vast_notice = 0x7f12014c;
public static int mbridge_reward_install = 0x7f12014e;
public static int mbridge_reward_video_view_reward_time_complete = 0x7f12014f;
public static int mbridge_reward_video_view_reward_time_left = 0x7f120150;
public static int mbridge_reward_video_view_reward_time_left_skip_time = 0x7f120151;
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() {
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
package com.mbridge.msdk.video.bt.a;
/* loaded from: classes4.dex */
public final class b {
public static final class a {
private static b a = new b();
}
}

View File

@@ -0,0 +1,86 @@
package com.mbridge.msdk.video.bt.a;
import android.text.TextUtils;
import android.util.Base64;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.video.bt.a.b;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public final class c {
int a;
int b;
private String c;
public static final class a {
private static c a = new c();
}
private c() {
this.c = "handlerNativeResult";
this.a = 0;
this.b = 1;
}
public static c a() {
return a.a;
}
public final void a(Object obj, JSONObject jSONObject) {
b unused;
if (jSONObject != null) {
try {
if (!TextUtils.isEmpty(jSONObject.toString())) {
String optString = jSONObject.optString("uniqueIdentifier");
String optString2 = jSONObject.optString("name");
if (!TextUtils.isEmpty(optString) && !TextUtils.isEmpty(optString2)) {
JSONArray optJSONArray = jSONObject.optJSONArray("parameters");
JSONObject optJSONObject = jSONObject.optJSONObject("result");
int i = 0;
if (optJSONObject != null && !TextUtils.isEmpty(optJSONObject.toString())) {
i = optJSONObject.optInt("type", 0);
}
a(this.a, "receivedMessage", obj);
if (optString.equalsIgnoreCase("reporter")) {
com.mbridge.msdk.mbsignalcommon.a.a.a().a(obj, optString2, optJSONArray, i);
return;
} else {
if (optString.equalsIgnoreCase("MediaPlayer")) {
unused = b.a.a;
return;
}
return;
}
}
a(this.b, "module or method is null", obj);
return;
}
} catch (Exception e) {
af.a("HandlerH5MessageManager", e.getMessage());
a(this.b, e.getMessage(), obj);
return;
} catch (Throwable th) {
af.a("HandlerH5MessageManager", th.getMessage());
a(this.b, th.getMessage(), obj);
return;
}
}
a(this.b, "params is null", obj);
}
private void a(int i, String str, Object obj) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", i);
jSONObject.put("message", str);
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (JSONException e) {
af.a("HandlerH5MessageManager", e.getMessage());
} catch (Throwable th) {
af.a("HandlerH5MessageManager", th.getMessage());
}
}
}

View File

@@ -0,0 +1,16 @@
package com.mbridge.msdk.video.bt.a;
/* loaded from: classes4.dex */
public final class d extends com.mbridge.msdk.video.bt.a.a {
public static class a {
private static d a = new d();
}
private d() {
}
public static d c() {
return a.a;
}
}

View File

@@ -0,0 +1,338 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.a;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.foundation.tools.x;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.mbridge.msdk.video.bt.a.d;
import com.mbridge.msdk.videocommon.d.c;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public abstract class BTBaseView extends FrameLayout {
public static final String TAG = "BTBaseView";
protected static int n = 0;
protected static int o = 1;
protected Context a;
protected CampaignEx b;
protected String c;
protected String d;
protected c e;
protected LayoutInflater f;
protected int g;
protected boolean h;
protected float i;
protected float j;
protected Rect k;
protected int l;
protected int m;
public void a() {
}
public CampaignEx getCampaign() {
return this.b;
}
public String getInstanceId() {
return this.d;
}
public Rect getRect() {
return this.k;
}
public String getUnitId() {
return this.c;
}
public int getViewHeight() {
return this.m;
}
public int getViewWidth() {
return this.l;
}
public abstract void init(Context context);
public abstract void onDestory();
public void setCampaign(CampaignEx campaignEx) {
this.b = campaignEx;
}
public void setInstanceId(String str) {
this.d = str;
}
public void setLayout(int i, int i2) {
this.l = i;
this.m = i2;
}
public void setRect(Rect rect) {
this.k = rect;
}
public void setRewardUnitSetting(c cVar) {
this.e = cVar;
}
public void setUnitId(String str) {
this.c = str;
}
public BTBaseView(Context context) {
this(context, null);
}
public BTBaseView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.d = "";
this.g = 1;
this.h = false;
this.a = context;
this.f = LayoutInflater.from(context);
init(context);
}
@Override // android.view.View
public void onConfigurationChanged(Configuration configuration) {
this.g = configuration.orientation;
super.onConfigurationChanged(configuration);
}
public void onSelfConfigurationChanged(Configuration configuration) {
this.g = configuration.orientation;
}
public int findID(String str) {
return x.a(this.a.getApplicationContext(), str, "id");
}
public int findLayout(String str) {
return x.a(this.a.getApplicationContext(), str, TtmlNode.TAG_LAYOUT);
}
public int findColor(String str) {
return x.a(this.a.getApplicationContext(), str, "color");
}
public int findDrawable(String str) {
return x.a(this.a.getApplicationContext(), str, "drawable");
}
public boolean isNotNULL(View... viewArr) {
if (viewArr == null) {
return false;
}
int length = viewArr.length;
int i = 0;
boolean z = false;
while (i < length) {
if (viewArr[i] == null) {
return false;
}
i++;
z = true;
}
return z;
}
public void setMatchParent() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams == null) {
setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
} else {
layoutParams.height = -1;
layoutParams.width = -1;
}
}
public void setWrapContent() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams == null) {
setLayoutParams(new ViewGroup.LayoutParams(-2, -2));
} else {
layoutParams.height = -2;
layoutParams.width = -2;
}
}
public void defaultShow() {
af.a(TAG, "defaultShow");
}
public boolean isLandscape() {
return this.a.getResources().getConfiguration().orientation == 2;
}
public void setLayoutCenter(int i, int i2) {
FrameLayout.LayoutParams parentFrameLayoutParams = getParentFrameLayoutParams();
RelativeLayout.LayoutParams parentRelativeLayoutParams = getParentRelativeLayoutParams();
LinearLayout.LayoutParams parentLinearLayoutParams = getParentLinearLayoutParams();
if (parentRelativeLayoutParams != null) {
parentRelativeLayoutParams.addRule(13);
if (i != -999) {
parentRelativeLayoutParams.width = i;
}
if (i2 != -999) {
parentRelativeLayoutParams.height = i2;
}
setLayoutParams(parentRelativeLayoutParams);
return;
}
if (parentLinearLayoutParams != null) {
parentLinearLayoutParams.gravity = 17;
if (i != -999) {
parentLinearLayoutParams.width = i;
}
if (i2 != -999) {
parentLinearLayoutParams.height = i2;
}
setLayoutParams(parentLinearLayoutParams);
return;
}
if (parentFrameLayoutParams != null) {
parentFrameLayoutParams.gravity = 17;
if (i != -999) {
parentFrameLayoutParams.width = i;
}
if (i2 != -999) {
parentFrameLayoutParams.height = i2;
}
setLayoutParams(parentFrameLayoutParams);
}
}
public void setLayoutParam(int i, int i2, int i3, int i4) {
FrameLayout.LayoutParams parentFrameLayoutParams = getParentFrameLayoutParams();
RelativeLayout.LayoutParams parentRelativeLayoutParams = getParentRelativeLayoutParams();
LinearLayout.LayoutParams parentLinearLayoutParams = getParentLinearLayoutParams();
if (parentRelativeLayoutParams != null) {
parentRelativeLayoutParams.topMargin = i2;
parentRelativeLayoutParams.leftMargin = i;
if (i3 != -999) {
parentRelativeLayoutParams.width = i3;
}
if (i4 != -999) {
parentRelativeLayoutParams.height = i4;
}
setLayoutParams(parentRelativeLayoutParams);
return;
}
if (parentLinearLayoutParams != null) {
parentLinearLayoutParams.topMargin = i2;
parentLinearLayoutParams.leftMargin = i;
if (i3 != -999) {
parentLinearLayoutParams.width = i3;
}
if (i4 != -999) {
parentLinearLayoutParams.height = i4;
}
setLayoutParams(parentLinearLayoutParams);
return;
}
if (parentFrameLayoutParams != null) {
parentFrameLayoutParams.topMargin = i2;
parentFrameLayoutParams.leftMargin = i;
if (i3 != -999) {
parentFrameLayoutParams.width = i3;
}
if (i4 != -999) {
parentFrameLayoutParams.height = i4;
}
setLayoutParams(parentFrameLayoutParams);
}
}
public RelativeLayout.LayoutParams getParentRelativeLayoutParams() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof RelativeLayout.LayoutParams) {
return (RelativeLayout.LayoutParams) layoutParams;
}
return null;
}
public LinearLayout.LayoutParams getParentLinearLayoutParams() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof LinearLayout.LayoutParams) {
return (LinearLayout.LayoutParams) layoutParams;
}
return null;
}
public FrameLayout.LayoutParams getParentFrameLayoutParams() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof FrameLayout.LayoutParams) {
return (FrameLayout.LayoutParams) layoutParams;
}
return null;
}
@Override // android.view.ViewGroup
public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
this.i = motionEvent.getRawX();
this.j = motionEvent.getRawY();
return super.onInterceptTouchEvent(motionEvent);
}
public final JSONObject a(int i) {
JSONObject jSONObject;
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject = new JSONObject();
} catch (JSONException e) {
e = e;
}
try {
jSONObject.put(a.h, ak.b(com.mbridge.msdk.foundation.controller.c.m().c(), this.i));
jSONObject.put(a.i, ak.b(com.mbridge.msdk.foundation.controller.c.m().c(), this.j));
jSONObject.put(a.m, i);
try {
this.g = getContext().getResources().getConfiguration().orientation;
} catch (Exception e2) {
e2.printStackTrace();
}
jSONObject.put(a.k, this.g);
jSONObject.put(a.l, ak.d(getContext()));
return jSONObject;
} catch (JSONException e3) {
e = e3;
jSONObject2 = jSONObject;
e.printStackTrace();
return jSONObject2;
}
}
public static void a(WebView webView, String str, String str2) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", n);
jSONObject.put("id", str2);
jSONObject.put("data", new JSONObject());
g.a().a(webView, str, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
d.c().a(webView, e.getMessage());
af.a(TAG, e.getMessage());
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.util.AttributeSet;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.video.bt.module.a.b;
import com.mbridge.msdk.video.bt.module.b.h;
import com.mbridge.msdk.video.module.MBridgeVideoView;
import com.mbridge.msdk.video.signal.container.AbstractJSContainer;
/* loaded from: classes4.dex */
public class MBTempContainerDiff extends AbstractJSContainer {
public MBridgeVideoView mbridgeVideoView;
public boolean checkChinaSendToServerDiff(h hVar) {
return false;
}
public boolean checkChinaShowingAlertViewState() {
return false;
}
public void setChinaBrowserCallBack(b bVar, String str, h hVar, CampaignEx campaignEx) {
}
public void setChinaCTACallBack() {
}
public void setChinaCallBackStatus(WindVaneWebView windVaneWebView) {
}
public void setChinaDestroy() {
}
public void setChinaJsCommonContext() {
}
public MBTempContainerDiff(Context context) {
super(context);
}
public MBTempContainerDiff(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,89 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.content.res.Configuration;
import android.util.AttributeSet;
import android.util.Base64;
import android.webkit.WebView;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.video.bt.a.d;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeBTLayout extends BTBaseView {
private WebView p;
public WebView getBtWebView() {
return this.p;
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
}
public void setWebView(WebView webView) {
this.p = webView;
}
public MBridgeBTLayout(Context context) {
super(context);
}
public MBridgeBTLayout(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView, android.view.View
public void onConfigurationChanged(Configuration configuration) {
if (this.p != null) {
try {
CampaignEx campaignEx = this.b;
if (campaignEx == null || !campaignEx.isDynamicView()) {
JSONObject jSONObject = new JSONObject();
if (configuration.orientation == 2) {
jSONObject.put("orientation", "landscape");
} else {
jSONObject.put("orientation", "portrait");
}
jSONObject.put("instanceId", this.d);
g.a().a(this.p, "orientation", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
public void onBackPressed() {
if (this.p != null) {
d.c().a(this.p, "onSystemBackPressed", this.d);
}
}
public void broadcast(String str, JSONObject jSONObject) {
if (this.p != null) {
try {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("code", BTBaseView.n);
jSONObject2.put("id", getInstanceId());
jSONObject2.put("eventName", str);
jSONObject2.put("data", jSONObject);
g.a().a(this.p, "broadcast", Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (Exception unused) {
d.c().a(this.p, "broadcast", getInstanceId());
}
}
}
public void notifyEvent(String str) {
WebView webView = this.p;
if (webView != null) {
BTBaseView.a(webView, str, this.d);
}
}
}

View File

@@ -0,0 +1,450 @@
package com.mbridge.msdk.video.bt.module;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import android.text.TextUtils;
import android.util.AttributeSet;
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 com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.c.b;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.video.bt.a.d;
import com.mbridge.msdk.video.module.a.a.e;
import com.mbridge.msdk.video.module.a.a.j;
import com.mbridge.msdk.video.signal.a.k;
import com.mbridge.msdk.videocommon.d.c;
import com.mbridge.msdk.videocommon.view.RoundImageView;
import com.mbridge.msdk.videocommon.view.StarLevelView;
import com.mbridge.msdk.widget.a;
import java.util.Locale;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeBTNativeEC extends MBridgeBTNativeECDiff {
private TextView A;
private StarLevelView B;
private boolean C;
private boolean D;
private int E;
private Runnable F;
private boolean G;
private View H;
private String I;
private k J;
private WebView K;
private ViewGroup p;
private ViewGroup q;
private RelativeLayout r;
private ImageView s;
private RoundImageView t;
private ImageView u;
private ImageView v;
private ImageView w;
private ImageView x;
private TextView y;
private TextView z;
@Override // com.mbridge.msdk.video.bt.module.MBridgeBTNativeECDiff, com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
}
public void setCreateWebView(WebView webView) {
this.K = webView;
}
public void setJSCommon(k kVar) {
this.J = kVar;
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void setUnitId(String str) {
this.I = str;
}
public MBridgeBTNativeEC(Context context) {
super(context);
this.C = false;
this.D = false;
this.E = 0;
this.G = false;
}
public MBridgeBTNativeEC(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.C = false;
this.D = false;
this.E = 0;
this.G = false;
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
if (this.F == null) {
this.F = new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.1
@Override // java.lang.Runnable
public final void run() {
MBridgeBTNativeEC.this.D = true;
if (MBridgeBTNativeEC.this.H != null) {
MBridgeBTNativeEC.this.H.setVisibility(0);
}
}
};
}
Runnable runnable = this.F;
if (runnable != null) {
postDelayed(runnable, this.E * 1000);
}
if (!this.h && this.K != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("id", this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("unitId", this.I);
jSONObject.put("data", jSONObject2);
af.a(BTBaseView.TAG, "NativeEC Call H5 onCloseBtnClicked " + jSONObject.toString());
} catch (JSONException e) {
af.a(BTBaseView.TAG, e.getMessage());
}
g.a().a(this.K, "onCloseBtnClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
}
if (this.K != null) {
JSONObject jSONObject3 = new JSONObject();
try {
jSONObject3.put("id", this.d);
JSONObject jSONObject4 = new JSONObject();
jSONObject4.put("unitId", this.I);
jSONObject3.put("data", jSONObject4);
af.a(BTBaseView.TAG, "NativeEC Call H5 onEndCardShow " + jSONObject3.toString());
} catch (JSONException e2) {
af.a(BTBaseView.TAG, e2.getMessage());
}
g.a().a(this.K, "onNativeECShow", Base64.encodeToString(jSONObject3.toString().getBytes(), 2));
}
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
Runnable runnable = this.F;
if (runnable != null) {
removeCallbacks(runnable);
}
}
public void preLoadData() {
Bitmap blurBitmap;
try {
CampaignEx campaignEx = this.b;
if (campaignEx == null || !this.h) {
return;
}
if (campaignEx.getCbd() > -2) {
this.E = this.b.getCbd();
} else {
c cVar = this.e;
if (cVar != null) {
this.E = cVar.p();
}
}
b.a(this.a.getApplicationContext()).a(this.b.getImageUrl(), new e(this.t, this.b, this.I));
b.a(this.a.getApplicationContext()).a(this.b.getIconUrl(), new j(this.u, ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 8.0f)));
this.y.setText(this.b.getAppName());
this.z.setText(this.b.getAppDesc());
this.A.setText(this.b.getNumberRating() + ")");
this.B.removeAllViews();
if (com.mbridge.msdk.e.b.a()) {
setChinaCTAData(this.b);
}
double rating = this.b.getRating();
if (rating <= 0.0d) {
rating = 5.0d;
}
this.B.initScore(rating);
try {
Bitmap a = a(this.t.getDrawable());
if (a != null && (blurBitmap = blurBitmap(a)) != null) {
this.s.setImageBitmap(blurBitmap);
}
} catch (Throwable unused) {
this.s.setVisibility(8);
}
if (!TextUtils.isEmpty(this.b.getendcard_url()) && this.b.getendcard_url().contains("alecfc=1")) {
this.C = true;
}
if (!TextUtils.isEmpty(this.b.getendcard_url()) && this.b.getendcard_url().contains("wlgo=1")) {
this.G = true;
}
String language = Locale.getDefault().getLanguage();
if (!TextUtils.isEmpty(language) && language.equals("zh")) {
this.v.setImageDrawable(getResources().getDrawable(getResources().getIdentifier("mbridge_reward_flag_cn", "drawable", com.mbridge.msdk.foundation.controller.c.m().g())));
} else {
this.v.setImageDrawable(getResources().getDrawable(getResources().getIdentifier("mbridge_reward_flag_en", "drawable", com.mbridge.msdk.foundation.controller.c.m().g())));
}
if (!this.G) {
this.v.setVisibility(4);
this.x.setVisibility(4);
}
ak.a(2, this.w, this.b, this.a, true, null);
if (this.D) {
return;
}
this.H.setVisibility(8);
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onSelfConfigurationChanged(Configuration configuration) {
super.onSelfConfigurationChanged(configuration);
int i = configuration.orientation;
this.g = i;
if (i == 2) {
removeView(this.p);
a(this.q);
} else {
removeView(this.q);
a(this.p);
}
}
private void a(View view) {
if (view == null) {
init(this.a);
preLoadData();
return;
}
if (view.getParent() != null) {
((ViewGroup) view.getParent()).removeView(view);
}
addView(view);
b(view);
a();
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public final void a() {
if (this.h) {
this.r.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.2
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeBTNativeEC.this.C) {
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, 1, view.getContext());
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, view.getX(), view.getY());
}
}
});
this.H.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.3
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeBTNativeEC.this.K != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("id", MBridgeBTNativeEC.this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("unitId", MBridgeBTNativeEC.this.I);
jSONObject.put("data", jSONObject2);
af.a(BTBaseView.TAG, "NativeEC Call H5 onCloseBtnClicked " + jSONObject.toString());
} catch (JSONException e) {
af.a(BTBaseView.TAG, e.getMessage());
}
g.a().a(MBridgeBTNativeEC.this.K, "onCloseBtnClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
}
}
});
this.ctaView.setOnClickListener(new a() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.4
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, 0, view.getContext());
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, view.getX(), view.getY());
}
});
this.u.setOnClickListener(new a() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.5
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
if (!com.mbridge.msdk.e.b.a() || MBridgeBTNativeEC.this.checkChinaProgressBarStatus()) {
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, 0, view.getContext());
}
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, view.getX(), view.getY());
}
});
this.t.setOnClickListener(new a() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.6
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
if (!com.mbridge.msdk.e.b.a() || MBridgeBTNativeEC.this.checkChinaProgressBarStatus()) {
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, 0, view.getContext());
}
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, view.getX(), view.getY());
}
});
}
}
private boolean b(View view) {
try {
this.r = (RelativeLayout) view.findViewById(findID("mbridge_native_ec_layout"));
this.s = (ImageView) view.findViewById(findID("mbridge_iv_adbanner_bg"));
this.t = (RoundImageView) view.findViewById(findID("mbridge_iv_adbanner"));
this.u = (ImageView) view.findViewById(findID("mbridge_iv_icon"));
this.v = (ImageView) view.findViewById(findID("mbridge_iv_flag"));
this.w = (ImageView) view.findViewById(findID("mbridge_iv_link"));
this.y = (TextView) view.findViewById(findID("mbridge_tv_apptitle"));
this.z = (TextView) view.findViewById(findID("mbridge_tv_appdesc"));
this.A = (TextView) view.findViewById(findID("mbridge_tv_number"));
this.B = (StarLevelView) view.findViewById(findID("mbridge_sv_starlevel"));
this.H = view.findViewById(findID("mbridge_iv_close"));
this.ctaView = view.findViewById(findID("mbridge_tv_cta"));
this.x = (ImageView) view.findViewById(findID("mbridge_iv_logo"));
return isNotNULL(this.s, this.t, this.u, this.y, this.z, this.A, this.B, this.H, this.ctaView);
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage(), th);
return false;
}
}
@TargetApi(17)
public Bitmap blurBitmap(Bitmap bitmap) {
try {
Bitmap createBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
RenderScript create = RenderScript.create(this.a.getApplicationContext());
ScriptIntrinsicBlur create2 = ScriptIntrinsicBlur.create(create, Element.U8_4(create));
Allocation createFromBitmap = Allocation.createFromBitmap(create, bitmap);
Allocation createFromBitmap2 = Allocation.createFromBitmap(create, createBitmap);
create2.setRadius(10.0f);
create2.setInput(createFromBitmap);
create2.forEach(createFromBitmap2);
createFromBitmap2.copyTo(createBitmap);
bitmap.recycle();
create.destroy();
return createBitmap;
} catch (Throwable unused) {
return null;
}
}
private Bitmap a(Drawable drawable) {
try {
int intrinsicWidth = drawable.getIntrinsicWidth();
int intrinsicHeight = drawable.getIntrinsicHeight();
Bitmap createBitmap = Bitmap.createBitmap(intrinsicWidth, intrinsicHeight, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(createBitmap);
drawable.setBounds(0, 0, intrinsicWidth, intrinsicHeight);
drawable.draw(canvas);
return createBitmap;
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
return null;
}
}
@Override // com.mbridge.msdk.video.bt.module.MBridgeBTNativeECDiff, com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
boolean b;
int findLayout = findLayout(isLandscape() ? "mbridge_reward_endcard_native_land" : "mbridge_reward_endcard_native_hor");
if (findLayout > 0) {
if (isLandscape()) {
ViewGroup viewGroup = (ViewGroup) this.f.inflate(findLayout, (ViewGroup) null);
this.q = viewGroup;
addView(viewGroup);
b = b(this.q);
} else {
ViewGroup viewGroup2 = (ViewGroup) this.f.inflate(findLayout, (ViewGroup) null);
this.p = viewGroup2;
addView(viewGroup2);
b = b(this.p);
}
this.h = b;
a();
}
}
/* JADX WARN: Removed duplicated region for block: B:19:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:8:0x001e A[Catch: all -> 0x0010, TryCatch #0 {all -> 0x0010, blocks: (B:3:0x0001, B:5:0x0006, B:6:0x001a, B:8:0x001e, B:10:0x0024, B:11:0x0029, B:13:0x002d, B:14:0x0034, B:23:0x0016), top: B:2:0x0001 }] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static /* synthetic */ void a(com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC r2, int r3, android.content.Context r4) {
/*
r0 = 0
org.json.JSONObject r1 = new org.json.JSONObject // Catch: java.lang.Throwable -> L10 org.json.JSONException -> L15
r1.<init>() // Catch: java.lang.Throwable -> L10 org.json.JSONException -> L15
java.lang.String r0 = com.mbridge.msdk.foundation.same.a.j // Catch: java.lang.Throwable -> L10 org.json.JSONException -> L12
org.json.JSONObject r3 = r2.a(r3) // Catch: java.lang.Throwable -> L10 org.json.JSONException -> L12
r1.put(r0, r3) // Catch: java.lang.Throwable -> L10 org.json.JSONException -> L12
goto L1a
L10:
r2 = move-exception
goto L39
L12:
r3 = move-exception
r0 = r1
goto L16
L15:
r3 = move-exception
L16:
r3.printStackTrace() // Catch: java.lang.Throwable -> L10
r1 = r0
L1a:
com.mbridge.msdk.video.signal.a.k r3 = r2.J // Catch: java.lang.Throwable -> L10
if (r3 == 0) goto L42
boolean r3 = com.mbridge.msdk.e.b.a() // Catch: java.lang.Throwable -> L10
if (r3 == 0) goto L29
com.mbridge.msdk.video.signal.a.k r3 = r2.J // Catch: java.lang.Throwable -> L10
r2.doChinaJumpClick(r4, r3) // Catch: java.lang.Throwable -> L10
L29:
com.mbridge.msdk.video.signal.a.k r2 = r2.J // Catch: java.lang.Throwable -> L10
if (r1 == 0) goto L32
java.lang.String r3 = r1.toString() // Catch: java.lang.Throwable -> L10
goto L34
L32:
java.lang.String r3 = ""
L34:
r4 = 1
r2.click(r4, r3) // Catch: java.lang.Throwable -> L10
goto L42
L39:
java.lang.String r3 = "BTBaseView"
java.lang.String r2 = r2.getMessage()
com.mbridge.msdk.foundation.tools.af.a(r3, r2)
L42:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.a(com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC, int, android.content.Context):void");
}
public static /* synthetic */ void a(MBridgeBTNativeEC mBridgeBTNativeEC, float f, float f2) {
if (mBridgeBTNativeEC.K != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.n);
jSONObject.put("id", mBridgeBTNativeEC.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("x", String.valueOf(f));
jSONObject2.put("y", String.valueOf(f2));
jSONObject.put("data", jSONObject2);
g.a().a(mBridgeBTNativeEC.K, "onClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception unused) {
d.c().a(mBridgeBTNativeEC.K, "onClicked", mBridgeBTNativeEC.d);
}
}
}
}

View File

@@ -0,0 +1,38 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.video.signal.a.k;
/* loaded from: classes4.dex */
public class MBridgeBTNativeECDiff extends BTBaseView {
public View ctaView;
public boolean checkChinaProgressBarStatus() {
return false;
}
public void doChinaJumpClick(Context context, k kVar) {
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
}
public void setChinaCTAData(CampaignEx campaignEx) {
}
public MBridgeBTNativeECDiff(Context context) {
super(context);
}
public MBridgeBTNativeECDiff(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
}

View File

@@ -0,0 +1,23 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.util.AttributeSet;
/* loaded from: classes4.dex */
public class MBridgeBTRootLayout extends BTBaseView {
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
}
public MBridgeBTRootLayout(Context context) {
super(context);
}
public MBridgeBTRootLayout(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
}

View File

@@ -0,0 +1,964 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.content.res.Configuration;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.iab.omid.library.mmadbridge.adsession.AdEvents;
import com.iab.omid.library.mmadbridge.adsession.AdSession;
import com.iab.omid.library.mmadbridge.adsession.FriendlyObstructionPurpose;
import com.iab.omid.library.mmadbridge.adsession.media.InteractionType;
import com.iab.omid.library.mmadbridge.adsession.media.MediaEvents;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.mbridge.msdk.dycreator.baseview.cusview.SoundImageView;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.d.b;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.report.d.e;
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.x;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener;
import com.mbridge.msdk.playercommon.PlayerErrorConstant;
import com.mbridge.msdk.playercommon.PlayerView;
import com.mbridge.msdk.video.bt.a.d;
import com.mbridge.msdk.widget.FeedBackButton;
import java.io.File;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeBTVideoView extends BTBaseView {
private static boolean K = false;
private static long Q;
private AdSession A;
private AdEvents B;
private MediaEvents C;
private a D;
private int E;
private int F;
private boolean G;
private int H;
private int I;
private String J;
private boolean L;
private boolean M;
private boolean N;
private RelativeLayout O;
private ProgressBar P;
private PlayerView p;
private SoundImageView q;
private TextView r;
private View s;
private FeedBackButton t;
private ImageView u;
private WebView v;
private com.mbridge.msdk.videocommon.download.a w;
private int x;
private int y;
private int z;
public AdEvents getAdEvents() {
return this.B;
}
public AdSession getAdSession() {
return this.A;
}
public int getMute() {
return this.E;
}
public MediaEvents getVideoEvents() {
return this.C;
}
public void setAdEvents(AdEvents adEvents) {
this.B = adEvents;
}
public void setAdSession(AdSession adSession) {
this.A = adSession;
}
public void setCreateWebView(WebView webView) {
this.v = webView;
}
public void setOrientation(int i) {
this.I = i;
}
public void setShowClose(int i) {
this.y = i;
}
public void setShowMute(int i) {
this.z = i;
}
public void setShowTime(int i) {
this.x = i;
}
public void setVideoEvents(MediaEvents mediaEvents) {
this.C = mediaEvents;
a aVar = this.D;
if (aVar != null) {
aVar.c = mediaEvents;
}
PlayerView playerView = this.p;
if (playerView != null) {
playerView.setVideoEvents(mediaEvents);
}
}
public MBridgeBTVideoView(Context context) {
super(context);
this.x = 0;
this.y = 0;
this.z = 0;
this.E = 2;
this.G = false;
this.H = 2;
this.I = 1;
this.L = false;
this.M = false;
this.N = false;
}
public MBridgeBTVideoView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.x = 0;
this.y = 0;
this.z = 0;
this.E = 2;
this.G = false;
this.H = 2;
this.I = 1;
this.L = false;
this.M = false;
this.N = false;
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView, android.view.View
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void setCampaign(CampaignEx campaignEx) {
super.setCampaign(campaignEx);
if (campaignEx != null && campaignEx.getVideoCompleteTime() > 0) {
this.r.setBackgroundResource(x.a(c.m().c(), "mbridge_reward_video_time_count_num_bg", "drawable"));
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, ak.a(c.m().c(), 30.0f));
int a2 = ak.a(c.m().c(), 5.0f);
layoutParams.setMargins(a2, 0, 0, 0);
this.r.setPadding(a2, 0, a2, 0);
this.r.setLayoutParams(layoutParams);
return;
}
this.r.setBackgroundResource(x.a(c.m().c(), "mbridge_reward_shape_progress", "drawable"));
this.r.setWidth(ak.a(c.m().c(), 30.0f));
}
public void soundOperate(int i, int i2, String str) {
if (this.h) {
this.E = i;
if (i == 1) {
this.q.setSoundStatus(false);
this.p.closeSound();
} else if (i == 2) {
this.q.setSoundStatus(true);
this.p.openSound();
}
if (i2 == 1) {
this.q.setVisibility(8);
} else if (i2 == 2) {
this.q.setVisibility(0);
}
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
try {
mediaEvents.volumeChange(this.p.getVolume());
} catch (Exception e) {
af.b("omsdk", e.getMessage());
}
}
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
int findLayout = findLayout("mbridge_reward_videoview_item");
if (findLayout > 0) {
this.f.inflate(findLayout, this);
boolean c = c();
this.h = c;
if (!c) {
af.b(BTBaseView.TAG, "MBridgeVideoView init fail");
}
a();
}
K = false;
}
public void onResume() {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.setDesk(true);
this.p.setIsCovered(false);
if (this.M) {
this.p.start(true);
}
this.p.resumeOMSDK();
}
}
public void onPause() {
PlayerView playerView = this.p;
if (playerView != null) {
boolean isPlayIng = playerView.isPlayIng();
this.M = isPlayIng;
this.p.setIsBTVideoPlaying(isPlayIng);
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
this.p.setVideoEvents(mediaEvents);
}
this.p.onPause();
}
}
public void onStop() {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.setIsCovered(true);
}
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
View rootView;
super.onAttachedToWindow();
if (!this.N) {
this.H = d.c().e(this.c);
}
View view = this.s;
if (view != null) {
view.setVisibility(this.y == 0 ? 8 : 0);
}
SoundImageView soundImageView = this.q;
if (soundImageView != null) {
soundImageView.setVisibility(this.z == 0 ? 8 : 0);
}
CampaignEx campaignEx = this.b;
if (campaignEx != null) {
campaignEx.setCampaignUnitId(this.c);
b.a().a(this.c + "_1", this.b);
}
TextView textView = this.r;
if (textView != null) {
textView.setVisibility(this.x == 0 ? 8 : 0);
if (this.r.getVisibility() == 0 && b.a().b()) {
b.a().a(this.c + "_1", this.t);
}
}
if (this.A == null || (rootView = getRootView()) == null) {
return;
}
this.A.removeFriendlyObstruction(rootView);
}
public boolean playMute() {
try {
PlayerView playerView = this.p;
if (playerView != null && this.v != null) {
playerView.closeSound();
this.q.setSoundStatus(false);
this.E = 1;
try {
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
mediaEvents.volumeChange(0.0f);
}
} catch (Exception e) {
af.a("OMSDK", e.getMessage());
}
BTBaseView.a(this.v, "onPlayerMute", this.d);
return true;
}
} catch (Exception e2) {
af.b(BTBaseView.TAG, e2.getMessage());
}
return false;
}
public boolean playUnMute() {
try {
PlayerView playerView = this.p;
if (playerView == null || this.v == null) {
return false;
}
playerView.openSound();
this.q.setSoundStatus(true);
this.E = 2;
try {
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
mediaEvents.volumeChange(1.0f);
}
} catch (Exception e) {
af.a("OMSDK", e.getMessage());
}
BTBaseView.a(this.v, "onUnmute", this.d);
return true;
} catch (Exception e2) {
af.b(BTBaseView.TAG, e2.getMessage());
return false;
}
}
public void play() {
a aVar;
try {
if (!this.N) {
String d = d();
this.J = d;
this.p.initVFPData(d, this.b.getVideoUrlEncode(), this.D);
if (this.H == 1) {
playMute();
} else {
playUnMute();
}
try {
if (this.B != null) {
af.b("omsdk", "bt impressionOccurred");
this.B.impressionOccurred();
}
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
if (!this.p.playVideo() && (aVar = this.D) != null) {
aVar.onPlayError("play video failed");
}
this.N = true;
return;
}
if (this.G) {
this.p.playVideo(0);
this.G = false;
} else {
this.p.start(false);
}
try {
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
mediaEvents.resume();
af.a("omsdk", "btv play2: videoEvents.resume()");
}
} catch (Throwable th2) {
af.a(BTBaseView.TAG, th2.getMessage());
}
WebView webView = this.v;
if (webView != null) {
BTBaseView.a(webView, "onPlayerPlay", this.d);
return;
}
return;
} catch (Exception e) {
af.b(BTBaseView.TAG, e.getMessage(), e);
}
af.b(BTBaseView.TAG, e.getMessage(), e);
}
public void resume() {
try {
PlayerView playerView = this.p;
if (playerView != null) {
if (this.G) {
playerView.playVideo(0);
this.G = false;
} else {
playerView.onResume();
}
try {
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
mediaEvents.resume();
af.a("omsdk", "btv play3: videoEvents.resume()");
}
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
WebView webView = this.v;
if (webView != null) {
BTBaseView.a(webView, "onPlayerResume", this.d);
}
}
} catch (Exception e) {
af.b(BTBaseView.TAG, e.getMessage());
}
}
public void pause() {
try {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.pause();
WebView webView = this.v;
if (webView != null) {
BTBaseView.a(webView, "onPlayerPause", this.d);
}
}
} catch (Exception e) {
af.b(BTBaseView.TAG, e.getMessage(), e);
}
}
public void stop() {
try {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.pause();
this.p.stop();
this.G = true;
WebView webView = this.v;
if (webView != null) {
BTBaseView.a(webView, "onPlayerStop", this.d);
}
}
} catch (Exception e) {
af.b(BTBaseView.TAG, e.getMessage(), e);
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
try {
if (this.p != null) {
AdSession adSession = this.A;
if (adSession != null) {
adSession.finish();
}
this.p.setOnClickListener(null);
this.p.release();
this.p = null;
e eVar = new e();
eVar.a(IronSourceConstants.EVENTS_DURATION, Long.valueOf(System.currentTimeMillis() - Q));
com.mbridge.msdk.foundation.same.report.d.d.a().a("2000146", this.b, eVar);
}
SoundImageView soundImageView = this.q;
if (soundImageView != null) {
soundImageView.setOnClickListener(null);
}
View view = this.s;
if (view != null) {
view.setOnClickListener(null);
}
if (this.v != null) {
this.v = null;
}
if (this.A != null) {
this.A = null;
}
if (this.C != null) {
this.C = null;
}
setOnClickListener(null);
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
private boolean c() {
try {
this.p = (PlayerView) findViewById(findID("mbridge_vfpv"));
this.q = (SoundImageView) findViewById(findID("mbridge_sound_switch"));
this.r = (TextView) findViewById(findID("mbridge_tv_count"));
this.s = findViewById(findID("mbridge_rl_playing_close"));
this.O = (RelativeLayout) findViewById(findID("mbridge_top_control"));
this.P = (ProgressBar) findViewById(findID("mbridge_video_progress_bar"));
this.p.setIsBTVideo(true);
this.t = (FeedBackButton) findViewById(findID("mbridge_native_endcard_feed_btn"));
this.u = (ImageView) findViewById(findID("mbridge_iv_link"));
return isNotNULL(this.p, this.q, this.r, this.s);
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage(), th);
return false;
}
}
private String d() {
String str = "";
try {
str = this.b.getVideoUrlEncode();
com.mbridge.msdk.videocommon.download.a aVar = this.w;
if (aVar == null) {
return str;
}
String h = aVar.h();
return !ap.a(h) ? new File(h).exists() ? h : str : str;
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage(), th);
return str;
}
}
private int e() {
try {
com.mbridge.msdk.videocommon.d.a b = com.mbridge.msdk.videocommon.d.b.a().b();
if (b == null) {
com.mbridge.msdk.videocommon.d.b.a().c();
}
r0 = b != null ? (int) b.h() : 5;
af.c(BTBaseView.TAG, "MBridgeBaseView buffetTimeout:" + r0);
} catch (Throwable th) {
th.printStackTrace();
}
return r0;
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public final void a() {
super.a();
if (this.h) {
this.q.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.1
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
boolean isSilent = MBridgeBTVideoView.this.p.isSilent();
if (MBridgeBTVideoView.this.v != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.n);
jSONObject.put("id", MBridgeBTVideoView.this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put(CampaignEx.JSON_NATIVE_VIDEO_MUTE, MBridgeBTVideoView.this.E);
jSONObject.put("data", jSONObject2);
g.a().a(MBridgeBTVideoView.this.v, "onPlayerMuteBtnClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
af.a("OperateViews", "onPlayerMuteBtnClicked isMute = " + isSilent + " mute = " + MBridgeBTVideoView.this.E);
} catch (Exception e) {
d.c().a(MBridgeBTVideoView.this.v, e.getMessage());
}
}
}
});
this.s.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.2
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeBTVideoView.this.v != null) {
BTBaseView.a(MBridgeBTVideoView.this.v, "onPlayerCloseBtnClicked", MBridgeBTVideoView.this.d);
}
}
});
setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.3
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeBTVideoView.this.C != null) {
try {
MBridgeBTVideoView.this.C.adUserInteraction(InteractionType.CLICK);
af.a("omsdk", "btv adUserInteraction click");
} catch (Exception e) {
af.b("omsdk", e.getMessage());
}
}
if (MBridgeBTVideoView.this.v != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.n);
jSONObject.put("id", MBridgeBTVideoView.this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("x", String.valueOf(view.getX()));
jSONObject2.put("y", String.valueOf(view.getY()));
jSONObject.put("data", jSONObject2);
g.a().a(MBridgeBTVideoView.this.v, "onClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception unused) {
d.c().a(MBridgeBTVideoView.this.v, "onClicked", MBridgeBTVideoView.this.d);
}
}
}
});
}
}
public static final class a extends DefaultVideoPlayerStatusListener {
private MBridgeBTVideoView a;
private WebView b;
private MediaEvents c;
private String d;
private String e;
private int f;
private int g;
private boolean h;
private int l;
private int m;
private boolean i = false;
private boolean j = false;
private boolean k = false;
private boolean n = false;
private boolean o = false;
public a(MBridgeBTVideoView mBridgeBTVideoView, WebView webView, MediaEvents mediaEvents) {
this.a = mBridgeBTVideoView;
this.b = webView;
this.c = mediaEvents;
if (mBridgeBTVideoView != null) {
this.d = mBridgeBTVideoView.d;
this.e = mBridgeBTVideoView.c;
}
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onPlayStarted(int i) {
super.onPlayStarted(i);
if (!this.h) {
this.a.P.setMax(i);
WebView webView = this.b;
if (webView != null) {
BTBaseView.a(webView, "onPlayerPlay", this.d);
}
this.h = true;
if (this.c != null) {
try {
MBridgeBTVideoView mBridgeBTVideoView = this.a;
this.c.start(i, (mBridgeBTVideoView == null || mBridgeBTVideoView.p == null) ? 0.0f : this.a.p.getVolume());
af.a("omsdk", "play2: videoEvents.start()");
} catch (Exception e) {
af.b("omsdk", e.getMessage());
}
}
}
boolean unused = MBridgeBTVideoView.K = false;
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onPlayCompleted() {
super.onPlayCompleted();
MBridgeBTVideoView mBridgeBTVideoView = this.a;
CampaignEx campaignEx = mBridgeBTVideoView.b;
if (campaignEx == null) {
mBridgeBTVideoView.r.setText("0");
} else if (campaignEx.getVideoCompleteTime() > 0) {
this.a.r.setText(x.a(c.m().c(), "mbridge_reward_video_view_reward_time_complete", "string"));
} else {
this.a.r.setText("0");
}
this.a.p.setClickable(false);
WebView webView = this.b;
if (webView != null) {
BTBaseView.a(webView, "onPlayerFinish", this.d);
}
MediaEvents mediaEvents = this.c;
if (mediaEvents != null) {
mediaEvents.complete();
af.a("omsdk", "play: videoEvents.complete()");
}
this.f = this.g;
boolean unused = MBridgeBTVideoView.K = true;
this.a.stop();
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onPlayError(String str) {
super.onPlayError(str);
if (this.b != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.o);
jSONObject.put("id", this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("error", str);
jSONObject2.put("id", this.d);
jSONObject.put("data", jSONObject2);
g.a().a(this.b, "onPlayerFailed", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
d.c().a(this.b, e.getMessage());
}
}
}
/* JADX WARN: Removed duplicated region for block: B:90:0x02c7 A[Catch: Exception -> 0x028f, TRY_LEAVE, TryCatch #0 {Exception -> 0x028f, blocks: (B:70:0x0239, B:72:0x023d, B:78:0x0245, B:80:0x0249, B:82:0x024d, B:84:0x0259, B:87:0x0264, B:88:0x02bb, B:90:0x02c7, B:94:0x0291), top: B:69:0x0239 }] */
/* JADX WARN: Removed duplicated region for block: B:93:? A[RETURN, SYNTHETIC] */
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void onPlayProgress(int r11, int r12) {
/*
Method dump skipped, instructions count: 750
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.a.onPlayProgress(int, int):void");
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onBufferingStart(String str) {
try {
af.b("omsdk", "bt onBufferingStart1");
super.onBufferingStart(str);
if (this.c != null) {
af.b("omsdk", "bt onBufferingStart");
this.c.bufferStart();
this.o = true;
}
if ((str.equals(PlayerErrorConstant.PREPARE_TIMEOUT) || str.equals(PlayerErrorConstant.PLAYERING_TIMEOUT)) && this.b != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.n);
jSONObject.put("id", this.d);
jSONObject.put("data", new JSONObject());
g.a().a(this.b, "onPlayerTimeout", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
d.c().a(this.b, e.getMessage());
}
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onBufferingEnd() {
try {
super.onBufferingEnd();
if (this.c == null || !this.o) {
return;
}
af.b("omsdk", "bt onBufferingEnd");
this.o = false;
this.c.bufferFinish();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onPlaySetDataSourceError(String str) {
super.onPlaySetDataSourceError(str);
}
/* JADX WARN: Removed duplicated region for block: B:23:0x00a7 A[Catch: Exception -> 0x006f, TryCatch #0 {Exception -> 0x006f, blocks: (B:15:0x002f, B:17:0x0037, B:20:0x0044, B:21:0x009b, B:23:0x00a7, B:25:0x00b1, B:31:0x0071), top: B:14:0x002f }] */
/* JADX WARN: Removed duplicated region for block: B:30:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(int r3, int r4) {
/*
r2 = this;
java.lang.String r0 = "DefaultVideoPlayerStatusListener"
r2.l = r3
r2.m = r4
com.mbridge.msdk.foundation.tools.ah r3 = com.mbridge.msdk.foundation.tools.ah.a()
java.lang.String r4 = "h_c_r_w_p_c"
r1 = 0
boolean r3 = r3.a(r4, r1)
if (r3 != 0) goto L15
goto Lc2
L15:
int r3 = r2.l
r4 = 100
if (r3 == r4) goto Lc2
int r4 = r2.m
if (r4 != 0) goto Lc2
boolean r4 = r2.n
if (r4 != 0) goto Lc2
if (r3 == 0) goto Lc2
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r3 = r2.a
if (r3 == 0) goto Lc2
com.mbridge.msdk.foundation.entity.CampaignEx r3 = r3.b
if (r3 != 0) goto L2f
goto Lc2
L2f:
int r3 = r3.getAdType() // Catch: java.lang.Exception -> L6f
r4 = 94
if (r3 == r4) goto L71
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r3 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r3 = r3.b // Catch: java.lang.Exception -> L6f
int r3 = r3.getAdType() // Catch: java.lang.Exception -> L6f
r4 = 287(0x11f, float:4.02E-43)
if (r3 != r4) goto L44
goto L71
L44:
java.lang.StringBuilder r3 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L6f
r3.<init>() // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getId() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getVideoUrlEncode() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getBidToken() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
java.lang.String r3 = r3.toString() // Catch: java.lang.Exception -> L6f
goto L9b
L6f:
r3 = move-exception
goto Lb7
L71:
java.lang.StringBuilder r3 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L6f
r3.<init>() // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getRequestId() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getId() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getVideoUrlEncode() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
java.lang.String r3 = r3.toString() // Catch: java.lang.Exception -> L6f
L9b:
com.mbridge.msdk.videocommon.download.b r4 = com.mbridge.msdk.videocommon.download.b.getInstance() // Catch: java.lang.Exception -> L6f
java.lang.String r1 = r2.e // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.videocommon.download.a r3 = r4.a(r1, r3) // Catch: java.lang.Exception -> L6f
if (r3 == 0) goto Lc2
r3.p() // Catch: java.lang.Exception -> L6f
r3 = 1
r2.n = r3 // Catch: java.lang.Exception -> L6f
boolean r3 = com.mbridge.msdk.MBridgeConstans.DEBUG // Catch: java.lang.Exception -> L6f
if (r3 == 0) goto Lc2
java.lang.String r3 = "CDRate is : 0 and start download when player create!"
com.mbridge.msdk.foundation.tools.af.b(r0, r3) // Catch: java.lang.Exception -> L6f
goto Lc2
Lb7:
boolean r4 = com.mbridge.msdk.MBridgeConstans.DEBUG
if (r4 == 0) goto Lc2
java.lang.String r3 = r3.getMessage()
com.mbridge.msdk.foundation.tools.af.b(r0, r3)
Lc2:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.a.a(int, int):void");
}
}
public void setSoundImageViewVisble(int i) {
this.q.setVisibility(i == 0 ? 4 : 0);
}
public void setCountDownTextViewVisable(int i) {
this.r.setVisibility(i == 0 ? 4 : 0);
}
public void setCloseViewVisable(int i) {
this.s.setVisibility(i == 0 ? 4 : 0);
}
public void setProgressBarState(int i) {
ProgressBar progressBar = this.P;
if (progressBar != null) {
progressBar.setVisibility(i == 0 ? 8 : 0);
CampaignEx campaignEx = this.b;
if (campaignEx == null || campaignEx.getProgressBarShow() != 1) {
return;
}
this.P.setVisibility(0);
}
}
/* JADX INFO: Access modifiers changed from: private */
public static String b(int i, int i2) {
if (i2 != 0) {
try {
return ak.a(Double.valueOf(i / i2)) + "";
} catch (Throwable th) {
th.printStackTrace();
}
}
return i2 + "";
}
public void setVolume(float f, float f2) {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.setVolume(f, f2);
}
}
public void setPlaybackParams(float f) {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.setPlaybackParams(f);
}
}
public void setNotchPadding(int i, int i2, int i3, int i4) {
if (i <= 0) {
i = this.O.getPaddingLeft();
}
if (i2 <= 0) {
i2 = this.O.getPaddingRight();
}
if (i3 <= 0) {
i3 = this.O.getPaddingTop();
}
if (i4 <= 0) {
i4 = this.O.getPaddingBottom();
}
af.b(BTBaseView.TAG, "NOTCH BTVideoView " + String.format("%1s-%2s-%3s-%4s", Integer.valueOf(i), Integer.valueOf(i2), Integer.valueOf(i3), Integer.valueOf(i4)));
this.O.setPadding(i, i3, i2, i4);
}
public void preLoadData() {
String str;
int r;
if (this.b.getAdType() == 94 || this.b.getAdType() == 287) {
str = this.b.getRequestId() + this.b.getId() + this.b.getVideoUrlEncode();
} else {
str = this.b.getId() + this.b.getVideoUrlEncode() + this.b.getBidToken();
}
com.mbridge.msdk.videocommon.download.a a2 = com.mbridge.msdk.videocommon.download.b.getInstance().a(this.c, str);
if (a2 != null) {
this.w = a2;
}
this.F = e();
String d = d();
this.J = d;
if (this.h && !TextUtils.isEmpty(d) && this.b != null) {
AdSession adSession = this.A;
if (adSession != null) {
adSession.registerAdView(this.p);
AdSession adSession2 = this.A;
SoundImageView soundImageView = this.q;
FriendlyObstructionPurpose friendlyObstructionPurpose = FriendlyObstructionPurpose.OTHER;
adSession2.addFriendlyObstruction(soundImageView, friendlyObstructionPurpose, null);
this.A.addFriendlyObstruction(this.r, friendlyObstructionPurpose, null);
this.A.addFriendlyObstruction(this.s, FriendlyObstructionPurpose.VIDEO_CONTROLS, null);
}
a aVar = new a(this, this.v, this.C);
this.D = aVar;
CampaignEx campaignEx = this.b;
if (campaignEx != null) {
if (campaignEx.getReady_rate() != -1) {
r = campaignEx.getReady_rate();
} else {
r = com.mbridge.msdk.videocommon.d.b.a().a(c.m().k(), this.c, false).r();
}
} else {
r = com.mbridge.msdk.videocommon.d.b.a().a(c.m().k(), this.c, false).r();
}
aVar.a(r, com.mbridge.msdk.videocommon.d.b.a().a(c.m().k(), this.c, false).s());
this.p.setDesk(false);
this.p.initBufferIngParam(this.F);
soundOperate(this.E, -1, null);
}
K = false;
}
}

View File

@@ -0,0 +1,519 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.content.res.Configuration;
import android.net.http.SslError;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.View;
import android.webkit.SslErrorHandler;
import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.mbridge.msdk.e.b;
import com.mbridge.msdk.foundation.entity.CampaignEx;
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.mbsignalcommon.b.a;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.out.Campaign;
import com.mbridge.msdk.video.bt.a.d;
import com.mbridge.msdk.video.signal.a.k;
import com.mbridge.msdk.videocommon.d.c;
import java.util.List;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeBTWebView extends MBridgeBTWebViewDiff {
private String p;
private String q;
private String r;
private boolean s;
private ImageView t;
private boolean u;
private c v;
private List<CampaignEx> w;
private WebView x;
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void expand(String str, boolean z) {
}
public List<CampaignEx> getCampaigns() {
return this.w;
}
public String getFilePath() {
return this.q;
}
public String getFileURL() {
return this.p;
}
public String getHtml() {
return this.r;
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public CampaignEx getMraidCampaign() {
return this.b;
}
public c getRewardUnitSetting() {
return this.v;
}
public WindVaneWebView getWebView() {
return this.webView;
}
public void setCampaigns(List<CampaignEx> list) {
this.w = list;
}
public void setCreateWebView(WebView webView) {
this.x = webView;
}
public void setFilePath(String str) {
this.q = str;
}
public void setHtml(String str) {
this.r = str;
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void setRewardUnitSetting(c cVar) {
this.v = cVar;
}
public void setFileURL(String str) {
this.p = str;
if (TextUtils.isEmpty(str)) {
return;
}
boolean contains = str.contains("play.google.com");
setWebviewClickable(!contains);
if (contains) {
com.mbridge.msdk.mbsignalcommon.base.c cVar = new com.mbridge.msdk.mbsignalcommon.base.c();
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setFilter(cVar);
}
}
}
public MBridgeBTWebView(Context context) {
super(context);
this.s = false;
this.u = false;
}
public MBridgeBTWebView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.s = false;
this.u = false;
}
public void setWebviewClickable(boolean z) {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setClickable(z);
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
WindVaneWebView windVaneWebView = new WindVaneWebView(context);
this.webView = windVaneWebView;
windVaneWebView.setBackgroundColor(0);
this.webView.setVisibility(0);
k kVar = new k(null, this.b, this.w);
this.jsCommon = kVar;
kVar.a(this.c);
if (b.a()) {
setChinaAlertInstallState(this.jsCommon);
}
this.webView.setObject(this.jsCommon);
this.webView.setMraidObject(this);
this.webView.setWebViewListener(new a() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTWebView.1
@Override // com.mbridge.msdk.mbsignalcommon.b.a
public final void a(Object obj) {
super.a(obj);
try {
k kVar2 = MBridgeBTWebView.this.jsCommon;
String str = "";
String c = kVar2 != null ? kVar2.c() : "";
if (!TextUtils.isEmpty(c)) {
str = Base64.encodeToString(c.getBytes(), 2);
af.a("RVWindVaneWebView", "getEndScreenInfo success");
} else {
af.a("RVWindVaneWebView", "getEndScreenInfo failed");
}
g.a().a(obj, str);
} catch (Throwable th) {
af.a("RVWindVaneWebView", th.getMessage());
}
}
@Override // com.mbridge.msdk.mbsignalcommon.b.a, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, String str) {
super.a(webView, str);
if (MBridgeBTWebView.this.x != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("id", MBridgeBTWebView.this.d);
jSONObject.put("code", BTBaseView.n);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("id", MBridgeBTWebView.this.d);
jSONObject2.put("result", 1);
jSONObject.put("data", jSONObject2);
g.a().a(MBridgeBTWebView.this.x, "onWebviewLoad", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
d.c().a(MBridgeBTWebView.this.x, e.getMessage());
af.a("RVWindVaneWebView", e.getMessage());
}
}
g.a().a(MBridgeBTWebView.this.webView);
}
@Override // com.mbridge.msdk.mbsignalcommon.b.a, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, int i, String str, String str2) {
super.a(webView, i, str, str2);
if (MBridgeBTWebView.this.x != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("id", MBridgeBTWebView.this.d);
jSONObject.put("code", BTBaseView.n);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("id", MBridgeBTWebView.this.d);
jSONObject2.put("result", 2);
jSONObject2.put("error", str);
jSONObject.put("data", jSONObject2);
g.a().a(MBridgeBTWebView.this.x, "onWebviewLoad", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
d.c().a(MBridgeBTWebView.this.x, e.getMessage());
af.a("RVWindVaneWebView", e.getMessage());
}
}
}
@Override // com.mbridge.msdk.mbsignalcommon.b.a, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
super.a(webView, sslErrorHandler, sslError);
if (MBridgeBTWebView.this.x == null) {
return;
}
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("id", MBridgeBTWebView.this.d);
jSONObject.put("code", BTBaseView.n);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("id", MBridgeBTWebView.this.d);
jSONObject2.put("result", 2);
throw null;
} catch (Exception e) {
d.c().a(MBridgeBTWebView.this.x, e.getMessage());
af.a("RVWindVaneWebView", e.getMessage());
}
}
@Override // com.mbridge.msdk.mbsignalcommon.b.a, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, int i) {
super.a(webView, i);
}
});
addView(this.webView, new FrameLayout.LayoutParams(-1, -1));
setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTWebView.2
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeBTWebView.this.x != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.n);
jSONObject.put("id", MBridgeBTWebView.this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("x", String.valueOf(view.getX()));
jSONObject2.put("y", String.valueOf(view.getY()));
jSONObject.put("data", jSONObject2);
g.a().a(MBridgeBTWebView.this.x, "onClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception unused) {
d.c().a(MBridgeBTWebView.this.x, "onClicked", MBridgeBTWebView.this.d);
}
}
}
});
try {
ImageView imageView = new ImageView(getContext());
this.t = imageView;
imageView.setImageResource(findDrawable("mbridge_reward_close"));
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(96, 96);
layoutParams.gravity = 8388661;
layoutParams.setMargins(30, 30, 30, 30);
this.t.setLayoutParams(layoutParams);
this.t.setVisibility(this.s ? 4 : 8);
CampaignEx campaignEx = this.b;
if (campaignEx != null && campaignEx.isMraid()) {
this.t.setVisibility(4);
}
this.t.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTWebView.3
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
MBridgeBTWebView.this.close();
}
});
addView(this.t);
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
public void setWebViewRid(String str) {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setRid(str);
}
}
public void setWebViewLocalRequestId(String str) {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setLocalRequestId(str);
}
}
public void setTempTypeForMetrics(int i) {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setTempTypeForMetrics(i);
}
}
public void preload() {
if (!TextUtils.isEmpty(this.p)) {
this.webView.loadUrl(this.p);
} else if (!TextUtils.isEmpty(this.q)) {
this.webView.loadUrl(this.q);
} else {
if (TextUtils.isEmpty(this.r)) {
return;
}
this.webView.loadDataWithBaseURL("", this.r, "text/html", "UTF-8", null);
}
}
public void webviewLoad(int i) {
if (this.jsCommon == null) {
this.jsCommon = new k(null, this.b, this.w);
}
CampaignEx campaignEx = this.b;
if (campaignEx != null) {
this.jsCommon.a(campaignEx);
} else {
List<CampaignEx> list = this.w;
if (list != null && list.size() > 0) {
this.jsCommon.a(this.w);
if (this.w.size() == 1) {
this.jsCommon.a(this.w.get(0));
}
}
}
c cVar = this.v;
if (cVar != null) {
this.jsCommon.a(cVar);
}
this.jsCommon.a(this.c);
this.jsCommon.c(this.d);
if (b.a()) {
setChinaAlertInstallState(this.jsCommon);
}
if (i == 1) {
this.jsCommon.q();
}
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setObject(this.jsCommon);
}
CampaignEx campaignEx2 = this.b;
if (campaignEx2 != null && campaignEx2.isMraid()) {
this.t.setVisibility(4);
}
preload();
}
public boolean webviewReload() {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView == null) {
return false;
}
windVaneWebView.reload();
return true;
}
public boolean webviewGoBack() {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView == null || !windVaneWebView.canGoBack()) {
return false;
}
this.webView.goBack();
return true;
}
public boolean webviewGoForward() {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView == null || !windVaneWebView.canGoForward()) {
return false;
}
this.webView.goForward();
return true;
}
public void broadcast(String str, JSONObject jSONObject) {
if (this.webView != null) {
try {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("code", BTBaseView.n);
jSONObject2.put("id", this.d);
jSONObject2.put("eventName", str);
jSONObject2.put("data", jSONObject);
g.a().a((WebView) this.webView, "broadcast", Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (Exception unused) {
d.c().a((WebView) this.webView, "broadcast", this.d);
}
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView, android.view.View
public void onConfigurationChanged(Configuration configuration) {
if (this.webView != null) {
try {
JSONObject jSONObject = new JSONObject();
if (configuration.orientation == 2) {
jSONObject.put("orientation", "landscape");
} else {
jSONObject.put("orientation", "portrait");
}
jSONObject.put("instanceId", this.d);
g.a().a((WebView) this.webView, "orientation", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
e.printStackTrace();
}
}
}
public void onBackPressed() {
if (this.webView != null) {
d.c().a((WebView) this.webView, "onSystemBackPressed", this.d);
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
if (this.u) {
return;
}
this.u = true;
try {
if (this.webView != null) {
d.c().a((WebView) this.webView, "onSystemDestory", this.d);
}
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTWebView.4
@Override // java.lang.Runnable
public final void run() {
try {
WindVaneWebView windVaneWebView = MBridgeBTWebView.this.webView;
if (windVaneWebView != null) {
windVaneWebView.clearWebView();
MBridgeBTWebView.this.webView.release();
}
MBridgeBTWebView.this.p = null;
MBridgeBTWebView.this.q = null;
MBridgeBTWebView.this.r = null;
if (MBridgeBTWebView.this.x != null) {
MBridgeBTWebView.this.x = null;
}
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
}, 500L);
setOnClickListener(null);
removeAllViews();
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
@Override // com.mbridge.msdk.video.bt.module.MBridgeBTWebViewDiff, com.mbridge.msdk.mbsignalcommon.mraid.b
public void open(String str) {
try {
String clickURL = this.b.getClickURL();
if (!TextUtils.isEmpty(str)) {
this.b.setClickURL(str);
reportOpen(str);
}
com.mbridge.msdk.click.a aVar = new com.mbridge.msdk.click.a(getContext(), this.c);
aVar.a(this);
aVar.a(this.b);
this.b.setClickURL(clickURL);
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage());
}
}
@Override // com.mbridge.msdk.video.bt.module.MBridgeBTWebViewDiff
public void reportOpen(String str) {
try {
CampaignEx mraidCampaign = getMraidCampaign();
if (mraidCampaign != null) {
new h(getContext()).a(mraidCampaign.getRequestId(), mraidCampaign.getRequestIdNotice(), mraidCampaign.getId(), this.c, str, this.b.isBidCampaign());
}
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void close() {
WebView webView = this.x;
if (webView != null) {
BTBaseView.a(webView, "onPlayerCloseBtnClicked", this.d);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void unload() {
close();
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void useCustomClose(boolean z) {
try {
this.t.setVisibility(z ? 4 : 0);
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage());
}
}
@Override // com.mbridge.msdk.out.BaseTrackingListener
public void onStartRedirection(Campaign campaign, String str) {
aj.b(campaign, this);
}
@Override // com.mbridge.msdk.out.BaseTrackingListener
public void onFinishRedirection(Campaign campaign, String str) {
aj.a(campaign, this);
}
@Override // com.mbridge.msdk.out.BaseTrackingListener
public void onRedirectionFailed(Campaign campaign, String str) {
aj.a(campaign, this);
}
}

View File

@@ -0,0 +1,57 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import com.mbridge.msdk.click.a;
import com.mbridge.msdk.click.i;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.report.h;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.mraid.b;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.video.signal.a.k;
/* loaded from: classes4.dex */
public abstract class MBridgeBTWebViewDiff extends BTBaseView implements i, b {
public k jsCommon;
public WindVaneWebView webView;
public void setChinaAlertInstallState(k kVar) {
}
public MBridgeBTWebViewDiff(Context context) {
super(context);
}
public MBridgeBTWebViewDiff(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public void open(String str) {
try {
String clickURL = this.b.getClickURL();
if (!TextUtils.isEmpty(str)) {
this.b.setClickURL(str);
reportOpen(str);
}
a aVar = new a(getContext(), this.c);
aVar.a(this);
aVar.a(this.b);
this.b.setClickURL(clickURL);
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage());
}
}
public void reportOpen(String str) {
try {
CampaignEx mraidCampaign = getMraidCampaign();
if (mraidCampaign != null) {
new h(getContext()).a(mraidCampaign.getRequestId(), mraidCampaign.getRequestIdNotice(), mraidCampaign.getId(), this.c, str, this.b.isBidCampaign());
}
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
}

View File

@@ -0,0 +1,22 @@
package com.mbridge.msdk.video.bt.module.a;
import com.mbridge.msdk.videocommon.b.c;
/* loaded from: classes4.dex */
public interface a {
void a();
void a(int i, String str, String str2);
void a(String str);
void a(String str, String str2);
void a(boolean z, int i);
void a(boolean z, c cVar);
void a(boolean z, String str, String str2);
void b(String str, String str2);
}

View File

@@ -0,0 +1,22 @@
package com.mbridge.msdk.video.bt.module.a;
import com.mbridge.msdk.videocommon.b.c;
/* loaded from: classes4.dex */
public interface b {
void a(String str);
void a(String str, int i, String str2, String str3);
void a(String str, String str2);
void a(String str, String str2, String str3);
void a(String str, boolean z, c cVar);
void a(boolean z, int i);
void b(String str, String str2, String str3);
void c(String str, String str2, String str3);
}

View File

@@ -0,0 +1,99 @@
package com.mbridge.msdk.video.bt.module.b;
import com.mbridge.msdk.out.MBridgeIds;
import com.mbridge.msdk.out.RewardInfo;
import com.mbridge.msdk.videocommon.listener.InterVideoOutListener;
/* loaded from: classes4.dex */
public final class a implements InterVideoOutListener {
private g a;
private String b;
private boolean c;
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onAdCloseWithIVReward(MBridgeIds mBridgeIds, RewardInfo rewardInfo) {
}
public a(g gVar, String str, boolean z) {
this.a = gVar;
this.b = str;
this.c = z;
}
public a(g gVar) {
this.b = "";
this.a = gVar;
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onAdShow(MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onAdShow(mBridgeIds);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onAdClose(MBridgeIds mBridgeIds, RewardInfo rewardInfo) {
g gVar = this.a;
if (gVar != null) {
gVar.onAdClose(mBridgeIds, rewardInfo);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onShowFail(com.mbridge.msdk.foundation.same.report.d.c cVar, MBridgeIds mBridgeIds, String str) {
g gVar = this.a;
if (gVar != null) {
gVar.onShowFail(mBridgeIds, str);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onVideoAdClicked(boolean z, MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onVideoAdClicked(mBridgeIds);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onVideoComplete(MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onVideoComplete(mBridgeIds);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onEndcardShow(MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onEndcardShow(mBridgeIds);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onVideoLoadFail(MBridgeIds mBridgeIds, String str) {
g gVar = this.a;
if (gVar != null) {
gVar.onVideoLoadFail(mBridgeIds, str);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onVideoLoadSuccess(MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onVideoLoadSuccess(mBridgeIds);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onLoadSuccess(MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onLoadSuccess(mBridgeIds);
}
}
}

View File

@@ -0,0 +1,51 @@
package com.mbridge.msdk.video.bt.module.b;
import com.mbridge.msdk.foundation.tools.af;
/* loaded from: classes4.dex */
public class b implements h {
public boolean b = false;
public boolean c = false;
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(com.mbridge.msdk.foundation.same.report.d.c cVar) {
af.a("ShowRewardListener", "onAdShow");
this.b = true;
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(com.mbridge.msdk.foundation.same.report.d.c cVar, boolean z, com.mbridge.msdk.videocommon.b.c cVar2) {
af.a("ShowRewardListener", "onAdClose:isCompleteView:" + z + ",reward:" + cVar2);
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(com.mbridge.msdk.foundation.same.report.d.c cVar, String str) {
af.a("ShowRewardListener", "onShowFail:" + str);
this.c = true;
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(boolean z, String str, String str2) {
af.a("ShowRewardListener", "onVideoAdClicked:" + str2);
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(String str, String str2) {
af.a("ShowRewardListener", "onVideoComplete: " + str2);
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(boolean z, int i) {
af.a("ShowRewardListener", "onAdCloseWithIVReward: " + z + " " + i);
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void b(String str, String str2) {
af.a("ShowRewardListener", "onEndcardShow: " + str2);
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(int i, String str, String str2) {
af.a("ShowRewardListener", "onAutoLoad: " + str2);
}
}

View File

@@ -0,0 +1,70 @@
package com.mbridge.msdk.video.bt.module.b;
import com.mbridge.msdk.foundation.tools.af;
/* loaded from: classes4.dex */
public final class c extends b {
private com.mbridge.msdk.video.bt.module.a.b a;
private String d;
public c(com.mbridge.msdk.video.bt.module.a.b bVar, String str) {
this.a = bVar;
this.d = str;
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onAdShow");
this.a.a(this.d);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar, boolean z, com.mbridge.msdk.videocommon.b.c cVar2) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onAdClose");
this.a.a(this.d, z, cVar2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar, String str) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onShowFail");
this.a.a(this.d, str);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(boolean z, String str, String str2) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onVideoAdClicked");
this.a.a(this.d, str, str2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(String str, String str2) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onVideoComplete");
this.a.b(this.d, str, str2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void b(String str, String str2) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onEndcardShow");
this.a.c(this.d, str, str2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(int i, String str, String str2) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onAutoLoad");
this.a.a(this.d, i, str, str2);
}
}
}

View File

@@ -0,0 +1,159 @@
package com.mbridge.msdk.video.bt.module.b;
import android.content.Context;
/* loaded from: classes4.dex */
public final class d extends b {
private h a;
private com.mbridge.msdk.videocommon.d.c d;
private String e;
private String f;
private boolean g;
private Context h;
private boolean i = false;
private boolean j = false;
private boolean k = false;
/* JADX WARN: Removed duplicated region for block: B:12:0x004c A[Catch: Exception -> 0x0070, TryCatch #0 {Exception -> 0x0070, blocks: (B:3:0x0016, B:5:0x0026, B:7:0x0030, B:9:0x0039, B:10:0x0042, B:12:0x004c, B:14:0x0052, B:16:0x0058, B:18:0x0062, B:21:0x0066, B:23:0x006a), top: B:2:0x0016 }] */
/* JADX WARN: Removed duplicated region for block: B:14:0x0052 A[Catch: Exception -> 0x0070, TryCatch #0 {Exception -> 0x0070, blocks: (B:3:0x0016, B:5:0x0026, B:7:0x0030, B:9:0x0039, B:10:0x0042, B:12:0x004c, B:14:0x0052, B:16:0x0058, B:18:0x0062, B:21:0x0066, B:23:0x006a), top: B:2:0x0016 }] */
/* JADX WARN: Removed duplicated region for block: B:25:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public d(android.content.Context r4, boolean r5, com.mbridge.msdk.videocommon.d.c r6, com.mbridge.msdk.foundation.entity.CampaignEx r7, com.mbridge.msdk.video.bt.module.b.h r8, java.lang.String r9, java.lang.String r10) {
/*
r3 = this;
r3.<init>()
r0 = 0
r3.i = r0
r3.j = r0
r3.k = r0
r3.a = r8
r3.d = r6
r3.e = r10
r3.f = r9
r3.g = r5
r3.h = r4
com.mbridge.msdk.foundation.controller.c r4 = com.mbridge.msdk.foundation.controller.c.m() // Catch: java.lang.Exception -> L70
java.lang.String r4 = r4.k() // Catch: java.lang.Exception -> L70
boolean r5 = android.text.TextUtils.isEmpty(r4) // Catch: java.lang.Exception -> L70
r8 = 0
if (r5 != 0) goto L41
com.mbridge.msdk.c.h r5 = com.mbridge.msdk.c.h.a() // Catch: java.lang.Exception -> L70
com.mbridge.msdk.c.g r4 = r5.b(r4) // Catch: java.lang.Exception -> L70
if (r4 != 0) goto L37
com.mbridge.msdk.c.h.a() // Catch: java.lang.Exception -> L70
com.mbridge.msdk.c.g r4 = com.mbridge.msdk.c.i.a() // Catch: java.lang.Exception -> L70
L37:
if (r4 == 0) goto L41
long r4 = r4.ad() // Catch: java.lang.Exception -> L70
r1 = 1000(0x3e8, double:4.94E-321)
long r4 = r4 * r1
goto L42
L41:
r4 = r8
L42:
com.mbridge.msdk.videocommon.d.b r10 = com.mbridge.msdk.videocommon.d.b.a() // Catch: java.lang.Exception -> L70
com.mbridge.msdk.videocommon.d.a r10 = r10.b() // Catch: java.lang.Exception -> L70
if (r10 == 0) goto L50
long r8 = r10.f() // Catch: java.lang.Exception -> L70
L50:
if (r7 == 0) goto L70
boolean r4 = r7.isSpareOffer(r8, r4) // Catch: java.lang.Exception -> L70
if (r4 == 0) goto L6a
r4 = 1
r7.setSpareOfferFlag(r4) // Catch: java.lang.Exception -> L70
int r5 = r6.y() // Catch: java.lang.Exception -> L70
if (r5 != r4) goto L66
r7.setCbt(r4) // Catch: java.lang.Exception -> L70
goto L70
L66:
r7.setCbt(r0) // Catch: java.lang.Exception -> L70
goto L70
L6a:
r7.setSpareOfferFlag(r0) // Catch: java.lang.Exception -> L70
r7.setCbt(r0) // Catch: java.lang.Exception -> L70
L70:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.b.d.<init>(android.content.Context, boolean, com.mbridge.msdk.videocommon.d.c, com.mbridge.msdk.foundation.entity.CampaignEx, com.mbridge.msdk.video.bt.module.b.h, java.lang.String, java.lang.String):void");
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar) {
super.a(cVar);
h hVar = this.a;
if (hVar == null || this.i) {
return;
}
this.i = true;
this.b = true;
hVar.a(cVar);
this.a.a(2, this.f, this.e);
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar, boolean z, com.mbridge.msdk.videocommon.b.c cVar2) {
super.a(cVar, z, cVar2);
h hVar = this.a;
if (hVar == null || this.k) {
return;
}
this.k = true;
hVar.a(7, this.f, this.e);
this.a.a(cVar, z, cVar2);
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(boolean z, int i) {
super.a(z, i);
h hVar = this.a;
if (hVar == null || this.k) {
return;
}
hVar.a(z, i);
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar, String str) {
super.a(cVar, str);
h hVar = this.a;
if (hVar == null || this.j) {
return;
}
this.j = true;
this.c = true;
hVar.a(cVar, str);
this.a.a(4, this.f, this.e);
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(boolean z, String str, String str2) {
super.a(z, str, str2);
h hVar = this.a;
if (hVar != null) {
hVar.a(z, str, str2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void b(String str, String str2) {
super.b(str, str2);
h hVar = this.a;
if (hVar != null) {
hVar.b(str, str2);
this.a.a(6, str, str2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(String str, String str2) {
super.a(str, str2);
h hVar = this.a;
if (hVar != null) {
hVar.a(str, str2);
this.a.a(5, str, str2);
}
}
}

View File

@@ -0,0 +1,23 @@
package com.mbridge.msdk.video.bt.module.b;
import com.mbridge.msdk.video.bt.module.MBTempContainer;
/* loaded from: classes4.dex */
public final class e extends MBTempContainer.a.C0237a {
private h a;
private com.mbridge.msdk.foundation.same.report.d.c b;
public e(com.mbridge.msdk.foundation.same.report.d.c cVar, h hVar) {
this.a = hVar;
this.b = cVar;
}
@Override // com.mbridge.msdk.video.bt.module.MBTempContainer.a.C0237a, com.mbridge.msdk.video.bt.module.MBTempContainer.a
public final void a(String str) {
super.a(str);
h hVar = this.a;
if (hVar != null) {
hVar.a(this.b, str);
}
}
}

View File

@@ -0,0 +1,198 @@
package com.mbridge.msdk.video.bt.module.b;
import android.content.Context;
import android.text.TextUtils;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.db.o;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.entity.n;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbbid.common.BidResponsedEx;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class f {
private static final String a = "com.mbridge.msdk.video.bt.module.b.f";
public static void a(Context context, String str) {
if (context != null) {
try {
o a2 = o.a(com.mbridge.msdk.foundation.db.g.a(context));
if (TextUtils.isEmpty(str) || a2 == null || a2.a() <= 0) {
return;
}
List<n> a3 = a2.a("m_download_end");
List<n> a4 = a2.a("2000021");
List<n> a5 = a2.a("2000039");
List<n> a6 = a2.a("m_download_end");
List<n> a7 = a2.a("m_download_end");
List<n> a8 = a2.a("2000044");
com.mbridge.msdk.foundation.same.report.n.e(a4);
com.mbridge.msdk.foundation.same.report.n.a(a3);
com.mbridge.msdk.foundation.same.report.n.c(a5);
com.mbridge.msdk.foundation.same.report.n.b(a6);
com.mbridge.msdk.foundation.same.report.n.f(a7);
com.mbridge.msdk.foundation.same.report.n.d(a8);
} catch (Exception e) {
af.b(a, e.getMessage());
}
}
}
public static void a(Context context, CampaignEx campaignEx, String str, int i) {
if (context == null || campaignEx == null) {
return;
}
try {
if (TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000054");
jSONObject.put("network_type", ab.m(context));
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
jSONObject.put(BidResponsedEx.KEY_CID, campaignEx.getId());
jSONObject.put("reason", "");
jSONObject.put("templateshowtype", i + " offer show success");
jSONObject.put("result", 2);
jSONObject.put("ad_type", campaignEx.getAdType() == 287 ? 3 : 1);
String str2 = campaignEx.getendcard_url();
if (!TextUtils.isEmpty(str2)) {
jSONObject.put("creative", URLEncoder.encode(str2, "UTF-8"));
}
jSONObject.put("devid", com.mbridge.msdk.foundation.tools.f.c());
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put(CampaignEx.JSON_KEY_NEW_INTERSTITIAL_AD_SPACE_T, campaignEx.getAdSpaceT());
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
public static void a(Context context, CampaignEx campaignEx, String str, String str2, int i) {
if (context == null || campaignEx == null) {
return;
}
try {
if ((!TextUtils.isEmpty(str)) && (!TextUtils.isEmpty(str2))) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000054");
jSONObject.put("network_type", ab.m(context));
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
jSONObject.put(BidResponsedEx.KEY_CID, campaignEx.getId());
jSONObject.put("reason", str2);
jSONObject.put("templateshowtype", i);
jSONObject.put("result", 1);
String str3 = campaignEx.getendcard_url();
if (!TextUtils.isEmpty(str3)) {
jSONObject.put("creative", URLEncoder.encode(str3, "UTF-8"));
}
jSONObject.put("devid", com.mbridge.msdk.foundation.tools.f.c());
jSONObject.put("ad_type", campaignEx.getAdType() == 287 ? 3 : 1);
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put(CampaignEx.JSON_KEY_NEW_INTERSTITIAL_AD_SPACE_T, campaignEx.getAdSpaceT());
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
}
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
public static void a(Context context, List<CampaignEx> list, String str) {
if (context == null || list == null) {
return;
}
try {
if (list.isEmpty() || TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000054");
jSONObject.put("network_type", ab.m(context));
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
ArrayList arrayList = new ArrayList();
for (int i = 0; i < list.size(); i++) {
arrayList.add(list.get(i).getId());
}
jSONObject.put(BidResponsedEx.KEY_CID, arrayList);
jSONObject.put("result", 2);
if (list.get(0) != null) {
CampaignEx campaignEx = list.get(0);
jSONObject.put("reason", "");
jSONObject.put("templateshowtype", "two offer ec show success");
jSONObject.put("ad_type", campaignEx.getAdType());
jSONObject.put("devid", com.mbridge.msdk.foundation.tools.f.c());
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put(CampaignEx.JSON_KEY_NEW_INTERSTITIAL_AD_SPACE_T, campaignEx.getAdSpaceT());
}
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
public static void a(Context context, List<CampaignEx> list, String str, String str2) {
if (context == null || list == null) {
return;
}
try {
if ((!TextUtils.isEmpty(str)) && (!TextUtils.isEmpty(str2))) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000054");
jSONObject.put("network_type", ab.m(context));
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
ArrayList arrayList = new ArrayList();
for (int i = 0; i < list.size(); i++) {
arrayList.add(list.get(i).getId());
}
jSONObject.put(BidResponsedEx.KEY_CID, arrayList);
jSONObject.put("reason", str2);
jSONObject.put("result", 1);
jSONObject.put("devid", com.mbridge.msdk.foundation.tools.f.c());
if (list.get(0) != null) {
CampaignEx campaignEx = list.get(0);
jSONObject.put("ad_type", campaignEx.getAdType());
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put("templateshowtype", campaignEx.getMof_tplid());
jSONObject.put(CampaignEx.JSON_KEY_NEW_INTERSTITIAL_AD_SPACE_T, campaignEx.getAdSpaceT());
}
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
}
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
public static void a(CampaignEx campaignEx, String str, int i) {
try {
Context c = com.mbridge.msdk.foundation.controller.c.m().c();
if (c == null || campaignEx == null || TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000115");
jSONObject.put("network_type", ab.m(c));
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
jSONObject.put(BidResponsedEx.KEY_CID, campaignEx.getId());
jSONObject.put("play_cur_time", i);
jSONObject.put("reason", "close ad in advance " + campaignEx.getMof_tplid());
jSONObject.put("result", 1);
jSONObject.put("devid", com.mbridge.msdk.foundation.tools.f.c());
jSONObject.put("ad_type", campaignEx.getAdType());
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put(CampaignEx.JSON_KEY_NEW_INTERSTITIAL_AD_SPACE_T, campaignEx.getAdSpaceT());
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
}

View File

@@ -0,0 +1,25 @@
package com.mbridge.msdk.video.bt.module.b;
import com.mbridge.msdk.out.MBridgeIds;
import com.mbridge.msdk.out.RewardInfo;
/* loaded from: classes4.dex */
public interface g {
void onAdClose(MBridgeIds mBridgeIds, RewardInfo rewardInfo);
void onAdShow(MBridgeIds mBridgeIds);
void onEndcardShow(MBridgeIds mBridgeIds);
void onLoadSuccess(MBridgeIds mBridgeIds);
void onShowFail(MBridgeIds mBridgeIds, String str);
void onVideoAdClicked(MBridgeIds mBridgeIds);
void onVideoComplete(MBridgeIds mBridgeIds);
void onVideoLoadFail(MBridgeIds mBridgeIds, String str);
void onVideoLoadSuccess(MBridgeIds mBridgeIds);
}

View File

@@ -0,0 +1,20 @@
package com.mbridge.msdk.video.bt.module.b;
/* loaded from: classes4.dex */
public interface h {
void a(int i, String str, String str2);
void a(com.mbridge.msdk.foundation.same.report.d.c cVar);
void a(com.mbridge.msdk.foundation.same.report.d.c cVar, String str);
void a(com.mbridge.msdk.foundation.same.report.d.c cVar, boolean z, com.mbridge.msdk.videocommon.b.c cVar2);
void a(String str, String str2);
void a(boolean z, int i);
void a(boolean z, String str, String str2);
void b(String str, String str2);
}

View File

@@ -0,0 +1,35 @@
package com.mbridge.msdk.video.dynview;
import android.view.View;
import java.util.List;
/* loaded from: classes4.dex */
public final class a {
private View a;
private List<View> b;
private boolean c;
public final View a() {
return this.a;
}
public final void a(View view) {
this.a = view;
}
public final void a(List<View> list) {
this.b = list;
}
public final void a(boolean z) {
this.c = z;
}
public final List<View> b() {
return this.b;
}
public final boolean c() {
return this.c;
}
}

View File

@@ -0,0 +1,10 @@
package com.mbridge.msdk.video.dynview.a;
/* loaded from: classes4.dex */
public final class a {
public static int a;
public static int b;
public static int c;
public static int d;
public static int e;
}

View File

@@ -0,0 +1,42 @@
package com.mbridge.msdk.video.dynview;
import android.view.View;
import com.mbridge.msdk.video.dynview.e.h;
import java.lang.ref.SoftReference;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes4.dex */
public class b {
private static volatile b b;
public Map<String, SoftReference<View>> a = new HashMap();
private b() {
}
public static b a() {
b bVar;
if (b != null) {
return b;
}
synchronized (b.class) {
try {
if (b == null) {
b = new b();
}
bVar = b;
} catch (Throwable th) {
throw th;
}
}
return bVar;
}
public final void a(c cVar, h hVar) {
new com.mbridge.msdk.video.dynview.h.a(cVar, hVar, new HashMap());
}
public final void a(c cVar, h hVar, Map<String, Object> map) {
new com.mbridge.msdk.video.dynview.h.a(cVar, hVar, map);
}
}

View File

@@ -0,0 +1,62 @@
package com.mbridge.msdk.video.dynview.b;
import android.view.View;
import com.mbridge.msdk.video.dynview.c;
import com.mbridge.msdk.video.dynview.e.e;
import java.util.ArrayList;
import java.util.Map;
/* loaded from: classes4.dex */
public class a {
private static volatile a b;
public com.mbridge.msdk.video.dynview.d.a a;
private a() {
}
public static a a() {
a aVar;
if (b != null) {
return b;
}
synchronized (a.class) {
try {
if (b == null) {
b = new a();
}
aVar = b;
} catch (Throwable th) {
throw th;
}
}
return aVar;
}
public final void a(View view, c cVar, Map map, e eVar) {
int h = cVar.h();
if (h == 1) {
com.mbridge.msdk.video.dynview.j.a aVar = new com.mbridge.msdk.video.dynview.j.a();
aVar.a(cVar, view, map, eVar);
this.a = aVar.a;
} else {
if (h == 2) {
new com.mbridge.msdk.video.dynview.j.a().b(cVar, view, map, eVar);
return;
}
if (h == 4) {
new com.mbridge.msdk.video.dynview.j.a().a(cVar, view, eVar);
} else if (h != 5) {
eVar.a(view, new ArrayList());
} else {
new com.mbridge.msdk.video.dynview.j.a().c(cVar, view, map, eVar);
}
}
}
public final void b() {
com.mbridge.msdk.video.dynview.d.a aVar = this.a;
if (aVar != null) {
aVar.c();
}
}
}

View File

@@ -0,0 +1,56 @@
package com.mbridge.msdk.video.dynview.b;
import android.view.View;
import com.mbridge.msdk.video.dynview.c;
import java.util.Map;
/* loaded from: classes4.dex */
public class b {
private static volatile b a;
private b() {
}
public static b a() {
b bVar;
if (a != null) {
return a;
}
synchronized (b.class) {
try {
if (a == null) {
a = new b();
}
bVar = a;
} catch (Throwable th) {
throw th;
}
}
return bVar;
}
public final void a(View view, c cVar, Map<String, Object> map) {
if (cVar == null) {
return;
}
int h = cVar.h();
if (h == 1) {
new com.mbridge.msdk.video.dynview.j.b().a(view, map);
return;
}
if (h == 2) {
new com.mbridge.msdk.video.dynview.j.b().a(view, cVar, map);
return;
}
if (h == 3) {
new com.mbridge.msdk.video.dynview.j.b().a(view, cVar);
} else if (h == 4) {
new com.mbridge.msdk.video.dynview.j.b().b(view, cVar, map);
} else {
if (h != 5) {
return;
}
new com.mbridge.msdk.video.dynview.j.b();
}
}
}

View File

@@ -0,0 +1,272 @@
package com.mbridge.msdk.video.dynview;
import android.content.Context;
import android.view.View;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import java.util.List;
/* loaded from: classes4.dex */
public final class c {
private Context a;
private String b;
private int c;
private float d;
private float e;
private int f;
private int g;
private View h;
private List<CampaignEx> i;
private int j;
private boolean k;
private List<String> l;
private int m;
private String n;
private int o;
private int p;
private String q;
public interface b {
b a(float f);
b a(int i);
b a(Context context);
b a(View view);
b a(String str);
b a(List<CampaignEx> list);
b a(boolean z);
c a();
b b(float f);
b b(int i);
b b(String str);
b b(List<String> list);
b c(int i);
b c(String str);
b d(int i);
b e(int i);
b f(int i);
b g(int i);
}
public final Context a() {
return this.a;
}
public final String b() {
return this.b;
}
public final float c() {
return this.d;
}
public final float d() {
return this.e;
}
public final int e() {
return this.f;
}
public final View f() {
return this.h;
}
public final List<CampaignEx> g() {
return this.i;
}
public final int h() {
return this.c;
}
public final int i() {
return this.j;
}
public final int j() {
return this.g;
}
public final boolean k() {
return this.k;
}
public final List<String> l() {
return this.l;
}
public final int m() {
return this.o;
}
public final int n() {
return this.p;
}
public final String o() {
return this.q;
}
private c(a aVar) {
this.e = aVar.e;
this.d = aVar.d;
this.f = aVar.f;
this.g = aVar.g;
this.a = aVar.a;
this.b = aVar.b;
this.c = aVar.c;
this.h = aVar.h;
this.i = aVar.i;
this.j = aVar.j;
this.k = aVar.k;
this.l = aVar.l;
this.m = aVar.m;
this.n = aVar.n;
this.o = aVar.o;
this.p = aVar.p;
this.q = aVar.q;
}
public static class a implements b {
private Context a;
private String b;
private int c;
private float d;
private float e;
private int f;
private int g;
private View h;
private List<CampaignEx> i;
private int j;
private boolean k;
private List<String> l;
private int m;
private String n;
private int o;
private int p = 1;
private String q;
@Override // com.mbridge.msdk.video.dynview.c.b
public final b a(float f) {
this.d = f;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b a(int i) {
this.c = i;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b a(View view) {
this.h = view;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b a(String str) {
this.b = str;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b a(List<CampaignEx> list) {
this.i = list;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b a(boolean z) {
this.k = z;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b b(float f) {
this.e = f;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b b(int i) {
this.f = i;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b b(String str) {
this.n = str;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b b(List<String> list) {
this.l = list;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b c(int i) {
this.g = i;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b c(String str) {
this.q = str;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b d(int i) {
this.j = i;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b e(int i) {
this.m = i;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b f(int i) {
this.o = i;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b g(int i) {
this.p = i;
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final b a(Context context) {
this.a = context.getApplicationContext();
return this;
}
@Override // com.mbridge.msdk.video.dynview.c.b
public final c a() {
return new c(this);
}
}
}

View File

@@ -0,0 +1,27 @@
package com.mbridge.msdk.video.dynview.c;
/* loaded from: classes4.dex */
public enum a {
NOT_FOUND_VIEWOPTION(-1, "ViewOption is null"),
NOT_FOUND_CONTEXT(-2, "Context is null"),
NOT_FOUND_LAYOUTNAME(-3, "layout xml name is null"),
CAMPAIGNEX_IS_NULL(-4, "Campaign size only one"),
VIEW_CREATE_ERROR(-5, "view create error"),
NOT_FOUND_ROOTVIEW(-6, "rootview is null");
private int g;
private String h;
public final int a() {
return this.g;
}
public final String b() {
return this.h;
}
a(int i2, String str) {
this.g = i2;
this.h = str;
}
}

View File

@@ -0,0 +1,10 @@
package com.mbridge.msdk.video.dynview.d;
/* loaded from: classes4.dex */
public interface a {
void a();
void b();
void c();
}

View File

@@ -0,0 +1,8 @@
package com.mbridge.msdk.video.dynview.e;
import java.util.Map;
/* loaded from: classes4.dex */
public interface a {
void a(Map<String, Object> map);
}

View File

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

View File

@@ -0,0 +1,10 @@
package com.mbridge.msdk.video.dynview.e;
import com.mbridge.msdk.foundation.entity.CampaignEx;
/* loaded from: classes4.dex */
public interface c {
void a();
void a(CampaignEx campaignEx, int i);
}

View File

@@ -0,0 +1,10 @@
package com.mbridge.msdk.video.dynview.e;
import com.mbridge.msdk.foundation.entity.CampaignEx;
/* loaded from: classes4.dex */
public interface d {
void countDownClick();
void itemClick(CampaignEx campaignEx);
}

View File

@@ -0,0 +1,11 @@
package com.mbridge.msdk.video.dynview.e;
import android.view.View;
import java.util.List;
/* loaded from: classes4.dex */
public interface e {
void a(View view, List<View> list);
void a(com.mbridge.msdk.video.dynview.c.a aVar);
}

View File

@@ -0,0 +1,6 @@
package com.mbridge.msdk.video.dynview.e;
/* loaded from: classes4.dex */
public interface f {
void a();
}

View File

@@ -0,0 +1,11 @@
package com.mbridge.msdk.video.dynview.e;
import android.view.ViewGroup;
import com.mbridge.msdk.foundation.entity.CampaignUnit;
/* loaded from: classes4.dex */
public interface g {
void a(int i, String str);
void a(ViewGroup viewGroup, CampaignUnit campaignUnit);
}

View File

@@ -0,0 +1,8 @@
package com.mbridge.msdk.video.dynview.e;
/* loaded from: classes4.dex */
public interface h {
void viewInflaterFail(com.mbridge.msdk.video.dynview.c.a aVar);
void viewInflaterSuccess(com.mbridge.msdk.video.dynview.a aVar);
}

View File

@@ -0,0 +1,8 @@
package com.mbridge.msdk.video.dynview.endcard.expose;
/* loaded from: classes4.dex */
public interface OnItemExposeListener {
void onItemViewFirstVisible();
void onItemViewVisible(boolean z, int i);
}

View File

@@ -0,0 +1,180 @@
package com.mbridge.msdk.video.dynview.f;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.click.i;
import com.mbridge.msdk.foundation.download.core.DownloadCommon;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.report.d.d;
import com.mbridge.msdk.foundation.tools.ab;
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.out.Campaign;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class a {
private static final String a = "com.mbridge.msdk.video.dynview.f.a";
public static void a(CampaignEx campaignEx, Context context, String str, String str2, String str3) {
if (context != null) {
try {
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
return;
}
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000091");
jSONObject.put("network_type", ab.m(context));
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str2);
if (!TextUtils.isEmpty(com.mbridge.msdk.foundation.same.a.V)) {
jSONObject.put(DownloadCommon.DOWNLOAD_REPORT_FIND_FILE_RESULT_VALUE_B, com.mbridge.msdk.foundation.same.a.V);
}
if (!TextUtils.isEmpty(com.mbridge.msdk.foundation.same.a.g)) {
jSONObject.put("c", com.mbridge.msdk.foundation.same.a.g);
}
jSONObject.put("hb", 0);
jSONObject.put("rid_n", str3);
jSONObject.put("reason", str);
if (campaignEx != null && campaignEx.getRewardTemplateMode() != null) {
jSONObject.put("dyview", ak.b(campaignEx.getRewardTemplateMode().e()));
}
d.a().a(jSONObject);
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
}
/* JADX WARN: Removed duplicated region for block: B:25:0x009b */
/* JADX WARN: Removed duplicated region for block: B:27:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static void a(com.mbridge.msdk.foundation.entity.CampaignUnit r9, int r10, int r11, java.lang.String r12) {
/*
if (r9 == 0) goto Lb1
java.util.ArrayList r0 = r9.getAds()
if (r0 == 0) goto Lb1
java.util.ArrayList r0 = r9.getAds()
int r0 = r0.size()
if (r0 <= 0) goto Lb1
java.util.ArrayList r0 = r9.getAds()
java.lang.Object r0 = r0.get(r10)
if (r0 == 0) goto Lb1
if (r11 != 0) goto L2d
java.util.ArrayList r0 = r9.getAds()
java.lang.Object r0 = r0.get(r10)
com.mbridge.msdk.foundation.entity.CampaignEx r0 = (com.mbridge.msdk.foundation.entity.CampaignEx) r0
boolean r0 = r0.mMoreOfferImpShow
if (r0 == 0) goto L2d
return
L2d:
java.util.ArrayList r0 = r9.getAds()
java.lang.Object r0 = r0.get(r10)
com.mbridge.msdk.foundation.entity.CampaignEx r0 = (com.mbridge.msdk.foundation.entity.CampaignEx) r0
java.lang.String r0 = r0.getendcard_url()
java.lang.String r1 = "mof_testuid"
java.lang.String r0 = com.mbridge.msdk.foundation.tools.aq.a(r0, r1)
boolean r1 = android.text.TextUtils.isEmpty(r0)
if (r1 == 0) goto L5b
java.util.ArrayList r0 = r9.getAds()
java.lang.Object r0 = r0.get(r10)
com.mbridge.msdk.foundation.entity.CampaignEx r0 = (com.mbridge.msdk.foundation.entity.CampaignEx) r0
java.lang.String r0 = r0.getendcard_url()
java.lang.String r1 = "mof_uid"
java.lang.String r0 = com.mbridge.msdk.foundation.tools.aq.a(r0, r1)
L5b:
boolean r1 = android.text.TextUtils.isEmpty(r0)
if (r1 == 0) goto L63
r4 = r12
goto L64
L63:
r4 = r0
L64:
if (r11 == 0) goto L82
r12 = 1
if (r11 == r12) goto L6f
java.lang.String r11 = ""
r12 = 0
r5 = r11
r8 = r12
goto L93
L6f:
int r11 = com.mbridge.msdk.click.a.a.h
java.util.ArrayList r12 = r9.getAds()
java.lang.Object r12 = r12.get(r10)
com.mbridge.msdk.foundation.entity.CampaignEx r12 = (com.mbridge.msdk.foundation.entity.CampaignEx) r12
java.lang.String r12 = r12.getOnlyImpressionURL()
L7f:
r8 = r11
r5 = r12
goto L93
L82:
int r11 = com.mbridge.msdk.click.a.a.g
java.util.ArrayList r12 = r9.getAds()
java.lang.Object r12 = r12.get(r10)
com.mbridge.msdk.foundation.entity.CampaignEx r12 = (com.mbridge.msdk.foundation.entity.CampaignEx) r12
java.lang.String r12 = r12.getImpressionURL()
goto L7f
L93:
r6 = 0
r7 = 1
boolean r11 = android.text.TextUtils.isEmpty(r5)
if (r11 != 0) goto Lb1
com.mbridge.msdk.foundation.controller.c r11 = com.mbridge.msdk.foundation.controller.c.m()
android.content.Context r2 = r11.c()
java.util.ArrayList r9 = r9.getAds()
java.lang.Object r9 = r9.get(r10)
r3 = r9
com.mbridge.msdk.foundation.entity.CampaignEx r3 = (com.mbridge.msdk.foundation.entity.CampaignEx) r3
com.mbridge.msdk.click.a.a(r2, r3, r4, r5, r6, r7, r8)
Lb1:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.dynview.f.a.a(com.mbridge.msdk.foundation.entity.CampaignUnit, int, int, java.lang.String):void");
}
public static void a(Context context, CampaignEx campaignEx, String str, View view) {
if (context == null || campaignEx == null) {
return;
}
if (campaignEx.getNativeVideoTracking() != null && campaignEx.getNativeVideoTracking().l() != null) {
com.mbridge.msdk.click.a.a(context, campaignEx, campaignEx.getCampaignUnitId(), campaignEx.getNativeVideoTracking().l(), false, false);
}
com.mbridge.msdk.click.a aVar = new com.mbridge.msdk.click.a(context, str);
if (view instanceof ViewGroup) {
final ViewGroup viewGroup = (ViewGroup) view;
aVar.a(new i() { // from class: com.mbridge.msdk.video.dynview.f.a.1
@Override // com.mbridge.msdk.out.BaseTrackingListener
public final void onStartRedirection(Campaign campaign, String str2) {
if (campaign == null) {
return;
}
aj.b(campaign, viewGroup);
}
@Override // com.mbridge.msdk.out.BaseTrackingListener
public final void onFinishRedirection(Campaign campaign, String str2) {
if (campaign == null) {
return;
}
aj.a(campaign, viewGroup);
}
@Override // com.mbridge.msdk.out.BaseTrackingListener
public final void onRedirectionFailed(Campaign campaign, String str2) {
if (campaign == null) {
return;
}
aj.a(campaign, viewGroup);
}
});
}
aVar.a(campaignEx);
}
}

View File

@@ -0,0 +1,64 @@
package com.mbridge.msdk.video.dynview.f.a;
import android.text.TextUtils;
import com.mbridge.msdk.foundation.entity.CampaignUnit;
import com.mbridge.msdk.foundation.entity.b;
import com.mbridge.msdk.foundation.same.net.c;
import com.mbridge.msdk.foundation.same.net.d;
import com.mbridge.msdk.tracker.network.h;
import java.util.List;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public abstract class a extends c<JSONObject> {
private int a;
private String b;
public abstract void a(int i, String str);
public abstract void a(List<h> list, CampaignUnit campaignUnit);
@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(d<JSONObject> dVar) {
com.mbridge.msdk.foundation.same.net.d.a aVar;
CampaignUnit parseCampaignUnit;
super.onSuccess(dVar);
if (dVar == null || (aVar = dVar.b) == null || this.a != 0) {
return;
}
List<h> list = aVar.b;
JSONObject jSONObject = dVar.c;
int optInt = jSONObject.optInt("status");
if (1 == optInt) {
calcRequestTime(System.currentTimeMillis());
if ("v5".equals(jSONObject.optString("version"))) {
parseCampaignUnit = b.parseV5CampaignUnit(jSONObject.optJSONObject("data"), this.b);
} else {
parseCampaignUnit = b.parseCampaignUnit(jSONObject.optJSONObject("data"), this.b);
}
if (parseCampaignUnit != null && parseCampaignUnit.getAds() != null && parseCampaignUnit.getAds().size() > 0) {
a(list, parseCampaignUnit);
saveRequestTime(parseCampaignUnit.getAds().size());
return;
} else {
String msg = parseCampaignUnit != null ? parseCampaignUnit.getMsg() : null;
if (TextUtils.isEmpty(msg)) {
msg = jSONObject.optString("msg");
}
a(optInt, msg);
return;
}
}
a(optInt, jSONObject.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) {
a(aVar.a, com.mbridge.msdk.foundation.same.net.e.a.a(aVar));
}
}

View File

@@ -0,0 +1,41 @@
package com.mbridge.msdk.video.dynview.f;
import android.content.Context;
import android.os.Build;
import com.mbridge.msdk.foundation.same.net.f.c;
import com.mbridge.msdk.foundation.same.net.f.e;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.f;
import com.mbridge.msdk.out.MBConfiguration;
/* loaded from: classes4.dex */
public final class b extends c {
public b(Context context) {
super(context);
}
@Override // com.mbridge.msdk.foundation.same.net.f.c
public final void addExtraParams(String str, 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", 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);
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,243 @@
package com.mbridge.msdk.video.dynview.g;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Shader;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RectShape;
/* loaded from: classes4.dex */
public final class a extends ShapeDrawable {
private int a;
private float b;
private float c;
private int d;
private int e;
private Bitmap f;
private Bitmap g;
private boolean h;
private Paint i;
private Matrix j;
public interface b {
b a(Bitmap bitmap);
b a(boolean z);
b b(float f);
b b(Bitmap bitmap);
}
@Override // android.graphics.drawable.ShapeDrawable, android.graphics.drawable.Drawable
public final int getOpacity() {
return -3;
}
private a(C0238a c0238a) {
super(c0238a.a);
this.h = false;
this.f = c0238a.b;
this.g = c0238a.c;
this.h = c0238a.d;
this.a = c0238a.e;
this.d = c0238a.f;
this.e = c0238a.g;
this.b = c0238a.h;
this.c = c0238a.i;
Paint paint = new Paint();
this.i = paint;
paint.setStyle(Paint.Style.FILL);
this.i.setAntiAlias(true);
this.j = new Matrix();
}
@Override // android.graphics.drawable.ShapeDrawable, android.graphics.drawable.Drawable
public final void draw(Canvas canvas) {
super.draw(canvas);
if (this.a == 1) {
float f = this.c / 2.0f;
Path path = new Path();
path.moveTo(0.0f, 0.0f);
path.lineTo(0.0f, (this.d + f) - this.e);
path.lineTo(this.b, (f - this.d) - this.e);
path.lineTo(this.b, 0.0f);
if (this.h) {
try {
a(canvas, path);
} catch (Exception e) {
e.printStackTrace();
}
} else {
Bitmap bitmap = this.f;
if (bitmap != null && !bitmap.isRecycled()) {
try {
a(canvas, path, this.f);
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
Path path2 = new Path();
path2.moveTo(0.0f, this.d + f + this.e);
path2.lineTo(0.0f, this.c);
path2.lineTo(this.b, this.c);
path2.lineTo(this.b, (f - this.d) + this.e);
if (this.h) {
try {
a(canvas, path2);
return;
} catch (Exception e3) {
e3.printStackTrace();
return;
}
}
Bitmap bitmap2 = this.g;
if (bitmap2 == null || bitmap2.isRecycled()) {
return;
}
try {
a(canvas, path2, this.g);
return;
} catch (Exception e4) {
e4.printStackTrace();
return;
}
}
float f2 = this.b / 2.0f;
Path path3 = new Path();
path3.moveTo(0.0f, 0.0f);
path3.lineTo(0.0f, this.c);
path3.lineTo((f2 - this.d) - this.e, this.c);
path3.lineTo((this.d + f2) - this.e, 0.0f);
if (this.h) {
try {
a(canvas, path3);
} catch (Exception e5) {
e5.printStackTrace();
}
} else {
Bitmap bitmap3 = this.f;
if (bitmap3 != null && !bitmap3.isRecycled()) {
try {
a(canvas, path3, this.f);
} catch (Exception e6) {
e6.printStackTrace();
}
}
}
Path path4 = new Path();
path4.moveTo(this.d + f2 + this.e, 0.0f);
path4.lineTo(this.b, 0.0f);
path4.lineTo(this.b, this.c);
path4.lineTo((f2 - this.d) + this.e, this.c);
if (this.h) {
try {
a(canvas, path4);
return;
} catch (Exception e7) {
e7.printStackTrace();
return;
}
}
Bitmap bitmap4 = this.g;
if (bitmap4 == null || bitmap4.isRecycled()) {
return;
}
try {
a(canvas, path4, this.g);
} catch (Exception e8) {
e8.printStackTrace();
}
}
private void a(Canvas canvas, Path path, Bitmap bitmap) {
if (canvas == null || path == null || bitmap == null || bitmap.isRecycled()) {
return;
}
if (bitmap.getWidth() != 0 && bitmap.getHeight() != 0) {
float max = Math.max(this.b / bitmap.getWidth(), this.c / bitmap.getHeight());
if (this.j == null) {
this.j = new Matrix();
}
this.j.reset();
this.j.preScale(max, max);
}
Shader.TileMode tileMode = Shader.TileMode.CLAMP;
BitmapShader bitmapShader = new BitmapShader(bitmap, tileMode, tileMode);
bitmapShader.setLocalMatrix(this.j);
this.i.setShader(bitmapShader);
canvas.drawPath(path, this.i);
}
private void a(Canvas canvas, Path path) {
this.i.setColor(Color.parseColor("#40EAEAEA"));
canvas.drawPath(path, this.i);
}
public static C0238a a() {
return new C0238a();
}
/* renamed from: com.mbridge.msdk.video.dynview.g.a$a, reason: collision with other inner class name */
public static class C0238a implements b {
private RectShape a;
private Bitmap b;
private Bitmap c;
private boolean d;
private int e;
private int f;
private int g;
private float h;
private float i;
public final b a(float f) {
this.h = f;
return this;
}
public final b a(int i) {
this.e = i;
return this;
}
@Override // com.mbridge.msdk.video.dynview.g.a.b
public final b a(Bitmap bitmap) {
this.b = bitmap;
return this;
}
@Override // com.mbridge.msdk.video.dynview.g.a.b
public final b a(boolean z) {
this.d = z;
return this;
}
@Override // com.mbridge.msdk.video.dynview.g.a.b
public final b b(float f) {
this.i = f;
return this;
}
@Override // com.mbridge.msdk.video.dynview.g.a.b
public final b b(Bitmap bitmap) {
this.c = bitmap;
return this;
}
private C0238a() {
this.f = 100;
this.g = 10;
this.a = new RectShape();
}
public final a a() {
return new a(this);
}
}
}

View File

@@ -0,0 +1,92 @@
package com.mbridge.msdk.video.dynview.h;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.mbridge.msdk.dycreator.wrapper.DyAdType;
import com.mbridge.msdk.dycreator.wrapper.DyOption;
import com.mbridge.msdk.dycreator.wrapper.DynamicViewCreator;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.x;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.mbridge.msdk.video.dynview.e.e;
import com.mbridge.msdk.video.dynview.e.h;
import com.mbridge.msdk.video.dynview.j.c;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/* loaded from: classes4.dex */
public final class a {
private static boolean a = false;
public a() {
}
public a(Context context, List<CampaignEx> list, h hVar, Map<String, Object> map) {
a(new c().a(context, list), hVar, map);
}
public a(com.mbridge.msdk.video.dynview.c cVar, h hVar, Map<String, Object> map) {
a(cVar, hVar, map);
}
private void a(com.mbridge.msdk.video.dynview.c cVar, final h hVar, Map<String, Object> map) {
View inflate;
if (hVar == null) {
return;
}
if (cVar == null) {
hVar.viewInflaterFail(com.mbridge.msdk.video.dynview.c.a.NOT_FOUND_VIEWOPTION);
return;
}
if (cVar.a() == null) {
hVar.viewInflaterFail(com.mbridge.msdk.video.dynview.c.a.NOT_FOUND_CONTEXT);
return;
}
if (TextUtils.isEmpty(cVar.b())) {
hVar.viewInflaterFail(com.mbridge.msdk.video.dynview.c.a.NOT_FOUND_LAYOUTNAME);
return;
}
try {
if (cVar.l() != null) {
inflate = DynamicViewCreator.getInstance().createDynamicView(new DyOption.Builder().campaignEx((cVar.g() == null || cVar.g().size() <= 0) ? null : cVar.g().get(0)).fileDirs(cVar.l()).dyAdType(DyAdType.REWARD).orientation(cVar.e()).templateType(cVar.h()).build());
if (inflate != null) {
a = true;
} else {
a = false;
inflate = LayoutInflater.from(cVar.a()).inflate(x.a(cVar.a(), cVar.b(), TtmlNode.TAG_LAYOUT), (ViewGroup) null);
}
} else {
a = false;
inflate = LayoutInflater.from(cVar.a()).inflate(x.a(cVar.a(), cVar.b(), TtmlNode.TAG_LAYOUT), (ViewGroup) null);
}
if (map == null) {
map = new HashMap<>();
}
map.put("is_dy_success", Boolean.valueOf(a));
com.mbridge.msdk.video.dynview.b.b.a().a(inflate, cVar, map);
com.mbridge.msdk.video.dynview.b.a.a().a(inflate, cVar, map, new e() { // from class: com.mbridge.msdk.video.dynview.h.a.1
@Override // com.mbridge.msdk.video.dynview.e.e
public final void a(View view, List<View> list) {
com.mbridge.msdk.video.dynview.a aVar = new com.mbridge.msdk.video.dynview.a();
aVar.a(view);
aVar.a(list);
aVar.a(a.a);
hVar.viewInflaterSuccess(aVar);
}
@Override // com.mbridge.msdk.video.dynview.e.e
public final void a(com.mbridge.msdk.video.dynview.c.a aVar) {
hVar.viewInflaterFail(aVar);
}
});
} catch (Exception e) {
af.b("MBridgeUI", e.getMessage());
hVar.viewInflaterFail(com.mbridge.msdk.video.dynview.c.a.VIEW_CREATE_ERROR);
}
}
}

View File

@@ -0,0 +1,181 @@
package com.mbridge.msdk.video.dynview.h;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.Keyframe;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
import android.util.Property;
import android.view.View;
import android.view.ViewGroup;
import java.util.List;
/* loaded from: classes4.dex */
public final class b {
public final void a(final View view, long j) {
ValueAnimator ofInt;
ValueAnimator ofFloat;
if (view == null) {
return;
}
if (view.getLayoutParams().width == 0) {
ofInt = ValueAnimator.ofInt(0, r0);
} else {
ofInt = ValueAnimator.ofInt(r0, 0);
}
ofInt.setDuration(j);
ofInt.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.mbridge.msdk.video.dynview.h.b.5
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
layoutParams.width = ((Integer) valueAnimator.getAnimatedValue()).intValue();
view.setLayoutParams(layoutParams);
}
});
if (view.getLayoutParams().width == 0) {
ofFloat = ValueAnimator.ofFloat(0.0f, 1.0f);
} else {
ofFloat = ValueAnimator.ofFloat(1.0f, 0.0f);
}
ofFloat.setDuration(j);
ofFloat.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.mbridge.msdk.video.dynview.h.b.6
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
view.setScaleX(((Float) valueAnimator.getAnimatedValue()).floatValue());
view.setScaleY(((Float) valueAnimator.getAnimatedValue()).floatValue());
}
});
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(ofInt, ofFloat);
animatorSet.start();
}
public final void b(final View view, long j) {
if (view != null) {
view.setAlpha(1.0f);
view.animate().alpha(0.0f).setDuration(j).setListener(new Animator.AnimatorListener() { // from class: com.mbridge.msdk.video.dynview.h.b.1
@Override // android.animation.Animator.AnimatorListener
public final void onAnimationRepeat(Animator animator) {
}
@Override // android.animation.Animator.AnimatorListener
public final void onAnimationStart(Animator animator) {
}
@Override // android.animation.Animator.AnimatorListener
public final void onAnimationEnd(Animator animator) {
View view2 = view;
if (view2 == null || !(view2 instanceof ViewGroup)) {
return;
}
((ViewGroup) view2).removeAllViews();
}
@Override // android.animation.Animator.AnimatorListener
public final void onAnimationCancel(Animator animator) {
View view2 = view;
if (view2 == null || !(view2 instanceof ViewGroup)) {
return;
}
((ViewGroup) view2).removeAllViews();
}
});
}
}
public final void c(View view, long j) {
if (view != null) {
view.setVisibility(0);
view.setAlpha(0.0f);
view.animate().alpha(1.0f).setDuration(j);
}
}
public final void a(final List<View> list, int i, int i2, long j) {
ValueAnimator duration = ValueAnimator.ofInt(i, i2).setDuration(j);
duration.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.mbridge.msdk.video.dynview.h.b.2
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
List list2 = list;
if (list2 == null || list2.size() <= 0) {
return;
}
for (View view : list) {
if (view != null) {
view.setPadding(0, 0, 0, ((Integer) valueAnimator.getAnimatedValue()).intValue());
view.requestLayout();
}
}
}
});
duration.start();
}
public final void a(final View view, int i, int i2, int i3, int i4, long j) {
ValueAnimator ofInt = ValueAnimator.ofInt(i, i2);
ofInt.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.mbridge.msdk.video.dynview.h.b.3
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
View view2 = view;
if (view2 != null) {
view2.getLayoutParams().width = ((Integer) valueAnimator.getAnimatedValue()).intValue();
view.requestLayout();
}
}
});
ValueAnimator ofInt2 = ValueAnimator.ofInt(i3, i4);
ofInt2.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.mbridge.msdk.video.dynview.h.b.4
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator) {
View view2 = view;
if (view2 != null) {
view2.getLayoutParams().height = ((Integer) valueAnimator.getAnimatedValue()).intValue();
view.requestLayout();
if (view.getVisibility() != 0) {
view.setVisibility(0);
}
}
}
});
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(ofInt, ofInt2);
animatorSet.setDuration(j);
animatorSet.start();
}
private PropertyValuesHolder a(Property property, float f) {
float f2 = f - 0.2f;
float f3 = f + 0.3f;
return PropertyValuesHolder.ofKeyframe(property, Keyframe.ofFloat(0.0f, f), Keyframe.ofFloat(0.1f, f - 0.4f), Keyframe.ofFloat(0.2f, f2), Keyframe.ofFloat(0.3f, f3), Keyframe.ofFloat(0.4f, f2), Keyframe.ofFloat(0.5f, f3), Keyframe.ofFloat(0.6f, f - 0.1f), Keyframe.ofFloat(0.7f, f3), Keyframe.ofFloat(0.8f, f), Keyframe.ofFloat(0.9f, 0.1f + f), Keyframe.ofFloat(1.0f, f));
}
private PropertyValuesHolder b(Property property, float f) {
float f2 = (-2.0f) * f;
float f3 = f * 2.0f;
return PropertyValuesHolder.ofKeyframe(property, Keyframe.ofFloat(0.0f, 0.0f), Keyframe.ofFloat(0.1f, f2), Keyframe.ofFloat(0.2f, f2), Keyframe.ofFloat(0.3f, f3), Keyframe.ofFloat(0.4f, f2), Keyframe.ofFloat(0.5f, f3), Keyframe.ofFloat(0.6f, f2), Keyframe.ofFloat(0.7f, f3), Keyframe.ofFloat(0.8f, f2), Keyframe.ofFloat(0.9f, f3), Keyframe.ofFloat(1.0f, 0.0f));
}
private PropertyValuesHolder c(Property property, float f) {
float f2 = f - 0.4f;
return PropertyValuesHolder.ofKeyframe(property, Keyframe.ofFloat(0.0f, f), Keyframe.ofFloat(0.1f, f2), Keyframe.ofFloat(0.2f, f2), Keyframe.ofFloat(0.3f, f), Keyframe.ofFloat(0.4f, f), Keyframe.ofFloat(0.5f, f), Keyframe.ofFloat(0.6f, f), Keyframe.ofFloat(0.7f, f), Keyframe.ofFloat(0.8f, f), Keyframe.ofFloat(0.9f, f), Keyframe.ofFloat(1.0f, f));
}
public final ObjectAnimator a(View view) {
ObjectAnimator duration = ObjectAnimator.ofPropertyValuesHolder(view, a(View.SCALE_X, 1.0f), a(View.SCALE_Y, 1.0f), b(View.ROTATION_X, 5.0f)).setDuration(2000L);
duration.setRepeatCount(-1);
return duration;
}
public final ObjectAnimator b(View view) {
ObjectAnimator duration = ObjectAnimator.ofPropertyValuesHolder(view, c(View.SCALE_X, 1.0f), c(View.SCALE_Y, 1.0f)).setDuration(2000L);
duration.setRepeatCount(-1);
return duration;
}
public final ObjectAnimator c(View view) {
ObjectAnimator duration = ObjectAnimator.ofPropertyValuesHolder(view, b(View.ROTATION, 2.0f)).setDuration(1000L);
duration.setRepeatCount(-1);
return duration;
}
}

View File

@@ -0,0 +1,92 @@
package com.mbridge.msdk.video.dynview.i;
import android.content.Context;
import android.net.Uri;
import android.text.TextUtils;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.download.core.DownloadCommon;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ab;
/* loaded from: classes4.dex */
public final class a {
public static String a(Context context, int i) {
String str = i == 1 ? "_por" : "_land";
String t = ab.t(context);
if (t.startsWith("zh")) {
return (t.contains("TW") || t.contains("HK")) ? "mbridge_reward_two_title_zh_trad" : "mbridge_reward_two_title_zh";
}
if (t.startsWith("ja")) {
return "mbridge_reward_two_title_japan" + str;
}
if (t.startsWith(DownloadCommon.DOWNLOAD_REPORT_DOWNLOAD_ERROR)) {
return "mbridge_reward_two_title_germany" + str;
}
if (t.startsWith("ko")) {
return "mbridge_reward_two_title_korea" + str;
}
if (t.startsWith("fr")) {
return "mbridge_reward_two_title_france" + str;
}
if (t.startsWith("ar")) {
return "mbridge_reward_two_title_arabia" + str;
}
if (t.startsWith("ru")) {
return "mbridge_reward_two_title_russian" + str;
}
return "mbridge_reward_two_title_en" + str;
}
public static boolean a(String str) {
if (TextUtils.isEmpty(str)) {
return false;
}
try {
Uri parse = Uri.parse(str);
if (parse == null) {
return false;
}
String queryParameter = parse.getQueryParameter("alecfc");
if (TextUtils.isEmpty(queryParameter)) {
return false;
}
return queryParameter.equals("1");
} catch (Throwable unused) {
return false;
}
}
public static String a(String str, String str2) {
if (TextUtils.isEmpty(str)) {
return "";
}
try {
Uri parse = Uri.parse(str);
if (parse != null) {
String queryParameter = parse.getQueryParameter(str2);
if (!TextUtils.isEmpty(queryParameter)) {
return queryParameter;
}
}
return "";
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
e.printStackTrace();
}
return "";
}
}
public static int a(CampaignEx campaignEx) {
if (campaignEx != null && campaignEx.getRewardTemplateMode() != null) {
int f = campaignEx.getRewardTemplateMode().f();
if (f == 302 || f == 802 || f == 902) {
return -3;
}
if (f == 904) {
return !a(campaignEx.getRewardTemplateMode().e()) ? -1 : -3;
}
}
return 100;
}
}

View File

@@ -0,0 +1,124 @@
package com.mbridge.msdk.video.dynview.i.a;
import android.graphics.Bitmap;
import android.text.TextUtils;
import android.view.View;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.SameMD5;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.p;
import com.mbridge.msdk.video.dynview.c;
import com.mbridge.msdk.video.dynview.g.a;
import java.util.List;
import java.util.Map;
/* loaded from: classes4.dex */
public class a {
private static volatile a a;
private View b;
private Bitmap c;
private Bitmap d;
private a() {
}
public static a a() {
a aVar;
if (a != null) {
return a;
}
synchronized (a.class) {
try {
if (a == null) {
a = new a();
}
aVar = a;
} catch (Throwable th) {
throw th;
}
}
return aVar;
}
public final void a(Map<String, Bitmap> map, c cVar, View view) {
if (view == null || cVar == null || map == null || map.size() == 0 || map.size() < 2 || cVar.g() == null || cVar.g().size() < 2) {
return;
}
this.b = view;
int e = cVar.e();
float d = cVar.d();
float c = cVar.c();
try {
List<CampaignEx> g = cVar.g();
String md5 = g.get(0) != null ? SameMD5.getMD5(g.get(0).getImageUrl()) : "";
String md52 = g.get(1) != null ? SameMD5.getMD5(g.get(1).getImageUrl()) : "";
Bitmap bitmap = (TextUtils.isEmpty(md5) || !map.containsKey(md5)) ? null : map.get(md5);
Bitmap bitmap2 = (TextUtils.isEmpty(md52) || !map.containsKey(md52)) ? null : map.get(md52);
if (bitmap == null || bitmap.isRecycled() || bitmap2 == null || bitmap2.isRecycled()) {
return;
}
a(e, d, c, bitmap, bitmap2);
} catch (Exception e2) {
af.b("ChoiceOneDrawBitBg", e2.getMessage());
}
}
private synchronized void a(final int i, final float f, final float f2, final Bitmap bitmap, Bitmap bitmap2) {
try {
com.mbridge.msdk.foundation.same.f.a.a().execute(new Runnable() { // from class: com.mbridge.msdk.video.dynview.i.a.a.1
@Override // java.lang.Runnable
public final void run() {
try {
Bitmap a2 = p.a(bitmap, 10);
Bitmap a3 = p.a(bitmap, 10);
final a.C0238a a4 = com.mbridge.msdk.video.dynview.g.a.a();
a4.a(i).a(a2).b(a3);
if (i == 2) {
float f3 = f;
float f4 = f2;
if (f3 > f4) {
a4.a(f3).b(f2);
} else {
a4.a(f4).b(f);
}
} else {
a4.a(f).b(f2);
}
if (a.this.b != null) {
a.this.b.post(new Runnable() { // from class: com.mbridge.msdk.video.dynview.i.a.a.1.1
@Override // java.lang.Runnable
public final void run() {
if (a.this.b == null || a4.a() == null) {
return;
}
a.this.b.setBackground(a4.a());
}
});
}
} catch (Exception e) {
af.b("ChoiceOneDrawBitBg", e.getMessage());
}
}
});
} catch (Exception e) {
af.a("ChoiceOneDrawBitBg", e.getMessage());
}
}
public final void b() {
if (this.b != null) {
this.b = null;
}
Bitmap bitmap = this.c;
if (bitmap != null && !bitmap.isRecycled()) {
this.c.recycle();
this.c = null;
}
Bitmap bitmap2 = this.d;
if (bitmap2 == null || bitmap2.isRecycled()) {
return;
}
this.d.recycle();
this.d = null;
}
}

View File

@@ -0,0 +1,23 @@
package com.mbridge.msdk.video.dynview.i.b;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.view.View;
import com.mbridge.msdk.foundation.tools.ak;
/* loaded from: classes4.dex */
public final class a {
public static void a(View view, float f, float f2, String str, String[] strArr, GradientDrawable.Orientation orientation) {
if (view == null || strArr == null) {
return;
}
int[] iArr = new int[strArr.length];
for (int i = 0; i < strArr.length; i++) {
iArr[i] = Color.parseColor(strArr[i]);
}
GradientDrawable gradientDrawable = new GradientDrawable(orientation, iArr);
gradientDrawable.setCornerRadius(ak.a(view.getContext(), f2));
gradientDrawable.setStroke(ak.a(view.getContext(), f), Color.parseColor(str));
view.setBackground(gradientDrawable);
}
}

View File

@@ -0,0 +1,8 @@
package com.mbridge.msdk.video.dynview.i.c;
/* loaded from: classes4.dex */
public interface a {
void a();
void a(long j);
}

View File

@@ -0,0 +1,96 @@
package com.mbridge.msdk.video.dynview.i.c;
import android.os.CountDownTimer;
/* loaded from: classes4.dex */
public final class b {
private long a = 0;
private long b;
private com.mbridge.msdk.video.dynview.i.c.a c;
private a d;
public final b a(long j) {
if (j < 0) {
j = 1000;
}
this.b = j;
return this;
}
public final b a(com.mbridge.msdk.video.dynview.i.c.a aVar) {
this.c = aVar;
return this;
}
public final b b(long j) {
this.a = j;
return this;
}
private void c() {
a aVar = this.d;
if (aVar != null) {
aVar.cancel();
this.d = null;
}
if (this.b <= 0) {
this.b = this.a + 1000;
}
a aVar2 = new a(this.a, this.b);
this.d = aVar2;
aVar2.a(this.c);
}
public final void a() {
if (this.d == null) {
c();
}
this.d.start();
}
public final void a(long j, com.mbridge.msdk.video.dynview.i.c.a aVar) {
this.a = j;
this.c = aVar;
c();
a aVar2 = this.d;
if (aVar2 != null) {
aVar2.start();
}
}
public final void b() {
a aVar = this.d;
if (aVar != null) {
aVar.cancel();
this.d = null;
}
}
public static class a extends CountDownTimer {
private com.mbridge.msdk.video.dynview.i.c.a a;
public final void a(com.mbridge.msdk.video.dynview.i.c.a aVar) {
this.a = aVar;
}
public a(long j, long j2) {
super(j, j2);
}
@Override // android.os.CountDownTimer
public final void onTick(long j) {
com.mbridge.msdk.video.dynview.i.c.a aVar = this.a;
if (aVar != null) {
aVar.a(j);
}
}
@Override // android.os.CountDownTimer
public final void onFinish() {
com.mbridge.msdk.video.dynview.i.c.a aVar = this.a;
if (aVar != null) {
aVar.a();
}
}
}
}

View File

@@ -0,0 +1,563 @@
package com.mbridge.msdk.video.dynview.j;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.ironsource.v8;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.dycreator.baseview.MBHeatLevelLayoutView;
import com.mbridge.msdk.dycreator.baseview.MBStarLevelLayoutView;
import com.mbridge.msdk.dycreator.baseview.cusview.MBCusRoundImageView;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.SameMD5;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.foundation.tools.p;
import com.mbridge.msdk.foundation.tools.x;
import com.mbridge.msdk.video.dynview.e.d;
import com.mbridge.msdk.video.dynview.e.e;
import com.mbridge.msdk.video.dynview.g.a;
import com.mbridge.msdk.video.dynview.widget.MBridgeLevelLayoutView;
import com.mbridge.msdk.videocommon.view.RoundImageView;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/* loaded from: classes4.dex */
public final class a {
private static boolean j = false;
private com.mbridge.msdk.video.dynview.i.c.b b;
private Map<String, Bitmap> c;
private volatile boolean d;
private String e = "#FFFFFFFF";
private String f = "#60000000";
private String g = "#FF5F5F5F";
private String h = "#90ECECEC";
private volatile long i = 0;
private com.mbridge.msdk.video.dynview.i.c.a k = null;
private boolean l = false;
private int m = 0;
public com.mbridge.msdk.video.dynview.d.a a = new com.mbridge.msdk.video.dynview.d.a() { // from class: com.mbridge.msdk.video.dynview.j.a.1
@Override // com.mbridge.msdk.video.dynview.d.a
public final void a() {
if (!a.this.l || a.this.b == null) {
return;
}
a.this.b.a(a.this.m * 1000, a.this.k);
a.this.l = false;
}
@Override // com.mbridge.msdk.video.dynview.d.a
public final void b() {
if (a.this.b != null) {
a.this.b.b();
a.this.l = true;
}
}
@Override // com.mbridge.msdk.video.dynview.d.a
public final void c() {
if (a.this.b != null) {
a.this.b.b();
a.this.l = true;
}
}
};
/* JADX WARN: Removed duplicated region for block: B:100:0x03b7 */
/* JADX WARN: Removed duplicated region for block: B:101:0x02df */
/* JADX WARN: Removed duplicated region for block: B:48:0x01dc */
/* JADX WARN: Removed duplicated region for block: B:50:0x01e8 */
/* JADX WARN: Removed duplicated region for block: B:52:0x01f1 */
/* JADX WARN: Removed duplicated region for block: B:57:0x020a */
/* JADX WARN: Removed duplicated region for block: B:59:0x0214 */
/* JADX WARN: Removed duplicated region for block: B:68:0x029c */
/* JADX WARN: Removed duplicated region for block: B:70:0x02aa */
/* JADX WARN: Removed duplicated region for block: B:72:0x02b5 */
/* JADX WARN: Removed duplicated region for block: B:75:0x02d9 */
/* JADX WARN: Removed duplicated region for block: B:78:0x02e4 */
/* JADX WARN: Removed duplicated region for block: B:90:0x03bb */
/* JADX WARN: Removed duplicated region for block: B:96:0x03ed */
/* JADX WARN: Removed duplicated region for block: B:98:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(com.mbridge.msdk.video.dynview.c r32, android.view.View r33, final java.util.Map r34, com.mbridge.msdk.video.dynview.e.e r35) {
/*
Method dump skipped, instructions count: 1010
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.dynview.j.a.a(com.mbridge.msdk.video.dynview.c, android.view.View, java.util.Map, com.mbridge.msdk.video.dynview.e.e):void");
}
public final void b(com.mbridge.msdk.video.dynview.c cVar, View view, Map map, e eVar) {
if (eVar == null) {
return;
}
if (cVar == null) {
eVar.a(com.mbridge.msdk.video.dynview.c.a.NOT_FOUND_VIEWOPTION);
return;
}
if (map != null && map.containsKey("is_dy_success")) {
j = ((Boolean) map.get("is_dy_success")).booleanValue();
}
boolean z = j;
LinearLayout linearLayout = z ? (LinearLayout) view.findViewById(a(z, "mbridge_reward_heat_mllv")) : null;
ImageView imageView = (ImageView) view.findViewById(a(j, "mbridge_reward_icon_riv"));
TextView textView = (TextView) view.findViewById(a(j, "mbridge_reward_title_tv"));
LinearLayout linearLayout2 = (LinearLayout) view.findViewById(a(j, "mbridge_reward_stars_mllv"));
TextView textView2 = (TextView) view.findViewById(a(j, "mbridge_reward_click_tv"));
ImageView imageView2 = (ImageView) view.findViewById(a(j, "mbridge_videoview_bg"));
TextView textView3 = (TextView) view.findViewById(a(j, "mbridge_reward_desc_tv"));
View view2 = (RelativeLayout) view.findViewById(a(j, "mbridge_reward_bottom_layout"));
List<View> arrayList = new ArrayList<>();
List<CampaignEx> g = cVar.g();
if (g != null && g.size() > 0) {
CampaignEx campaignEx = g.get(0);
if (campaignEx != null) {
if (imageView != null) {
if (j) {
if (imageView instanceof MBCusRoundImageView) {
((MBCusRoundImageView) imageView).setCustomBorder(30, 30, 30, 30, 10, -1);
}
} else {
((RoundImageView) imageView).setBorderRadius(10);
}
a(campaignEx.getIconUrl(), imageView);
}
if (textView != null) {
textView.setText(campaignEx.getAppName());
}
if (textView3 != null) {
textView3.setText(campaignEx.getAppDesc());
}
if (linearLayout2 != null) {
double rating = campaignEx.getRating();
if (rating <= 0.0d) {
rating = 5.0d;
}
if (j) {
if (linearLayout2 instanceof MBStarLevelLayoutView) {
MBStarLevelLayoutView mBStarLevelLayoutView = (MBStarLevelLayoutView) linearLayout2;
mBStarLevelLayoutView.setRating((int) rating);
mBStarLevelLayoutView.setOrientation(0);
}
if (linearLayout instanceof MBHeatLevelLayoutView) {
((MBHeatLevelLayoutView) linearLayout).setHeatCount(campaignEx.getNumberRating());
}
} else {
((MBridgeLevelLayoutView) linearLayout2).setRatingAndUser(rating, campaignEx.getNumberRating());
}
}
if (textView2 != null) {
textView2.setText(campaignEx.getAdCall());
}
int i = cVar.i();
if (i == 102 || i == 202 || i == 302) {
if (textView2 != null) {
arrayList.add(textView2);
}
} else if (i == 802) {
if (imageView != null) {
arrayList.add(imageView);
}
if (textView2 != null) {
arrayList.add(textView2);
}
a(imageView2, campaignEx.getImageUrl(), i);
} else if (i != 902) {
if (i != 904) {
if (i == 5002010) {
if (cVar.k() && view2 != null && view2.getVisibility() == 0) {
arrayList.add(view2);
} else {
if (imageView != null) {
arrayList.add(imageView);
}
if (textView2 != null) {
arrayList.add(textView2);
}
}
}
} else if (cVar.k()) {
arrayList.add(view);
}
} else if (TextUtils.isEmpty(cVar.o()) || !cVar.o().equals("dsp") || !TextUtils.isEmpty(campaignEx.getClickURL())) {
arrayList.add(view);
}
eVar.a(view, arrayList);
return;
}
eVar.a(com.mbridge.msdk.video.dynview.c.a.CAMPAIGNEX_IS_NULL);
return;
}
eVar.a(com.mbridge.msdk.video.dynview.c.a.CAMPAIGNEX_IS_NULL);
}
public final void a(com.mbridge.msdk.video.dynview.c cVar, View view, e eVar) {
if (eVar == null) {
return;
}
if (cVar == null) {
eVar.a(com.mbridge.msdk.video.dynview.c.a.NOT_FOUND_VIEWOPTION);
return;
}
try {
ImageView imageView = (ImageView) view.findViewById(x.a(com.mbridge.msdk.foundation.controller.c.m().c(), "mbridge_iv_adbanner_bg", "id"));
if (imageView != null) {
imageView.setBackgroundColor(Color.parseColor(this.h));
}
ImageView imageView2 = (ImageView) view.findViewById(x.a(com.mbridge.msdk.foundation.controller.c.m().c(), "mbridge_iv_adbanner", "id"));
if (imageView2 != null) {
imageView2.setBackgroundColor(Color.parseColor(this.h));
}
eVar.a(view, new ArrayList());
} catch (Exception e) {
af.a("DataEnergizeWrapper", e.getMessage());
eVar.a(com.mbridge.msdk.video.dynview.c.a.NOT_FOUND_VIEWOPTION);
}
}
public final void c(com.mbridge.msdk.video.dynview.c cVar, View view, final Map map, e eVar) {
try {
if (this.c == null) {
this.c = new HashMap();
}
final List<CampaignEx> g = cVar.g();
if (view.getContext() == null) {
eVar.a(com.mbridge.msdk.video.dynview.c.a.NOT_FOUND_CONTEXT);
return;
}
if (map != null && map.containsKey("is_dy_success")) {
j = ((Boolean) map.get("is_dy_success")).booleanValue();
}
for (CampaignEx campaignEx : g) {
if (campaignEx != null) {
campaignEx.setECTemplateRenderSucc(j);
}
}
ListView listView = (ListView) view.findViewById(a(j, "mbridge_order_view_lv"));
GridView gridView = (GridView) view.findViewById(a(j, "mbridge_order_view_h_lv"));
ImageView imageView = (ImageView) view.findViewById(a(j, "mbridge_order_view_iv_close"));
com.mbridge.msdk.video.dynview.ordercamp.a.a aVar = new com.mbridge.msdk.video.dynview.ordercamp.a.a(g);
if (cVar.e() == 1) {
if (listView != null) {
try {
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) listView.getLayoutParams();
if (layoutParams != null) {
layoutParams.height = -1;
float c = (cVar.c() - ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 720.0f)) / 2.0f;
int a = ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 10.0f);
int i = (int) c;
layoutParams.setMargins(a, i, a, i);
listView.setLayoutParams(layoutParams);
}
} catch (Exception e) {
af.b("DataEnergizeWrapper", e.getMessage());
}
listView.setAdapter((ListAdapter) aVar);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { // from class: com.mbridge.msdk.video.dynview.j.a.6
@Override // android.widget.AdapterView.OnItemClickListener
public final void onItemClick(AdapterView<?> adapterView, View view2, int i2, long j2) {
a.a(a.this, map, g, i2);
}
});
}
} else if (gridView != null) {
int d = (int) cVar.d();
int size = d / g.size();
int i2 = size / 9;
int i3 = i2 / 2;
LinearLayout.LayoutParams layoutParams2 = (LinearLayout.LayoutParams) gridView.getLayoutParams();
layoutParams2.width = d - (i2 * 2);
gridView.setLayoutParams(layoutParams2);
gridView.setColumnWidth((size - i2) - (i3 / 2));
gridView.setHorizontalSpacing(i3);
gridView.setStretchMode(0);
gridView.setNumColumns(g.size());
gridView.setAdapter((ListAdapter) aVar);
gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() { // from class: com.mbridge.msdk.video.dynview.j.a.7
@Override // android.widget.AdapterView.OnItemClickListener
public final void onItemClick(AdapterView<?> adapterView, View view2, int i4, long j2) {
a.a(a.this, map, g, i4);
}
});
}
if (imageView != null) {
imageView.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.dynview.j.a.8
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
a.a(a.this, map);
}
});
}
if (eVar != null) {
eVar.a(view, null);
}
} catch (Exception unused) {
if (eVar != null) {
eVar.a(com.mbridge.msdk.video.dynview.c.a.NOT_FOUND_VIEWOPTION);
}
}
}
private void a(String str, ImageView imageView) {
if (TextUtils.isEmpty(str) || imageView == null) {
return;
}
a(imageView, str, -1);
}
private void a(ImageView imageView, String str, int i) {
if (TextUtils.isEmpty(str) || imageView == null) {
return;
}
com.mbridge.msdk.foundation.same.c.b.a(imageView.getContext()).a(str, new AnonymousClass9(i, imageView));
}
/* renamed from: com.mbridge.msdk.video.dynview.j.a$9, reason: invalid class name */
public class AnonymousClass9 implements com.mbridge.msdk.foundation.same.c.c {
final /* synthetic */ int a;
final /* synthetic */ ImageView b;
public AnonymousClass9(int i, ImageView imageView) {
this.a = i;
this.b = imageView;
}
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onSuccessLoad(final Bitmap bitmap, String str) {
if (bitmap == null || bitmap.isRecycled()) {
int a = x.a(this.b.getContext(), "mbridge_icon_play_bg", "drawable");
this.b.setBackgroundColor(Color.parseColor(a.this.g));
this.b.setImageResource(a);
this.b.setScaleType(ImageView.ScaleType.CENTER);
return;
}
int i = this.a;
if (i == 501 || i == 802) {
com.mbridge.msdk.foundation.same.f.a.a().execute(new Runnable() { // from class: com.mbridge.msdk.video.dynview.j.a.9.1
@Override // java.lang.Runnable
public final void run() {
try {
final Bitmap a2 = p.a(bitmap, 10);
AnonymousClass9.this.b.post(new Runnable() { // from class: com.mbridge.msdk.video.dynview.j.a.9.1.1
@Override // java.lang.Runnable
public final void run() {
AnonymousClass9.this.b.setImageBitmap(a2);
}
});
} catch (Exception e) {
af.b("DataEnergizeWrapper", e.getMessage());
}
}
});
} else {
this.b.setImageBitmap(bitmap);
}
}
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onFailedLoad(String str, String str2) {
try {
int a = x.a(this.b.getContext(), "mbridge_icon_play_bg", "drawable");
this.b.setBackgroundColor(Color.parseColor(a.this.g));
this.b.setImageResource(a);
this.b.setScaleType(ImageView.ScaleType.CENTER);
} catch (Exception e) {
af.a("DataEnergizeWrapper", e.getMessage());
}
}
}
private void a(final String str, final ImageView imageView, final com.mbridge.msdk.video.dynview.c cVar, final View view) {
com.mbridge.msdk.foundation.same.c.b.a(imageView.getContext()).a(str, new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.video.dynview.j.a.10
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onFailedLoad(String str2, String str3) {
}
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onSuccessLoad(Bitmap bitmap, String str2) {
ImageView imageView2;
if (bitmap == null || bitmap.isRecycled() || (imageView2 = imageView) == null) {
return;
}
imageView2.setImageBitmap(bitmap);
if (a.this.c != null) {
a.this.c.put(SameMD5.getMD5(str), bitmap);
a.a(a.this, cVar, view);
}
}
});
try {
Bitmap a = a();
if (a == null || a.isRecycled()) {
return;
}
a(cVar, view);
} catch (Exception e) {
af.b("DataEnergizeWrapper", e.getMessage());
}
}
private int a(boolean z, String str) {
try {
if (z) {
if (TextUtils.isEmpty(str)) {
return -1;
}
return str.hashCode();
}
return x.a(com.mbridge.msdk.foundation.controller.c.m().c(), str, "id");
} catch (Exception e) {
af.b("DataEnergizeWrapper", e.getMessage());
return -1;
}
}
private Bitmap a() {
Bitmap bitmap = null;
try {
bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_4444);
bitmap.eraseColor(Color.parseColor(this.h));
return bitmap;
} catch (Exception e) {
if (!MBridgeConstans.DEBUG) {
return bitmap;
}
e.printStackTrace();
return bitmap;
}
}
private void a(com.mbridge.msdk.video.dynview.c cVar, View view) {
a.C0238a a = com.mbridge.msdk.video.dynview.g.a.a();
a.a(cVar.e()).a(true);
if (cVar.e() != 2) {
a.a(cVar.d()).b(cVar.c());
} else if (cVar.d() > cVar.c()) {
a.a(cVar.d()).b(cVar.c());
} else {
a.a(cVar.c()).b(cVar.d());
}
if (view.getBackground() == null) {
view.setBackground(a.a());
}
}
private void b() {
com.mbridge.msdk.video.dynview.i.a.a.a().b();
com.mbridge.msdk.video.dynview.i.c.b bVar = this.b;
if (bVar != null) {
bVar.b();
this.b = null;
}
com.mbridge.msdk.video.dynview.b.a.a().a = null;
if (this.a != null) {
this.a = null;
}
Map<String, Bitmap> map = this.c;
if (map != null) {
if (map.entrySet() != null) {
try {
Iterator<Map.Entry<String, Bitmap>> it = this.c.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Bitmap> next = it.next();
if (next != null && next.getValue() != null && !next.getValue().isRecycled()) {
next.getValue().recycle();
}
it.remove();
}
} catch (Exception e) {
e.printStackTrace();
}
}
this.c.clear();
}
}
public static /* synthetic */ void a(a aVar, Map map, List list, int i) {
if (map == null || list == null || list.size() <= 1) {
return;
}
if (map.containsKey("choice_one_callback") && (map.get("choice_one_callback") instanceof d)) {
d dVar = (d) map.get("choice_one_callback");
if (dVar != null) {
dVar.itemClick((CampaignEx) list.get(i));
try {
CampaignEx campaignEx = (CampaignEx) list.get(i);
com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e();
eVar.a("click", "0");
eVar.a("time", Long.valueOf(aVar.i));
eVar.a("choose_cid", campaignEx.getId());
eVar.a(v8.h.L, Integer.valueOf(i));
eVar.a("type", "choseFromTwoSelect");
com.mbridge.msdk.video.module.b.a.a("2000103", campaignEx, eVar);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
e.printStackTrace();
}
}
}
aVar.b();
return;
}
if (map.containsKey("order_view_callback") && (map.get("order_view_callback") instanceof com.mbridge.msdk.video.dynview.e.c)) {
com.mbridge.msdk.video.dynview.e.c cVar = (com.mbridge.msdk.video.dynview.e.c) map.get("order_view_callback");
if (cVar != null) {
cVar.a((CampaignEx) list.get(i), i);
}
aVar.b();
}
}
public static /* synthetic */ void a(a aVar, Map map) {
if (map != null) {
try {
if (map.containsKey("order_view_callback") && (map.get("order_view_callback") instanceof com.mbridge.msdk.video.dynview.e.c)) {
((com.mbridge.msdk.video.dynview.e.c) map.get("order_view_callback")).a();
aVar.b();
}
} catch (Exception e) {
af.b("DataEnergizeWrapper", e.getMessage());
}
}
}
public static /* synthetic */ void a(a aVar, com.mbridge.msdk.video.dynview.c cVar, View view) {
Map<String, Bitmap> map = aVar.c;
if (map == null || map.size() <= 1) {
return;
}
new com.mbridge.msdk.video.dynview.h.b();
Map<String, Bitmap> map2 = aVar.c;
if (view != null) {
com.mbridge.msdk.video.dynview.i.a.a.a().a(map2, cVar, view);
}
}
public static /* synthetic */ void b(a aVar, Map map) {
if (map != null) {
try {
if (map.containsKey("choice_one_callback") && (map.get("choice_one_callback") instanceof d)) {
((d) map.get("choice_one_callback")).countDownClick();
aVar.b();
}
} catch (Exception e) {
af.b("DataEnergizeWrapper", e.getMessage());
}
}
}
}

View File

@@ -0,0 +1,328 @@
package com.mbridge.msdk.video.dynview.j;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.text.TextUtils;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.dycreator.baseview.MBFrameLayout;
import com.mbridge.msdk.dycreator.baseview.MBStarLevelLayoutView;
import com.mbridge.msdk.dycreator.baseview.MBTextView;
import com.mbridge.msdk.dycreator.baseview.cusview.MBridgeFramLayout;
import com.mbridge.msdk.dycreator.baseview.cusview.MBridgeTextView;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.foundation.tools.x;
import com.mbridge.msdk.video.dynview.widget.MBridgeLevelLayoutView;
import com.mbridge.msdk.video.dynview.widget.MBridgeRelativeLayout;
import com.mbridge.msdk.video.module.MBridgeClickCTAView;
import java.util.Map;
/* loaded from: classes4.dex */
public final class b {
private String a = "mbridge_top_play_bg";
private String b = "mbridge_top_finger_bg";
private String c = "mbridge_bottom_play_bg";
private String d = "mbridge_bottom_finger_bg";
private String e = "mbridge_tv_count";
private String f = "mbridge_sound_switch";
private String g = "mbridge_top_control";
private String h = "mbridge_tv_title";
private String i = "mbridge_tv_desc";
private String j = "mbridge_tv_install";
private String k = "mbridge_sv_starlevel";
private String l = "mbridge_sv_heat_count_level";
private String m = "mbridge_tv_cta";
private String n = "mbridge_native_ec_controller";
private String o = "mbridge_reward_shape_choice_rl";
private String p = "#FFFFFF";
private String q = "#FF000000";
private String r = "#40000000";
private String s = "#CAEF79";
private String t = "#2196F3";
private String u = "#402196F3";
private String v = "#8FC31F";
private String w = "#03A9F4";
private String x = "#FF89C120";
private String y = "#FF2BAE5D";
private boolean z = false;
public final void a(View view, Map<String, Object> map) {
ImageView imageView;
ImageView imageView2;
ImageView imageView3;
ImageView imageView4;
if (view == null || !(view instanceof MBridgeFramLayout)) {
return;
}
MBridgeFramLayout mBridgeFramLayout = (MBridgeFramLayout) view;
AnimatorSet animatorSet = new AnimatorSet();
if (view.getContext() != null) {
if (map != null && map.containsKey("is_dy_success")) {
this.z = ((Boolean) map.get("is_dy_success")).booleanValue();
}
if (this.z) {
imageView = (ImageView) view.findViewById(b(this.a));
imageView2 = (ImageView) view.findViewById(b(this.b));
imageView3 = (ImageView) view.findViewById(b(this.c));
imageView4 = (ImageView) view.findViewById(b(this.d));
} else {
imageView = (ImageView) view.findViewById(a(this.a));
imageView2 = (ImageView) view.findViewById(a(this.b));
imageView3 = (ImageView) view.findViewById(a(this.c));
imageView4 = (ImageView) view.findViewById(a(this.d));
}
ObjectAnimator a = imageView != null ? new com.mbridge.msdk.video.dynview.h.b().a(imageView) : null;
ObjectAnimator b = imageView2 != null ? new com.mbridge.msdk.video.dynview.h.b().b(imageView2) : null;
ObjectAnimator a2 = imageView3 != null ? new com.mbridge.msdk.video.dynview.h.b().a(imageView3) : null;
ObjectAnimator b2 = imageView4 != null ? new com.mbridge.msdk.video.dynview.h.b().b(imageView4) : null;
if (a == null || a2 == null || b == null || b2 == null) {
return;
}
animatorSet.playTogether(a, a2, b, b2);
mBridgeFramLayout.setAnimatorSet(animatorSet);
}
}
public final void a(View view, com.mbridge.msdk.video.dynview.c cVar, Map<String, Object> map) {
TextView textView;
TextView textView2;
String str;
String str2;
RelativeLayout relativeLayout;
RelativeLayout.LayoutParams layoutParams;
Context context = view != null ? view.getContext() : null;
if (context == null || cVar == null) {
return;
}
if (map != null && map.containsKey("is_dy_success")) {
boolean booleanValue = ((Boolean) map.get("is_dy_success")).booleanValue();
this.z = booleanValue;
if (booleanValue) {
textView = (TextView) view.findViewById(b(this.e));
textView2 = (TextView) view.findViewById(b("mbridge_reward_click_tv"));
} else {
textView = (TextView) view.findViewById(a(this.e));
textView2 = (TextView) view.findViewById(a("mbridge_reward_click_tv"));
}
} else {
textView = (TextView) view.findViewById(a(this.e));
textView2 = (TextView) view.findViewById(a("mbridge_reward_click_tv"));
}
if (textView != null) {
textView.setBackgroundResource(x.a(context, "mbridge_reward_shape_progress", "drawable"));
textView.setTextColor(Color.parseColor(this.p));
textView.setTextSize(11.0f);
}
if (textView2 != null) {
textView2.setTextSize(20.0f);
if (textView2 instanceof MBridgeTextView) {
((MBridgeTextView) textView2).setObjectAnimator(new com.mbridge.msdk.video.dynview.h.b().c(textView2));
}
if (textView2 instanceof MBTextView) {
((MBTextView) textView2).setAnimator(new com.mbridge.msdk.video.dynview.h.b().c(textView2));
}
}
String str3 = this.q;
String str4 = this.s;
int i = cVar.i();
float f = 10.0f;
float f2 = 1.0f;
if (i == 302) {
str = this.t;
str2 = this.w;
str3 = this.p;
str4 = this.u;
} else if (i == 802) {
str = this.p;
str3 = this.q;
str4 = this.r;
f = 25.0f;
f2 = 0.5f;
str2 = str;
} else if (i != 5002010) {
str = this.v;
str2 = this.s;
f = 5.0f;
} else {
str = this.v;
str3 = this.p;
str4 = str;
str2 = str4;
}
if (textView2 != null) {
textView2.setTextColor(Color.parseColor(str3));
com.mbridge.msdk.video.dynview.i.b.a.a(textView2, f2, f, str4, new String[]{str, str2}, GradientDrawable.Orientation.LEFT_RIGHT);
}
if (cVar.f() != null && (layoutParams = (RelativeLayout.LayoutParams) cVar.f().getLayoutParams()) != null) {
layoutParams.setMargins(0, 0, 0, 0);
cVar.f().setLayoutParams(layoutParams);
}
if (this.z) {
relativeLayout = (RelativeLayout) view.findViewById(b(this.g));
} else {
relativeLayout = (RelativeLayout) view.findViewById(a(this.g));
}
if (relativeLayout != null) {
if (com.mbridge.msdk.video.dynview.a.a.a == 0 && com.mbridge.msdk.video.dynview.a.a.b == 0 && com.mbridge.msdk.video.dynview.a.a.c == 0 && com.mbridge.msdk.video.dynview.a.a.d == 0) {
return;
}
relativeLayout.setVisibility(4);
AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 100.0f);
alphaAnimation.setDuration(200L);
relativeLayout.startAnimation(alphaAnimation);
relativeLayout.setVisibility(0);
}
}
public final void a(View view, com.mbridge.msdk.video.dynview.c cVar) {
Context context;
int a;
if (view == null || cVar == null || (context = view.getContext()) == null) {
return;
}
if (cVar.e() == 1) {
view.setBackground(context.getResources().getDrawable(x.a(context, this.o, "drawable")));
TextView textView = (TextView) view.findViewById(a(this.h));
if (textView != null) {
textView.setTextColor(Color.parseColor(this.q));
}
TextView textView2 = (TextView) view.findViewById(a(this.i));
if (textView2 != null) {
textView2.setTextColor(Color.parseColor(this.q));
}
a = ak.a(context, 2.0f);
} else {
a = ak.a(context, 10.0f);
view.getBackground().setAlpha(100);
}
int a2 = ak.a(context, 8.0f);
View findViewById = view.findViewById(a(this.j));
if (findViewById != null) {
if (cVar.f() != null && (cVar.f() instanceof MBridgeClickCTAView)) {
((MBridgeClickCTAView) cVar.f()).setObjectAnimator(new com.mbridge.msdk.video.dynview.h.b().c(findViewById));
}
if (findViewById instanceof TextView) {
TextView textView3 = (TextView) findViewById;
textView3.setTextColor(Color.parseColor(this.p));
textView3.setTextSize(15.0f);
String str = this.v;
String str2 = this.s;
com.mbridge.msdk.video.dynview.i.b.a.a(textView3, 1.0f, 5.0f, str2, new String[]{str, str2}, GradientDrawable.Orientation.LEFT_RIGHT);
}
}
if (view.getLayoutParams() == null) {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);
layoutParams.setMargins(a, a, a, a2);
layoutParams.height = ak.a(context, 60.0f);
view.setLayoutParams(layoutParams);
}
}
public final void b(View view, com.mbridge.msdk.video.dynview.c cVar, Map<String, Object> map) {
LinearLayout linearLayout;
View findViewById;
if (view == null || cVar == null) {
return;
}
if (view.getContext() != null) {
if (map != null && map.containsKey("is_dy_success")) {
this.z = ((Boolean) map.get("is_dy_success")).booleanValue();
}
if (this.z) {
linearLayout = (LinearLayout) view.findViewById(b(this.k));
findViewById = view.findViewById(b(this.m));
} else {
linearLayout = (LinearLayout) view.findViewById(a(this.k));
findViewById = view.findViewById(a(this.m));
}
View view2 = findViewById;
if (linearLayout != null && (linearLayout instanceof MBridgeLevelLayoutView)) {
if (cVar.e() == 1) {
linearLayout.setOrientation(1);
} else {
linearLayout.setOrientation(0);
}
}
if (linearLayout != null && (linearLayout instanceof MBStarLevelLayoutView)) {
linearLayout.setOrientation(0);
}
RelativeLayout relativeLayout = (RelativeLayout) view.findViewById(a(this.n));
if (relativeLayout != null) {
if (relativeLayout.getLayoutParams() instanceof RelativeLayout.LayoutParams) {
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) relativeLayout.getLayoutParams();
layoutParams.setMargins(layoutParams.leftMargin + com.mbridge.msdk.video.dynview.a.a.a, layoutParams.topMargin + com.mbridge.msdk.video.dynview.a.a.c, layoutParams.rightMargin + com.mbridge.msdk.video.dynview.a.a.b, layoutParams.bottomMargin + com.mbridge.msdk.video.dynview.a.a.d);
relativeLayout.setLayoutParams(layoutParams);
}
if (relativeLayout.getLayoutParams() instanceof FrameLayout.LayoutParams) {
FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) relativeLayout.getLayoutParams();
layoutParams2.setMargins(layoutParams2.leftMargin + com.mbridge.msdk.video.dynview.a.a.a, layoutParams2.topMargin + com.mbridge.msdk.video.dynview.a.a.c, layoutParams2.rightMargin + com.mbridge.msdk.video.dynview.a.a.b, layoutParams2.bottomMargin + com.mbridge.msdk.video.dynview.a.a.d);
relativeLayout.setLayoutParams(layoutParams2);
}
}
if (view2 != null) {
if (view2 instanceof TextView) {
TextView textView = (TextView) view2;
textView.setTextColor(Color.parseColor(this.p));
textView.setTextSize(22.0f);
com.mbridge.msdk.video.dynview.i.b.a.a(view2, 1.0f, cVar.i() == 1302 ? 25 : 5, this.s, new String[]{this.x, this.y}, GradientDrawable.Orientation.LEFT_RIGHT);
}
try {
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(new com.mbridge.msdk.video.dynview.h.b().c(view2));
animatorSet.addListener(new Animator.AnimatorListener() { // from class: com.mbridge.msdk.video.dynview.j.b.1
@Override // android.animation.Animator.AnimatorListener
public final void onAnimationCancel(Animator animator) {
}
@Override // android.animation.Animator.AnimatorListener
public final void onAnimationEnd(Animator animator) {
}
@Override // android.animation.Animator.AnimatorListener
public final void onAnimationRepeat(Animator animator) {
}
@Override // android.animation.Animator.AnimatorListener
public final void onAnimationStart(Animator animator) {
}
});
if (view instanceof MBFrameLayout) {
((MBFrameLayout) view).setAnimator(animatorSet);
}
if (view instanceof MBridgeFramLayout) {
((MBridgeFramLayout) view).setAnimatorSet(animatorSet);
}
if (view instanceof MBridgeRelativeLayout) {
((MBridgeRelativeLayout) view).setAnimatorSet(animatorSet);
}
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
e.printStackTrace();
}
}
}
}
new com.mbridge.msdk.video.dynview.h.b().c(view, 500L);
}
private int a(String str) {
return x.a(com.mbridge.msdk.foundation.controller.c.m().c(), str, "id");
}
private int b(String str) {
if (TextUtils.isEmpty(str)) {
return -1;
}
return str.hashCode();
}
}

View File

@@ -0,0 +1,315 @@
package com.mbridge.msdk.video.dynview.j;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.ad;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.foundation.tools.o;
import com.mbridge.msdk.video.dynview.c;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes4.dex */
public final class c {
public final com.mbridge.msdk.video.dynview.c a(Context context, List<CampaignEx> list) {
String str;
int i;
int i2;
int i3;
if (list == null) {
return null;
}
try {
float f = ak.f(com.mbridge.msdk.foundation.controller.c.m().c());
float e = ak.e(com.mbridge.msdk.foundation.controller.c.m().c());
List<String> arrayList = new ArrayList<>();
if (list.size() <= 0 || list.get(0) == null) {
str = "";
i = 1;
i2 = 0;
i3 = 0;
} else {
CampaignEx campaignEx = list.get(0);
i = (campaignEx == null || campaignEx.getRewardTemplateMode() == null) ? 1 : campaignEx.getRewardTemplateMode().b();
i2 = list.get(0).getMof_tplid();
str = list.get(0).getMof_template_url();
i3 = list.get(0).getDynamicTempCode();
}
if (i2 != 0 && !TextUtils.isEmpty(str)) {
arrayList = ad.a(o.a(0, i2 + "", str), "template_" + i2 + "_" + i);
}
String str2 = "mbridge_same_choice_one_layout_portrait";
if (i != 1) {
if (i == 2) {
str2 = "mbridge_same_choice_one_layout_landscape";
} else if (context.getResources().getConfiguration().orientation == 2) {
str2 = "mbridge_same_choice_one_layout_landscape";
i = 2;
} else {
i = 1;
}
}
return new c.a().a(context).a(str2).a(1).a(e).b(f).a(list).b(i).b(arrayList).e(i3).d(i2).a();
} catch (Exception e2) {
af.b("ViewOptionWrapper", e2.getMessage());
return null;
}
}
/* JADX WARN: Removed duplicated region for block: B:20:0x0058 A[Catch: Exception -> 0x0027, TryCatch #0 {Exception -> 0x0027, blocks: (B:6:0x0004, B:9:0x0016, B:10:0x002c, B:17:0x003e, B:18:0x0052, B:20:0x0058, B:21:0x0081, B:23:0x009d, B:24:0x00a1), top: B:5:0x0004 }] */
/* JADX WARN: Removed duplicated region for block: B:23:0x009d A[Catch: Exception -> 0x0027, TryCatch #0 {Exception -> 0x0027, blocks: (B:6:0x0004, B:9:0x0016, B:10:0x002c, B:17:0x003e, B:18:0x0052, B:20:0x0058, B:21:0x0081, B:23:0x009d, B:24:0x00a1), top: B:5:0x0004 }] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final com.mbridge.msdk.video.dynview.c a(android.view.View r12, com.mbridge.msdk.foundation.entity.CampaignEx r13) {
/*
r11 = this;
r0 = 0
if (r13 != 0) goto L4
return r0
L4:
java.util.ArrayList r1 = new java.util.ArrayList // Catch: java.lang.Exception -> L27
r1.<init>() // Catch: java.lang.Exception -> L27
java.lang.String r2 = r13.getCampaignUnitId() // Catch: java.lang.Exception -> L27
com.mbridge.msdk.foundation.entity.CampaignEx$c r3 = r13.getRewardTemplateMode() // Catch: java.lang.Exception -> L27
java.lang.String r4 = ""
r5 = 0
if (r3 == 0) goto L2a
com.mbridge.msdk.foundation.entity.CampaignEx$c r3 = r13.getRewardTemplateMode() // Catch: java.lang.Exception -> L27
int r3 = r3.f() // Catch: java.lang.Exception -> L27
com.mbridge.msdk.foundation.entity.CampaignEx$c r6 = r13.getRewardTemplateMode() // Catch: java.lang.Exception -> L27
java.lang.String r6 = r6.e() // Catch: java.lang.Exception -> L27
goto L2c
L27:
r12 = move-exception
goto Lf8
L2a:
r6 = r4
r3 = r5
L2c:
java.lang.String r7 = "ia_tp"
r8 = -5
int r7 = com.mbridge.msdk.foundation.tools.ak.a(r6, r7, r8) // Catch: java.lang.Exception -> L27
if (r3 == 0) goto L50
r8 = 102(0x66, float:1.43E-43)
if (r3 == r8) goto L50
r8 = 202(0xca, float:2.83E-43)
if (r3 != r8) goto L3e
goto L50
L3e:
java.lang.StringBuilder r8 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L27
r8.<init>() // Catch: java.lang.Exception -> L27
java.lang.String r9 = "mbridge_reward_layer_floor_"
r8.append(r9) // Catch: java.lang.Exception -> L27
r8.append(r3) // Catch: java.lang.Exception -> L27
java.lang.String r8 = r8.toString() // Catch: java.lang.Exception -> L27
goto L52
L50:
java.lang.String r8 = "mbridge_reward_layer_floor"
L52:
boolean r9 = android.text.TextUtils.isEmpty(r6) // Catch: java.lang.Exception -> L27
if (r9 != 0) goto L81
java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L27
r1.<init>() // Catch: java.lang.Exception -> L27
r1.append(r3) // Catch: java.lang.Exception -> L27
r1.append(r4) // Catch: java.lang.Exception -> L27
java.lang.String r1 = r1.toString() // Catch: java.lang.Exception -> L27
r4 = 1
java.lang.String r1 = com.mbridge.msdk.foundation.tools.o.a(r4, r1, r6) // Catch: java.lang.Exception -> L27
java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L27
r4.<init>() // Catch: java.lang.Exception -> L27
java.lang.String r9 = "template_"
r4.append(r9) // Catch: java.lang.Exception -> L27
r4.append(r3) // Catch: java.lang.Exception -> L27
java.lang.String r4 = r4.toString() // Catch: java.lang.Exception -> L27
java.util.List r1 = com.mbridge.msdk.foundation.tools.ad.a(r1, r4) // Catch: java.lang.Exception -> L27
L81:
boolean r4 = com.mbridge.msdk.video.dynview.i.a.a(r6) // Catch: java.lang.Exception -> L27
java.lang.String r9 = "whs_chn"
java.lang.String r6 = com.mbridge.msdk.video.dynview.i.a.a(r6, r9) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.videocommon.d.b r9 = com.mbridge.msdk.videocommon.d.b.a() // Catch: java.lang.Exception -> L27
com.mbridge.msdk.foundation.controller.c r10 = com.mbridge.msdk.foundation.controller.c.m() // Catch: java.lang.Exception -> L27
java.lang.String r10 = r10.k() // Catch: java.lang.Exception -> L27
com.mbridge.msdk.videocommon.d.c r2 = r9.a(r10, r2, r5) // Catch: java.lang.Exception -> L27
if (r2 == 0) goto La1
int r5 = r2.g() // Catch: java.lang.Exception -> L27
La1:
java.util.ArrayList r2 = new java.util.ArrayList // Catch: java.lang.Exception -> L27
r2.<init>() // Catch: java.lang.Exception -> L27
r2.add(r13) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$a r9 = new com.mbridge.msdk.video.dynview.c$a // Catch: java.lang.Exception -> L27
r9.<init>() // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r8 = r9.a(r8) // Catch: java.lang.Exception -> L27
r9 = 2
com.mbridge.msdk.video.dynview.c$b r8 = r8.a(r9) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r2 = r8.a(r2) // Catch: java.lang.Exception -> L27
android.content.Context r8 = r12.getContext() // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r2 = r2.a(r8) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r2 = r2.a(r12) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r2 = r2.c(r5) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r2 = r2.f(r7) // Catch: java.lang.Exception -> L27
android.content.Context r12 = r12.getContext() // Catch: java.lang.Exception -> L27
int r12 = com.mbridge.msdk.foundation.tools.ab.s(r12) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r12 = r2.b(r12) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r12 = r12.d(r3) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r12 = r12.a(r4) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r12 = r12.c(r6) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r12 = r12.b(r1) // Catch: java.lang.Exception -> L27
int r13 = r13.getDynamicTempCode() // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c$b r12 = r12.e(r13) // Catch: java.lang.Exception -> L27
com.mbridge.msdk.video.dynview.c r12 = r12.a() // Catch: java.lang.Exception -> L27
return r12
Lf8:
java.lang.String r13 = "ViewOptionWrapper"
java.lang.String r12 = r12.getMessage()
com.mbridge.msdk.foundation.tools.af.b(r13, r12)
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.dynview.j.c.a(android.view.View, com.mbridge.msdk.foundation.entity.CampaignEx):com.mbridge.msdk.video.dynview.c");
}
public final com.mbridge.msdk.video.dynview.c b(View view, CampaignEx campaignEx) {
if (campaignEx == null) {
return null;
}
try {
com.mbridge.msdk.videocommon.d.c a = com.mbridge.msdk.videocommon.d.b.a().a(com.mbridge.msdk.foundation.controller.c.m().k(), campaignEx.getCampaignUnitId(), false);
int g = a != null ? a.g() : 0;
ArrayList arrayList = new ArrayList();
arrayList.add(campaignEx);
return new c.a().a("mbridge_reward_layer_floor_bottom").a(3).a(arrayList).a(view.getContext()).a(view).c(g).b(ab.s(view.getContext())).a();
} catch (Exception e) {
af.b("ViewOptionWrapper", e.getMessage());
return null;
}
}
public final com.mbridge.msdk.video.dynview.c a(Context context, CampaignEx campaignEx, int i, String str) {
String str2;
String str3;
StringBuilder sb;
if (campaignEx == null) {
return null;
}
try {
long ecTemplateId = campaignEx.getEcTemplateId();
int s = ab.s(context);
int a = ak.a(campaignEx.getendcard_url(), "n_logo", 1);
if (ecTemplateId == 1302) {
if (s == 1) {
sb = new StringBuilder();
sb.append("mbridge_reward_end_card_layout_portrait_");
sb.append(ecTemplateId);
} else {
sb = new StringBuilder();
sb.append("mbridge_reward_end_card_layout_landscape_");
sb.append(ecTemplateId);
}
str2 = sb.toString();
str3 = "template_" + str + s + "_" + ecTemplateId;
} else {
str2 = s == 1 ? "mbridge_reward_end_card_layout_portrait" : "mbridge_reward_end_card_layout_landscape";
str3 = "template_" + str + s;
}
List<String> arrayList = new ArrayList<>();
if (!TextUtils.isEmpty(campaignEx.getendcard_url())) {
arrayList = ad.a(o.a(2, i + "", campaignEx.getendcard_url()), str3);
}
return new c.a().a(str2).a(4).a(context).b(ab.s(context)).b(arrayList).e(campaignEx.getDynamicTempCode()).d(i).b(str).g(a).a();
} catch (Exception e) {
af.b("ViewOptionWrapper", e.getMessage());
return null;
}
}
public final com.mbridge.msdk.video.dynview.c b(Context context, List<CampaignEx> list) {
if (list != null) {
try {
if (list.size() != 0) {
float f = ak.f(com.mbridge.msdk.foundation.controller.c.m().c());
float e = ak.e(com.mbridge.msdk.foundation.controller.c.m().c());
List<String> arrayList = new ArrayList<>();
int dynamicTempCode = list.get(0).getDynamicTempCode();
int mof_tplid = list.get(0).getMof_tplid();
String mof_template_url = list.get(0).getMof_template_url();
int s = ab.s(context);
if (mof_tplid != 0 && !TextUtils.isEmpty(mof_template_url)) {
arrayList = ad.a(o.a(0, mof_tplid + "", mof_template_url), "template_" + mof_tplid + "_" + s);
}
return new c.a().a(s == 1 ? "mbridge_order_layout_list_portrait" : "mbridge_order_layout_list_landscape").a(5).a(context).a(e).b(f).a(list).b(s).b(arrayList).e(dynamicTempCode).d(mof_tplid).a();
}
} catch (Exception e2) {
af.b("ViewOptionWrapper", e2.getMessage());
}
}
return null;
}
public final com.mbridge.msdk.video.dynview.c a(View view, CampaignEx campaignEx, boolean z) {
String str;
int i;
String str2;
if (campaignEx == null) {
return null;
}
try {
List<String> arrayList = new ArrayList<>();
String campaignUnitId = campaignEx.getCampaignUnitId();
if (campaignEx.getRewardTemplateMode() != null) {
i = campaignEx.getRewardTemplateMode().f();
str = campaignEx.getRewardTemplateMode().e();
} else {
str = "";
i = 0;
}
int a = ak.a(str, "ia_tp", -5);
if (z) {
if (i != 0 && i != 102 && i != 202) {
str2 = "mbridge_reward_layer_floor_" + i;
}
str2 = "mbridge_reward_layer_floor";
} else {
str2 = "mbridge_reward_videoview_item";
}
if (!TextUtils.isEmpty(str)) {
arrayList = ad.a(o.a(1, i + "", str), "template_" + i);
}
boolean a2 = com.mbridge.msdk.video.dynview.i.a.a(str);
String a3 = com.mbridge.msdk.video.dynview.i.a.a(str, "whs_chn");
com.mbridge.msdk.videocommon.d.c a4 = com.mbridge.msdk.videocommon.d.b.a().a(com.mbridge.msdk.foundation.controller.c.m().k(), campaignUnitId, false);
int g = a4 != null ? a4.g() : 0;
ArrayList arrayList2 = new ArrayList();
arrayList2.add(campaignEx);
return new c.a().a(str2).a(2).a(arrayList2).a(view.getContext()).a(view).c(g).f(a).b(ab.s(view.getContext())).d(i).a(a2).c(a3).b(arrayList).e(campaignEx.getDynamicTempCode()).a();
} catch (Exception e) {
af.b("ViewOptionWrapper", e.getMessage());
return null;
}
}
public final com.mbridge.msdk.video.dynview.c b(Context context, CampaignEx campaignEx, int i, String str) {
if (campaignEx == null) {
return null;
}
try {
long ecTemplateId = campaignEx.getEcTemplateId();
int s = ab.s(context);
int a = ak.a(campaignEx.getendcard_url(), "n_logo", 1);
String str2 = s == 1 ? "mbridge_reward_endcard_native_half_portrait" : "mbridge_reward_endcard_native_half_landscape";
String str3 = "template_" + str + s + "_" + ecTemplateId + "_half";
List<String> arrayList = new ArrayList<>();
if (!TextUtils.isEmpty(campaignEx.getendcard_url())) {
arrayList = ad.a(o.a(2, i + "", campaignEx.getendcard_url()), str3);
}
return new c.a().a(str2).a(4).a(context).b(ab.s(context)).b(arrayList).e(campaignEx.getDynamicTempCode()).d(i).b(str).g(a).a();
} catch (Exception e) {
af.b("ViewOptionWrapper", e.getMessage());
return null;
}
}
}

View File

@@ -0,0 +1,796 @@
package com.mbridge.msdk.video.dynview.moffer;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Rect;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.work.WorkRequest;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.entity.CampaignUnit;
import com.mbridge.msdk.foundation.same.net.f.e;
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.aq;
import com.mbridge.msdk.foundation.tools.x;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.mbridge.msdk.system.NoProGuard;
import com.mbridge.msdk.tracker.network.h;
import com.mbridge.msdk.video.dynview.e.g;
import com.mbridge.msdk.video.dynview.endcard.expose.OnItemExposeListener;
import com.mbridge.msdk.video.dynview.widget.MBridgeRelativeLayout;
import com.mbridge.msdk.video.dynview.widget.ObservableScrollView;
import com.mbridge.msdk.videocommon.view.RoundImageView;
import com.tapjoy.TapjoyConstants;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MOfferModel implements NoProGuard {
private static final String MOF_LOAD_RESULT_CODE_OFFER_LESS_THAN_5 = "12930014";
private static final String MOF_LOAD_RESULT_FAILED = "2";
private static final String MOF_LOAD_RESULT_SUCCESS = "1";
private static final String TAG = "MOfferModel";
private int admf;
private int admftm;
private List<Integer> cacheImpressionReportList;
private List<Integer> cacheOnlyImpressionReportList;
private boolean isShowMoreOffer;
private CampaignUnit mCampaignUnit;
private Context mContext;
private LinearLayout mLinearLayout;
private CampaignEx mMainOfferCampaignEx;
private g mMoreOfferLayoutListener;
private com.mbridge.msdk.video.module.a.a mNotifyListener;
private ObservableScrollView mObservableScrollView;
private e mParam;
private String mRid;
private String mUnitId;
private MBridgeRelativeLayout viewMofferLayout;
private final String VALUE_MOF_TYPE = "1";
private final String VALUE_H5_TYPE = "1";
private final String VALUE_MOF = "1";
private final String VALUE_COUNTRY_CODE = "CN";
private final String VALUE_MOF_VER = "1";
private final String VALUE_OFF_SET = "0";
private final String VALUE_CATEGORY = "0";
private final String VALUE_ONLY_IMPRESSION = "1";
private final String VALUE_PING_MODE = "1";
private final String VALUE_HTTP_REQ = "2";
private final String VALUE_AD_NUM = "20";
private final String VALUE_TNUM = "20";
private final String VALUE_API_VERSION = "2.3";
private final String VALUE_DEFAULT_VIDEO_TEMP_ID = "404";
private final String K = CampaignEx.JSON_KEY_AD_K;
private final String MOF_TEST_UID = "mof_testuid";
private final String MCC = "mcc";
private final String MOF_UID = "mof_uid";
private final String MNC = "mnc";
private final String RV_TID = "rv_tid";
private final String EC_ID = "ecid";
private final String TP_LGP = "tplgp";
private final String V_FMD5 = "v_fmd5";
private final String I_FMD5 = "i_fmd5";
private final String APP_ID = "app_id";
private final String SIGN = "sign";
private final String PARENT_UNIT = "parent_unit";
private final String E = "e";
private final String MOF_TYPE = "mof_type";
private final String H5_TYPE = "h5_type";
private final String MOF = "mof";
private final String COUNTRY_CODE = "country_code";
private final String MOF_VER = "mof_ver";
private final String CRT_CID = "crt_cid";
private final String CRT_RID = "crt_rid";
private final String H5_T = "h5_t";
private final String MOF_T = "mof_t";
private final String MOF_DATA = "mof_data";
private final String OFFER_ID = "offer_id";
private final String OFF_SET = "offset";
private final String CATEGORY = "category";
private final String ONLY_IMPRESSION = "only_impression";
private final String PING_MODE = "ping_mode";
private final String HTTP_REQ = "http_req";
private final String AD_NUM = "ad_num";
private final String TNUM = "tnum";
private final String API_VERSION = "api_version";
private final String MOF_DOMAIN = "mof_domain";
private final String PARENT_ID = "parent_id";
private final String MOF_PARENT_ID = "mof_parent_id";
private final String MOF_CALLBACK_DATE = "mcd";
private final String UC_PARENT_UNIT = "uc_parent_unit";
private final String DEFAULT_PATH_V3 = "/openapi/ad/v3";
private final String PARENT_EXCHANGE = "parent_exchange";
private final String PARENT_AD_TYPE = "parent_ad_type";
private final String PARENT_TEMPLATE_ID = "parent_template_id";
private final String ONE_ID = "oneId";
private final String DY_VIEW = "dy_view";
private final String MORE_OFFER_DEFAULT_UNIT_ID = "117361";
private final String MORE_OFFER_DEFAULT_APP_ID = "92762";
private final String MORE_OFFER_DEFAULT_APP_KEY = "936dcbdd57fe235fd7cf61c2e93da3c4";
private final String MORE_OFFER_LOAD_SUCCESS = "more offer load success";
private final String MORE_OFFER_LOAD_FAILED = "more offer load failed";
private final String MORE_OFFER_SHOW = "more offer show";
private final String MORE_OFFER_CLICK = "more offer click";
private final String MORE_OFFER_SHOW_FAILED = "more offer show fail";
private final String UNIT_ID = MBridgeConstans.PROPERTIES_UNIT_ID;
private final String R_ID = "r_id";
private final int DO_ACTION_IMPRESSION = 0;
private final int DO_ACTION_ONLY_IMPRESSION = 1;
private volatile boolean hasReportMoreOfferLoad = false;
private volatile boolean hasReportMoreOfferShow = false;
private int bitmapSuccessCount = 0;
private List<Integer> mImpressionId = new ArrayList();
private int mControlShowSize = 0;
private boolean isOnlyImpShow = false;
private boolean mHasReportMofScenes = false;
private boolean mIsRetry = false;
private int mFromType = 0;
private OnItemExposeListener onItemExposeListener = new OnItemExposeListener() { // from class: com.mbridge.msdk.video.dynview.moffer.MOfferModel.1
@Override // com.mbridge.msdk.video.dynview.endcard.expose.OnItemExposeListener
public final void onItemViewVisible(boolean z, int i) {
if (MOfferModel.this.viewMofferLayout == null) {
return;
}
if (MOfferModel.this.viewMofferLayout.getVisibility() == 0) {
if (!MOfferModel.this.hasReportMoreOfferShow) {
com.mbridge.msdk.video.dynview.f.a.a(MOfferModel.this.mMainOfferCampaignEx, com.mbridge.msdk.foundation.controller.c.m().c(), "more offer show", MOfferModel.this.mUnitId, MOfferModel.this.mRid);
MOfferModel.this.hasReportMoreOfferShow = true;
}
try {
com.mbridge.msdk.video.dynview.f.a.a(MOfferModel.this.mCampaignUnit, i, 0, "117361");
return;
} catch (Exception e) {
e.printStackTrace();
return;
}
}
if (MOfferModel.this.cacheImpressionReportList == null) {
MOfferModel.this.cacheImpressionReportList = new ArrayList();
}
if (MOfferModel.this.cacheImpressionReportList.contains(Integer.valueOf(i))) {
return;
}
MOfferModel.this.cacheImpressionReportList.add(Integer.valueOf(i));
}
@Override // com.mbridge.msdk.video.dynview.endcard.expose.OnItemExposeListener
public final void onItemViewFirstVisible() {
if (MOfferModel.this.viewMofferLayout == null || !MOfferModel.this.isOnlyImpShow) {
return;
}
if (MOfferModel.this.viewMofferLayout.getVisibility() == 0) {
try {
com.mbridge.msdk.video.dynview.f.a.a(MOfferModel.this.mCampaignUnit, 0, 1, "117361");
return;
} catch (Exception e) {
e.printStackTrace();
return;
}
}
if (MOfferModel.this.cacheOnlyImpressionReportList == null) {
MOfferModel.this.cacheOnlyImpressionReportList = new ArrayList();
}
MOfferModel.this.cacheOnlyImpressionReportList.add(0);
}
};
private c mMoreOfferShowCallBack = new c() { // from class: com.mbridge.msdk.video.dynview.moffer.MOfferModel.2
@Override // com.mbridge.msdk.video.dynview.moffer.c
public final void a(List<View> list) {
TextView textView;
if (MOfferModel.this.viewMofferLayout == null || (textView = (TextView) MOfferModel.this.viewMofferLayout.findViewById(MOfferModel.this.findID("mbridge_reward_end_card_like_tv"))) == null) {
return;
}
textView.setVisibility(0);
}
};
public CampaignEx getmMainOfferCampaignEx() {
return this.mMainOfferCampaignEx;
}
public void mofDestroy() {
if (this.mMoreOfferLayoutListener != null) {
this.mMoreOfferLayoutListener = null;
}
if (this.onItemExposeListener != null) {
this.onItemExposeListener = null;
}
if (this.mMoreOfferShowCallBack != null) {
this.mMoreOfferShowCallBack = null;
}
if (this.mNotifyListener != null) {
this.mNotifyListener = null;
}
}
public void setFromType(int i) {
this.mFromType = i;
}
public void setIsRetry(boolean z) {
this.mIsRetry = z;
}
public void setMoreOfferListener(g gVar, com.mbridge.msdk.video.module.a.a aVar) {
this.mMoreOfferLayoutListener = gVar;
this.mNotifyListener = aVar;
}
public static /* synthetic */ int access$2208(MOfferModel mOfferModel) {
int i = mOfferModel.bitmapSuccessCount;
mOfferModel.bitmapSuccessCount = i + 1;
return i;
}
public void buildMofferAd(CampaignEx campaignEx) {
Context c = com.mbridge.msdk.foundation.controller.c.m().c();
this.mContext = c;
if (c == null) {
return;
}
this.mMainOfferCampaignEx = campaignEx;
initView();
initData();
}
private void initData() {
String str;
CampaignEx campaignEx = this.mMainOfferCampaignEx;
if (campaignEx == null || this.mContext == null) {
return;
}
buildRequestParams(campaignEx);
if (this.mParam == null) {
return;
}
com.mbridge.msdk.video.dynview.f.b bVar = new com.mbridge.msdk.video.dynview.f.b(this.mContext);
com.mbridge.msdk.video.dynview.f.a.a aVar = new com.mbridge.msdk.video.dynview.f.a.a() { // from class: com.mbridge.msdk.video.dynview.moffer.MOfferModel.3
@Override // com.mbridge.msdk.video.dynview.f.a.a
public final void a(List<h> list, CampaignUnit campaignUnit) {
if (MOfferModel.this.mParam != null && campaignUnit != null) {
try {
MOfferModel mOfferModel = MOfferModel.this;
mOfferModel.mUnitId = mOfferModel.mParam.a().get(MBridgeConstans.PROPERTIES_UNIT_ID);
MOfferModel mOfferModel2 = MOfferModel.this;
mOfferModel2.mRid = mOfferModel2.mParam.a().get("r_id");
if (campaignUnit.getAds() == null || campaignUnit.getAds().size() < 5) {
if (!MOfferModel.this.hasReportMoreOfferLoad) {
com.mbridge.msdk.video.dynview.f.a.a(MOfferModel.this.mMainOfferCampaignEx, com.mbridge.msdk.foundation.controller.c.m().c(), "more offer load failed errorCode: -999 errorMsg: The campaign quantity less than 5.", MOfferModel.this.mUnitId, MOfferModel.this.mRid);
MOfferModel.this.hasReportMoreOfferLoad = true;
}
com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e();
eVar.a("result", "2");
eVar.a("code", MOfferModel.MOF_LOAD_RESULT_CODE_OFFER_LESS_THAN_5);
if (MOfferModel.this.mIsRetry) {
eVar.a(TapjoyConstants.TJC_RETRY, "1");
}
com.mbridge.msdk.foundation.same.report.d.d.a().a("m_mof_req_result", MOfferModel.this.mMainOfferCampaignEx, eVar);
a.a().b();
return;
}
MOfferModel.this.mCampaignUnit = campaignUnit;
if (MOfferModel.this.admf > 0 && MOfferModel.this.admftm == 1) {
MOfferModel.this.doControllableImpOnRequest();
}
if (!MOfferModel.this.hasReportMoreOfferLoad) {
com.mbridge.msdk.video.dynview.f.a.a(MOfferModel.this.mMainOfferCampaignEx, com.mbridge.msdk.foundation.controller.c.m().c(), "more offer load success", MOfferModel.this.mUnitId, MOfferModel.this.mRid);
MOfferModel.this.hasReportMoreOfferLoad = true;
}
com.mbridge.msdk.foundation.same.report.d.e eVar2 = new com.mbridge.msdk.foundation.same.report.d.e();
eVar2.a("result", "1");
if (MOfferModel.this.mIsRetry) {
eVar2.a(TapjoyConstants.TJC_RETRY, "1");
}
com.mbridge.msdk.foundation.same.report.d.d.a().a("m_mof_req_result", MOfferModel.this.mMainOfferCampaignEx, eVar2);
MOfferModel.this.createMoreOfferView();
return;
} catch (Exception e) {
af.b(MOfferModel.TAG, e.getMessage());
a.a().b();
return;
}
}
a.a().b();
}
@Override // com.mbridge.msdk.video.dynview.f.a.a
public final void a(int i, String str2) {
if (MOfferModel.this.mParam != null) {
try {
MOfferModel mOfferModel = MOfferModel.this;
mOfferModel.mUnitId = mOfferModel.mParam.a().get(MBridgeConstans.PROPERTIES_UNIT_ID);
MOfferModel mOfferModel2 = MOfferModel.this;
mOfferModel2.mRid = mOfferModel2.mParam.a().get("r_id");
if (!MOfferModel.this.hasReportMoreOfferLoad) {
com.mbridge.msdk.video.dynview.f.a.a(MOfferModel.this.mMainOfferCampaignEx, com.mbridge.msdk.foundation.controller.c.m().c(), "more offer load failed errorCode:" + i + "errorMsg:" + str2, MOfferModel.this.mUnitId, MOfferModel.this.mRid);
MOfferModel.this.hasReportMoreOfferLoad = true;
}
com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e();
eVar.a("result", "2");
eVar.a("code", i + "");
if (MOfferModel.this.mIsRetry) {
eVar.a(TapjoyConstants.TJC_RETRY, "1");
}
com.mbridge.msdk.foundation.same.report.d.d.a().a("m_mof_req_result", MOfferModel.this.mMainOfferCampaignEx, eVar);
a.a().b();
return;
} catch (Exception e) {
af.b(MOfferModel.TAG, e.getMessage());
a.a().b();
return;
}
}
a.a().b();
}
};
String str2 = com.mbridge.msdk.foundation.same.net.e.d.f().M;
if (!TextUtils.isEmpty(this.mMainOfferCampaignEx.getReq_ext_data())) {
try {
JSONObject jSONObject = new JSONObject(this.mMainOfferCampaignEx.getReq_ext_data());
String optString = jSONObject.optString("mof_domain");
if (!TextUtils.isEmpty(optString)) {
str2 = optString + "/openapi/ad/v3";
}
String optString2 = jSONObject.optString("parent_id");
if (!TextUtils.isEmpty(optString2)) {
com.mbridge.msdk.foundation.same.net.e.b.a(this.mParam, "mof_parent_id", optString2);
}
String optString3 = jSONObject.optString("oneId");
if (!TextUtils.isEmpty(optString3)) {
com.mbridge.msdk.foundation.same.net.e.b.a(this.mParam, "oneId", optString3);
}
String optString4 = jSONObject.optString("mcd");
if (!TextUtils.isEmpty(optString4)) {
com.mbridge.msdk.foundation.same.net.e.b.a(this.mParam, "mcd", optString4);
}
aVar.setUnitId(this.mMainOfferCampaignEx.getCampaignUnitId());
} catch (Exception e) {
af.b(TAG, e.getMessage());
str = com.mbridge.msdk.foundation.same.net.e.d.f().M;
}
}
str = str2;
com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e();
if (this.mIsRetry) {
eVar.a(TapjoyConstants.TJC_RETRY, "1");
}
com.mbridge.msdk.foundation.same.report.d.d.a().a("m_mof_initiate", this.mMainOfferCampaignEx, eVar);
bVar.getLoadOrSetting(1, str, this.mParam, aVar, true, "more_offer", WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS);
doAdmfContorl();
}
private void doAdmfContorl() {
JSONObject jSONObject;
try {
CampaignEx campaignEx = this.mMainOfferCampaignEx;
if (campaignEx != null && !TextUtils.isEmpty(campaignEx.getMoreOfferJsonData())) {
JSONObject jSONObject2 = new JSONObject(this.mMainOfferCampaignEx.getMoreOfferJsonData());
int i = this.mFromType;
if (i == 1) {
jSONObject = jSONObject2.getJSONObject("template_url");
} else {
jSONObject = i != 2 ? null : jSONObject2.getJSONObject(CampaignEx.ENDCARD_URL);
}
if (jSONObject == null) {
return;
}
if (jSONObject.has(MBridgeConstans.DYNAMIC_VIEW_MORE_OFFER_ADMFTM)) {
this.admftm = jSONObject.getInt(MBridgeConstans.DYNAMIC_VIEW_MORE_OFFER_ADMFTM);
}
if (jSONObject.has(MBridgeConstans.DYNAMIC_VIEW_MORE_OFFER_ADMF)) {
this.admf = jSONObject.getInt(MBridgeConstans.DYNAMIC_VIEW_MORE_OFFER_ADMF);
}
}
} catch (Exception e) {
af.b(TAG, e.getMessage());
}
}
/* JADX INFO: Access modifiers changed from: private */
public void doControllableImpOnRequest() {
CampaignUnit campaignUnit = this.mCampaignUnit;
if (campaignUnit == null) {
return;
}
try {
com.mbridge.msdk.video.dynview.f.a.a(campaignUnit, 0, 1, "117361");
this.isOnlyImpShow = true;
if (this.mCampaignUnit.getAds() == null) {
return;
}
int size = this.mCampaignUnit.getAds().size();
if (this.admf >= size) {
this.admf = size;
}
if (this.mImpressionId == null) {
this.mImpressionId = new ArrayList();
}
for (int i = 0; i < this.admf; i++) {
if (!this.mImpressionId.contains(Integer.valueOf(i))) {
com.mbridge.msdk.video.dynview.f.a.a(this.mCampaignUnit, i, 0, "117361");
this.mImpressionId.add(Integer.valueOf(i));
}
}
} catch (Exception e) {
af.b(TAG, e.getMessage());
}
}
private void doControllableImpOnShow(int i) {
CampaignUnit campaignUnit = this.mCampaignUnit;
if (campaignUnit == null || campaignUnit.getAds() == null) {
return;
}
try {
int size = this.mCampaignUnit.getAds().size();
if (this.mControlShowSize == 0) {
this.mControlShowSize = this.admf + i;
}
if (this.mControlShowSize >= size) {
this.mControlShowSize = size;
}
while (i < this.mControlShowSize) {
if (!this.mImpressionId.contains(Integer.valueOf(i))) {
com.mbridge.msdk.video.dynview.f.a.a(this.mCampaignUnit, i, 0, "117361");
this.mImpressionId.add(Integer.valueOf(i));
}
i++;
}
} catch (Exception e) {
af.b(TAG, e.getMessage());
}
}
/* JADX WARN: Can't wrap try/catch for region: R(27:5|(1:7)|8|9|10|(21:14|15|(1:17)(1:52)|18|19|(1:21)(1:51)|22|(1:24)(1:50)|25|(2:27|(1:29))(1:49)|30|(1:32)(1:48)|33|(1:35)(1:47)|36|37|38|39|(1:41)|42|43)|54|15|(0)(0)|18|19|(0)(0)|22|(0)(0)|25|(0)(0)|30|(0)(0)|33|(0)(0)|36|37|38|39|(0)|42|43) */
/* JADX WARN: Code restructure failed: missing block: B:45:0x01e9, code lost:
r0 = move-exception;
*/
/* JADX WARN: Code restructure failed: missing block: B:46:0x01ea, code lost:
r0.printStackTrace();
*/
/* JADX WARN: Removed duplicated region for block: B:17:0x0087 */
/* JADX WARN: Removed duplicated region for block: B:21:0x0106 */
/* JADX WARN: Removed duplicated region for block: B:24:0x013e */
/* JADX WARN: Removed duplicated region for block: B:27:0x015f */
/* JADX WARN: Removed duplicated region for block: B:32:0x0183 */
/* JADX WARN: Removed duplicated region for block: B:35:0x0196 */
/* JADX WARN: Removed duplicated region for block: B:41:0x0245 */
/* JADX WARN: Removed duplicated region for block: B:47:0x019e */
/* JADX WARN: Removed duplicated region for block: B:48:0x0189 */
/* JADX WARN: Removed duplicated region for block: B:49:0x0167 */
/* JADX WARN: Removed duplicated region for block: B:50:0x0141 */
/* JADX WARN: Removed duplicated region for block: B:51:0x010a */
/* JADX WARN: Removed duplicated region for block: B:52:0x0092 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void buildRequestParams(com.mbridge.msdk.foundation.entity.CampaignEx r28) {
/*
Method dump skipped, instructions count: 620
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.dynview.moffer.MOfferModel.buildRequestParams(com.mbridge.msdk.foundation.entity.CampaignEx):void");
}
/* JADX INFO: Access modifiers changed from: private */
public void createMoreOfferView() {
CampaignUnit campaignUnit = this.mCampaignUnit;
if (campaignUnit == null || this.mContext == null || campaignUnit.getAds() == null || this.mCampaignUnit.getAds().size() == 0) {
return;
}
setMoreOfferLayoutCallBack();
createMoreOfferList();
}
private void createMoreOfferList() {
MBridgeRelativeLayout mBridgeRelativeLayout = this.viewMofferLayout;
if (mBridgeRelativeLayout == null) {
return;
}
this.mObservableScrollView = (ObservableScrollView) mBridgeRelativeLayout.findViewById(findID("mbridge_moreoffer_hls"));
buildScrollViewGroup();
addLikeTextView();
showView();
}
private void setMoreOfferLayoutCallBack() {
MBridgeRelativeLayout mBridgeRelativeLayout = this.viewMofferLayout;
if (mBridgeRelativeLayout == null) {
return;
}
mBridgeRelativeLayout.setMoreOfferCacheReportCallBack(new b() { // from class: com.mbridge.msdk.video.dynview.moffer.MOfferModel.4
@Override // com.mbridge.msdk.video.dynview.moffer.b
public final void a() {
try {
if (MOfferModel.this.cacheImpressionReportList != null) {
for (int i = 0; i < MOfferModel.this.cacheImpressionReportList.size(); i++) {
if (!MOfferModel.this.hasReportMoreOfferShow) {
com.mbridge.msdk.video.dynview.f.a.a(MOfferModel.this.mMainOfferCampaignEx, MOfferModel.this.mContext, "more offer show", MOfferModel.this.mUnitId, MOfferModel.this.mRid);
MOfferModel.this.hasReportMoreOfferShow = true;
}
com.mbridge.msdk.video.dynview.f.a.a(MOfferModel.this.mCampaignUnit, ((Integer) MOfferModel.this.cacheImpressionReportList.get(i)).intValue(), 0, "117361");
}
}
if (!MOfferModel.this.isOnlyImpShow && MOfferModel.this.cacheOnlyImpressionReportList != null) {
for (int i2 = 0; i2 < MOfferModel.this.cacheOnlyImpressionReportList.size(); i2++) {
com.mbridge.msdk.video.dynview.f.a.a(MOfferModel.this.mCampaignUnit, ((Integer) MOfferModel.this.cacheOnlyImpressionReportList.get(i2)).intValue(), 1, "117361");
}
}
MOfferModel.this.release();
} catch (Exception e) {
af.b(MOfferModel.TAG, e.getMessage());
}
}
});
this.viewMofferLayout.setMoreOfferShowFailedCallBack(new d() { // from class: com.mbridge.msdk.video.dynview.moffer.MOfferModel.5
@Override // com.mbridge.msdk.video.dynview.moffer.d
public final void a() {
if (MOfferModel.this.viewMofferLayout != null && MOfferModel.this.viewMofferLayout.getVisibility() != 0) {
com.mbridge.msdk.video.dynview.f.a.a(MOfferModel.this.mMainOfferCampaignEx, MOfferModel.this.mContext, "more offer show fail", MOfferModel.this.mUnitId, MOfferModel.this.mRid);
}
MOfferModel.this.release();
}
});
}
private void buildScrollViewGroup() {
if (this.mContext == null || this.viewMofferLayout == null || this.mMainOfferCampaignEx == null) {
return;
}
this.mLinearLayout = new LinearLayout(this.mContext);
this.mLinearLayout.setLayoutParams(new FrameLayout.LayoutParams(-2, -1));
this.mLinearLayout.setOrientation(0);
this.mLinearLayout.setGravity(17);
for (int i = 0; i < this.mCampaignUnit.ads.size(); i++) {
View buildItemView = buildItemView(i);
if (buildItemView != null) {
this.mLinearLayout.addView(buildItemView);
}
}
this.mObservableScrollView.addView(this.mLinearLayout);
this.mObservableScrollView.setOnTouchListener(new View.OnTouchListener() { // from class: com.mbridge.msdk.video.dynview.moffer.MOfferModel.6
@Override // android.view.View.OnTouchListener
public final boolean onTouch(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() != 1) {
return false;
}
MOfferModel.this.checkViewVisiableState();
return false;
}
});
}
private View buildItemView(final int i) {
Context context = this.mContext;
if (context == null) {
return null;
}
final View inflate = LayoutInflater.from(this.mContext).inflate(x.a(context, "mbridge_reward_end_card_more_offer_item", TtmlNode.TAG_LAYOUT), (ViewGroup) null, false);
int a = x.a(this.mContext, "mbridge_reward_end_card_item_iv", "id");
if (inflate == null) {
return null;
}
setOfferData(this.mCampaignUnit.getAds(), i, (RoundImageView) inflate.findViewById(a), (TextView) inflate.findViewById(x.a(this.mContext, "mbridge_reward_end_card_item_title_tv", "id")));
inflate.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.dynview.moffer.MOfferModel.7
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
CampaignEx campaignEx;
try {
if (MOfferModel.this.mCampaignUnit == null || MOfferModel.this.mCampaignUnit.ads == null || MOfferModel.this.mCampaignUnit.ads.size() <= 0 || (campaignEx = MOfferModel.this.mCampaignUnit.ads.get(i)) == null) {
return;
}
if (MOfferModel.this.mNotifyListener != null) {
MOfferModel mOfferModel = MOfferModel.this;
mOfferModel.callBackClick(mOfferModel.mNotifyListener);
}
com.mbridge.msdk.video.dynview.f.a.a(MOfferModel.this.mMainOfferCampaignEx, com.mbridge.msdk.foundation.controller.c.m().c(), "more offer click", MOfferModel.this.mUnitId, MOfferModel.this.mRid);
com.mbridge.msdk.video.dynview.f.a.a(com.mbridge.msdk.foundation.controller.c.m().c(), campaignEx, MOfferModel.this.mUnitId, inflate);
} catch (Exception e) {
af.b(MOfferModel.TAG, e.getMessage());
}
}
});
return inflate;
}
private void setOfferData(List<CampaignEx> list, int i, final RoundImageView roundImageView, TextView textView) {
CampaignEx campaignEx;
if (roundImageView == null || textView == null || list == null || this.mContext == null || this.mMainOfferCampaignEx == null || list.size() <= 0 || (campaignEx = list.get(i)) == null) {
return;
}
roundImageView.setImageDrawable(null);
com.mbridge.msdk.foundation.same.c.b.a(this.mContext).a(campaignEx.getIconUrl(), new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.video.dynview.moffer.MOfferModel.8
@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) {
try {
if (roundImageView != null && bitmap != null && !bitmap.isRecycled()) {
roundImageView.setBorderRadius(13);
roundImageView.setImageBitmap(bitmap);
}
MOfferModel.access$2208(MOfferModel.this);
if (MOfferModel.this.isShowMoreOffer || MOfferModel.this.bitmapSuccessCount < 5 || MOfferModel.this.mMoreOfferShowCallBack == null) {
return;
}
MOfferModel.this.isShowMoreOffer = true;
MOfferModel.this.mMoreOfferShowCallBack.a(null);
} catch (Exception e) {
af.b(MOfferModel.TAG, e.getMessage());
}
}
});
if (TextUtils.isEmpty(campaignEx.getAppName())) {
return;
}
String a = aq.a(this.mMainOfferCampaignEx.getendcard_url(), "mof_textmod");
if (!TextUtils.isEmpty(a) && a.equals("1")) {
textView.setText(campaignEx.getAppName());
} else {
textView.setVisibility(8);
}
}
public void showView() {
CampaignUnit campaignUnit;
g gVar = this.mMoreOfferLayoutListener;
if (gVar == null) {
return;
}
MBridgeRelativeLayout mBridgeRelativeLayout = this.viewMofferLayout;
if (mBridgeRelativeLayout == null || (campaignUnit = this.mCampaignUnit) == null) {
gVar.a(-1, "more Offer create fail");
return;
}
gVar.a(mBridgeRelativeLayout, campaignUnit);
if (!this.isOnlyImpShow) {
com.mbridge.msdk.video.dynview.f.a.a(this.mCampaignUnit, 0, 1, "117361");
}
if (this.mHasReportMofScenes) {
return;
}
com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e();
eVar.a("scene", this.mFromType + "");
com.mbridge.msdk.foundation.same.report.d.d.a().a("m_mof_scenes", this.mMainOfferCampaignEx, eVar);
}
private void initView() {
Context context = this.mContext;
if (context == null) {
return;
}
this.viewMofferLayout = (MBridgeRelativeLayout) LayoutInflater.from(this.mContext).inflate(x.a(context, "mbridge_reward_more_offer_view", TtmlNode.TAG_LAYOUT), (ViewGroup) null, false);
}
private void addLikeTextView() {
TextView textView;
MBridgeRelativeLayout mBridgeRelativeLayout = this.viewMofferLayout;
if (mBridgeRelativeLayout == null || (textView = (TextView) mBridgeRelativeLayout.findViewById(findID("mbridge_reward_end_card_like_tv"))) == null) {
return;
}
textView.setTextColor(Color.parseColor("#FF000000"));
textView.setTextSize(10.0f);
if (ab.t(com.mbridge.msdk.foundation.controller.c.m().c()).contains("zh")) {
textView.setEms(1);
textView.getLayoutParams().width = ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 30.0f);
textView.setText("猜你喜欢");
} else {
textView.setText("Just\nfor\nYou");
}
textView.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.dynview.moffer.MOfferModel.9
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MOfferModel.this.mObservableScrollView != null) {
if (MOfferModel.this.mObservableScrollView.getVisibility() == 0) {
MOfferModel.this.mObservableScrollView.setVisibility(8);
} else {
MOfferModel.this.mObservableScrollView.setVisibility(0);
}
}
try {
new com.mbridge.msdk.video.dynview.h.b().a(MOfferModel.this.mLinearLayout, 300L);
} catch (Exception e) {
af.b(MOfferModel.TAG, e.getMessage());
}
}
});
}
public void checkViewVisiableState() {
if (this.mLinearLayout == null) {
return;
}
for (int i = 0; i < this.mLinearLayout.getChildCount(); i++) {
try {
setCallbackForLogicVisibleView(this.mLinearLayout.getChildAt(i), i);
} catch (Exception e) {
af.b(TAG, e.getMessage());
return;
}
}
}
private void setCallbackForLogicVisibleView(View view, int i) {
if (view == null) {
return;
}
try {
Rect rect = new Rect();
boolean globalVisibleRect = view.getGlobalVisibleRect(rect);
boolean z = rect.width() > view.getMeasuredWidth() / 5;
if (globalVisibleRect && z) {
List<Integer> list = this.mImpressionId;
if (list != null && this.onItemExposeListener != null) {
if (list.contains(Integer.valueOf(i))) {
return;
}
this.mImpressionId.add(Integer.valueOf(i));
this.onItemExposeListener.onItemViewVisible(true, i);
}
} else if (this.admf != 0) {
doControllableImpOnShow(i);
}
} catch (Exception e) {
af.b(TAG, e.getMessage());
}
}
/* JADX INFO: Access modifiers changed from: private */
public void callBackClick(com.mbridge.msdk.video.module.a.a aVar) {
if (aVar == null) {
return;
}
aVar.a(128, "");
}
/* JADX INFO: Access modifiers changed from: private */
public int findID(String str) {
return x.a(com.mbridge.msdk.foundation.controller.c.m().c(), str, "id");
}
/* JADX INFO: Access modifiers changed from: private */
public void release() {
List<Integer> list = this.cacheImpressionReportList;
if (list != null) {
list.clear();
this.cacheImpressionReportList = null;
}
List<Integer> list2 = this.cacheOnlyImpressionReportList;
if (list2 != null) {
list2.clear();
this.cacheOnlyImpressionReportList = null;
}
}
public long getECParentTemplateCode() {
try {
e eVar = this.mParam;
String str = eVar != null ? eVar.a().get("parent_template_id") : "";
if (TextUtils.isEmpty(str)) {
return 404L;
}
return Long.parseLong(str);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
e.printStackTrace();
}
return 404L;
}
}
}

View File

@@ -0,0 +1,297 @@
package com.mbridge.msdk.video.dynview.moffer;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.entity.CampaignUnit;
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.x;
import com.mbridge.msdk.video.dynview.e.g;
import com.mbridge.msdk.video.module.MBridgeNativeEndCardView;
import java.lang.ref.SoftReference;
import java.util.ArrayList;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/* loaded from: classes4.dex */
public class a {
private static volatile a a;
private Map<String, SoftReference<MOfferModel>> b = new ConcurrentHashMap();
private int c = 500;
private a() {
}
public static a a() {
a aVar;
if (a != null) {
return a;
}
synchronized (a.class) {
try {
if (a == null) {
a = new a();
}
aVar = a;
} catch (Throwable th) {
throw th;
}
}
return aVar;
}
public final void a(final ViewGroup viewGroup, String str, com.mbridge.msdk.video.module.a.a aVar) {
if (viewGroup == null || aVar == null || this.b == null || TextUtils.isEmpty(str) || !this.b.containsKey(str)) {
return;
}
SoftReference<MOfferModel> softReference = this.b.get(str);
final MOfferModel mOfferModel = (softReference == null || softReference.get() == null) ? null : softReference.get();
if (mOfferModel == null) {
return;
}
mOfferModel.setMoreOfferListener(new g() { // from class: com.mbridge.msdk.video.dynview.moffer.a.1
@Override // com.mbridge.msdk.video.dynview.e.g
public final void a(ViewGroup viewGroup2, CampaignUnit campaignUnit) {
ViewGroup viewGroup3;
if (viewGroup2 == null || (viewGroup3 = viewGroup) == null) {
return;
}
try {
a.a(a.this, mOfferModel, viewGroup3, viewGroup2, campaignUnit);
} catch (Exception e) {
af.b("MOfferEnergize", e.getMessage());
}
}
@Override // com.mbridge.msdk.video.dynview.e.g
public final void a(int i, String str2) {
af.b("MOfferEnergize", str2);
}
}, aVar);
mOfferModel.showView();
}
public final void a(CampaignEx campaignEx, int i) {
if (campaignEx == null) {
return;
}
String str = campaignEx.getRequestId() + "_" + campaignEx.getId();
if (this.b == null) {
this.b = new ConcurrentHashMap();
}
if (this.b.containsKey(str)) {
return;
}
try {
MOfferModel mOfferModel = new MOfferModel();
mOfferModel.setFromType(i);
SoftReference<MOfferModel> softReference = new SoftReference<>(mOfferModel);
if (softReference.get() != null) {
this.b.put(str, softReference);
softReference.get().buildMofferAd(campaignEx);
}
} catch (Exception e) {
af.b("MOfferEnergize", e.getMessage());
}
}
public final void a(CampaignEx campaignEx, final ViewGroup viewGroup, com.mbridge.msdk.video.module.a.a aVar, int i) {
if (campaignEx == null) {
return;
}
String str = campaignEx.getRequestId() + "_" + campaignEx.getId();
if (this.b == null) {
this.b = new ConcurrentHashMap();
}
try {
MOfferModel mOfferModel = new MOfferModel();
mOfferModel.setFromType(i);
SoftReference<MOfferModel> softReference = new SoftReference<>(mOfferModel);
if (softReference.get() != null) {
this.b.put(str, softReference);
final MOfferModel mOfferModel2 = softReference.get();
mOfferModel2.setMoreOfferListener(new g() { // from class: com.mbridge.msdk.video.dynview.moffer.a.3
@Override // com.mbridge.msdk.video.dynview.e.g
public final void a(int i2, String str2) {
}
@Override // com.mbridge.msdk.video.dynview.e.g
public final void a(ViewGroup viewGroup2, CampaignUnit campaignUnit) {
if (viewGroup2 == null || campaignUnit == null) {
return;
}
try {
a.a(a.this, mOfferModel2, viewGroup, viewGroup2, campaignUnit);
} catch (Exception e) {
af.b("MOfferEnergize", e.getMessage());
}
}
}, aVar);
mOfferModel2.setIsRetry(true);
mOfferModel2.buildMofferAd(campaignEx);
}
} catch (Exception e) {
af.b("MOfferEnergize", e.getMessage());
}
}
public final boolean a(String str) {
if (this.b == null || TextUtils.isEmpty(str)) {
return false;
}
return this.b.containsKey(str);
}
public final void b() {
MOfferModel mOfferModel;
try {
Map<String, SoftReference<MOfferModel>> map = this.b;
if (map != null) {
for (SoftReference<MOfferModel> softReference : map.values()) {
if (softReference != null && (mOfferModel = softReference.get()) != null) {
mOfferModel.mofDestroy();
}
}
this.b.clear();
}
} catch (Exception e) {
af.b("MOfferEnergize", e.getMessage());
}
}
private int b(String str) {
return x.a(com.mbridge.msdk.foundation.controller.c.m().c(), str, "id");
}
public static /* synthetic */ void a(a aVar, final MOfferModel mOfferModel, ViewGroup viewGroup, ViewGroup viewGroup2, CampaignUnit campaignUnit) {
View findViewById;
RelativeLayout relativeLayout;
ImageView imageView;
TextView textView;
ImageView imageView2;
RelativeLayout relativeLayout2;
if (mOfferModel == null || viewGroup == null || viewGroup2 == null || campaignUnit == null) {
return;
}
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) viewGroup2.getLayoutParams();
if (layoutParams == null) {
layoutParams = new RelativeLayout.LayoutParams(-1, -2);
}
RelativeLayout.LayoutParams layoutParams2 = layoutParams;
layoutParams2.addRule(12, -1);
int a2 = ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 5.0f);
layoutParams2.setMargins(a2, a2, a2, a2);
if (viewGroup2.getBackground() == null) {
try {
Drawable drawable = com.mbridge.msdk.foundation.controller.c.m().c().getResources().getDrawable(x.a(com.mbridge.msdk.foundation.controller.c.m().c(), "mbridge_reward_more_offer_default_bg", "drawable"));
if (drawable != null && (findViewById = viewGroup2.findViewById(aVar.b("mbridge_moreoffer_hls"))) != null) {
findViewById.setBackground(drawable);
}
} catch (Exception e) {
af.b("MOfferEnergize", e.getMessage());
}
}
viewGroup2.setLayoutParams(layoutParams2);
ViewGroup viewGroup3 = (ViewGroup) viewGroup2.getParent();
if (viewGroup3 != null) {
viewGroup3.removeAllViews();
}
if (mOfferModel.getECParentTemplateCode() == 1302) {
try {
if (mOfferModel.getmMainOfferCampaignEx() != null && mOfferModel.getmMainOfferCampaignEx().getRewardTemplateMode() != null) {
int b = mOfferModel.getmMainOfferCampaignEx().getRewardTemplateMode().b();
if (b == 0) {
b = ab.s(com.mbridge.msdk.foundation.controller.c.m().c());
}
if (b != 1 && (viewGroup instanceof MBridgeNativeEndCardView)) {
if (((MBridgeNativeEndCardView) viewGroup).isDyXmlSuccess()) {
imageView2 = (ImageView) viewGroup.findViewById(-1803557032);
} else {
imageView2 = (ImageView) viewGroup.findViewById(aVar.b("mbridge_iv_adbanner"));
}
int g = ak.g(com.mbridge.msdk.foundation.controller.c.m().c()) - ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 220.0f);
RelativeLayout.LayoutParams layoutParams3 = (RelativeLayout.LayoutParams) imageView2.getLayoutParams();
layoutParams3.height = g;
layoutParams3.width = (g * 16) / 9;
imageView2.setLayoutParams(layoutParams3);
}
}
if (viewGroup instanceof MBridgeNativeEndCardView) {
if (((MBridgeNativeEndCardView) viewGroup).isDyXmlSuccess()) {
relativeLayout = (RelativeLayout) viewGroup.findViewById(-1642631508);
imageView = (ImageView) viewGroup.findViewById(389008949);
textView = (TextView) viewGroup.findViewById(1561614848);
} else {
relativeLayout = (RelativeLayout) viewGroup.findViewById(aVar.b("mbridge_native_ec_layout"));
imageView = (ImageView) viewGroup.findViewById(aVar.b("mbridge_iv_flag"));
textView = (TextView) viewGroup.findViewById(aVar.b("mbridge_tv_flag"));
}
ArrayList arrayList = new ArrayList();
arrayList.add(imageView);
arrayList.add(textView);
new com.mbridge.msdk.video.dynview.h.b().a(arrayList, 0, ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 100.0f), aVar.c);
} else {
relativeLayout = null;
}
RelativeLayout.LayoutParams layoutParams4 = (RelativeLayout.LayoutParams) viewGroup2.getLayoutParams();
layoutParams4.setMargins(0, 0, 0, 0);
viewGroup2.setLayoutParams(layoutParams4);
if (relativeLayout != null) {
relativeLayout.addView(viewGroup2);
}
} catch (Exception e2) {
if (MBridgeConstans.DEBUG) {
e2.printStackTrace();
}
}
} else {
try {
if (viewGroup instanceof MBridgeNativeEndCardView) {
if (((MBridgeNativeEndCardView) viewGroup).isDyXmlSuccess()) {
relativeLayout2 = (RelativeLayout) viewGroup.findViewById(-1642631508);
} else {
relativeLayout2 = (RelativeLayout) viewGroup.findViewById(aVar.b("mbridge_native_ec_layout"));
}
ArrayList arrayList2 = new ArrayList();
arrayList2.add(relativeLayout2);
new com.mbridge.msdk.video.dynview.h.b().a(arrayList2, 0, ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 100.0f), aVar.c);
}
RelativeLayout relativeLayout3 = (RelativeLayout) viewGroup.findViewById(aVar.b("mbridge_reward_moreoffer_layout"));
if (relativeLayout3 == null) {
relativeLayout3 = (RelativeLayout) viewGroup.findViewById(-82036151);
}
if (relativeLayout3 != null) {
if (viewGroup.isShown()) {
relativeLayout3.setVisibility(0);
relativeLayout3.addView(viewGroup2);
}
} else {
viewGroup.addView(viewGroup2);
}
} catch (Exception e3) {
af.b("MOfferEnergize", e3.getMessage());
}
}
new com.mbridge.msdk.video.dynview.h.b().a(viewGroup2, 0, ak.f(com.mbridge.msdk.foundation.controller.c.m().c()), 0, ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 100.0f), 0L);
if (viewGroup instanceof MBridgeNativeEndCardView) {
((MBridgeNativeEndCardView) viewGroup).setMoreOfferCampaignUnit(campaignUnit);
}
viewGroup.postDelayed(new Runnable() { // from class: com.mbridge.msdk.video.dynview.moffer.a.2
@Override // java.lang.Runnable
public final void run() {
MOfferModel mOfferModel2 = mOfferModel;
if (mOfferModel2 != null) {
mOfferModel2.checkViewVisiableState();
}
}
}, aVar.c + 500);
}
}

View File

@@ -0,0 +1,6 @@
package com.mbridge.msdk.video.dynview.moffer;
/* loaded from: classes4.dex */
public interface b {
void a();
}

View File

@@ -0,0 +1,9 @@
package com.mbridge.msdk.video.dynview.moffer;
import android.view.View;
import java.util.List;
/* loaded from: classes4.dex */
public interface c {
void a(List<View> list);
}

View File

@@ -0,0 +1,6 @@
package com.mbridge.msdk.video.dynview.moffer;
/* loaded from: classes4.dex */
public interface d {
void a();
}

View File

@@ -0,0 +1,26 @@
package com.mbridge.msdk.video.dynview.ordercamp;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.GridView;
/* loaded from: classes4.dex */
public class AblGridView extends GridView {
public AblGridView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public AblGridView(Context context) {
super(context);
}
public AblGridView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
@Override // android.widget.GridView, android.widget.AbsListView, android.view.View
public void onMeasure(int i, int i2) {
super.onMeasure(i, View.MeasureSpec.makeMeasureSpec(536870911, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,346 @@
package com.mbridge.msdk.video.dynview.ordercamp.a;
import android.content.Context;
import android.graphics.Bitmap;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.mbridge.msdk.c.h;
import com.mbridge.msdk.dycreator.baseview.MBFrameLayout;
import com.mbridge.msdk.dycreator.baseview.MBHeatLevelLayoutView;
import com.mbridge.msdk.dycreator.baseview.MBStarLevelLayoutView;
import com.mbridge.msdk.dycreator.baseview.cusview.MBCusRoundImageView;
import com.mbridge.msdk.dycreator.baseview.cusview.MBRotationView;
import com.mbridge.msdk.dycreator.baseview.cusview.MBridgeImageView;
import com.mbridge.msdk.dycreator.baseview.cusview.MBridgeTextView;
import com.mbridge.msdk.dycreator.wrapper.DyAdType;
import com.mbridge.msdk.dycreator.wrapper.DyOption;
import com.mbridge.msdk.dycreator.wrapper.DynamicViewCreator;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.ad;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.foundation.tools.o;
import com.mbridge.msdk.foundation.tools.x;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.mbridge.msdk.video.dynview.h.b;
import com.mbridge.msdk.video.dynview.widget.MBridgeLevelLayoutView;
import com.mbridge.msdk.videocommon.view.RoundImageView;
import java.io.File;
import java.util.List;
import java.util.Locale;
/* loaded from: classes4.dex */
public final class a extends BaseAdapter {
private boolean a = false;
private C0241a b;
private List<CampaignEx> c;
/* renamed from: com.mbridge.msdk.video.dynview.ordercamp.a.a$a, reason: collision with other inner class name */
public static class C0241a {
RelativeLayout a;
MBRotationView b;
MBridgeImageView c;
RoundImageView d;
TextView e;
TextView f;
TextView g;
TextView h;
MBridgeLevelLayoutView i;
ImageView j;
ImageView k;
MBCusRoundImageView l;
MBCusRoundImageView m;
MBStarLevelLayoutView n;
MBHeatLevelLayoutView o;
MBFrameLayout p;
}
@Override // android.widget.Adapter
public final long getItemId(int i) {
return i;
}
public a(List<CampaignEx> list) {
this.c = list;
}
@Override // android.widget.Adapter
public final int getCount() {
List<CampaignEx> list = this.c;
if (list == null || list.size() <= 0) {
return 0;
}
return this.c.size();
}
@Override // android.widget.Adapter
public final Object getItem(int i) {
List<CampaignEx> list = this.c;
if (list != null) {
return list.get(i);
}
return null;
}
@Override // android.widget.Adapter
public final View getView(int i, View view, ViewGroup viewGroup) {
View view2;
try {
if (view == null) {
view2 = a(i);
} else {
this.b = (C0241a) view.getTag();
view2 = view;
}
} catch (Exception e) {
e = e;
view2 = view;
}
try {
this.b.a = (RelativeLayout) view2.findViewById(d("mbridge_lv_item_rl"));
this.b.e = (TextView) view2.findViewById(d("mbridge_lv_title_tv"));
this.b.g = (TextView) view2.findViewById(d("mbridge_lv_tv_install"));
this.b.o = (MBHeatLevelLayoutView) view2.findViewById(d("mbridge_lv_sv_heat_level"));
this.b.f = (TextView) view2.findViewById(d("mbridge_lv_desc_tv"));
this.b.j = (ImageView) view2.findViewById(d("mbridge_iv_flag"));
this.b.h = (TextView) view2.findViewById(d("mbridge_order_viewed_tv"));
double d = 5.0d;
if (this.a) {
List<CampaignEx> list = this.c;
if (list != null && this.b != null && list.size() != 0) {
MBCusRoundImageView mBCusRoundImageView = this.b.l;
if (mBCusRoundImageView != null && (mBCusRoundImageView instanceof MBCusRoundImageView)) {
mBCusRoundImageView.setCustomBorder(30, 30, 30, 30, 10, -1728053248);
a(this.b.l, this.c.get(i).getImageUrl(), false);
}
ImageView imageView = this.b.k;
if (imageView != null) {
a(imageView, this.c.get(i).getImageUrl(), false);
}
MBCusRoundImageView mBCusRoundImageView2 = this.b.m;
if (mBCusRoundImageView2 != null && (mBCusRoundImageView2 instanceof MBCusRoundImageView)) {
mBCusRoundImageView2.setBorder(50, 20, -1);
a(this.b.m, this.c.get(i).getIconUrl(), true);
}
double rating = this.c.get(i).getRating();
if (rating > 0.0d) {
d = rating;
}
MBStarLevelLayoutView mBStarLevelLayoutView = this.b.n;
if (mBStarLevelLayoutView != null) {
mBStarLevelLayoutView.setRating((int) d);
this.b.n.setOrientation(0);
}
MBHeatLevelLayoutView mBHeatLevelLayoutView = this.b.o;
if (mBHeatLevelLayoutView != null) {
mBHeatLevelLayoutView.setHeatCount(this.c.get(i).getNumberRating());
}
}
} else {
List<CampaignEx> list2 = this.c;
if (list2 != null && this.b != null && list2.size() != 0) {
MBridgeImageView mBridgeImageView = this.b.c;
if (mBridgeImageView != null) {
a(mBridgeImageView, this.c.get(i).getImageUrl(), false);
}
ImageView imageView2 = this.b.k;
if (imageView2 != null) {
a(imageView2, this.c.get(i).getImageUrl(), false);
}
RoundImageView roundImageView = this.b.d;
if (roundImageView != null) {
roundImageView.setBorderRadius(25);
a(this.b.d, this.c.get(i).getIconUrl(), true);
}
double rating2 = this.c.get(i).getRating();
if (rating2 > 0.0d) {
d = rating2;
}
MBridgeLevelLayoutView mBridgeLevelLayoutView = this.b.i;
if (mBridgeLevelLayoutView != null) {
mBridgeLevelLayoutView.setRatingAndUser(d, this.c.get(i).getNumberRating());
this.b.i.setOrientation(0);
}
MBRotationView mBRotationView = this.b.b;
if (mBRotationView != null) {
mBRotationView.setWidthRatio(1.0f);
this.b.b.setHeightRatio(1.0f);
this.b.b.setAutoscroll(false);
}
MBridgeImageView mBridgeImageView2 = this.b.c;
if (mBridgeImageView2 != null) {
mBridgeImageView2.setCustomBorder(30, 30, 30, 30, 10, -1728053248);
}
}
}
C0241a c0241a = this.b;
if (c0241a != null) {
if (c0241a.e != null) {
this.b.e.setText(this.c.get(i).getAppName());
}
if (this.b.f != null) {
this.b.f.setText(this.c.get(i).getAppDesc());
}
if (this.b.g != null) {
String adCall = this.c.get(i).getAdCall();
if (this.b.g instanceof MBridgeTextView) {
((MBridgeTextView) this.b.g).setObjectAnimator(new b().c(this.b.g));
}
this.b.g.setText(adCall);
}
if (this.b.j != null) {
try {
String language = Locale.getDefault().getLanguage();
Context c = c.m().c();
if (c != null) {
if (!TextUtils.isEmpty(language) && language.equals("zh")) {
this.b.j.setImageDrawable(c.getResources().getDrawable(c.getResources().getIdentifier("mbridge_reward_flag_cn", "drawable", c.m().g())));
} else {
this.b.j.setImageDrawable(c.getResources().getDrawable(c.getResources().getIdentifier("mbridge_reward_flag_en", "drawable", c.m().g())));
}
}
} catch (Exception e2) {
af.b("OrderCampAdapter", e2.getMessage());
}
ak.a(2, this.b.j, this.c.get(i), c.m().c(), false, null);
}
if (this.b.h != null) {
try {
this.b.h.setText(c.m().c().getResources().getString(c.m().c().getResources().getIdentifier("mbridge_reward_viewed_text_str", "string", c.m().g())));
this.b.h.setVisibility(0);
} catch (Exception e3) {
af.b("OrderCampAdapter", e3.getMessage());
}
}
}
} catch (Exception e4) {
e = e4;
af.b("OrderCampAdapter", e.getMessage());
return view2;
}
return view2;
}
private View a(int i) {
View view;
String str;
String str2;
try {
List<CampaignEx> list = this.c;
str = "";
if (list == null || list.get(i) == null) {
str2 = "501";
} else {
str2 = this.c.get(i).getMof_tplid() + "";
str = this.c.get(i).getCMPTEntryUrl();
}
} catch (Exception e) {
af.b("OrderCampAdapter", e.getMessage());
view = null;
}
if (TextUtils.isEmpty(str)) {
return a();
}
int s = ab.s(c.m().c());
String a = o.a(0, str2, str);
if (TextUtils.isEmpty(a)) {
return a();
}
File file = new File(a + File.separator + "template_config.json");
if (file.isFile() && file.exists()) {
List<String> a2 = ad.a(a, "template_" + str2 + "_" + s + "_item");
if (a2 == null) {
return a();
}
int s2 = ab.s(c.m().c());
h.a().b(c.m().k());
view = DynamicViewCreator.getInstance().createDynamicView(new DyOption.Builder().campaignEx(this.c.get(i)).fileDirs(a2).dyAdType(DyAdType.REWARD).orientation(s2).adChoiceLink(ak.a(this.c.get(i))).build());
if (view != null) {
this.a = true;
C0241a c0241a = new C0241a();
this.b = c0241a;
c0241a.l = (MBCusRoundImageView) view.findViewById(c("mbridge_lv_iv"));
this.b.k = (ImageView) view.findViewById(c("mbridge_lv_iv_burl"));
this.b.m = (MBCusRoundImageView) view.findViewById(c("mbridge_lv_icon_iv"));
this.b.n = (MBStarLevelLayoutView) view.findViewById(c("mbridge_lv_sv_starlevel"));
this.b.p = (MBFrameLayout) view.findViewById(c("mbridge_lv_ration"));
view.setTag(this.b);
}
return this.a ? view : a();
}
return a();
}
private View a() {
View inflate = LayoutInflater.from(c.m().c()).inflate(a("mbridge_order_layout_item"), (ViewGroup) null);
C0241a c0241a = new C0241a();
this.b = c0241a;
c0241a.c = (MBridgeImageView) inflate.findViewById(b("mbridge_lv_iv"));
this.b.k = (ImageView) inflate.findViewById(b("mbridge_lv_iv_burl"));
this.b.d = (RoundImageView) inflate.findViewById(b("mbridge_lv_icon_iv"));
this.b.i = (MBridgeLevelLayoutView) inflate.findViewById(b("mbridge_lv_sv_starlevel"));
this.b.b = (MBRotationView) inflate.findViewById(b("mbridge_lv_ration"));
inflate.setTag(this.b);
return inflate;
}
private void a(final ImageView imageView, String str, final boolean z) {
if (imageView == null) {
return;
}
if (!TextUtils.isEmpty(str)) {
com.mbridge.msdk.foundation.same.c.b.a(imageView.getContext()).a(str, new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.video.dynview.ordercamp.a.a.1
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onSuccessLoad(Bitmap bitmap, String str2) {
try {
if (bitmap.isRecycled()) {
return;
}
imageView.setImageBitmap(bitmap);
} catch (Throwable th) {
af.b("OrderCampAdapter", th.getMessage());
}
}
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onFailedLoad(String str2, String str3) {
if (z) {
imageView.setVisibility(8);
}
}
});
} else if (z) {
imageView.setVisibility(8);
}
}
private int a(String str) {
return x.a(c.m().c().getApplicationContext(), str, TtmlNode.TAG_LAYOUT);
}
private int b(String str) {
return x.a(c.m().c().getApplicationContext(), str, "id");
}
private int c(String str) {
if (TextUtils.isEmpty(str)) {
return -1;
}
return str.hashCode();
}
private int d(String str) {
if (this.a) {
return c(str);
}
return b(str);
}
}

View File

@@ -0,0 +1,118 @@
package com.mbridge.msdk.video.dynview.widget;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import com.mbridge.msdk.foundation.tools.x;
/* loaded from: classes4.dex */
public class MBridgeLevelLayoutView extends LinearLayout {
private static int d = 18;
private double a;
private int b;
private boolean c;
public MBridgeLevelLayoutView(Context context) {
super(context);
}
public MBridgeLevelLayoutView(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
}
public MBridgeLevelLayoutView(Context context, @Nullable AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
public void setRatingAndUser(double d2, int i) {
this.a = d2;
if (i == 0) {
i = (int) (((Math.random() * 9.0d) + 1.0d) * 10000.0d);
}
this.b = i;
this.c = true;
a();
}
public void setRating(int i) {
this.a = i;
a();
}
private void a() {
LinearLayout linearLayout;
LinearLayout linearLayout2;
if (this.c) {
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-2, dip2px(getContext(), d));
linearLayout = new LinearLayout(getContext());
linearLayout.setOrientation(0);
linearLayout.setLayoutParams(layoutParams);
linearLayout2 = new LinearLayout(getContext());
linearLayout2.setOrientation(0);
linearLayout2.setLayoutParams(layoutParams);
} else {
linearLayout = null;
linearLayout2 = null;
}
removeAllViews();
if (linearLayout2 != null) {
LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-2, dip2px(getContext(), d));
TextView textView = new TextView(getContext());
textView.setTypeface(Typeface.defaultFromStyle(1));
textView.setText("(");
textView.setTextColor(Color.parseColor("#5f5f5f"));
TextView textView2 = new TextView(getContext());
textView2.setTypeface(Typeface.defaultFromStyle(1));
textView2.setGravity(17);
textView2.setTextColor(Color.parseColor("#5f5f5f"));
Drawable drawable = getResources().getDrawable(x.a(getContext(), "mbridge_reward_user", "drawable"));
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
textView2.setCompoundDrawables(drawable, null, null, null);
textView2.setText(this.b + " )");
textView2.setEllipsize(TextUtils.TruncateAt.END);
textView2.setLines(1);
linearLayout2.addView(textView, layoutParams2);
linearLayout2.addView(textView2, layoutParams2);
}
double d2 = this.a;
if (d2 == 0.0d) {
d2 = 5.0d;
}
for (int i = 0; i < 5; i++) {
ImageView imageView = new ImageView(getContext());
LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(dip2px(getContext(), 15.0f), dip2px(getContext(), d));
if (i < d2) {
imageView.setImageResource(x.a(getContext(), "mbridge_download_message_dialog_star_sel", "drawable"));
} else {
imageView.setImageResource(x.a(getContext(), "mbridge_download_message_dilaog_star_nor", "drawable"));
}
layoutParams3.weight = 1.0f;
layoutParams3.setMargins(dip2px(getContext(), 2.0f), 0, 0, 0);
if (linearLayout != null) {
linearLayout.addView(imageView, layoutParams3);
} else {
addView(imageView, layoutParams3);
}
}
if (linearLayout != null) {
addView(linearLayout);
addView(linearLayout2);
}
}
public static int dip2px(Context context, float f) {
Resources resources;
if (context == null || (resources = context.getResources()) == null) {
return 0;
}
return (int) ((f * resources.getDisplayMetrics().density) + 0.5f);
}
}

View File

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

View File

@@ -0,0 +1,85 @@
package com.mbridge.msdk.video.dynview.widget;
import android.animation.AnimatorSet;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;
import androidx.annotation.NonNull;
import com.mbridge.msdk.video.dynview.moffer.b;
import com.mbridge.msdk.video.dynview.moffer.d;
/* loaded from: classes4.dex */
public class MBridgeRelativeLayout extends RelativeLayout {
private d a;
private boolean b;
private AnimatorSet c;
private boolean d;
private b e;
public void setAnimatorSet(AnimatorSet animatorSet) {
this.c = animatorSet;
}
public void setMoreOfferCacheReportCallBack(b bVar) {
this.e = bVar;
}
public void setMoreOfferShowFailedCallBack(d dVar) {
this.a = dVar;
}
public MBridgeRelativeLayout(Context context) {
super(context);
}
public MBridgeRelativeLayout(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public MBridgeRelativeLayout(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
AnimatorSet animatorSet = this.c;
if (animatorSet != null) {
try {
animatorSet.start();
} catch (Exception e) {
e.printStackTrace();
}
}
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
d dVar;
super.onDetachedFromWindow();
if (!this.b && (dVar = this.a) != null) {
this.b = true;
dVar.a();
}
AnimatorSet animatorSet = this.c;
if (animatorSet != null) {
try {
animatorSet.cancel();
} catch (Exception e) {
e.printStackTrace();
}
}
}
@Override // android.view.View
public void onVisibilityChanged(@NonNull View view, int i) {
b bVar;
super.onVisibilityChanged(view, i);
if (!(view instanceof MBridgeRelativeLayout) || i != 0 || (bVar = this.e) == null || this.d) {
return;
}
this.d = true;
bVar.a();
}
}

View File

@@ -0,0 +1,39 @@
package com.mbridge.msdk.video.dynview.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.HorizontalScrollView;
/* loaded from: classes4.dex */
public class ObservableScrollView extends HorizontalScrollView {
private a a;
public ObservableScrollView(Context context) {
super(context);
this.a = null;
}
public ObservableScrollView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.a = null;
}
public ObservableScrollView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.a = null;
}
@Override // android.widget.HorizontalScrollView
public void fling(int i) {
super.fling(i / 4);
}
@Override // android.view.View
public void onScrollChanged(int i, int i2, int i3, int i4) {
super.onScrollChanged(i, i2, i3, i4);
a aVar = this.a;
if (aVar != null) {
aVar.a(this, i, i2, i3, i4);
}
}
}

View File

@@ -0,0 +1,6 @@
package com.mbridge.msdk.video.dynview.widget;
/* loaded from: classes4.dex */
public interface a {
void a(ObservableScrollView observableScrollView, int i, int i2, int i3, int i4);
}

View File

@@ -0,0 +1,124 @@
package com.mbridge.msdk.video.module;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.webkit.WebView;
import android.widget.RelativeLayout;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.same.g.a;
import com.mbridge.msdk.foundation.same.report.i;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.videocommon.d.b;
import com.mbridge.msdk.videocommon.download.d;
import com.mbridge.msdk.videocommon.download.e;
/* loaded from: classes4.dex */
public class MBridgeAlertWebview extends MBridgeH5EndCardView {
private String w;
public MBridgeAlertWebview(Context context) {
super(context);
}
public MBridgeAlertWebview(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public final String a() {
if (TextUtils.isEmpty(this.unitId)) {
return "";
}
b.a().a(c.m().k(), this.unitId, false);
String str = com.mbridge.msdk.videocommon.d.c.a;
this.w = str;
return !TextUtils.isEmpty(str) ? d.a().a(this.w) : "";
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public void preLoadData(com.mbridge.msdk.video.signal.factory.b bVar) {
String a = a();
if (this.e && this.b != null && !TextUtils.isEmpty(a)) {
a aVar = new a(this.b);
aVar.a(this.b.getAppName());
this.p.setDownloadListener(aVar);
this.p.setCampaignId(this.b.getId());
setCloseVisible(8);
this.p.setApiManagerJSFactory(bVar);
this.p.setWebViewListener(new com.mbridge.msdk.mbsignalcommon.b.b() { // from class: com.mbridge.msdk.video.module.MBridgeAlertWebview.1
@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);
af.b("MBridgeAlertWebview", "finish+" + str);
g.a().a(webView);
}
@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);
af.b("MBridgeAlertWebview", "onReceivedError");
if (MBridgeAlertWebview.this.t) {
return;
}
af.a(MBridgeBaseView.TAG, "onReceivedError,url:" + str2);
MBridgeAlertWebview mBridgeAlertWebview = MBridgeAlertWebview.this;
i.a(mBridgeAlertWebview.a, mBridgeAlertWebview.b, mBridgeAlertWebview.w, MBridgeAlertWebview.this.unitId, 2, str, 1);
MBridgeAlertWebview.this.t = true;
}
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, int i) {
String str;
super.a(webView, i);
af.b("MBridgeAlertWebview", "readyState : " + i);
MBridgeAlertWebview mBridgeAlertWebview = MBridgeAlertWebview.this;
if (mBridgeAlertWebview.t) {
return;
}
boolean z = i == 1;
mBridgeAlertWebview.s = z;
if (z) {
str = "readyState state is " + i;
} else {
str = "";
}
String str2 = str;
MBridgeAlertWebview mBridgeAlertWebview2 = MBridgeAlertWebview.this;
i.a(mBridgeAlertWebview2.a, mBridgeAlertWebview2.b, mBridgeAlertWebview2.w, MBridgeAlertWebview.this.unitId, i, str2, 1);
}
});
setHtmlSource(e.a().b(a));
this.s = false;
if (TextUtils.isEmpty(this.r)) {
af.a(MBridgeBaseView.TAG, "load url:" + a);
this.p.loadUrl(a);
} else {
af.a(MBridgeBaseView.TAG, "load html...");
this.p.loadDataWithBaseURL(a, this.r, "text/html", "UTF-8", null);
}
this.p.setBackgroundColor(0);
setBackgroundColor(0);
return;
}
this.notifyListener.a(101, "");
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public void webviewshow() {
RelativeLayout relativeLayout = this.n;
if (relativeLayout != null) {
relativeLayout.setBackgroundColor(0);
}
super.webviewshow();
i.a(this.a, this.b, this.w, this.unitId, 2, 1);
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public final RelativeLayout.LayoutParams b() {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
layoutParams.addRule(13, -1);
return layoutParams;
}
}

View File

@@ -0,0 +1,290 @@
package com.mbridge.msdk.video.module;
import android.content.Context;
import android.content.res.Configuration;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
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 com.mbridge.msdk.foundation.tools.x;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.mbridge.msdk.video.module.a.a;
import com.mbridge.msdk.video.module.a.a.f;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public abstract class MBridgeBaseView extends RelativeLayout {
public static final String TAG = "MBridgeBaseView";
protected Context a;
protected CampaignEx b;
protected LayoutInflater c;
protected int d;
protected boolean e;
protected float f;
protected float g;
protected boolean h;
protected int i;
protected boolean j;
protected int k;
protected int l;
public a notifyListener;
public void c() {
}
public CampaignEx getCampaign() {
return this.b;
}
public abstract void init(Context context);
public void setCampaign(CampaignEx campaignEx) {
this.b = campaignEx;
}
public void setNotifyListener(a aVar) {
this.notifyListener = aVar;
}
public MBridgeBaseView(Context context) {
this(context, null);
}
public MBridgeBaseView(Context context, AttributeSet attributeSet, boolean z, int i, boolean z2, int i2, int i3) {
super(context, attributeSet);
this.d = 1;
this.notifyListener = new f();
this.e = false;
this.k = 1;
this.l = 0;
this.a = context;
this.c = LayoutInflater.from(context);
this.h = z;
this.i = i;
this.j = z2;
this.k = i2;
this.l = i3;
init(context);
}
public MBridgeBaseView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.d = 1;
this.notifyListener = new f();
this.e = false;
this.k = 1;
this.l = 0;
this.a = context;
this.c = LayoutInflater.from(context);
init(context);
}
@Override // android.view.View
public void onConfigurationChanged(Configuration configuration) {
this.d = configuration.orientation;
super.onConfigurationChanged(configuration);
StringBuilder sb = new StringBuilder();
sb.append("onConfigurationChanged:");
sb.append(configuration.orientation);
}
public void onSelfConfigurationChanged(Configuration configuration) {
this.d = configuration.orientation;
StringBuilder sb = new StringBuilder();
sb.append("onSelfConfigurationChanged:");
sb.append(configuration.orientation);
}
public int findID(String str) {
return x.a(this.a.getApplicationContext(), str, "id");
}
public int findDyID(String str) {
if (TextUtils.isEmpty(str)) {
return -1;
}
return str.hashCode();
}
public int filterFindViewId(boolean z, String str) {
if (z) {
return findDyID(str);
}
return findID(str);
}
public int findLayout(String str) {
return x.a(this.a.getApplicationContext(), str, TtmlNode.TAG_LAYOUT);
}
public int findColor(String str) {
return x.a(this.a.getApplicationContext(), str, "color");
}
public int findDrawable(String str) {
return x.a(this.a.getApplicationContext(), str, "drawable");
}
public boolean isNotNULL(View... viewArr) {
if (viewArr == null) {
return false;
}
int length = viewArr.length;
int i = 0;
boolean z = false;
while (i < length) {
if (viewArr[i] == null) {
return false;
}
i++;
z = true;
}
return z;
}
public void setMatchParent() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams == null) {
setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
} else {
layoutParams.height = -1;
layoutParams.width = -1;
}
}
public void setWrapContent() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams == null) {
setLayoutParams(new ViewGroup.LayoutParams(-2, -2));
} else {
layoutParams.height = -2;
layoutParams.width = -2;
}
}
public void defaultShow() {
af.a(TAG, "defaultShow");
}
public boolean isLandscape() {
return this.a.getResources().getConfiguration().orientation == 2;
}
public void setLayoutCenter(int i, int i2) {
RelativeLayout.LayoutParams parentRelativeLayoutParams = getParentRelativeLayoutParams();
LinearLayout.LayoutParams parentLinearLayoutParams = getParentLinearLayoutParams();
if (parentRelativeLayoutParams != null) {
parentRelativeLayoutParams.addRule(13);
if (i != -999) {
parentRelativeLayoutParams.width = i;
}
if (i2 != -999) {
parentRelativeLayoutParams.height = i2;
}
setLayoutParams(parentRelativeLayoutParams);
return;
}
if (parentLinearLayoutParams != null) {
parentLinearLayoutParams.gravity = 17;
if (i != -999) {
parentLinearLayoutParams.width = i;
}
if (i2 != -999) {
parentLinearLayoutParams.height = i2;
}
setLayoutParams(parentLinearLayoutParams);
}
}
public void setLayoutParam(int i, int i2, int i3, int i4) {
RelativeLayout.LayoutParams parentRelativeLayoutParams = getParentRelativeLayoutParams();
LinearLayout.LayoutParams parentLinearLayoutParams = getParentLinearLayoutParams();
if (parentRelativeLayoutParams != null) {
parentRelativeLayoutParams.topMargin = i2;
parentRelativeLayoutParams.leftMargin = i;
if (i3 != -999) {
parentRelativeLayoutParams.width = i3;
}
if (i4 != -999) {
parentRelativeLayoutParams.height = i4;
}
setLayoutParams(parentRelativeLayoutParams);
return;
}
if (parentLinearLayoutParams != null) {
parentLinearLayoutParams.topMargin = i2;
parentLinearLayoutParams.leftMargin = i;
if (i3 != -999) {
parentLinearLayoutParams.width = i3;
}
if (i4 != -999) {
parentLinearLayoutParams.height = i4;
}
setLayoutParams(parentLinearLayoutParams);
}
}
public RelativeLayout.LayoutParams getParentRelativeLayoutParams() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof RelativeLayout.LayoutParams) {
return (RelativeLayout.LayoutParams) layoutParams;
}
return null;
}
public LinearLayout.LayoutParams getParentLinearLayoutParams() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof LinearLayout.LayoutParams) {
return (LinearLayout.LayoutParams) layoutParams;
}
return null;
}
@Override // android.view.ViewGroup
public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
this.f = motionEvent.getRawX();
this.g = motionEvent.getRawY();
return super.onInterceptTouchEvent(motionEvent);
}
public final String d() {
return a(0).toString();
}
public final JSONObject a(int i) {
JSONObject jSONObject;
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject = new JSONObject();
} catch (JSONException e) {
e = e;
}
try {
jSONObject.put(com.mbridge.msdk.foundation.same.a.h, ak.b(c.m().c(), this.f));
jSONObject.put(com.mbridge.msdk.foundation.same.a.i, ak.b(c.m().c(), this.g));
jSONObject.put(com.mbridge.msdk.foundation.same.a.m, i);
try {
this.d = getContext().getResources().getConfiguration().orientation;
} catch (Exception e2) {
e2.printStackTrace();
}
jSONObject.put(com.mbridge.msdk.foundation.same.a.k, this.d);
jSONObject.put(com.mbridge.msdk.foundation.same.a.l, ak.d(getContext()));
return jSONObject;
} catch (JSONException e3) {
e = e3;
jSONObject2 = jSONObject;
e.printStackTrace();
return jSONObject2;
}
}
}

View File

@@ -0,0 +1,257 @@
package com.mbridge.msdk.video.module;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.Configuration;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
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.video.dynview.e.h;
import com.mbridge.msdk.video.dynview.j.c;
import com.mbridge.msdk.video.module.a.a.e;
import com.mbridge.msdk.video.signal.factory.b;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeClickCTAView extends MBridgeClickCTAViewDiff {
public a ctaClickCallBack;
private ViewGroup m;
private ImageView n;
private TextView o;
private TextView p;
private String q;
private float r;
private float s;
private int t;
private ObjectAnimator u;
public interface a {
void ctaClick();
}
@Override // com.mbridge.msdk.video.module.MBridgeClickCTAViewDiff, com.mbridge.msdk.video.module.MBridgeBaseView
public void init(Context context) {
}
public void setCtaClickCallBack(a aVar) {
this.ctaClickCallBack = aVar;
}
public void setObjectAnimator(ObjectAnimator objectAnimator) {
this.u = objectAnimator;
}
public void setUnitId(String str) {
this.q = str;
}
public MBridgeClickCTAView(Context context) {
super(context);
}
public MBridgeClickCTAView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
public final void c() {
super.c();
if (this.e) {
CampaignEx campaignEx = this.b;
if (campaignEx != null && campaignEx.isDynamicView()) {
setOnClickListener(new com.mbridge.msdk.widget.a() { // from class: com.mbridge.msdk.video.module.MBridgeClickCTAView.2
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
MBridgeClickCTAView mBridgeClickCTAView = MBridgeClickCTAView.this;
a aVar = mBridgeClickCTAView.ctaClickCallBack;
if (aVar != null) {
aVar.ctaClick();
} else {
MBridgeClickCTAView.b(mBridgeClickCTAView);
}
}
});
}
this.ctaTv.setOnClickListener(new com.mbridge.msdk.widget.a() { // from class: com.mbridge.msdk.video.module.MBridgeClickCTAView.3
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
MBridgeClickCTAView mBridgeClickCTAView = MBridgeClickCTAView.this;
a aVar = mBridgeClickCTAView.ctaClickCallBack;
if (aVar != null) {
aVar.ctaClick();
} else {
MBridgeClickCTAView.b(mBridgeClickCTAView);
}
}
});
ImageView imageView = this.n;
if (imageView != null) {
imageView.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.module.MBridgeClickCTAView.4
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
}
});
}
}
}
@Override // com.mbridge.msdk.video.module.MBridgeClickCTAViewDiff
public void preLoadData(b bVar) {
CampaignEx campaignEx = this.b;
if (campaignEx != null) {
if (campaignEx.isDynamicView()) {
com.mbridge.msdk.video.dynview.b.a().a(new c().b(this, this.b), new h() { // from class: com.mbridge.msdk.video.module.MBridgeClickCTAView.1
@Override // com.mbridge.msdk.video.dynview.e.h
public final void viewInflaterSuccess(com.mbridge.msdk.video.dynview.a aVar) {
if (aVar != null) {
this.addView(aVar.a());
MBridgeClickCTAView mBridgeClickCTAView = MBridgeClickCTAView.this;
mBridgeClickCTAView.e = mBridgeClickCTAView.b();
MBridgeClickCTAView mBridgeClickCTAView2 = MBridgeClickCTAView.this;
mBridgeClickCTAView2.p = (TextView) mBridgeClickCTAView2.findViewById(mBridgeClickCTAView2.findID("mbridge_tv_desc"));
MBridgeClickCTAView.this.c();
}
}
@Override // com.mbridge.msdk.video.dynview.e.h
public final void viewInflaterFail(com.mbridge.msdk.video.dynview.c.a aVar) {
af.b(MBridgeBaseView.TAG, "errorMsg:" + aVar.b());
}
});
} else {
int findLayout = findLayout("mbridge_reward_clickable_cta");
if (findLayout >= 0) {
this.c.inflate(findLayout, this);
this.e = b();
c();
setWrapContent();
}
}
if (this.e) {
if (com.mbridge.msdk.e.b.a()) {
setChinaCTAData();
}
this.ctaTv.setText(this.b.getAdCall());
if (!TextUtils.isEmpty(this.b.getIconUrl())) {
com.mbridge.msdk.foundation.same.c.b.a(this.a.getApplicationContext()).a(this.b.getIconUrl(), new e(this.n, this.b, this.q) { // from class: com.mbridge.msdk.video.module.MBridgeClickCTAView.5
@Override // com.mbridge.msdk.video.module.a.a.e, com.mbridge.msdk.foundation.same.c.c
public final void onFailedLoad(String str, String str2) {
super.onFailedLoad(str, str2);
MBridgeClickCTAView.this.a();
}
});
} else {
a();
}
if (this.o != null && !TextUtils.isEmpty(this.b.getAppName())) {
this.o.setText(this.b.getAppName());
}
if (this.p == null || TextUtils.isEmpty(this.b.getAppDesc())) {
return;
}
this.p.setText(this.b.getAppDesc());
}
}
}
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
public void onSelfConfigurationChanged(Configuration configuration) {
super.onSelfConfigurationChanged(configuration);
this.t = configuration.orientation;
}
/* JADX INFO: Access modifiers changed from: private */
public void a() {
ImageView imageView = this.n;
if (imageView != null) {
imageView.setVisibility(8);
}
}
/* JADX INFO: Access modifiers changed from: private */
public boolean b() {
this.m = (ViewGroup) findViewById(findID("mbridge_viewgroup_ctaroot"));
this.n = (ImageView) findViewById(findID("mbridge_iv_appicon"));
this.o = (TextView) findViewById(findID("mbridge_tv_title"));
TextView textView = (TextView) findViewById(findID("mbridge_tv_install"));
this.ctaTv = textView;
return isNotNULL(this.m, this.n, this.o, textView);
}
@Override // com.mbridge.msdk.video.module.MBridgeBaseView, android.view.ViewGroup
public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
this.r = motionEvent.getRawX();
this.s = motionEvent.getRawY();
return super.onInterceptTouchEvent(motionEvent);
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
ObjectAnimator objectAnimator = this.u;
if (objectAnimator != null) {
try {
objectAnimator.start();
} catch (Exception e) {
e.printStackTrace();
}
}
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
ObjectAnimator objectAnimator = this.u;
if (objectAnimator != null) {
try {
objectAnimator.cancel();
} catch (Exception e) {
e.printStackTrace();
}
}
}
public static /* synthetic */ void b(MBridgeClickCTAView mBridgeClickCTAView) {
JSONObject jSONObject;
JSONException e;
CampaignEx campaignEx = mBridgeClickCTAView.b;
if (campaignEx != null && campaignEx.isDynamicView()) {
try {
CampaignEx.c rewardTemplateMode = mBridgeClickCTAView.b.getRewardTemplateMode();
String str = "";
if (rewardTemplateMode != null) {
str = rewardTemplateMode.f() + "";
}
i.a(com.mbridge.msdk.foundation.controller.c.m().c(), "cta_click", mBridgeClickCTAView.b.getCampaignUnitId(), mBridgeClickCTAView.b.isBidCampaign(), mBridgeClickCTAView.b.getRequestId(), mBridgeClickCTAView.b.getRequestIdNotice(), mBridgeClickCTAView.b.getId(), str);
} catch (Exception e2) {
e2.printStackTrace();
}
}
try {
jSONObject = new JSONObject();
try {
jSONObject.put(com.mbridge.msdk.foundation.same.a.j, mBridgeClickCTAView.a(0));
} catch (JSONException e3) {
e = e3;
e.printStackTrace();
mBridgeClickCTAView.b.setTriggerClickSource(1);
mBridgeClickCTAView.b.setClickTempSource(1);
mBridgeClickCTAView.notifyListener.a(105, jSONObject);
}
} catch (JSONException e4) {
jSONObject = null;
e = e4;
}
mBridgeClickCTAView.b.setTriggerClickSource(1);
mBridgeClickCTAView.b.setClickTempSource(1);
mBridgeClickCTAView.notifyListener.a(105, jSONObject);
}
}

View File

@@ -0,0 +1,33 @@
package com.mbridge.msdk.video.module;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;
import com.mbridge.msdk.video.signal.factory.b;
/* loaded from: classes4.dex */
public class MBridgeClickCTAViewDiff extends MBridgeBaseView {
public TextView ctaTv;
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
public void init(Context context) {
}
public void preLoadData(b bVar) {
}
public void setChinaCTAData() {
}
public MBridgeClickCTAViewDiff(Context context) {
super(context);
}
public MBridgeClickCTAViewDiff(Context context, AttributeSet attributeSet, boolean z, int i, boolean z2, int i2, int i3) {
super(context, attributeSet, z, i, z2, i2, i3);
}
public MBridgeClickCTAViewDiff(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
}

View File

@@ -0,0 +1,167 @@
package com.mbridge.msdk.video.module;
import android.R;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.drawable.GradientDrawable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.RelativeLayout;
import androidx.annotation.RequiresApi;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.download.download.H5DownLoadManager;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.report.d.d;
import com.mbridge.msdk.foundation.same.report.d.e;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.video.signal.factory.b;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeClickMiniCardView extends MBridgeH5EndCardView {
private boolean w;
public MBridgeClickMiniCardView(Context context) {
super(context);
this.w = false;
}
public MBridgeClickMiniCardView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.w = false;
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView, com.mbridge.msdk.video.module.MBridgeBaseView
@RequiresApi(api = 11)
public void onSelfConfigurationChanged(Configuration configuration) {
if (this.e) {
a(this.m);
}
super.onSelfConfigurationChanged(configuration);
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public final RelativeLayout.LayoutParams b() {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);
layoutParams.addRule(13, -1);
return layoutParams;
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
@RequiresApi(api = 11)
public final void e() {
super.e();
if (this.e) {
setBackgroundResource(findColor("mbridge_reward_minicard_bg"));
a(this.m);
setClickable(true);
}
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public final String a() {
CampaignEx campaignEx = this.b;
if (campaignEx == null) {
return null;
}
CampaignEx.c rewardTemplateMode = campaignEx.getRewardTemplateMode();
String c = rewardTemplateMode != null ? rewardTemplateMode.c() : null;
if (TextUtils.isEmpty(c) || !c.contains(".zip")) {
return c;
}
String h5ResAddress = H5DownLoadManager.getInstance().getH5ResAddress(c);
return !TextUtils.isEmpty(h5ResAddress) ? h5ResAddress : c;
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public void preLoadData(b bVar) {
super.preLoadData(bVar);
setCloseVisible(0);
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public void webviewshow() {
WindVaneWebView windVaneWebView = this.p;
if (windVaneWebView != null) {
windVaneWebView.post(new Runnable() { // from class: com.mbridge.msdk.video.module.MBridgeClickMiniCardView.1
@Override // java.lang.Runnable
public final void run() {
try {
af.a(MBridgeBaseView.TAG, "webviewshow");
String str = "";
try {
int[] iArr = new int[2];
MBridgeClickMiniCardView.this.p.getLocationOnScreen(iArr);
af.b(MBridgeBaseView.TAG, "coordinate:" + iArr[0] + "--" + iArr[1]);
JSONObject jSONObject = new JSONObject();
jSONObject.put("startX", ak.b(c.m().c(), (float) iArr[0]));
jSONObject.put("startY", ak.b(c.m().c(), (float) iArr[1]));
str = jSONObject.toString();
} catch (Throwable th) {
af.b(MBridgeBaseView.TAG, th.getMessage(), th);
}
g.a().a((WebView) MBridgeClickMiniCardView.this.p, "webviewshow", Base64.encodeToString(str.toString().getBytes(), 2));
} catch (Exception e) {
e.printStackTrace();
}
}
});
e eVar = new e();
eVar.a("type", 3);
d.a().a("2000133", this.b, eVar);
}
}
@RequiresApi(api = 11)
private void a(View view) {
int f = ak.f(this.a);
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
layoutParams.width = (int) ((f * 0.7f) + 0.5f);
layoutParams.height = (int) ((ak.e(this.a) * 0.7f) + 0.5f);
view.setLayoutParams(layoutParams);
}
public void setMBridgeClickMiniCardViewTransparent() {
setBackgroundColor(0);
}
public void setMBridgeClickMiniCardViewClickable(boolean z) {
setClickable(z);
}
public void setMiniCardLocation(int i, int i2, int i3, int i4) {
this.w = true;
resizeMiniCard(i3, i4);
}
public void resizeMiniCard(int i, int i2) {
View findViewById = ((Activity) this.a).getWindow().findViewById(R.id.content);
int width = findViewById.getWidth();
int height = findViewById.getHeight();
if (i <= 0 || i2 <= 0 || i > width || i2 > height) {
return;
}
ViewGroup.LayoutParams layoutParams = this.m.getLayoutParams();
layoutParams.width = i;
layoutParams.height = i2;
this.m.setLayoutParams(layoutParams);
}
public void setRadius(int i) {
if (i > 0) {
GradientDrawable gradientDrawable = new GradientDrawable();
gradientDrawable.setCornerRadius(ak.a(getContext(), i));
gradientDrawable.setColor(-1);
this.p.setBackground(gradientDrawable);
this.p.setClipToOutline(true);
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,48 @@
package com.mbridge.msdk.video.module;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import com.mbridge.msdk.click.a;
import com.mbridge.msdk.click.i;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.mraid.b;
import com.mbridge.msdk.video.signal.h;
/* loaded from: classes4.dex */
public abstract class MBridgeH5EndCardViewDiff extends MBridgeBaseView implements i, b, h {
public String unitId;
public MBridgeH5EndCardViewDiff(Context context) {
super(context);
}
public MBridgeH5EndCardViewDiff(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public void open(String str) {
try {
String clickURL = this.b.getClickURL();
if (!TextUtils.isEmpty(str)) {
this.b.setClickURL(str);
reportOpen(str);
}
a aVar = new a(getContext(), this.unitId);
aVar.a(this);
aVar.a(this.b);
this.b.setClickURL(clickURL);
this.notifyListener.a(126, "");
} catch (Exception e) {
af.b(MBridgeBaseView.TAG, e.getMessage());
}
}
public void reportOpen(String str) {
CampaignEx mraidCampaign = getMraidCampaign();
if (mraidCampaign != null) {
new com.mbridge.msdk.foundation.same.report.h(getContext()).a(mraidCampaign.getRequestId(), mraidCampaign.getRequestIdNotice(), mraidCampaign.getId(), this.unitId, str, this.b.isBidCampaign());
}
}
}

View File

@@ -0,0 +1,73 @@
package com.mbridge.msdk.video.module;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.webkit.URLUtil;
import android.webkit.WebView;
import com.mbridge.msdk.click.c;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.aj;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.out.BaseTrackingListener;
import com.mbridge.msdk.video.signal.factory.b;
/* loaded from: classes4.dex */
public class MBridgeLandingPageView extends MBridgeH5EndCardView {
public MBridgeLandingPageView(Context context) {
super(context);
}
public MBridgeLandingPageView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView, com.mbridge.msdk.video.module.MBridgeBaseView
public void init(Context context) {
super.init(context);
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public final String a() {
CampaignEx campaignEx = this.b;
if (campaignEx != null) {
return c.a(campaignEx.getClickURL(), "-999", "-999");
}
return null;
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public void preLoadData(b bVar) {
if (this.e) {
this.p.setFilter(new a());
}
super.preLoadData(bVar);
setVisibility(0);
setCloseVisible(0);
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public void webviewshow() {
try {
af.a(MBridgeBaseView.TAG, "webviewshow");
g.a().a((WebView) this.p, "webviewshow", "");
} catch (Exception e) {
e.printStackTrace();
}
}
public static final class a implements com.mbridge.msdk.mbsignalcommon.base.a {
private a() {
}
@Override // com.mbridge.msdk.mbsignalcommon.base.a
public final boolean a(String str) {
if (TextUtils.isEmpty(str) || URLUtil.isNetworkUrl(str)) {
return false;
}
aj.a(com.mbridge.msdk.foundation.controller.c.m().c(), str, (BaseTrackingListener) null);
return true;
}
}
}

View File

@@ -0,0 +1,967 @@
package com.mbridge.msdk.video.module;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.drawable.GradientDrawable;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.core.internal.view.SupportMenu;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.dycreator.baseview.MBHeatLevelLayoutView;
import com.mbridge.msdk.dycreator.baseview.MBStarLevelLayoutView;
import com.mbridge.msdk.dycreator.baseview.cusview.MBridgeBaitClickView;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.entity.CampaignUnit;
import com.mbridge.msdk.foundation.same.report.d.d;
import com.mbridge.msdk.foundation.same.report.d.e;
import com.mbridge.msdk.foundation.same.report.i;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.foundation.tools.aq;
import com.mbridge.msdk.shake.MBShakeView;
import com.mbridge.msdk.shake.a;
import com.mbridge.msdk.video.dynview.e.h;
import com.mbridge.msdk.video.dynview.widget.MBridgeLevelLayoutView;
import com.mbridge.msdk.video.module.a.a.j;
import com.mbridge.msdk.video.signal.factory.b;
import com.mbridge.msdk.videocommon.view.RoundImageView;
import com.mbridge.msdk.videocommon.view.StarLevelView;
import com.mbridge.msdk.widget.FeedBackButton;
import java.util.Iterator;
import java.util.Locale;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeNativeEndCardView extends MBridgeNativeEndCardViewDiff {
private LinearLayout A;
private Runnable B;
private Runnable C;
private RelativeLayout D;
private b E;
private boolean F;
private boolean G;
private boolean H;
private boolean I;
private int J;
private AlphaAnimation K;
private int L;
private int M;
private int N;
private int O;
private Bitmap P;
private View Q;
private FeedBackButton R;
private String S;
private CampaignUnit T;
private MBShakeView U;
private com.mbridge.msdk.shake.b V;
private MBridgeBaitClickView W;
private boolean aa;
private int ab;
private String ac;
private ViewGroup m;
private ViewGroup n;
private RelativeLayout o;
private ImageView p;
private ImageView q;
private ImageView r;
private ImageView s;
private TextView t;
private ImageView u;
private ImageView v;
private TextView w;
private TextView x;
private TextView y;
private LinearLayout z;
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
public void init(Context context) {
}
public boolean isDyXmlSuccess() {
return this.aa;
}
public void setCloseBtnDelay(int i) {
this.J = i;
}
public void setOnPause() {
this.H = false;
}
public void setOnResume() {
this.H = true;
}
public void setUnitId(String str) {
this.S = str;
}
public MBridgeNativeEndCardView(Context context) {
super(context);
this.F = false;
this.G = false;
this.H = false;
this.I = false;
this.J = 0;
this.aa = false;
this.ab = 1;
}
public MBridgeNativeEndCardView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.F = false;
this.G = false;
this.H = false;
this.I = false;
this.J = 0;
this.aa = false;
this.ab = 1;
}
public MBridgeNativeEndCardView(Context context, AttributeSet attributeSet, boolean z, int i, boolean z2, int i2, int i3) {
super(context, attributeSet, z, i, z2, i2, i3);
this.F = false;
this.G = false;
this.H = false;
this.I = false;
this.J = 0;
this.aa = false;
this.ab = 1;
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
int parseInt;
int parseInt2;
int i;
MBridgeBaitClickView mBridgeBaitClickView;
super.onAttachedToWindow();
if (this.B == null) {
this.B = new Runnable() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.1
@Override // java.lang.Runnable
public final void run() {
MBridgeNativeEndCardView.this.G = true;
if (MBridgeNativeEndCardView.this.Q != null) {
MBridgeNativeEndCardView.this.Q.setVisibility(0);
}
}
};
}
Runnable runnable = this.B;
if (runnable != null) {
postDelayed(runnable, this.J * 1000);
if (!this.H) {
this.H = true;
}
try {
CampaignEx campaignEx = this.b;
if (campaignEx != null && campaignEx.isDynamicView()) {
String str = this.b.getendcard_url();
if (TextUtils.isEmpty(str)) {
str = this.b.getEndScreenUrl();
}
String a = aq.a(str, "alac");
if (!TextUtils.isEmpty(a) && a.equals("1") && this.b.getAutoShowStoreMiniCard() != 1) {
postDelayed(new Runnable() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.8
@Override // java.lang.Runnable
public final void run() {
MBridgeNativeEndCardView.this.b.setTriggerClickSource(2);
MBridgeNativeEndCardView.this.b.setClickType(1);
MBridgeNativeEndCardView.a(MBridgeNativeEndCardView.this, 2);
}
}, 1000L);
}
}
} catch (Throwable th) {
af.b(MBridgeBaseView.TAG, th.getMessage());
}
}
try {
CampaignEx campaignEx2 = this.b;
if (campaignEx2 != null && campaignEx2.isDynamicView()) {
String str2 = this.b.getendcard_url();
if (TextUtils.isEmpty(str2)) {
str2 = this.b.getEndScreenUrl();
}
String a2 = aq.a(str2, "bait_click");
try {
i = Integer.parseInt(a2);
} catch (Throwable th2) {
af.b(MBridgeBaseView.TAG, th2.getMessage());
i = 1;
}
if (!TextUtils.isEmpty(a2) && i != 0 && (mBridgeBaitClickView = this.W) != null) {
mBridgeBaitClickView.setVisibility(0);
this.W.init(1342177280, i);
if (this.b.getEcTemplateId() == 1302) {
GradientDrawable gradientDrawable = new GradientDrawable();
gradientDrawable.setShape(0);
gradientDrawable.setColor(1342177280);
gradientDrawable.setStroke(0, SupportMenu.CATEGORY_MASK);
gradientDrawable.setCornerRadius(25.0f);
this.W.setBackground(gradientDrawable);
}
this.W.startAnimation();
this.W.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.7
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
MBridgeNativeEndCardView.this.b.setTriggerClickSource(2);
MBridgeNativeEndCardView.a(MBridgeNativeEndCardView.this, 0);
}
});
}
}
} catch (Throwable th3) {
af.b(MBridgeBaseView.TAG, th3.getMessage());
}
try {
CampaignEx campaignEx3 = this.b;
if (campaignEx3 != null && campaignEx3.isDynamicView()) {
String str3 = this.b.getendcard_url();
if (TextUtils.isEmpty(str3)) {
str3 = this.b.getEndScreenUrl();
}
String a3 = aq.a(str3, "shake_show");
String a4 = aq.a(str3, "shake_strength");
String a5 = aq.a(str3, "shake_time");
if (!TextUtils.isEmpty(a3) && a3.equals("1") && this.U == null) {
MBridgeBaitClickView mBridgeBaitClickView2 = this.W;
if (mBridgeBaitClickView2 != null) {
mBridgeBaitClickView2.setVisibility(8);
}
MBShakeView mBShakeView = new MBShakeView(getContext());
this.U = mBShakeView;
mBShakeView.initView(this.b.getAdCall(), true);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);
if (!isLandscape()) {
layoutParams.addRule(2, filterFindViewId(this.aa, "mbridge_iv_logo"));
layoutParams.addRule(14);
this.U.setPadding(0, 0, 0, ak.a(getContext(), 20.0f));
} else {
layoutParams.addRule(13);
}
this.U.setLayoutParams(layoutParams);
RelativeLayout relativeLayout = this.o;
if (relativeLayout != null && relativeLayout.isShown()) {
this.o.addView(this.U);
TextView textView = this.ctaView;
if (textView != null) {
textView.setVisibility(4);
}
this.U.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.5
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
MBridgeNativeEndCardView.this.b.setTriggerClickSource(5);
MBridgeNativeEndCardView.a(MBridgeNativeEndCardView.this, 0);
}
});
int i2 = 10;
if (!TextUtils.isEmpty(a4) && (parseInt2 = Integer.parseInt(a4)) > 0) {
i2 = parseInt2;
}
int i3 = 5000;
if (!TextUtils.isEmpty(a5) && (parseInt = Integer.parseInt(a5)) > 0) {
i3 = parseInt * 1000;
}
this.V = new com.mbridge.msdk.shake.b(i2, i3) { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.6
@Override // com.mbridge.msdk.shake.b
public final void a() {
if ((com.mbridge.msdk.e.b.a() && MBridgeNativeEndCardView.this.checkChinaShakeState()) || MBridgeNativeEndCardView.this.I || !MBridgeNativeEndCardView.this.H) {
return;
}
MBridgeNativeEndCardView mBridgeNativeEndCardView = MBridgeNativeEndCardView.this;
mBridgeNativeEndCardView.f = 0.0f;
mBridgeNativeEndCardView.g = 0.0f;
mBridgeNativeEndCardView.b.setTriggerClickSource(5);
MBridgeNativeEndCardView.a(MBridgeNativeEndCardView.this, 4);
}
};
a.a().a(this.V);
}
}
}
} catch (Throwable th4) {
af.b(MBridgeBaseView.TAG, th4.getMessage());
}
try {
CampaignEx campaignEx4 = this.b;
if (campaignEx4 != null && campaignEx4.getAutoShowStoreMiniCard() != 0 && !TextUtils.isEmpty(this.b.getDeepLinkURL())) {
long showStoreMiniCardDelayTime = this.b.getShowStoreMiniCardDelayTime();
if (showStoreMiniCardDelayTime == 0) {
showStoreMiniCardDelayTime = 1;
}
if (this.C == null) {
this.C = new Runnable() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.9
@Override // java.lang.Runnable
public final void run() {
MBridgeNativeEndCardView.this.b.setTriggerClickSource(2);
MBridgeNativeEndCardView.this.b.setClickType(1);
MBridgeNativeEndCardView.a(MBridgeNativeEndCardView.this, 2);
}
};
}
postDelayed(this.C, showStoreMiniCardDelayTime * 1000);
}
} catch (Throwable th5) {
af.b(MBridgeBaseView.TAG, th5.getMessage());
}
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
Runnable runnable = this.B;
if (runnable != null) {
removeCallbacks(runnable);
}
Runnable runnable2 = this.C;
if (runnable2 != null) {
removeCallbacks(runnable2);
}
if (this.V != null) {
a.a().b(this.V);
this.V = null;
}
}
/* JADX INFO: Access modifiers changed from: private */
public void a() {
int e = e();
if (e > 0) {
this.e = b(e);
b();
CampaignEx campaignEx = this.b;
if (campaignEx != null) {
campaignEx.setECTemplateRenderSucc(false);
}
}
}
/* JADX INFO: Access modifiers changed from: private */
public void b() {
c();
if (!this.e) {
this.notifyListener.a(104, "");
}
AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 100.0f);
this.K = alphaAnimation;
alphaAnimation.setDuration(200L);
}
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
public void onSelfConfigurationChanged(Configuration configuration) {
super.onSelfConfigurationChanged(configuration);
CampaignEx campaignEx = this.b;
if (campaignEx == null || !campaignEx.isDynamicView()) {
RelativeLayout relativeLayout = this.D;
if (relativeLayout != null) {
relativeLayout.setVisibility(4);
}
int i = configuration.orientation;
this.d = i;
if (i == 2) {
removeView(this.m);
a(this.n);
} else {
removeView(this.n);
a(this.m);
}
}
}
public boolean canBackPress() {
View view = this.Q;
return view != null && view.getVisibility() == 0;
}
public void notifyShowListener() {
this.notifyListener.a(110, "");
}
private void a(View view) {
if (view == null) {
setLayout();
preLoadData(this.E);
} else {
if (view.getParent() != null) {
((ViewGroup) view.getParent()).removeView(view);
}
addView(view);
b(view);
c();
}
f();
}
private boolean b(int i) {
if (isLandscape()) {
ViewGroup viewGroup = (ViewGroup) this.c.inflate(i, (ViewGroup) null);
this.n = viewGroup;
addView(viewGroup);
return b(this.n);
}
ViewGroup viewGroup2 = (ViewGroup) this.c.inflate(i, (ViewGroup) null);
this.m = viewGroup2;
addView(viewGroup2);
return b(this.m);
}
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
public final void c() {
if (this.e) {
this.o.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.14
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeNativeEndCardView.this.F) {
MBridgeNativeEndCardView.this.b.setTriggerClickSource(2);
MBridgeNativeEndCardView.a(MBridgeNativeEndCardView.this, 1);
}
}
});
this.Q.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.15
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeNativeEndCardView.this.h) {
try {
com.mbridge.msdk.video.dynview.moffer.a.a().b();
} catch (Exception e) {
af.b(MBridgeBaseView.TAG, e.getMessage());
}
try {
CampaignEx campaignEx = MBridgeNativeEndCardView.this.b;
if (campaignEx != null) {
String a = aq.a(campaignEx.getendcard_url(), "ecid");
String a2 = aq.a(MBridgeNativeEndCardView.this.b.getendcard_url(), "mof");
e eVar = new e();
eVar.a("type", "choseFromTwoClose");
eVar.a("endcard_id", a);
eVar.a("mof", a2);
com.mbridge.msdk.video.module.b.a.a("2000103", MBridgeNativeEndCardView.this.b, eVar);
}
} catch (Exception e2) {
if (MBridgeConstans.DEBUG) {
e2.printStackTrace();
}
}
}
try {
e eVar2 = new e();
eVar2.a("type", 2);
d.a().a("2000152", eVar2);
d.a().a("2000134", MBridgeNativeEndCardView.this.b);
} catch (Throwable th) {
if (MBridgeConstans.DEBUG) {
th.printStackTrace();
}
}
MBridgeNativeEndCardView.this.notifyListener.a(104, "");
}
});
TextView textView = this.ctaView;
if (textView != null) {
textView.setOnClickListener(new com.mbridge.msdk.widget.a() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.16
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
MBridgeNativeEndCardView.this.b.setTriggerClickSource(1);
MBridgeNativeEndCardView.a(MBridgeNativeEndCardView.this, 0);
}
});
}
this.r.setOnClickListener(new com.mbridge.msdk.widget.a() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.17
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
if (MBridgeNativeEndCardView.this.ctaView != null) {
if (!com.mbridge.msdk.e.b.a() || MBridgeNativeEndCardView.this.checkProgressBarIntercepted()) {
MBridgeNativeEndCardView.this.b.setTriggerClickSource(2);
MBridgeNativeEndCardView.a(MBridgeNativeEndCardView.this, 0);
}
}
}
});
this.q.setOnClickListener(new com.mbridge.msdk.widget.a() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.2
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
if (MBridgeNativeEndCardView.this.ctaView != null) {
if (!com.mbridge.msdk.e.b.a() || MBridgeNativeEndCardView.this.checkProgressBarIntercepted()) {
MBridgeNativeEndCardView.this.b.setTriggerClickSource(2);
MBridgeNativeEndCardView.a(MBridgeNativeEndCardView.this, 0);
}
}
}
});
}
}
/* JADX INFO: Access modifiers changed from: private */
public boolean b(View view) {
try {
this.o = (RelativeLayout) view.findViewById(filterFindViewId(this.aa, "mbridge_native_ec_layout"));
this.q = (ImageView) view.findViewById(filterFindViewId(this.aa, "mbridge_iv_adbanner"));
this.r = (ImageView) view.findViewById(filterFindViewId(this.aa, "mbridge_iv_icon"));
this.s = (ImageView) view.findViewById(filterFindViewId(this.aa, "mbridge_iv_flag"));
this.t = (TextView) view.findViewById(filterFindViewId(this.aa, "mbridge_tv_flag"));
this.u = (ImageView) view.findViewById(filterFindViewId(this.aa, "mbridge_iv_logo"));
this.v = (ImageView) view.findViewById(filterFindViewId(this.aa, "mbridge_iv_link"));
this.w = (TextView) view.findViewById(filterFindViewId(this.aa, "mbridge_tv_apptitle"));
this.z = (LinearLayout) view.findViewById(filterFindViewId(this.aa, "mbridge_sv_starlevel"));
this.A = (LinearLayout) view.findViewById(filterFindViewId(this.aa, "mbridge_sv_heat_count_level"));
this.Q = view.findViewById(filterFindViewId(this.aa, "mbridge_iv_close"));
this.ctaView = (TextView) view.findViewById(filterFindViewId(this.aa, "mbridge_tv_cta"));
this.R = (FeedBackButton) view.findViewById(filterFindViewId(this.aa, "mbridge_native_endcard_feed_btn"));
this.D = (RelativeLayout) view.findViewById(filterFindViewId(this.aa, "mbridge_native_ec_controller"));
this.p = (ImageView) view.findViewById(filterFindViewId(this.aa, "mbridge_iv_adbanner_bg"));
this.W = (MBridgeBaitClickView) findViewById(filterFindViewId(this.aa, "mbridge_animation_click_view"));
this.x = (TextView) view.findViewById(filterFindViewId(this.aa, "mbridge_tv_appdesc"));
if (this.h) {
ImageView imageView = this.q;
if (imageView != null && (imageView instanceof RoundImageView)) {
((RoundImageView) imageView).setBorderRadius(10);
}
ImageView imageView2 = this.r;
if (imageView2 != null && (imageView2 instanceof RoundImageView)) {
((RoundImageView) imageView2).setBorderRadius(10);
}
return isNotNULL(this.q, this.r, this.w, this.z, this.Q, this.ctaView);
}
TextView textView = (TextView) view.findViewById(filterFindViewId(this.aa, "mbridge_tv_number"));
this.y = textView;
return isNotNULL(this.q, this.r, this.w, this.x, textView, this.z, this.Q, this.ctaView);
} catch (Throwable th) {
af.b(MBridgeBaseView.TAG, th.getMessage(), th);
return false;
}
}
/* JADX WARN: Code restructure failed: missing block: B:10:0x001b, code lost:
r1 = "mbridge_reward_endcard_native_half_landscape";
*/
/* JADX WARN: Code restructure failed: missing block: B:11:0x001c, code lost:
r3 = r1;
*/
/* JADX WARN: Code restructure failed: missing block: B:23:0x002e, code lost:
if (r6.j != false) goto L11;
*/
/* JADX WARN: Code restructure failed: missing block: B:9:0x0019, code lost:
if (r6.j != false) goto L11;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private int e() {
/*
r6 = this;
int r0 = r6.k
java.lang.String r1 = "mbridge_reward_endcard_native_land"
java.lang.String r2 = "mbridge_reward_endcard_native_half_landscape"
java.lang.String r3 = "mbridge_reward_endcard_native_hor"
java.lang.String r4 = "mbridge_reward_endcard_native_half_portrait"
if (r0 != 0) goto L1e
boolean r0 = r6.j
if (r0 == 0) goto L11
r3 = r4
L11:
boolean r0 = r6.isLandscape()
if (r0 == 0) goto L31
boolean r0 = r6.j
if (r0 == 0) goto L1c
L1b:
r1 = r2
L1c:
r3 = r1
goto L31
L1e:
r5 = 1
if (r0 != r5) goto L27
boolean r5 = r6.j
if (r5 == 0) goto L29
r3 = r4
goto L29
L27:
java.lang.String r3 = ""
L29:
r4 = 2
if (r0 != r4) goto L31
boolean r0 = r6.j
if (r0 == 0) goto L1c
goto L1b
L31:
int r0 = r6.findLayout(r3)
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.e():int");
}
@TargetApi(17)
public Bitmap blurBitmap(Bitmap bitmap) {
try {
Bitmap createBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_4444);
RenderScript create = RenderScript.create(this.a.getApplicationContext());
ScriptIntrinsicBlur create2 = ScriptIntrinsicBlur.create(create, Element.U8_4(create));
Allocation createFromBitmap = Allocation.createFromBitmap(create, bitmap);
Allocation createFromBitmap2 = Allocation.createFromBitmap(create, createBitmap);
create2.setRadius(25.0f);
create2.setInput(createFromBitmap);
create2.forEach(createFromBitmap2);
createFromBitmap2.copyTo(createBitmap);
create.destroy();
return createBitmap;
} catch (Throwable unused) {
return null;
}
}
public void setNotchPadding(int i, int i2, int i3, int i4) {
af.b(MBridgeBaseView.TAG, "NOTCH NativeEndCard " + String.format("%1s-%2s-%3s-%4s", Integer.valueOf(i), Integer.valueOf(i2), Integer.valueOf(i3), Integer.valueOf(i4)));
this.L = i;
this.M = i2;
this.N = i3;
this.O = i4;
f();
}
private void f() {
RelativeLayout relativeLayout;
if (!this.e || (relativeLayout = this.D) == null) {
return;
}
relativeLayout.postDelayed(new Runnable() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.3
@Override // java.lang.Runnable
public final void run() {
if (MBridgeNativeEndCardView.this.D != null) {
CampaignEx campaignEx = MBridgeNativeEndCardView.this.b;
if (campaignEx != null && !campaignEx.isDynamicView() && MBridgeNativeEndCardView.this.b.getAdSpaceT() != 2) {
MBridgeNativeEndCardView.this.D.setPadding(MBridgeNativeEndCardView.this.L, MBridgeNativeEndCardView.this.N, MBridgeNativeEndCardView.this.M, MBridgeNativeEndCardView.this.O);
MBridgeNativeEndCardView.this.D.startAnimation(MBridgeNativeEndCardView.this.K);
}
MBridgeNativeEndCardView.this.D.setVisibility(0);
}
if (MBridgeNativeEndCardView.this.Q != null && MBridgeNativeEndCardView.this.Q.getVisibility() != 0 && MBridgeNativeEndCardView.this.G) {
MBridgeNativeEndCardView.this.Q.setVisibility(0);
}
MBridgeNativeEndCardView.p(MBridgeNativeEndCardView.this);
}
}, 200L);
}
public void setMoreOfferCampaignUnit(CampaignUnit campaignUnit) {
MBShakeView mBShakeView;
CampaignEx campaignEx = this.b;
if (campaignEx == null || !campaignEx.isDynamicView()) {
return;
}
this.T = campaignUnit;
if (campaignUnit == null || campaignUnit.getAds() == null || this.T.getAds().size() <= 5 || (mBShakeView = this.U) == null) {
return;
}
mBShakeView.setPadding(0, 0, 0, ak.a(getContext(), 5.0f));
}
public void clearMoreOfferBitmap() {
CampaignUnit campaignUnit;
CampaignEx campaignEx = this.b;
if (campaignEx == null || !campaignEx.isDynamicView() || (campaignUnit = this.T) == null || campaignUnit.getAds() == null || this.T.getAds().size() <= 0) {
return;
}
Iterator<CampaignEx> it = this.T.getAds().iterator();
while (it.hasNext()) {
CampaignEx next = it.next();
if (!TextUtils.isEmpty(next.getIconUrl())) {
com.mbridge.msdk.foundation.same.c.b.a(c.m().c());
next.getIconUrl();
}
}
}
public void release() {
try {
removeAllViews();
AlphaAnimation alphaAnimation = this.K;
if (alphaAnimation != null) {
alphaAnimation.cancel();
}
this.B = null;
} catch (Exception e) {
af.b(MBridgeBaseView.TAG, e.getMessage());
}
}
public void setLayout() {
if (!this.h) {
a();
return;
}
com.mbridge.msdk.video.dynview.c a = new com.mbridge.msdk.video.dynview.j.c().a(getContext(), this.b, this.i, com.mbridge.msdk.e.b.a() ? "cn_" : "en_");
this.ab = a.n();
com.mbridge.msdk.video.dynview.b.a().a(a, new h() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.10
@Override // com.mbridge.msdk.video.dynview.e.h
public final void viewInflaterSuccess(com.mbridge.msdk.video.dynview.a aVar) {
if (aVar != null) {
MBridgeNativeEndCardView.this.addView(aVar.a());
MBridgeNativeEndCardView.this.aa = aVar.c();
if (MBridgeNativeEndCardView.this.ctaViewCanGet(aVar.a(), MBridgeNativeEndCardView.this.aa)) {
MBridgeNativeEndCardView mBridgeNativeEndCardView = MBridgeNativeEndCardView.this;
mBridgeNativeEndCardView.e = mBridgeNativeEndCardView.b(aVar.a());
MBridgeNativeEndCardView.this.b();
} else {
MBridgeNativeEndCardView.this.aa = false;
MBridgeNativeEndCardView mBridgeNativeEndCardView2 = MBridgeNativeEndCardView.this;
mBridgeNativeEndCardView2.h = false;
mBridgeNativeEndCardView2.a();
}
MBridgeNativeEndCardView mBridgeNativeEndCardView3 = MBridgeNativeEndCardView.this;
CampaignEx campaignEx = mBridgeNativeEndCardView3.b;
if (campaignEx != null) {
campaignEx.setECTemplateRenderSucc(mBridgeNativeEndCardView3.aa);
}
}
}
@Override // com.mbridge.msdk.video.dynview.e.h
public final void viewInflaterFail(com.mbridge.msdk.video.dynview.c.a aVar) {
af.b(MBridgeBaseView.TAG, "errorMsg:" + aVar.b());
}
});
}
public void preLoadData(b bVar) {
this.E = bVar;
try {
if (this.b == null || !this.e) {
return;
}
com.mbridge.msdk.foundation.same.c.b.a(this.a.getApplicationContext()).a(this.b.getImageUrl(), new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.11
@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) {
if (bitmap == null || bitmap.isRecycled()) {
return;
}
try {
if (MBridgeNativeEndCardView.this.q != null) {
MBridgeNativeEndCardView mBridgeNativeEndCardView = MBridgeNativeEndCardView.this;
if (mBridgeNativeEndCardView.h) {
mBridgeNativeEndCardView.q.setBackground(null);
}
MBridgeNativeEndCardView.this.q.setImageBitmap(bitmap);
}
MBridgeNativeEndCardView.a(MBridgeNativeEndCardView.this, bitmap);
} catch (Throwable unused) {
if (MBridgeNativeEndCardView.this.p != null) {
MBridgeNativeEndCardView.this.p.setVisibility(4);
}
}
}
});
com.mbridge.msdk.foundation.same.c.b.a(this.a.getApplicationContext()).a(this.b.getIconUrl(), new j(this.r, ak.a(c.m().c(), 8.0f)));
this.w.setText(this.b.getAppName());
TextView textView = this.ctaView;
if (textView != null) {
textView.setText(this.b.getAdCall());
}
TextView textView2 = this.x;
if (textView2 != null) {
textView2.setText(this.b.getAppDesc());
}
TextView textView3 = this.y;
if (textView3 != null) {
textView3.setText(this.b.getNumberRating() + ")");
}
this.z.removeAllViews();
double rating = this.b.getRating();
if (rating <= 0.0d) {
rating = 5.0d;
}
LinearLayout linearLayout = this.z;
if (linearLayout instanceof StarLevelView) {
((StarLevelView) linearLayout).initScore(rating);
}
LinearLayout linearLayout2 = this.z;
if (linearLayout2 instanceof MBridgeLevelLayoutView) {
((MBridgeLevelLayoutView) linearLayout2).setRatingAndUser(rating, this.b.getNumberRating());
}
LinearLayout linearLayout3 = this.z;
if (linearLayout3 instanceof MBStarLevelLayoutView) {
((MBStarLevelLayoutView) linearLayout3).setRating((int) rating);
}
LinearLayout linearLayout4 = this.A;
if (linearLayout4 != null && (linearLayout4 instanceof MBHeatLevelLayoutView)) {
((MBHeatLevelLayoutView) linearLayout4).setHeatCount(this.b.getNumberRating());
}
if (!TextUtils.isEmpty(this.b.getendcard_url()) && this.b.getendcard_url().contains("alecfc=1")) {
this.F = true;
}
String language = Locale.getDefault().getLanguage();
if (!TextUtils.isEmpty(language) && language.equals("zh")) {
this.s.setImageDrawable(getResources().getDrawable(getResources().getIdentifier("mbridge_reward_flag_cn", "drawable", c.m().g())));
this.ac = "广告";
} else {
this.s.setImageDrawable(getResources().getDrawable(getResources().getIdentifier("mbridge_reward_flag_en", "drawable", c.m().g())));
this.ac = "AD";
}
if (this.ab == 0) {
ImageView imageView = this.s;
if (imageView != null) {
imageView.setVisibility(4);
}
ImageView imageView2 = this.u;
if (imageView2 != null) {
imageView2.setVisibility(4);
}
TextView textView4 = this.t;
if (textView4 != null) {
textView4.setVisibility(0);
this.t.setText(this.ac);
}
}
ak.a(2, this.v, this.b, this.a, true, new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.12
@Override // com.mbridge.msdk.foundation.d.a
public final void showed() {
MBridgeNativeEndCardView.this.I = true;
}
@Override // com.mbridge.msdk.foundation.d.a
public final void close() {
MBridgeNativeEndCardView.this.I = false;
}
@Override // com.mbridge.msdk.foundation.d.a
public final void summit(String str) {
MBridgeNativeEndCardView.this.I = false;
}
});
if (this.G) {
return;
}
this.Q.setVisibility(8);
} catch (Throwable th) {
af.a(MBridgeBaseView.TAG, th.getMessage());
}
}
public static /* synthetic */ void a(MBridgeNativeEndCardView mBridgeNativeEndCardView, final Bitmap bitmap) {
try {
com.mbridge.msdk.foundation.same.f.a.d().execute(new Runnable() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.13
@Override // java.lang.Runnable
public final void run() {
MBridgeNativeEndCardView mBridgeNativeEndCardView2 = MBridgeNativeEndCardView.this;
mBridgeNativeEndCardView2.P = mBridgeNativeEndCardView2.blurBitmap(bitmap);
if (MBridgeNativeEndCardView.this.P == null || MBridgeNativeEndCardView.this.P.isRecycled() || MBridgeNativeEndCardView.this.p == null) {
return;
}
MBridgeNativeEndCardView.this.p.post(new Runnable() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.13.1
@Override // java.lang.Runnable
public final void run() {
MBridgeNativeEndCardView mBridgeNativeEndCardView3 = MBridgeNativeEndCardView.this;
if (mBridgeNativeEndCardView3.h) {
mBridgeNativeEndCardView3.p.setBackground(null);
}
af.b("async", "执行异步加载图");
MBridgeNativeEndCardView.this.p.setImageBitmap(MBridgeNativeEndCardView.this.P);
}
});
}
});
} catch (Exception e) {
af.a(MBridgeBaseView.TAG, e.getMessage());
}
}
public static /* synthetic */ void a(MBridgeNativeEndCardView mBridgeNativeEndCardView, int i) {
JSONObject jSONObject;
CampaignEx campaignEx = mBridgeNativeEndCardView.b;
if (campaignEx != null && campaignEx.isDynamicView()) {
try {
CampaignEx.c rewardTemplateMode = mBridgeNativeEndCardView.b.getRewardTemplateMode();
String str = "";
if (rewardTemplateMode != null) {
str = rewardTemplateMode.f() + "";
}
i.a(c.m().c(), "end_card_click", mBridgeNativeEndCardView.b.getCampaignUnitId(), mBridgeNativeEndCardView.b.isBidCampaign(), mBridgeNativeEndCardView.b.getRequestId(), mBridgeNativeEndCardView.b.getRequestIdNotice(), mBridgeNativeEndCardView.b.getId(), str);
} catch (Exception e) {
e.printStackTrace();
}
}
JSONObject jSONObject2 = null;
try {
jSONObject = new JSONObject();
try {
jSONObject.put(com.mbridge.msdk.foundation.same.a.j, mBridgeNativeEndCardView.a(i));
if (mBridgeNativeEndCardView.b.getDynamicTempCode() == 5) {
jSONObject.put("camp_position", 0);
}
} catch (JSONException e2) {
e = e2;
jSONObject2 = jSONObject;
e.printStackTrace();
jSONObject = jSONObject2;
mBridgeNativeEndCardView.b.setClickTempSource(2);
mBridgeNativeEndCardView.notifyListener.a(105, jSONObject);
}
} catch (JSONException e3) {
e = e3;
}
mBridgeNativeEndCardView.b.setClickTempSource(2);
mBridgeNativeEndCardView.notifyListener.a(105, jSONObject);
}
public static /* synthetic */ void p(MBridgeNativeEndCardView mBridgeNativeEndCardView) {
CampaignEx campaignEx = mBridgeNativeEndCardView.b;
if (campaignEx != null) {
campaignEx.setCampaignUnitId(mBridgeNativeEndCardView.S);
com.mbridge.msdk.foundation.d.b.a().a(mBridgeNativeEndCardView.S + "_2", mBridgeNativeEndCardView.b);
}
if (com.mbridge.msdk.foundation.d.b.a().b()) {
com.mbridge.msdk.foundation.d.b.a().a(mBridgeNativeEndCardView.S + "_2", new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.video.module.MBridgeNativeEndCardView.4
@Override // com.mbridge.msdk.foundation.d.a
public final void showed() {
MBridgeNativeEndCardView.this.I = true;
}
@Override // com.mbridge.msdk.foundation.d.a
public final void close() {
MBridgeNativeEndCardView.this.I = false;
}
@Override // com.mbridge.msdk.foundation.d.a
public final void summit(String str) {
MBridgeNativeEndCardView.this.I = false;
}
});
com.mbridge.msdk.foundation.d.b.a().c(mBridgeNativeEndCardView.S + "_1");
if (mBridgeNativeEndCardView.R != null) {
com.mbridge.msdk.foundation.d.b.a().a(mBridgeNativeEndCardView.S + "_2", mBridgeNativeEndCardView.R);
return;
}
return;
}
FeedBackButton feedBackButton = mBridgeNativeEndCardView.R;
if (feedBackButton != null) {
feedBackButton.setVisibility(8);
}
}
}

View File

@@ -0,0 +1,46 @@
package com.mbridge.msdk.video.module;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
import com.mbridge.msdk.MBridgeConstans;
/* loaded from: classes4.dex */
public abstract class MBridgeNativeEndCardViewDiff extends MBridgeBaseView {
public TextView ctaView;
public boolean checkChinaShakeState() {
return false;
}
public boolean checkProgressBarIntercepted() {
return false;
}
public MBridgeNativeEndCardViewDiff(Context context) {
super(context);
}
public MBridgeNativeEndCardViewDiff(Context context, AttributeSet attributeSet, boolean z, int i, boolean z2, int i2, int i3) {
super(context, attributeSet, z, i, z2, i2, i3);
}
public MBridgeNativeEndCardViewDiff(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public boolean ctaViewCanGet(View view, boolean z) {
try {
View findViewById = view.findViewById(filterFindViewId(z, "mbridge_tv_cta"));
if (findViewById instanceof TextView) {
this.ctaView = (TextView) findViewById;
}
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
e.printStackTrace();
}
}
return this.ctaView != null;
}
}

View File

@@ -0,0 +1,37 @@
package com.mbridge.msdk.video.module;
import android.content.Context;
import android.util.AttributeSet;
import com.mbridge.msdk.video.signal.factory.b;
/* loaded from: classes4.dex */
public class MBridgePlayableView extends MBridgeH5EndCardView {
public MBridgePlayableView(Context context) {
super(context);
}
public MBridgePlayableView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView, com.mbridge.msdk.video.module.MBridgeBaseView
public void init(Context context) {
super.init(context);
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public final String a() {
return super.a();
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public void preLoadData(b bVar) {
super.preLoadData(bVar);
super.setLoadPlayable(true);
}
@Override // com.mbridge.msdk.video.module.MBridgeH5EndCardView
public void onBackPress() {
super.onBackPress();
}
}

View File

@@ -0,0 +1,71 @@
package com.mbridge.msdk.video.module;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import com.mbridge.msdk.video.signal.factory.b;
import com.mbridge.msdk.widget.a;
/* loaded from: classes4.dex */
public class MBridgeVastEndCardView extends MBridgeBaseView {
private ViewGroup m;
private View n;
private View o;
public void preLoadData(b bVar) {
}
public MBridgeVastEndCardView(Context context) {
super(context);
}
public MBridgeVastEndCardView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
public void init(Context context) {
int findLayout = findLayout("mbridge_reward_endcard_vast");
if (findLayout >= 0) {
this.c.inflate(findLayout, this);
this.m = (ViewGroup) findViewById(findID("mbridge_rl_content"));
this.n = findViewById(findID("mbridge_iv_vastclose"));
View findViewById = findViewById(findID("mbridge_iv_vastok"));
this.o = findViewById;
this.e = isNotNULL(this.m, this.n, findViewById);
c();
if (this.e) {
setMatchParent();
setBackgroundResource(findColor("mbridge_reward_endcard_vast_bg"));
setClickable(true);
((RelativeLayout.LayoutParams) this.m.getLayoutParams()).addRule(13, -1);
}
}
}
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
public final void c() {
super.c();
if (this.e) {
this.n.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.module.MBridgeVastEndCardView.1
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
MBridgeVastEndCardView.this.notifyListener.a(104, "");
}
});
this.o.setOnClickListener(new a() { // from class: com.mbridge.msdk.video.module.MBridgeVastEndCardView.2
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
MBridgeVastEndCardView mBridgeVastEndCardView = MBridgeVastEndCardView.this;
mBridgeVastEndCardView.notifyListener.a(108, mBridgeVastEndCardView.d());
}
});
}
}
public void notifyShowListener() {
this.notifyListener.a(111, "");
}
}

View File

@@ -0,0 +1,196 @@
package com.mbridge.msdk.video.module;
import android.content.Context;
import android.content.res.Configuration;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.a;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.video.module.a.a.j;
import com.mbridge.msdk.video.signal.factory.b;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeVideoEndCoverView extends MBridgeBaseView {
private final String m;
private View n;
private ImageView o;
private ImageView p;
private TextView q;
private TextView r;
private TextView s;
private b t;
public MBridgeVideoEndCoverView(Context context) {
super(context);
this.m = "MBridgeVideoEndCoverView";
}
public MBridgeVideoEndCoverView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.m = "MBridgeVideoEndCoverView";
}
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
public void init(Context context) {
int findLayout = findLayout("mbridge_reward_videoend_cover");
if (findLayout >= 0) {
View inflate = this.c.inflate(findLayout, (ViewGroup) null);
this.n = inflate;
if (inflate != null) {
this.e = a(inflate);
addView(this.n, -1, -1);
c();
}
}
}
@Override // com.mbridge.msdk.video.module.MBridgeBaseView, android.view.ViewGroup
public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
this.f = motionEvent.getRawX();
this.g = motionEvent.getRawY();
return super.onInterceptTouchEvent(motionEvent);
}
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
public void onSelfConfigurationChanged(Configuration configuration) {
super.onSelfConfigurationChanged(configuration);
this.d = configuration.orientation;
removeView(this.n);
View view = this.n;
if (view == null) {
init(this.a);
preLoadData(this.t);
return;
}
if (view.getParent() != null) {
((ViewGroup) this.n.getParent()).removeView(this.n);
}
addView(this.n);
a(this.n);
c();
}
private boolean a(View view) {
if (view == null) {
return true;
}
try {
this.o = (ImageView) view.findViewById(findID("mbridge_vec_iv_icon"));
this.p = (ImageView) view.findViewById(findID("mbridge_vec_iv_close"));
this.q = (TextView) view.findViewById(findID("mbridge_vec_tv_title"));
this.r = (TextView) view.findViewById(findID("mbridge_vec_tv_desc"));
this.s = (TextView) view.findViewById(findID("mbridge_vec_btn"));
return true;
} catch (Throwable th) {
af.b("MBridgeVideoEndCoverView", th.getMessage());
return false;
}
}
@Override // com.mbridge.msdk.video.module.MBridgeBaseView
public final void c() {
super.c();
this.p.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.module.MBridgeVideoEndCoverView.1
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
MBridgeVideoEndCoverView.this.notifyListener.a(104, "");
}
});
this.o.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.module.MBridgeVideoEndCoverView.2
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
MBridgeVideoEndCoverView.this.a();
}
});
this.s.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.module.MBridgeVideoEndCoverView.3
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
MBridgeVideoEndCoverView.this.a();
}
});
}
public final void a() {
JSONObject jSONObject;
JSONException e;
JSONObject jSONObject2;
JSONException e2;
try {
JSONObject jSONObject3 = new JSONObject();
try {
jSONObject2 = new JSONObject();
try {
jSONObject2.put(a.h, ak.b(c.m().c(), this.f));
jSONObject2.put(a.i, ak.b(c.m().c(), this.g));
jSONObject2.put(a.m, 0);
try {
this.d = getContext().getResources().getConfiguration().orientation;
} catch (Exception e3) {
e3.printStackTrace();
}
jSONObject2.put(a.k, this.d);
jSONObject2.put(a.l, ak.d(getContext()));
} catch (JSONException e4) {
e2 = e4;
af.b("MBridgeVideoEndCoverView", e2.getMessage());
jSONObject = new JSONObject();
jSONObject.put(a.j, jSONObject2);
this.notifyListener.a(105, jSONObject);
}
} catch (JSONException e5) {
jSONObject2 = jSONObject3;
e2 = e5;
}
jSONObject = new JSONObject();
try {
jSONObject.put(a.j, jSONObject2);
} catch (JSONException e6) {
e = e6;
e.printStackTrace();
this.notifyListener.a(105, jSONObject);
}
} catch (JSONException e7) {
jSONObject = null;
e = e7;
}
this.notifyListener.a(105, jSONObject);
}
public void preLoadData(b bVar) {
ImageView imageView;
this.t = bVar;
try {
CampaignEx campaignEx = this.b;
if (campaignEx == null || !this.e || campaignEx == null) {
return;
}
if (!TextUtils.isEmpty(campaignEx.getIconUrl()) && (imageView = this.o) != null) {
com.mbridge.msdk.foundation.same.c.b.a(this.a.getApplicationContext()).a(this.b.getIconUrl(), new j(imageView, ak.a(c.m().c(), 8.0f)));
}
TextView textView = this.q;
if (textView != null) {
textView.setText(this.b.getAppName());
}
TextView textView2 = this.s;
if (textView2 != null) {
textView2.setText(this.b.getAdCall());
}
TextView textView3 = this.r;
if (textView3 != null) {
textView3.setText(this.b.getAppDesc());
}
} catch (Throwable th) {
af.a("MBridgeVideoEndCoverView", th.getMessage());
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
package com.mbridge.msdk.video.module.a;
/* loaded from: classes4.dex */
public interface a {
void a(int i, Object obj);
}

View File

@@ -0,0 +1,39 @@
package com.mbridge.msdk.video.module.a.a;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.af;
/* loaded from: classes4.dex */
public class a extends f {
private Activity a;
private CampaignEx b;
public a(Activity activity, CampaignEx campaignEx) {
this.a = activity;
this.b = campaignEx;
}
@Override // com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a
public void a(int i, Object obj) {
super.a(i, obj);
if (i != 106 || this.a == null || this.b == null) {
return;
}
try {
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
String a = com.mbridge.msdk.click.c.a(this.b.getClickURL(), "-999", "-999");
if (!TextUtils.isEmpty(a)) {
intent.setData(Uri.parse(a));
this.a.startActivity(intent);
}
} catch (Throwable th) {
af.b("NotifyListener", th.getMessage(), th);
}
this.a.finish();
}
}

View File

@@ -0,0 +1,57 @@
package com.mbridge.msdk.video.module.a.a;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.video.module.MBridgeContainerView;
import com.mbridge.msdk.video.module.MBridgeVideoView;
/* loaded from: classes4.dex */
public final class b extends d {
private MBridgeVideoView k;
private MBridgeContainerView l;
public b(MBridgeVideoView mBridgeVideoView, MBridgeContainerView mBridgeContainerView, CampaignEx campaignEx, com.mbridge.msdk.videocommon.b.c cVar, com.mbridge.msdk.videocommon.download.a aVar, String str, String str2, com.mbridge.msdk.video.module.a.a aVar2, int i, boolean z) {
super(campaignEx, aVar, cVar, str, str2, aVar2, i, z);
this.k = mBridgeVideoView;
this.l = mBridgeContainerView;
if (mBridgeVideoView == null || mBridgeContainerView == null) {
this.a = false;
}
}
@Override // com.mbridge.msdk.video.module.a.a.d, com.mbridge.msdk.video.module.a.a.k, com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a
public final void a(int i, Object obj) {
if (this.a) {
if (i == 8) {
MBridgeContainerView mBridgeContainerView = this.l;
if (mBridgeContainerView == null) {
MBridgeVideoView mBridgeVideoView = this.k;
if (mBridgeVideoView != null) {
mBridgeVideoView.showAlertView();
}
} else if (mBridgeContainerView.showAlertWebView()) {
MBridgeVideoView mBridgeVideoView2 = this.k;
if (mBridgeVideoView2 != null) {
mBridgeVideoView2.alertWebViewShowed();
}
} else {
MBridgeVideoView mBridgeVideoView3 = this.k;
if (mBridgeVideoView3 != null) {
mBridgeVideoView3.showAlertView();
}
}
} else if (i == 107) {
this.l.showVideoClickView(-1);
this.k.setCover(false);
this.k.setMiniEndCardState(false);
this.k.videoOperate(1);
} else if (i == 112) {
this.k.setCover(true);
this.k.setMiniEndCardState(true);
this.k.videoOperate(2);
} else if (i == 115) {
this.l.resizeMiniCard(this.k.getBorderViewWidth(), this.k.getBorderViewHeight(), this.k.getBorderViewRadius());
}
}
super.a(i, obj);
}
}

View File

@@ -0,0 +1,46 @@
package com.mbridge.msdk.video.module.a.a;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.video.signal.factory.IJSFactory;
/* loaded from: classes4.dex */
public final class c extends d {
private IJSFactory k;
public c(IJSFactory iJSFactory, CampaignEx campaignEx, com.mbridge.msdk.videocommon.b.c cVar, com.mbridge.msdk.videocommon.download.a aVar, String str, String str2, com.mbridge.msdk.video.module.a.a aVar2, int i, boolean z) {
super(campaignEx, aVar, cVar, str, str2, aVar2, i, z);
this.k = iJSFactory;
if (iJSFactory == null) {
this.a = false;
}
}
@Override // com.mbridge.msdk.video.module.a.a.d, com.mbridge.msdk.video.module.a.a.k, com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a
public final void a(int i, Object obj) {
if (this.a) {
if (i != 8) {
if (i == 105) {
this.k.getJSNotifyProxy().a(3, obj.toString());
i = -1;
} else if (i == 107) {
this.k.getJSContainerModule().showVideoClickView(-1);
this.k.getJSVideoModule().setCover(false);
this.k.getJSVideoModule().setMiniEndCardState(false);
this.k.getJSVideoModule().videoOperate(1);
} else if (i == 112) {
this.k.getJSVideoModule().setCover(true);
this.k.getJSVideoModule().setMiniEndCardState(true);
this.k.getJSVideoModule().videoOperate(2);
} else if (i == 115) {
com.mbridge.msdk.video.signal.j jSVideoModule = this.k.getJSVideoModule();
this.k.getJSContainerModule().resizeMiniCard(jSVideoModule.getBorderViewWidth(), jSVideoModule.getBorderViewHeight(), jSVideoModule.getBorderViewRadius());
}
} else if (!this.k.getJSContainerModule().showAlertWebView()) {
this.k.getJSVideoModule().showAlertView();
} else {
this.k.getJSVideoModule().alertWebViewShowed();
}
}
super.a(i, obj);
}
}

View File

@@ -0,0 +1,58 @@
package com.mbridge.msdk.video.module.a.a;
import android.net.Uri;
import android.text.TextUtils;
import com.ironsource.v8;
import com.mbridge.msdk.foundation.entity.CampaignEx;
/* loaded from: classes4.dex */
public class d extends k {
public d(CampaignEx campaignEx, com.mbridge.msdk.videocommon.download.a aVar, com.mbridge.msdk.videocommon.b.c cVar, String str, String str2, com.mbridge.msdk.video.module.a.a aVar2, int i, boolean z) {
super(campaignEx, aVar, cVar, str, str2, aVar2, i, z);
}
@Override // com.mbridge.msdk.video.module.a.a.k, com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a
public void a(int i, Object obj) {
super.a(i, obj);
if (this.a) {
try {
CampaignEx campaignEx = this.b;
if (campaignEx != null && campaignEx.getDynamicTempCode() == 5) {
b(obj.toString());
}
} catch (Exception unused) {
}
if (i != 105 && i != 106 && i != 113) {
if (i != 122) {
switch (i) {
case 109:
b(2);
a(2);
break;
case 110:
b(1);
a(1);
break;
case 111:
a(1);
break;
}
}
a();
return;
}
com.mbridge.msdk.video.module.b.b.d(com.mbridge.msdk.foundation.controller.c.m().c(), this.b);
if (i != 105) {
String noticeUrl = this.b.getNoticeUrl();
if (!TextUtils.isEmpty(noticeUrl)) {
if (!noticeUrl.contains(com.mbridge.msdk.foundation.same.a.m)) {
noticeUrl = noticeUrl + v8.i.c + com.mbridge.msdk.foundation.same.a.m + "=2";
} else {
noticeUrl = noticeUrl.replace(com.mbridge.msdk.foundation.same.a.m + v8.i.b + Uri.parse(noticeUrl).getQueryParameter(com.mbridge.msdk.foundation.same.a.m), com.mbridge.msdk.foundation.same.a.m + "=2");
}
}
com.mbridge.msdk.click.a.a(com.mbridge.msdk.foundation.controller.c.m().c(), this.b, this.g, noticeUrl, true, false, com.mbridge.msdk.click.a.a.i);
}
}
}
}

View File

@@ -0,0 +1,75 @@
package com.mbridge.msdk.video.module.a.a;
import android.graphics.Bitmap;
import android.widget.ImageView;
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;
/* loaded from: classes4.dex */
public class e implements com.mbridge.msdk.foundation.same.c.c {
private CampaignEx a;
protected ImageView b;
private String c;
public e(ImageView imageView) {
this.b = imageView;
}
public e(ImageView imageView, CampaignEx campaignEx, String str) {
this.b = imageView;
this.a = campaignEx;
this.c = str;
}
@Override // com.mbridge.msdk.foundation.same.c.c
public void onSuccessLoad(Bitmap bitmap, String str) {
try {
if (bitmap == null) {
af.b("ImageLoaderListener", "bitmap=null");
} else {
if (this.b == null || bitmap.isRecycled()) {
return;
}
this.b.setImageBitmap(bitmap);
this.b.setVisibility(0);
}
} catch (Throwable th) {
if (MBridgeConstans.DEBUG) {
th.printStackTrace();
}
}
}
@Override // com.mbridge.msdk.foundation.same.c.c
public void onFailedLoad(final String str, String str2) {
Runnable runnable = new Runnable() { // from class: com.mbridge.msdk.video.module.a.a.e.1
@Override // java.lang.Runnable
public final void run() {
try {
com.mbridge.msdk.foundation.db.o a = com.mbridge.msdk.foundation.db.o.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
if (e.this.a == null) {
af.a("ImageLoaderListener", "campaign is null");
return;
}
com.mbridge.msdk.foundation.entity.n nVar = new com.mbridge.msdk.foundation.entity.n();
nVar.a("2000044");
nVar.a(ab.m(com.mbridge.msdk.foundation.controller.c.m().c()));
nVar.e(e.this.a.getId());
nVar.p(e.this.a.getImageUrl());
nVar.f(e.this.a.getRequestId());
nVar.g(e.this.a.getRequestIdNotice());
nVar.c(e.this.c);
nVar.h(str);
a.a(nVar);
} catch (Exception e) {
e.printStackTrace();
}
}
};
com.mbridge.msdk.foundation.controller.d.a();
com.mbridge.msdk.foundation.same.f.a.b().execute(runnable);
af.b("ImageLoaderListener", "desc:" + str);
}
}

View File

@@ -0,0 +1,11 @@
package com.mbridge.msdk.video.module.a.a;
import com.mbridge.msdk.foundation.tools.af;
/* loaded from: classes4.dex */
public class f implements com.mbridge.msdk.video.module.a.a {
@Override // com.mbridge.msdk.video.module.a.a
public void a(int i, Object obj) {
af.b("NotifyListener", "onNotify,type=" + i + ",pt=" + obj);
}
}

View File

@@ -0,0 +1,43 @@
package com.mbridge.msdk.video.module.a.a;
import androidx.annotation.RequiresApi;
import com.mbridge.msdk.video.module.MBridgeClickMiniCardView;
import com.vungle.ads.internal.signals.SignalKey;
/* loaded from: classes4.dex */
public final class g extends i {
private MBridgeClickMiniCardView a;
public g(MBridgeClickMiniCardView mBridgeClickMiniCardView, com.mbridge.msdk.video.module.a.a aVar) {
super(aVar);
this.a = mBridgeClickMiniCardView;
}
@Override // com.mbridge.msdk.video.module.a.a.i, com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a
@RequiresApi(api = 11)
public final void a(int i, Object obj) {
boolean z = false;
switch (i) {
case 100:
MBridgeClickMiniCardView mBridgeClickMiniCardView = this.a;
if (mBridgeClickMiniCardView != null) {
mBridgeClickMiniCardView.webviewshow();
MBridgeClickMiniCardView mBridgeClickMiniCardView2 = this.a;
mBridgeClickMiniCardView2.onSelfConfigurationChanged(mBridgeClickMiniCardView2.getResources().getConfiguration());
break;
}
break;
case 101:
case 102:
z = true;
break;
case 103:
i = SignalKey.EVENT_ID;
break;
}
if (z) {
return;
}
super.a(i, obj);
}
}

View File

@@ -0,0 +1,46 @@
package com.mbridge.msdk.video.module.a.a;
import com.mbridge.msdk.foundation.entity.CampaignEx;
/* loaded from: classes4.dex */
public final class h extends k {
public h(CampaignEx campaignEx, com.mbridge.msdk.videocommon.download.a aVar, com.mbridge.msdk.videocommon.b.c cVar, String str, String str2, com.mbridge.msdk.video.module.a.a aVar2, int i, boolean z) {
super(campaignEx, aVar, cVar, str, str2, aVar2, i, z);
}
@Override // com.mbridge.msdk.video.module.a.a.k, com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a
public final void a(int i, Object obj) {
if (i == 100) {
g();
f();
e();
a(2);
} else if (i == 109) {
b(2);
} else if (i == 122) {
a();
} else if (i != 129) {
String str = "";
if (i == 118) {
if (obj != null && (obj instanceof String)) {
str = (String) obj;
}
a(3, str);
} else if (i == 119) {
if (obj != null && (obj instanceof String)) {
str = (String) obj;
}
a(4, str);
}
} else {
CampaignEx campaignEx = this.b;
if (campaignEx != null && campaignEx.getPlayable_ads_without_video() == 2) {
g();
f();
e();
a(1);
}
}
super.a(i, obj);
}
}

View File

@@ -0,0 +1,19 @@
package com.mbridge.msdk.video.module.a.a;
/* loaded from: classes4.dex */
public class i extends f {
protected com.mbridge.msdk.video.module.a.a b;
public i(com.mbridge.msdk.video.module.a.a aVar) {
this.b = aVar;
}
@Override // com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a
public void a(int i, Object obj) {
super.a(i, obj);
com.mbridge.msdk.video.module.a.a aVar = this.b;
if (aVar != null) {
aVar.a(i, obj);
}
}
}

View File

@@ -0,0 +1,34 @@
package com.mbridge.msdk.video.module.a.a;
import android.graphics.Bitmap;
import android.widget.ImageView;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.tools.ae;
/* loaded from: classes4.dex */
public final class j extends e {
private int a;
public j(ImageView imageView, int i) {
super(imageView);
this.a = i;
}
@Override // com.mbridge.msdk.video.module.a.a.e, com.mbridge.msdk.foundation.same.c.c
public final void onSuccessLoad(Bitmap bitmap, String str) {
Bitmap a;
if (bitmap == null) {
return;
}
try {
if (this.b == null || bitmap.isRecycled() || (a = ae.a(bitmap, 1, this.a)) == null) {
return;
}
this.b.setImageBitmap(a);
} catch (Throwable th) {
if (MBridgeConstans.DEBUG) {
th.printStackTrace();
}
}
}
}

View File

@@ -0,0 +1,347 @@
package com.mbridge.msdk.video.module.a.a;
import android.content.Context;
import android.text.TextUtils;
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.foundation.tools.ap;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class k extends f {
protected boolean a;
protected CampaignEx b;
protected List<CampaignEx> c;
protected boolean d;
protected com.mbridge.msdk.videocommon.download.a e;
protected com.mbridge.msdk.videocommon.b.c f;
protected String g;
protected String h;
protected com.mbridge.msdk.video.module.a.a i;
protected int j;
private boolean k = false;
private boolean l = false;
private boolean m = false;
public final void a(CampaignEx campaignEx) {
this.b = campaignEx;
}
public final void a(List<CampaignEx> list) {
this.c = list;
}
public k(CampaignEx campaignEx, com.mbridge.msdk.videocommon.download.a aVar, com.mbridge.msdk.videocommon.b.c cVar, String str, String str2, com.mbridge.msdk.video.module.a.a aVar2, int i, boolean z) {
this.d = false;
this.i = new f();
this.j = 1;
if (!z && campaignEx != null && ap.b(str2) && aVar != null && aVar2 != null) {
this.b = campaignEx;
this.h = str;
this.g = str2;
this.e = aVar;
this.f = cVar;
this.i = aVar2;
this.a = true;
this.j = i;
this.d = false;
return;
}
if (!z || campaignEx == null || !ap.b(str2) || aVar2 == null) {
return;
}
this.b = campaignEx;
this.h = str;
this.g = str2;
this.e = aVar;
this.f = cVar;
this.i = aVar2;
this.a = true;
this.j = i;
this.d = true;
}
@Override // com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a
public void a(int i, Object obj) {
super.a(i, obj);
this.i.a(i, obj);
}
public final void a(int i) {
if (this.b != null) {
if (i == 1 || i == 2) {
com.mbridge.msdk.video.module.b.b.a(com.mbridge.msdk.foundation.controller.c.m().c(), this.b, i, this.j);
}
}
}
public final void a() {
if (!this.a || this.b == null) {
return;
}
com.mbridge.msdk.foundation.entity.n nVar = new com.mbridge.msdk.foundation.entity.n("2000061", this.b.getId(), this.b.getRequestId(), this.b.getRequestIdNotice(), this.g, ab.m(com.mbridge.msdk.foundation.controller.c.m().c()));
nVar.d(this.b.isMraid() ? com.mbridge.msdk.foundation.entity.n.a : com.mbridge.msdk.foundation.entity.n.b);
com.mbridge.msdk.foundation.same.report.g.b(nVar, com.mbridge.msdk.foundation.controller.c.m().c(), this.g);
}
public final void a(int i, String str) {
if (this.b != null) {
com.mbridge.msdk.foundation.same.report.g.c(new com.mbridge.msdk.foundation.entity.n("2000062", this.b.getId(), this.b.getRequestId(), this.b.getRequestIdNotice(), this.g, ab.m(com.mbridge.msdk.foundation.controller.c.m().c()), i, str), com.mbridge.msdk.foundation.controller.c.m().c(), this.g);
}
}
public final void b(int i) {
CampaignEx campaignEx = this.b;
if (campaignEx != null) {
String noticeUrl = campaignEx.getNoticeUrl();
if (TextUtils.isEmpty(noticeUrl)) {
return;
}
if (i == 1 || i == 2) {
if (!noticeUrl.contains("endscreen_type")) {
StringBuilder sb = new StringBuilder(noticeUrl);
if (noticeUrl.contains("?")) {
sb.append("&endscreen_type=");
sb.append(i);
} else {
sb.append("?endscreen_type=");
sb.append(i);
}
noticeUrl = sb.toString();
} else if (i == 2) {
if (noticeUrl.contains("endscreen_type=1")) {
noticeUrl = noticeUrl.replace("endscreen_type=1", "endscreen_type=2");
}
} else if (noticeUrl.contains("endscreen_type=2")) {
noticeUrl = noticeUrl.replace("endscreen_type=2", "endscreen_type=1");
}
this.b.setNoticeUrl(noticeUrl);
}
}
}
public final void b() {
Runnable runnable = new Runnable() { // from class: com.mbridge.msdk.video.module.a.a.k.1
@Override // java.lang.Runnable
public final void run() {
try {
k kVar = k.this;
if (!kVar.a || kVar.b == null || !ap.b(kVar.g) || com.mbridge.msdk.foundation.controller.c.m().c() == null) {
return;
}
com.mbridge.msdk.foundation.db.i a = com.mbridge.msdk.foundation.db.i.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
com.mbridge.msdk.foundation.entity.f fVar = new com.mbridge.msdk.foundation.entity.f();
fVar.a(System.currentTimeMillis());
fVar.b(k.this.g);
fVar.a(k.this.b.getId());
a.a(fVar);
} catch (Throwable th) {
af.b("NotifyListener", th.getMessage(), th);
}
}
};
com.mbridge.msdk.foundation.controller.d.a();
com.mbridge.msdk.foundation.same.f.a.b().execute(runnable);
}
public final void c() {
try {
Runnable runnable = new Runnable() { // from class: com.mbridge.msdk.video.module.a.a.k.2
@Override // java.lang.Runnable
public final void run() {
try {
k kVar = k.this;
if (kVar.a && kVar.b != null && ap.b(kVar.g)) {
com.mbridge.msdk.videocommon.a.a a = com.mbridge.msdk.videocommon.a.a.a();
k kVar2 = k.this;
a.a(kVar2.b, kVar2.g);
}
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
e.printStackTrace();
}
}
try {
com.mbridge.msdk.videocommon.a.a a2 = com.mbridge.msdk.videocommon.a.a.a();
k kVar3 = k.this;
a2.c(kVar3.h, kVar3.b.getAdType());
} catch (Exception e2) {
if (MBridgeConstans.DEBUG) {
e2.printStackTrace();
}
} catch (Throwable th) {
af.a("NotifyListener", th.getMessage());
}
}
};
com.mbridge.msdk.foundation.controller.d.a();
com.mbridge.msdk.foundation.same.f.a.b().execute(runnable);
} catch (Throwable th) {
af.b("NotifyListener", th.getMessage(), th);
}
}
public final void d() {
com.mbridge.msdk.videocommon.download.a aVar = this.e;
if (aVar != null) {
aVar.f(true);
}
}
public final void e() {
CampaignEx campaignEx;
Map<String, Long> map;
String str;
try {
CampaignEx campaignEx2 = this.b;
if (campaignEx2 != null && campaignEx2.isDynamicView() && this.d && !this.b.isCampaignIsFiltered()) {
this.l = true;
return;
}
if (!this.a || (campaignEx = this.b) == null || TextUtils.isEmpty(campaignEx.getOnlyImpressionURL()) || (map = com.mbridge.msdk.foundation.same.a.b.k) == null || map.containsKey(this.b.getOnlyImpressionURL()) || this.l) {
return;
}
com.mbridge.msdk.foundation.same.a.b.k.put(this.b.getOnlyImpressionURL(), Long.valueOf(System.currentTimeMillis()));
String onlyImpressionURL = this.b.getOnlyImpressionURL();
if (this.b.getSpareOfferFlag() == 1) {
str = onlyImpressionURL + "&to=1&cbt=" + this.b.getCbt() + "&tmorl=" + this.j;
} else {
str = onlyImpressionURL + "&to=0&cbt=" + this.b.getCbt() + "&tmorl=" + this.j;
}
String str2 = str;
if (!this.d || this.b.isCampaignIsFiltered()) {
com.mbridge.msdk.click.a.a(com.mbridge.msdk.foundation.controller.c.m().c(), this.b, this.g, str2, false, true, com.mbridge.msdk.click.a.a.h);
c();
}
this.l = true;
} catch (Exception e) {
e.printStackTrace();
}
}
public final void f() {
try {
if (!this.a || this.k || TextUtils.isEmpty(this.b.getImpressionURL())) {
return;
}
this.k = true;
if (this.b.isBidCampaign() && this.b != null) {
try {
HashMap hashMap = new HashMap();
List<com.mbridge.msdk.foundation.entity.d> a = com.mbridge.msdk.foundation.db.b.a(com.mbridge.msdk.foundation.controller.c.m().c()).a(this.b.getCampaignUnitId(), this.b.getRequestId());
if (a != null && a.size() > 0 && a.get(0) != null) {
if (a.get(0).c() == 1) {
hashMap.put("encrypt_p=", "encrypt_p=" + a.get(0).b());
hashMap.put("irlfa=", "irlfa=1");
for (Map.Entry entry : hashMap.entrySet()) {
String str = (String) entry.getKey();
String str2 = (String) entry.getValue();
CampaignEx campaignEx = this.b;
campaignEx.setImpressionURL(campaignEx.getImpressionURL().replaceAll(str, str2));
CampaignEx campaignEx2 = this.b;
campaignEx2.setOnlyImpressionURL(campaignEx2.getOnlyImpressionURL().replaceAll(str, str2));
}
}
af.a("BidReplaceCampignDao", "removeReplace count " + com.mbridge.msdk.foundation.db.b.a(com.mbridge.msdk.foundation.controller.c.m().c()).a(this.b.getRequestId()));
}
} catch (Exception e) {
e.printStackTrace();
}
}
String impressionURL = this.b.getImpressionURL();
com.mbridge.msdk.click.a.a(com.mbridge.msdk.foundation.controller.c.m().c(), this.b, this.g, this.b.getSpareOfferFlag() == 1 ? impressionURL + "&to=1&cbt=" + this.b.getCbt() + "&tmorl=" + this.j : impressionURL + "&to=0&cbt=" + this.b.getCbt() + "&tmorl=" + this.j, false, true, com.mbridge.msdk.click.a.a.g);
com.mbridge.msdk.video.module.b.b.a(com.mbridge.msdk.foundation.controller.c.m().c(), this.b);
new Thread(new Runnable() { // from class: com.mbridge.msdk.video.module.a.a.k.3
@Override // java.lang.Runnable
public final void run() {
try {
com.mbridge.msdk.foundation.db.j.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c())).a(k.this.b.getId());
} catch (Throwable th) {
af.b("NotifyListener", th.getMessage(), th);
}
}
}).start();
if (!this.a || com.mbridge.msdk.foundation.same.a.b.j == null || TextUtils.isEmpty(this.b.getId())) {
return;
}
com.mbridge.msdk.foundation.same.a.b.a(this.g, this.b, "reward");
} catch (Throwable th) {
af.b("NotifyListener", th.getMessage(), th);
}
}
public final void g() {
CampaignEx campaignEx;
List<String> pv_urls;
try {
if (!this.a || this.m || (campaignEx = this.b) == null) {
return;
}
this.m = true;
if ((campaignEx.isDynamicView() && this.d && !this.b.isCampaignIsFiltered()) || (pv_urls = this.b.getPv_urls()) == null || pv_urls.size() <= 0) {
return;
}
Iterator<String> it = pv_urls.iterator();
while (it.hasNext()) {
com.mbridge.msdk.click.a.a(com.mbridge.msdk.foundation.controller.c.m().c(), this.b, this.g, it.next(), false, true);
}
} catch (Throwable th) {
af.b("NotifyListener", th.getMessage());
}
}
public final void h() {
CampaignEx campaignEx = this.b;
if (campaignEx == null || TextUtils.isEmpty(campaignEx.getCampaignUnitId()) || this.b.getNativeVideoTracking() == null || this.b.getNativeVideoTracking().o() == null) {
return;
}
Context c = com.mbridge.msdk.foundation.controller.c.m().c();
CampaignEx campaignEx2 = this.b;
com.mbridge.msdk.click.a.a(c, campaignEx2, campaignEx2.getCampaignUnitId(), this.b.getNativeVideoTracking().o(), false, false);
}
public final void a(String str) {
try {
if (this.b != null) {
com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e();
eVar.a("url", this.b.getVideoUrlEncode());
eVar.a("reason", str);
String noticeUrl = this.b.getNoticeUrl();
String clickURL = this.b.getClickURL();
if (TextUtils.isEmpty(noticeUrl)) {
if (!TextUtils.isEmpty(clickURL)) {
eVar.a("offer_url", clickURL);
}
} else {
eVar.a("offer_url", noticeUrl);
}
com.mbridge.msdk.foundation.same.report.d.d.a().a("2000021", this.b, eVar);
}
} catch (Exception e) {
e.printStackTrace();
}
}
public final void b(String str) {
List<CampaignEx> list;
if (this.b == null || (list = this.c) == null || list.size() == 0 || TextUtils.isEmpty(str)) {
return;
}
try {
JSONObject jSONObject = new JSONObject(str);
if (jSONObject.has("camp_position")) {
this.b = this.c.get(jSONObject.getInt("camp_position"));
}
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b("NotifyListener", e.getMessage());
}
}
}
}

View File

@@ -0,0 +1,13 @@
package com.mbridge.msdk.video.module.a.a;
/* loaded from: classes4.dex */
public final class l extends i {
public l(com.mbridge.msdk.video.module.a.a aVar) {
super(aVar);
}
@Override // com.mbridge.msdk.video.module.a.a.i, com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a
public final void a(int i, Object obj) {
super.a(i, obj);
}
}

View File

@@ -0,0 +1,381 @@
package com.mbridge.msdk.video.module.a.a;
import android.os.Handler;
import android.text.TextUtils;
import android.widget.FrameLayout;
import android.widget.TextView;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.dycreator.baseview.cusview.SoundImageView;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ah;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.video.module.MBridgeContainerView;
import com.mbridge.msdk.video.module.MBridgeVideoView;
import java.util.Timer;
import java.util.TimerTask;
/* loaded from: classes4.dex */
public final class m extends o {
private MBridgeVideoView l;
private MBridgeContainerView m;
private int n;
private Timer o;
private Handler p;
private boolean q;
private boolean r;
private boolean s;
private int t;
private int u;
private MBridgeVideoView.a v;
public m(MBridgeVideoView mBridgeVideoView, MBridgeContainerView mBridgeContainerView, CampaignEx campaignEx, com.mbridge.msdk.videocommon.b.c cVar, com.mbridge.msdk.videocommon.download.a aVar, String str, String str2, int i, int i2, com.mbridge.msdk.video.module.a.a aVar2, int i3, boolean z, int i4) {
super(campaignEx, cVar, aVar, str, str2, aVar2, i3, z);
this.p = new Handler();
this.q = false;
this.r = false;
this.s = false;
this.l = mBridgeVideoView;
this.m = mBridgeContainerView;
this.u = i;
this.n = i2;
this.t = i4;
if (mBridgeVideoView != null) {
this.q = mBridgeVideoView.getVideoSkipTime() == 0;
}
if (mBridgeVideoView == null || mBridgeContainerView == null) {
this.a = false;
}
}
@Override // com.mbridge.msdk.video.module.a.a.o, com.mbridge.msdk.video.module.a.a.k, com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a
public final void a(int i, Object obj) {
Integer num;
int i2;
CampaignEx campaignEx;
if (this.a) {
if (i == 1) {
if (!this.m.endCardShowing()) {
int videoInteractiveType = this.m.getVideoInteractiveType();
if (videoInteractiveType != -2) {
if (videoInteractiveType == -1) {
if (this.m.isLast()) {
this.m.showVideoClickView(1);
this.l.soundOperate(0, 1);
try {
i();
this.o = new Timer();
this.o.schedule(new TimerTask() { // from class: com.mbridge.msdk.video.module.a.a.m.1
@Override // java.util.TimerTask, java.lang.Runnable
public final void run() {
try {
m.this.p.post(new Runnable() { // from class: com.mbridge.msdk.video.module.a.a.m.1.1
@Override // java.lang.Runnable
public final void run() {
m.this.m.showVideoClickView(-1);
m.this.l.soundOperate(0, 2);
}
});
} catch (Throwable th) {
if (MBridgeConstans.DEBUG) {
th.printStackTrace();
}
}
}
}, 3000L);
} catch (Exception e) {
e.printStackTrace();
}
} else {
this.m.showVideoClickView(-1);
this.l.soundOperate(0, 2);
i();
}
}
} else if (this.m.miniCardLoaded()) {
this.m.showVideoClickView(2);
}
}
} else {
if (i != 2) {
if (i != 5) {
if (i != 6) {
if (i == 8) {
MBridgeContainerView mBridgeContainerView = this.m;
if (mBridgeContainerView == null) {
MBridgeVideoView mBridgeVideoView = this.l;
if (mBridgeVideoView != null) {
mBridgeVideoView.showAlertView();
}
} else if (mBridgeContainerView.showAlertWebView()) {
MBridgeVideoView mBridgeVideoView2 = this.l;
if (mBridgeVideoView2 != null) {
mBridgeVideoView2.alertWebViewShowed();
}
} else {
MBridgeVideoView mBridgeVideoView3 = this.l;
if (mBridgeVideoView3 != null) {
mBridgeVideoView3.showAlertView();
}
}
} else if (i == 20) {
if (ah.a().a("i_l_s_t_r_i", false) && (obj instanceof MBridgeVideoView.a)) {
this.v = (MBridgeVideoView.a) obj;
}
} else {
switch (i) {
case 10:
this.r = true;
this.l.soundOperate(0, 2);
this.l.progressOperate(0, 2);
break;
case 11:
this.l.videoOperate(3);
this.l.dismissAllAlert();
CampaignEx campaignEx2 = this.b;
if (campaignEx2 != null && campaignEx2.getVideo_end_type() != 3 && this.b.getRewardTemplateMode() != null && this.b.getRewardTemplateMode().f() != 5002010) {
if (this.b.getAdSpaceT() != 2) {
this.l.setVisibility(8);
}
} else {
this.l.setVisibility(0);
}
CampaignEx campaignEx3 = this.b;
if (campaignEx3 != null && campaignEx3.getDynamicTempCode() == 5) {
MBridgeVideoView mBridgeVideoView4 = this.l;
if (mBridgeVideoView4.mCurrPlayNum == mBridgeVideoView4.mCampaignSize) {
MBridgeContainerView mBridgeContainerView2 = this.m;
if (mBridgeContainerView2 != null) {
mBridgeContainerView2.setRewardStatus(true);
this.m.showOrderCampView();
break;
}
}
}
CampaignEx campaignEx4 = this.b;
if (campaignEx4 == null || campaignEx4.getRewardTemplateMode() == null || this.b.getRewardTemplateMode().f() != 5002010) {
if (this.b.getAdSpaceT() == 2) {
this.m.showVideoEndCover();
break;
} else {
this.m.showEndcard(this.b.getVideo_end_type());
break;
}
}
break;
case 12:
h();
this.l.videoOperate(3);
this.l.dismissAllAlert();
if (this.b.getVideo_end_type() != 3) {
this.l.setVisibility(8);
} else {
this.l.setVisibility(0);
}
if (this.r || this.t != 0) {
if (this.b.isDynamicView() && this.b.getDynamicTempCode() == 5 && TextUtils.isEmpty(this.b.getendcard_url())) {
j();
this.t = 0;
}
if (!this.r && this.t == 1) {
g();
f();
e();
if (ah.a().a("i_l_s_t_r_i", false) && !this.s) {
this.s = true;
MBridgeVideoView.a aVar = this.v;
if (aVar != null) {
aVar.a();
}
}
}
if (this.b.getAdSpaceT() != 2) {
this.m.showEndcard(this.b.getVideo_end_type());
break;
} else {
this.m.showVideoEndCover();
break;
}
}
break;
case 13:
this.l.closeVideoOperate(0, 2);
break;
case 14:
if (!this.q) {
this.l.closeVideoOperate(0, 1);
break;
}
break;
case 15:
if (obj != null && (obj instanceof MBridgeVideoView.b)) {
MBridgeVideoView.b bVar = (MBridgeVideoView.b) obj;
int videoInteractiveType2 = this.m.getVideoInteractiveType();
if (this.b.getAdSpaceT() == 2) {
SoundImageView soundImageView = this.l.mSoundImageView;
if (soundImageView != null && (soundImageView.getLayoutParams() instanceof FrameLayout.LayoutParams)) {
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) this.l.mSoundImageView.getLayoutParams();
layoutParams.setMargins(ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 5.0f), 0, 0, ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 85.0f));
this.l.mSoundImageView.setLayoutParams(layoutParams);
}
TextView textView = this.l.tvFlag;
if (textView != null && (textView.getLayoutParams() instanceof FrameLayout.LayoutParams)) {
FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) this.l.tvFlag.getLayoutParams();
layoutParams2.setMargins(ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 5.0f), 0, 0, ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 85.0f));
this.l.tvFlag.setVisibility(0);
this.l.tvFlag.setLayoutParams(layoutParams2);
}
this.m.showVideoClickView(1);
} else if (videoInteractiveType2 >= 0 && bVar.a >= videoInteractiveType2) {
this.m.showVideoClickView(1);
this.l.soundOperate(0, 1);
}
this.q = bVar.c;
if (this.b.getDynamicTempCode() != 5) {
int i3 = this.n;
if (((i3 >= 0 && ((i2 = bVar.a) >= i3 || i2 == bVar.b)) || (this.b.getVideoCompleteTime() > 0 && (bVar.a > this.b.getVideoCompleteTime() || bVar.a == bVar.b))) && !this.q) {
this.l.closeVideoOperate(0, 2);
this.q = true;
break;
}
} else {
int i4 = bVar.a;
int i5 = bVar.b;
if (!this.q && this.l != null && (campaignEx = this.b) != null) {
int i6 = this.n;
int i7 = (i6 < 0 || i4 < i6) ? 1 : 2;
if (i7 != 2 && (campaignEx.getVideoCompleteTime() != 0 ? i4 > this.b.getVideoCompleteTime() : this.l.mCurrPlayNum > 1)) {
i7 = 2;
}
if (i7 != 2 && this.l.mCurrPlayNum > 1 && i4 == i5) {
i7 = 2;
}
if (i7 == 2) {
this.l.closeVideoOperate(0, i7);
this.q = true;
break;
}
}
}
}
break;
}
}
}
} else if (obj != null && (obj instanceof Integer)) {
if (((Integer) obj).intValue() == 1) {
num = 2;
} else {
num = 1;
}
this.l.soundOperate(num.intValue(), -1);
}
}
this.l.dismissAllAlert();
this.l.videoOperate(3);
CampaignEx campaignEx5 = this.b;
if (campaignEx5 != null && campaignEx5.isDynamicView() && this.b.getDynamicTempCode() == 5) {
if (this.m != null) {
MBridgeVideoView mBridgeVideoView5 = this.l;
if (mBridgeVideoView5.mCurrPlayNum == mBridgeVideoView5.mCampaignSize) {
if (this.b.getAdSpaceT() != 2) {
this.m.setRewardStatus(true);
this.m.showOrderCampView();
}
i = 16;
}
}
com.mbridge.msdk.video.bt.module.b.f.a(this.b, this.g, this.l.mCurrentPlayProgressTime);
}
if (this.u == 2 && !this.m.endCardShowing() && this.b.getAdSpaceT() != 2) {
this.m.showEndcard(this.b.getVideo_end_type());
}
i = 16;
}
}
super.a(i, obj);
}
private void i() {
try {
Timer timer = this.o;
if (timer != null) {
timer.cancel();
this.o = null;
}
} catch (Exception e) {
e.printStackTrace();
}
}
/* JADX WARN: Removed duplicated region for block: B:23:0x005f */
/* JADX WARN: Removed duplicated region for block: B:32:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void j() {
/*
r4 = this;
com.mbridge.msdk.foundation.entity.CampaignEx r0 = r4.b
if (r0 == 0) goto L70
int r0 = r0.getDynamicTempCode()
r1 = 5
if (r0 != r1) goto L70
com.mbridge.msdk.video.module.MBridgeVideoView r0 = r4.l
if (r0 == 0) goto L5c
java.util.List<com.mbridge.msdk.foundation.entity.CampaignEx> r0 = r0.mCampOrderViewData
if (r0 == 0) goto L5c
r0 = 0
r1 = r0
L15:
com.mbridge.msdk.video.module.MBridgeVideoView r2 = r4.l
java.util.List<com.mbridge.msdk.foundation.entity.CampaignEx> r2 = r2.mCampOrderViewData
int r2 = r2.size()
if (r1 >= r2) goto L45
com.mbridge.msdk.video.module.MBridgeVideoView r2 = r4.l
java.util.List<com.mbridge.msdk.foundation.entity.CampaignEx> r2 = r2.mCampOrderViewData
java.lang.Object r2 = r2.get(r1)
if (r2 == 0) goto L42
com.mbridge.msdk.video.module.MBridgeVideoView r2 = r4.l
java.util.List<com.mbridge.msdk.foundation.entity.CampaignEx> r2 = r2.mCampOrderViewData
java.lang.Object r2 = r2.get(r1)
com.mbridge.msdk.foundation.entity.CampaignEx r2 = (com.mbridge.msdk.foundation.entity.CampaignEx) r2
java.lang.String r2 = r2.getId()
com.mbridge.msdk.foundation.entity.CampaignEx r3 = r4.b
java.lang.String r3 = r3.getId()
if (r2 != r3) goto L42
int r0 = r1 + (-1)
goto L45
L42:
int r1 = r1 + 1
goto L15
L45:
if (r0 < 0) goto L5c
com.mbridge.msdk.video.module.MBridgeVideoView r1 = r4.l
java.util.List<com.mbridge.msdk.foundation.entity.CampaignEx> r1 = r1.mCampOrderViewData
java.lang.Object r1 = r1.get(r0)
if (r1 == 0) goto L5c
com.mbridge.msdk.video.module.MBridgeVideoView r1 = r4.l
java.util.List<com.mbridge.msdk.foundation.entity.CampaignEx> r1 = r1.mCampOrderViewData
java.lang.Object r0 = r1.get(r0)
com.mbridge.msdk.foundation.entity.CampaignEx r0 = (com.mbridge.msdk.foundation.entity.CampaignEx) r0
goto L5d
L5c:
r0 = 0
L5d:
if (r0 == 0) goto L70
com.mbridge.msdk.video.module.MBridgeVideoView r1 = r4.l
if (r1 == 0) goto L66
r1.setCampaign(r0)
L66:
com.mbridge.msdk.video.module.MBridgeContainerView r1 = r4.m
if (r1 == 0) goto L6d
r1.setCampaign(r0)
L6d:
r4.a(r0)
L70:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.module.a.a.m.j():void");
}
}

View File

@@ -0,0 +1,185 @@
package com.mbridge.msdk.video.module.a.a;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ah;
import com.mbridge.msdk.video.module.MBridgeVideoView;
import com.mbridge.msdk.video.signal.factory.IJSFactory;
/* loaded from: classes4.dex */
public final class n extends o {
private IJSFactory l;
private int m;
private boolean n;
private boolean o;
private int p;
private boolean q;
private MBridgeVideoView.a r;
public n(IJSFactory iJSFactory, CampaignEx campaignEx, com.mbridge.msdk.videocommon.b.c cVar, com.mbridge.msdk.videocommon.download.a aVar, String str, String str2, int i, int i2, com.mbridge.msdk.video.module.a.a aVar2, int i3, boolean z, int i4) {
super(campaignEx, cVar, aVar, str, str2, aVar2, i3, z);
this.n = false;
this.o = false;
this.q = false;
this.l = iJSFactory;
this.m = i;
this.n = i2 == 0;
this.p = i4;
if (iJSFactory == null) {
this.a = false;
}
}
@Override // com.mbridge.msdk.video.module.a.a.o, com.mbridge.msdk.video.module.a.a.k, com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a
public final void a(int i, Object obj) {
Integer num;
int i2;
int i3 = i;
if (this.a) {
if (i3 == 1) {
if (!this.l.getJSContainerModule().endCardShowing()) {
this.l.getJSNotifyProxy().a(1, obj != null ? obj.toString() : "");
}
} else {
if (i3 != 2) {
if (i3 != 5) {
if (i3 != 6) {
if (i3 != 8) {
if (i3 != 20) {
if (i3 != 114) {
if (i3 != 116) {
switch (i3) {
case 10:
this.q = true;
this.l.getJSNotifyProxy().a(0);
break;
case 11:
case 12:
this.l.getJSVideoModule().videoOperate(3);
if (this.b.getVideo_end_type() != 3) {
if (this.b.getAdSpaceT() != 2) {
this.l.getJSVideoModule().setVisible(8);
}
} else {
this.l.getJSVideoModule().setVisible(0);
}
if (i3 == 12) {
h();
i2 = 2;
} else {
i2 = 1;
}
this.l.getJSNotifyProxy().a(i2);
if (this.l.getJSCommon().g() == 2) {
this.l.getJSVideoModule().setVisible(0);
com.mbridge.msdk.video.signal.j jSVideoModule = this.l.getJSVideoModule();
this.l.getJSContainerModule().showMiniCard(jSVideoModule.getBorderViewTop(), jSVideoModule.getBorderViewLeft(), jSVideoModule.getBorderViewWidth(), jSVideoModule.getBorderViewHeight(), jSVideoModule.getBorderViewRadius());
} else if (i3 == 12) {
if (this.p == 1) {
if (this.b.getAdSpaceT() != 2) {
this.l.getJSContainerModule().showEndcard(this.b.getVideo_end_type());
} else {
this.l.getJSContainerModule().showVideoEndCover();
}
}
} else if (this.b.getAdSpaceT() != 2) {
this.l.getJSContainerModule().showEndcard(this.b.getVideo_end_type());
} else {
this.l.getJSContainerModule().showVideoEndCover();
}
this.l.getJSVideoModule().dismissAllAlert();
if (i3 == 12 && !this.q && this.p == 1) {
h();
g();
f();
e();
if (ah.a().a("i_l_s_t_r_i", false) && !this.o) {
this.o = true;
MBridgeVideoView.a aVar = this.r;
if (aVar != null) {
aVar.a();
break;
}
}
}
break;
case 13:
if (!this.l.getJSVideoModule().isH5Canvas()) {
this.l.getJSVideoModule().closeVideoOperate(0, 2);
}
this.l.getJSNotifyProxy().a(-1);
break;
case 14:
if (!this.n) {
this.l.getJSVideoModule().closeVideoOperate(0, 1);
break;
}
break;
case 15:
if (obj != null && (obj instanceof MBridgeVideoView.b)) {
this.n = true;
this.l.getJSNotifyProxy().a((MBridgeVideoView.b) obj);
break;
}
break;
default:
switch (i3) {
case 123:
case 124:
this.l.getJSNotifyProxy().a(i3 == 123 ? 7 : 6, "");
break;
case 125:
this.l.getJSContainerModule().hideAlertWebview();
break;
}
}
} else {
com.mbridge.msdk.video.signal.j jSVideoModule2 = this.l.getJSVideoModule();
this.l.getJSContainerModule().configurationChanged(jSVideoModule2.getBorderViewWidth(), jSVideoModule2.getBorderViewHeight(), jSVideoModule2.getBorderViewRadius());
}
} else if (this.l.getJSCommon().g() == 2) {
com.mbridge.msdk.video.signal.j jSVideoModule3 = this.l.getJSVideoModule();
this.l.getJSContainerModule().showMiniCard(jSVideoModule3.getBorderViewTop(), jSVideoModule3.getBorderViewLeft(), jSVideoModule3.getBorderViewWidth(), jSVideoModule3.getBorderViewHeight(), jSVideoModule3.getBorderViewRadius());
}
} else if (ah.a().a("i_l_s_t_r_i", false) && (obj instanceof MBridgeVideoView.a)) {
this.r = (MBridgeVideoView.a) obj;
}
} else if (!this.l.getJSContainerModule().showAlertWebView()) {
this.l.getJSVideoModule().showAlertView();
} else {
this.l.getJSVideoModule().alertWebViewShowed();
}
}
} else if (obj != null && (obj instanceof Integer)) {
if (((Integer) obj).intValue() == 1) {
num = 2;
} else {
num = 1;
}
this.l.getJSVideoModule().soundOperate(num.intValue(), -1);
this.l.getJSNotifyProxy().a(5, num + "");
}
}
this.l.getJSVideoModule().dismissAllAlert();
if (i3 == 2) {
this.l.getJSNotifyProxy().a(2, "");
}
this.l.getJSVideoModule().videoOperate(3);
int i4 = 16;
if (this.l.getJSCommon().g() != 2) {
if (this.b.getVideo_end_type() != 3) {
this.l.getJSVideoModule().setVisible(8);
} else {
this.l.getJSVideoModule().setVisible(0);
}
if (this.m == 2 && !this.l.getJSContainerModule().endCardShowing() && this.b.getAdSpaceT() != 2) {
this.l.getJSContainerModule().showEndcard(this.b.getVideo_end_type());
i4 = i3;
}
}
this.l.getJSNotifyProxy().a(1);
i3 = i4;
}
}
super.a(i3, obj);
}
}

Some files were not shown because too many files have changed in this diff Show More