红果免费短剧 v6.2.3.32版本的 MD5 值为:a6b05492607eab2c8a25f26d2f238ae0

以下内容为反编译后的 a.java 源代码,内容仅作参考


package com.bytedance.reader_ad.common.a;

import android.graphics.drawable.Animatable;
import android.net.Uri;
import android.text.TextUtils;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.drawee.backends.pipeline.PipelineDraweeController;
import com.facebook.drawee.controller.BaseControllerListener;
import com.facebook.drawee.controller.ControllerListener;
import com.facebook.drawee.drawable.ScalingUtils;
import com.facebook.drawee.generic.GenericDraweeHierarchyBuilder;
import com.facebook.drawee.generic.RoundingParams;
import com.facebook.drawee.view.SimpleDraweeView;
import com.facebook.imagepipeline.image.ImageInfo;
import com.facebook.imagepipeline.postprocessors.BlurPostProcessor;
import com.facebook.imagepipeline.request.ImageRequestBuilder;
import java.util.ArrayList;
import java.util.List;

public class a {

    private static final List<String> f25055a;

    private static final List<String> f25056b;

    static {
        ArrayList arrayList = new ArrayList();
        f25055a = arrayList;
        ArrayList arrayList2 = new ArrayList();
        f25056b = arrayList2;
        arrayList.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/img_double_coin.png~noop.image");
        arrayList.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/red_packet_card_image_cover.png~noop.image");
        arrayList.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/seven_day_presents_dialog_bkg_2.png~noop.image");
        arrayList.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/olympiad_new_red_pack.png~noop.image");
        arrayList.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/dialog_olympiad_top_bg.png~noop.image");
        arrayList.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/book_shandow_2x.webp~noop.image");
        arrayList.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/music_preference_bg.png~noop.image");
        arrayList.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/icon_novel_boy.png~noop.image");
        arrayList.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/icon_novel_girl.png~noop.image");
        arrayList.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/icon_novel_both.png~noop.image");
        arrayList2.add("http://lf6-file.novelfmstatic.com/obj/novel-static/pic_horizontal_slide.png");
        arrayList2.add("http://lf6-file.novelfmstatic.com/obj/novel-static/inspire_close_coin.png");
        arrayList2.add("http://lf6-file.novelfmstatic.com/obj/novel-static/inspire_close_tts.png");
        arrayList2.add("http://lf6-file.novelfmstatic.com/obj/novel-static/inspire_close_ad.png");
        arrayList2.add("http://lf6-file.novelfmstatic.com/obj/novel-static/img_update_banner.png");
        arrayList2.add("http://lf6-file.novelfmstatic.com/obj/novel-static/img_social_convention.png");
        arrayList2.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/login_top_bg_mobile.jpg~noop.image");
        arrayList2.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/ic_coin_award_bg.png~noop.image");
        arrayList2.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/icon_withdraw_remind_icon.png~noop.image");
        arrayList2.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/ic_new_red_package_award_bg.png~noop.image");
        arrayList2.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/coin_reward_count_down_bkg.png~noop.image");
        arrayList2.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/audio_play_shadow_background.png~noop.image");
        arrayList2.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/audio_play_shadow_background_new.png~noop.image");
        arrayList2.add("http://p26-tt.byteimg.com/xs_fm_mobile_res/luna_dialog_vip.webp~noop.image");
    }

    public static void a(SimpleDraweeView simpleDraweeView, String str) {
        a(simpleDraweeView, str, ScalingUtils.ScaleType.FIT_CENTER);
    }

    public static void a(SimpleDraweeView simpleDraweeView, String str, ScalingUtils.ScaleType scaleType) {
        a(simpleDraweeView, str, scaleType, (BaseControllerListener<ImageInfo>) null, (RoundingParams) null, 0, 0);
    }

    public static void a(SimpleDraweeView simpleDraweeView, String str, ScalingUtils.ScaleType scaleType, BaseControllerListener<ImageInfo> baseControllerListener) {
        a(simpleDraweeView, str, scaleType, (BaseControllerListener<ImageInfo>) null, (RoundingParams) null, 0, 0);
    }

    public static void a(final SimpleDraweeView simpleDraweeView, final String str, final ScalingUtils.ScaleType scaleType, final BaseControllerListener<ImageInfo> baseControllerListener, final RoundingParams roundingParams, final int i, final int i2) {
        if (!TextUtils.isEmpty(str)) {
            a(simpleDraweeView, str, scaleType, (ControllerListener<ImageInfo>) new BaseControllerListener<ImageInfo>() {
                private String a(String str2) {
                    if (str2.contains("lf3-reading")) {
                        return str2.replace("lf3-reading", "lf6-reading");
                    }
                    return "";
                }

                @Override
                public void onFailure(String str2, Throwable th) {
                    String a2 = a(str);
                    if (!TextUtils.isEmpty(a2)) {
                        a.a(simpleDraweeView, a2, scaleType, (ControllerListener<ImageInfo>) new BaseControllerListener<ImageInfo>() {
                            @Override
                            public void onFailure(String str3, Throwable th2) {
                                if (baseControllerListener != null) {
                                    baseControllerListener.onFailure(str3, th2);
                                }
                            }

                            @Override
                            public void onFinalImageSet(String str3, ImageInfo imageInfo, Animatable animatable) {
                                if (baseControllerListener != null) {
                                    baseControllerListener.onFinalImageSet(str3, imageInfo, animatable);
                                }
                            }
                        }, roundingParams, i, i2);
                        return;
                    }
                    BaseControllerListener baseControllerListener2 = baseControllerListener;
                    if (baseControllerListener2 != null) {
                        baseControllerListener2.onFailure(str2, th);
                    }
                }

                @Override
                public void onFinalImageSet(String str2, ImageInfo imageInfo, Animatable animatable) {
                    BaseControllerListener baseControllerListener2 = baseControllerListener;
                    if (baseControllerListener2 != null) {
                        baseControllerListener2.onFinalImageSet(str2, imageInfo, animatable);
                    }
                }
            }, roundingParams, i, i2);
        }
    }

    public static void a(SimpleDraweeView simpleDraweeView, String str, ScalingUtils.ScaleType scaleType, ControllerListener<ImageInfo> controllerListener, RoundingParams roundingParams, int i, int i2) {
        try {
            ImageRequestBuilder newBuilderWithSource = ImageRequestBuilder.newBuilderWithSource(Uri.parse(str));
            if (i > 0 && i2 > 0) {
                newBuilderWithSource.setPostprocessor(new BlurPostProcessor(i2, simpleDraweeView.getContext(), i));
            }
            PipelineDraweeController pipelineDraweeController = (PipelineDraweeController) Fresco.newDraweeControllerBuilder().setImageRequest(newBuilderWithSource.build()).setOldController(simpleDraweeView.getController()).setControllerListener(controllerListener).build();
            GenericDraweeHierarchyBuilder actualImageScaleType = GenericDraweeHierarchyBuilder.newInstance(simpleDraweeView.getResources()).setFadeDuration(0).setActualImageScaleType(scaleType);
            if (roundingParams != null) {
                actualImageScaleType.setRoundingParams(roundingParams);
            }
            simpleDraweeView.setHierarchy(actualImageScaleType.build());
            simpleDraweeView.setController(pipelineDraweeController);
        } catch (Throwable th) {
            th.printStackTrace();
        }
    }
}