APKPure.apk分析 / TubeAndImageCard.java


package com.apkpure.aegon.app.newcard.impl;

import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.apkpure.aegon.R;
import com.apkpure.aegon.app.newcard.AppCard;
import com.apkpure.aegon.app.newcard.model.AppCardData;
import com.apkpure.aegon.application.AegonApplication;
import com.apkpure.aegon.application.RealApplicationLike;
import com.apkpure.proto.nano.AppDetailInfoProtos;
import com.apkpure.proto.nano.BannerImageProtos;
import com.apkpure.proto.nano.ComemntImageProtos;
import com.apkpure.proto.nano.ImageInfoProtos;
import com.apkpure.proto.nano.TubeInfoProtos;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.makeramen.roundedimageview.RoundedImageView;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView;
import com.yalantis.ucrop.view.CropImageView;
import e.g.a.e.k.g;
import e.g.a.e.k.m.f0;
import e.g.a.e.k.m.k;
import e.g.a.e.k.m.k0.k0;
import e.g.a.e.k.m.k0.x;
import e.g.a.e.k.m.m;
import e.g.a.e.k.m.n;
import e.g.a.h0.b.h;
import e.g.a.i0.p1;
import e.g.a.m0.c0.d;
import e.s.a.c.a.q;
import e.w.e.a.b.l.b;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import o.s.c.j;

@SuppressLint({"ViewConstructor"})
public final class TubeAndImageCard extends AppCard implements g {

    /* renamed from: q  reason: collision with root package name */
    public static final s.e.a f1073q = new s.e.c("TubeAndImageCard");

    /* renamed from: k  reason: collision with root package name */
    public View f1074k;

    /* renamed from: l  reason: collision with root package name */
    public RecyclerView f1075l;

    /* renamed from: m  reason: collision with root package name */
    public b f1076m;

    /* renamed from: n  reason: collision with root package name */
    public AppDetailInfoProtos.AppDetailInfo f1077n;

    /* renamed from: o  reason: collision with root package name */
    public final e.g.a.e.k.m.j0.b f1078o = new e.g.a.e.k.m.j0.b();

    /* renamed from: p  reason: collision with root package name */
    public final e.g.a.e.k.m.j0.c f1079p = new e.g.a.e.k.m.j0.c();

    public static final class a implements MultiItemEntity {
        public BannerImageProtos.BannerImage b;
        public TubeInfoProtos.TubeInfo c;
        public Integer d;

        @Override // com.chad.library.adapter.base.entity.MultiItemEntity
        public int getItemType() {
            Integer num = this.d;
            if (num == null) {
                return 0;
            }
            return num.intValue();
        }
    }

    public final class b extends RecyclerView.e<RecyclerView.a0> {

        /* renamed from: a  reason: collision with root package name */
        public final List<a> f1080a;
        public final int b;
        public ArrayList<YouTubePlayerView> c = new ArrayList<>();
        public final /* synthetic */ TubeAndImageCard d;

        public final class a extends RecyclerView.a0 {

            /* renamed from: a  reason: collision with root package name */
            public final int f1081a;
            public final float b;
            public final int c;
            public final RoundedImageView d;

            /* renamed from: e  reason: collision with root package name */
            public final ImageView f1082e;

            /* renamed from: f  reason: collision with root package name */
            public final /* synthetic */ b f1083f;

            /* JADX INFO: super call moved to the top of the method (can break code semantics) */
            public a(b bVar, View view, int i2) {
                super(view);
                j.e(bVar, "this$0");
                j.e(view, "itemView");
                this.f1083f = bVar;
                this.f1081a = i2;
                float dimensionPixelSize = (float) bVar.d.getContext().getResources().getDimensionPixelSize(R.dimen.arg_RES_2131165279);
                this.b = dimensionPixelSize;
                this.c = p1.a(bVar.d.getContext(), dimensionPixelSize);
                View findViewById = view.findViewById(R.id.arg_RES_2131297429);
                j.d(findViewById, "itemView.findViewById(R.id.image_view)");
                this.d = (RoundedImageView) findViewById;
                View findViewById2 = view.findViewById(R.id.arg_RES_2131298914);
                j.d(findViewById2, "itemView.findViewById(R.id.video_view)");
                this.f1082e = (ImageView) findViewById2;
            }
        }

        /* renamed from: com.apkpure.aegon.app.newcard.impl.TubeAndImageCard$b$b  reason: collision with other inner class name */
        public final class C0004b extends RecyclerView.a0 implements x {
            public final int b;
            public boolean c;
            public a d;

            /* renamed from: e  reason: collision with root package name */
            public q f1084e;

            /* renamed from: f  reason: collision with root package name */
            public boolean f1085f = true;

            /* renamed from: g  reason: collision with root package name */
            public boolean f1086g;

            /* renamed from: h  reason: collision with root package name */
            public ImageView f1087h;

            /* renamed from: i  reason: collision with root package name */
            public float f1088i;

            /* renamed from: j  reason: collision with root package name */
            public final float f1089j;

            /* renamed from: k  reason: collision with root package name */
            public final int f1090k;

            /* renamed from: l  reason: collision with root package name */
            public YouTubePlayerView f1091l;

            /* renamed from: m  reason: collision with root package name */
            public FrameLayout f1092m;

            /* renamed from: n  reason: collision with root package name */
            public ImageView f1093n;

            /* renamed from: o  reason: collision with root package name */
            public ImageView f1094o;

            /* renamed from: p  reason: collision with root package name */
            public final /* synthetic */ b f1095p;

            /* renamed from: com.apkpure.aegon.app.newcard.impl.TubeAndImageCard$b$b$a */
            public static final class a implements e.s.a.c.a.s.b {

                /* renamed from: a  reason: collision with root package name */
                public final /* synthetic */ C0004b f1096a;

                public a(C0004b bVar) {
                    this.f1096a = bVar;
                }

                @Override // e.s.a.c.a.s.b
                public void a(q qVar) {
                    TubeInfoProtos.TubeInfo tubeInfo;
                    j.e(qVar, "player");
                    C0004b bVar = this.f1096a;
                    bVar.c = true;
                    bVar.f1084e = qVar;
                    s.e.a aVar = TubeAndImageCard.f1073q;
                    s.e.a aVar2 = TubeAndImageCard.f1073q;
                    a aVar3 = bVar.d;
                    TubeInfoProtos.TubeInfo tubeInfo2 = null;
                    if (aVar3 == null) {
                        tubeInfo = null;
                    } else {
                        tubeInfo = aVar3.c;
                    }
                    j.c(tubeInfo);
                    j.k("开始加载视频: ", tubeInfo.id);
                    C0004b bVar2 = this.f1096a;
                    q qVar2 = bVar2.f1084e;
                    if (qVar2 != null) {
                        a aVar4 = bVar2.d;
                        if (aVar4 != null) {
                            tubeInfo2 = aVar4.c;
                        }
                        j.c(tubeInfo2);
                        String str = tubeInfo2.id;
                        j.d(str, "data?.tubeInfo!!.id");
                        qVar2.n(str, CropImageView.DEFAULT_ASPECT_RATIO);
                    }
                    q qVar3 = this.f1096a.f1084e;
                    if (qVar3 != null) {
                        qVar3.o();
                    }
                }
            }

            /* JADX INFO: super call moved to the top of the method (can break code semantics) */
            public C0004b(b bVar, View view, int i2) {
                super(view);
                j.e(bVar, "this$0");
                j.e(view, "itemView");
                this.f1095p = bVar;
                this.b = i2;
                float dimensionPixelSize = (float) view.getContext().getResources().getDimensionPixelSize(R.dimen.arg_RES_2131165279);
                this.f1089j = dimensionPixelSize;
                bVar.d.getContext().getResources().getDimensionPixelSize(R.dimen.arg_RES_2131165295);
                this.f1090k = p1.a(view.getContext(), dimensionPixelSize);
                View findViewById = view.findViewById(R.id.arg_RES_2131296664);
                j.d(findViewById, "itemView.findViewById(R.id.bg_layout)");
                FrameLayout frameLayout = (FrameLayout) findViewById;
                View findViewById2 = view.findViewById(R.id.arg_RES_2131298910);
                j.d(findViewById2, "itemView.findViewById(R.id.video_play_root_view)");
                this.f1092m = (FrameLayout) findViewById2;
                View findViewById3 = view.findViewById(R.id.arg_RES_2131297516);
                j.d(findViewById3, "itemView.findViewById(R.…video_list_card_video_bg)");
                this.f1093n = (ImageView) findViewById3;
                View findViewById4 = view.findViewById(R.id.arg_RES_2131297517);
                j.d(findViewById4, "itemView.findViewById(R.…ideo_list_card_video_btn)");
                this.f1094o = (ImageView) findViewById4;
                ImageView imageView = this.f1093n;
                if (imageView != null) {
                    imageView.setOnClickListener(new m(this));
                }
            }

            @Override // e.g.a.e.k.m.k0.x
            public boolean d() {
                return this.c;
            }

            @Override // e.g.a.e.k.m.k0.x
            public void e() {
                s.e.a aVar = TubeAndImageCard.f1073q;
                s.e.a aVar2 = TubeAndImageCard.f1073q;
                j.k("外部调用播放, 之前的状态是: ", Boolean.valueOf(this.c));
                if (this.c) {
                    k0 k0Var = k0.V0;
                    i.i.g.c.d0(((s.e.c) k0.W0).f16991a, "外部调用playVideo时, 正在播放");
                    return;
                }
                this.c = true;
                YouTubePlayerView youTubePlayerView = this.f1091l;
                if (youTubePlayerView != null) {
                    youTubePlayerView.setStartSecond(0);
                }
                h();
            }

            @Override // e.g.a.e.k.m.k0.x
            public boolean g() {
                j.e(this, "this");
                return false;
            }

            public final void h() {
                YouTubePlayerView youTubePlayerView = this.f1091l;
                if (youTubePlayerView != null) {
                    youTubePlayerView.setVisibility(0);
                }
                YouTubePlayerView youTubePlayerView2 = this.f1091l;
                if (youTubePlayerView2 != null) {
                    youTubePlayerView2.j(new a(this));
                }
            }

            public final void i() {
                if (this.f1087h != null) {
                    i.b0.a.a.g j2 = p1.j(this.f1095p.d.getContext(), this.f1085f ? R.drawable.arg_RES_2131231807 : R.drawable.arg_RES_2131231810);
                    if (j2 != null) {
                        p1.z(j2, this.f1087h, -1);
                    }
                }
            }

            @Override // e.g.a.e.k.m.k0.x
            public void pauseVideo() {
                s.e.a aVar = TubeAndImageCard.f1073q;
                s.e.a aVar2 = TubeAndImageCard.f1073q;
                j.k("外部调用关闭, 之前的状态是: ", Boolean.valueOf(this.c));
                if (!this.c) {
                    i.i.g.c.d0(((s.e.c) aVar2).f16991a, "外部调用pauseVideo时, 没有在播放");
                    return;
                }
                this.c = false;
                q qVar = this.f1084e;
                if (qVar == null) {
                    i.i.g.c.d0(((s.e.c) aVar2).f16991a, "外部调用pauseVideo时, youTubePlayer 为 null");
                    return;
                }
                j.c(qVar);
                qVar.b();
            }
        }

        public b(TubeAndImageCard tubeAndImageCard, List<a> list, int i2) {
            j.e(tubeAndImageCard, "this$0");
            j.e(list, "data");
            this.d = tubeAndImageCard;
            this.f1080a = list;
            this.b = i2;
        }

        @Override // androidx.recyclerview.widget.RecyclerView.e
        public int getItemCount() {
            List<a> list = this.f1080a;
            if (list == null) {
                return 0;
            }
            return list.size();
        }

        @Override // androidx.recyclerview.widget.RecyclerView.e
        public int getItemViewType(int i2) {
            a k2 = k(i2);
            if (k2 == null) {
                return 0;
            }
            return k2.getItemType();
        }

        public final a k(int i2) {
            if (this.d.getAppCard() != null) {
                AppCard appCard = this.d.getAppCard();
                j.c(appCard);
                if (appCard.getData() != null) {
                    return this.f1080a.get(i2);
                }
            }
            k0 k0Var = k0.V0;
            i.i.g.c.d0(((s.e.c) k0.W0).f16991a, "appCard is null.");
            return null;
        }

        @Override // androidx.recyclerview.widget.RecyclerView.e
        public void onBindViewHolder(RecyclerView.a0 a0Var, int i2) {
            TubeInfoProtos.TubeInfo tubeInfo;
            String str;
            ComemntImageProtos.CommentImage commentImage;
            ImageInfoProtos.ImageInfo imageInfo;
            e.s.a.c.b.j playerUiController;
            e.s.a.c.b.j playerUiController2;
            View n2;
            AppCardData data;
            j.e(a0Var, "holder");
            a k2 = k(i2);
            if (k2 == null) {
                k0 k0Var = k0.V0;
                i.i.g.c.d0(((s.e.c) k0.W0).f16991a, "videoListRecyclerview onBindViewHolder data empty");
            } else {
                String str2 = "";
                if (a0Var instanceof a) {
                    a aVar = (a) a0Var;
                    j.e(k2, "data");
                    Context context = aVar.itemView.getContext();
                    BannerImageProtos.BannerImage bannerImage = k2.b;
                    j.c(bannerImage);
                    String str3 = bannerImage.thumbnail.url;
                    aVar.f1082e.setVisibility(8);
                    e.f.a.e.c.Y(context, str3, aVar.d, (e.h.a.q.g) ((e.h.a.q.g) e.f.a.e.c.L(e.g.a.s.l.a.T0(context, 3)).B(Integer.MIN_VALUE, aVar.c)).k());
                    aVar.itemView.setOnClickListener(new k(aVar.f1083f.d, i2));
                    j.d(str3, "thumbnailUrl");
                    AppCard appCard = aVar.f1083f.d.getAppCard();
                    String appRecommendId = (appCard == null || (data = appCard.getData()) == null) ? null : data.getAppRecommendId(0);
                    HashMap hashMap = new HashMap(2);
                    hashMap.put("image_id", str3);
                    hashMap.put("position", Integer.valueOf(aVar.f1081a + 1));
                    hashMap.put("small_position", Integer.valueOf(aVar.getPosition() + 1));
                    if (appRecommendId != null) {
                        str2 = appRecommendId;
                    }
                    hashMap.put("recommend_id", str2);
                    h.s(aVar.itemView, "app", hashMap, false);
                } else if (a0Var instanceof C0004b) {
                    C0004b bVar = (C0004b) a0Var;
                    j.e(k2, "videoInfo");
                    bVar.d = k2;
                    YouTubePlayerView youTubePlayerView = bVar.f1091l;
                    if (youTubePlayerView != null) {
                        youTubePlayerView.setVisibility(8);
                    } else {
                        Context context2 = bVar.f1095p.d.getContext();
                        j.d(context2, "context");
                        YouTubePlayerView youTubePlayerView2 = new YouTubePlayerView(context2);
                        bVar.f1091l = youTubePlayerView2;
                        ArrayList<YouTubePlayerView> arrayList = bVar.f1095p.c;
                        j.c(youTubePlayerView2);
                        arrayList.add(youTubePlayerView2);
                        YouTubePlayerView youTubePlayerView3 = bVar.f1091l;
                        if (youTubePlayerView3 != null) {
                            youTubePlayerView3.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
                        }
                        YouTubePlayerView youTubePlayerView4 = bVar.f1091l;
                        if (youTubePlayerView4 != null) {
                            youTubePlayerView4.setVisibility(8);
                        }
                        YouTubePlayerView youTubePlayerView5 = bVar.f1091l;
                        if ((youTubePlayerView5 == null ? null : youTubePlayerView5.getPlayerUiController()) != null) {
                            YouTubePlayerView youTubePlayerView6 = bVar.f1091l;
                            e.s.a.c.b.j playerUiController3 = youTubePlayerView6 == null ? null : youTubePlayerView6.getPlayerUiController();
                            j.c(playerUiController3);
                            playerUiController3.d(true);
                            YouTubePlayerView youTubePlayerView7 = bVar.f1091l;
                            e.s.a.c.b.j playerUiController4 = youTubePlayerView7 == null ? null : youTubePlayerView7.getPlayerUiController();
                            j.c(playerUiController4);
                            playerUiController4.l(false);
                        }
                        YouTubePlayerView youTubePlayerView8 = bVar.f1091l;
                        if (!(youTubePlayerView8 == null || (playerUiController2 = youTubePlayerView8.getPlayerUiController()) == null || (n2 = playerUiController2.n()) == null)) {
                            Objects.requireNonNull(bVar.f1095p);
                            HashMap hashMap2 = new HashMap();
                            e.d.a.a.a.o0(i2, 1, hashMap2, "small_position");
                            h.s(n2, "full_screen_button", hashMap2, false);
                        }
                        YouTubePlayerView youTubePlayerView9 = bVar.f1091l;
                        if (youTubePlayerView9 != null) {
                            youTubePlayerView9.h(new f0(bVar));
                        }
                        YouTubePlayerView youTubePlayerView10 = bVar.f1091l;
                        if (!(youTubePlayerView10 == null || (playerUiController = youTubePlayerView10.getPlayerUiController()) == null)) {
                            playerUiController.h(new n(bVar, bVar.f1095p.d));
                        }
                        bVar.f1092m.addView(bVar.f1091l);
                        bVar.f1092m.setTag(bVar);
                    }
                    int i3 = AegonApplication.f1165e;
                    e.f.a.e.c.Y(RealApplicationLike.getContext(), "https://static-sg.winudf.com/wupload/xy/aprojectadmin/r4qBCniy.webp", bVar.f1094o, new e.h.a.q.g());
                    TubeInfoProtos.TubeInfo tubeInfo2 = k2.c;
                    String str4 = (tubeInfo2 == null || (commentImage = tubeInfo2.imageInfo) == null || (imageInfo = commentImage.thumbnail) == null) ? null : imageInfo.url;
                    if (!(str4 == null || str4.length() == 0)) {
                        e.h.a.q.a k3 = ((e.h.a.q.g) e.f.a.e.c.L(e.g.a.s.l.a.T0(bVar.f1095p.d.getContext(), 3)).B(Integer.MIN_VALUE, bVar.f1090k)).k();
                        j.d(k3, "imageDefaultOptions(Them…           .dontAnimate()");
                        e.f.a.e.c.Y(bVar.f1095p.d.getContext(), str4, bVar.f1093n, (e.h.a.q.g) k3);
                    }
                    HashMap hashMap3 = new HashMap(2);
                    int i4 = i2 + 1;
                    hashMap3.put("small_position", Integer.valueOf(i4));
                    a aVar2 = bVar.d;
                    if (!(aVar2 == null || (tubeInfo = aVar2.c) == null || (str = tubeInfo.id) == null)) {
                        str2 = str;
                    }
                    hashMap3.put("video_id", str2);
                    hashMap3.put("position", Integer.valueOf(bVar.b + 1));
                    hashMap3.put("small_position", Integer.valueOf(i4));
                    h.s(bVar.f1092m, "video", hashMap3, false);
                }
            }
            b.C0315b.f12266a.o(a0Var, i2, getItemId(i2));
        }

        @Override // androidx.recyclerview.widget.RecyclerView.e
        public RecyclerView.a0 onCreateViewHolder(ViewGroup viewGroup, int i2) {
            j.e(viewGroup, "parent");
            if (i2 == 1) {
                View inflate = LayoutInflater.from(this.d.getContext()).inflate(R.layout.arg_RES_2131493300, viewGroup, false);
                j.d(inflate, "from(context)\n          …tube_card, parent, false)");
                return new C0004b(this, inflate, this.b);
            }
            View inflate2 = LayoutInflater.from(this.d.getContext()).inflate(R.layout.arg_RES_2131493555, viewGroup, false);
            j.d(inflate2, "from(context)\n          …and_image, parent, false)");
            return new a(this, inflate2, this.b);
        }
    }

    public static final class c extends e.g.a.m0.c0.c {
        public final /* synthetic */ TubeAndImageCard c;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public c(TubeAndImageCard tubeAndImageCard, Context context) {
            super(context);
            this.c = tubeAndImageCard;
        }

        @Override // e.g.a.m0.c0.c
        public e.g.a.m0.c0.a g(int i2) {
            List<a> list;
            if (i2 == 0) {
                d dVar = new d(true, 0, 16.0f, CropImageView.DEFAULT_ASPECT_RATIO, CropImageView.DEFAULT_ASPECT_RATIO);
                d dVar2 = new d(false, -10066330, CropImageView.DEFAULT_ASPECT_RATIO, CropImageView.DEFAULT_ASPECT_RATIO, CropImageView.DEFAULT_ASPECT_RATIO);
                e.g.a.m0.c0.a aVar = new e.g.a.m0.c0.a(dVar, dVar2, dVar2, dVar2);
                j.d(aVar, "DividerBuilder()\n       …                .create()");
                return aVar;
            }
            b bVar = this.c.f1076m;
            int i3 = 0;
            if (!(bVar == null || (list = bVar.f1080a) == null)) {
                i3 = list.size();
            }
            if (i2 == i3 - 1) {
                d dVar3 = new d(true, 0, 8.0f, CropImageView.DEFAULT_ASPECT_RATIO, CropImageView.DEFAULT_ASPECT_RATIO);
                d dVar4 = new d(true, 0, 16.0f, CropImageView.DEFAULT_ASPECT_RATIO, CropImageView.DEFAULT_ASPECT_RATIO);
                d dVar5 = new d(false, -10066330, CropImageView.DEFAULT_ASPECT_RATIO, CropImageView.DEFAULT_ASPECT_RATIO, CropImageView.DEFAULT_ASPECT_RATIO);
                e.g.a.m0.c0.a aVar2 = new e.g.a.m0.c0.a(dVar3, dVar5, dVar4, dVar5);
                j.d(aVar2, "DividerBuilder()\n       …                .create()");
                return aVar2;
            }
            d dVar6 = new d(true, 0, 8.0f, CropImageView.DEFAULT_ASPECT_RATIO, CropImageView.DEFAULT_ASPECT_RATIO);
            d dVar7 = new d(false, -10066330, CropImageView.DEFAULT_ASPECT_RATIO, CropImageView.DEFAULT_ASPECT_RATIO, CropImageView.DEFAULT_ASPECT_RATIO);
            e.g.a.m0.c0.a aVar3 = new e.g.a.m0.c0.a(dVar6, dVar7, dVar7, dVar7);
            j.d(aVar3, "DividerBuilder()\n       …                .create()");
            return aVar3;
        }
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public TubeAndImageCard(Context context, e.g.a.e.k.b bVar) {
        super(context, bVar);
        j.e(context, "context");
        j.e(bVar, "cardDef");
    }

    @Override // com.apkpure.aegon.app.newcard.AppCard, e.g.a.e.k.g
    public void j(AppCardData appCardData) {
        BannerImageProtos.BannerImage[] bannerImageArr;
        TubeInfoProtos.TubeInfo[] tubeInfoArr;
        j.e(appCardData, "appCard");
        super.j(appCardData);
        List<AppDetailInfoProtos.AppDetailInfo> data = appCardData.getData();
        if (!(data == null ? null : Boolean.valueOf(data.isEmpty())).booleanValue()) {
            this.f1077n = appCardData.getData().get(0);
            ArrayList arrayList = new ArrayList();
            ArrayList arrayList2 = new ArrayList();
            AppDetailInfoProtos.AppDetailInfo appDetailInfo = this.f1077n;
            if (!(appDetailInfo == null || (tubeInfoArr = appDetailInfo.tubes) == null)) {
                Collections.addAll(arrayList2, Arrays.copyOf(tubeInfoArr, tubeInfoArr.length));
            }
            ArrayList arrayList3 = new ArrayList();
            AppDetailInfoProtos.AppDetailInfo appDetailInfo2 = this.f1077n;
            if (!(appDetailInfo2 == null || (bannerImageArr = appDetailInfo2.screenshots) == null)) {
                Collections.addAll(arrayList3, Arrays.copyOf(bannerImageArr, bannerImageArr.length));
            }
            Iterator it = arrayList2.iterator();
            while (it.hasNext()) {
                a aVar = new a();
                aVar.d = 1;
                aVar.c = (TubeInfoProtos.TubeInfo) it.next();
                arrayList.add(aVar);
            }
            Iterator it2 = arrayList3.iterator();
            while (it2.hasNext()) {
                a aVar2 = new a();
                aVar2.d = 2;
                aVar2.b = (BannerImageProtos.BannerImage) it2.next();
                arrayList.add(aVar2);
            }
            b bVar = new b(this, arrayList, getPosition());
            this.f1076m = bVar;
            RecyclerView recyclerView = this.f1075l;
            if (recyclerView != null) {
                recyclerView.setAdapter(bVar);
            }
        }
    }

    @Override // com.apkpure.aegon.app.newcard.AppCard
    public View l(RecyclerView.s sVar) {
        RecyclerView recyclerView = null;
        View inflate = LayoutInflater.from(getContext()).inflate(R.layout.arg_RES_2131492974, (ViewGroup) null, true);
        this.f1074k = inflate;
        if (inflate != null) {
            recyclerView = (RecyclerView) inflate.findViewById(R.id.arg_RES_2131298720);
        }
        this.f1075l = recyclerView;
        if (recyclerView != null) {
            recyclerView.setRecycledViewPool(sVar);
        }
        RecyclerView recyclerView2 = this.f1075l;
        if (recyclerView2 != null) {
            recyclerView2.setHasFixedSize(true);
        }
        RecyclerView recyclerView3 = this.f1075l;
        if (recyclerView3 != null) {
            recyclerView3.setNestedScrollingEnabled(false);
        }
        RecyclerView recyclerView4 = this.f1075l;
        if (recyclerView4 != null) {
            getContext();
            recyclerView4.setLayoutManager(new LinearLayoutManager(0, false));
        }
        RecyclerView recyclerView5 = this.f1075l;
        if (recyclerView5 != null) {
            recyclerView5.h(new c(this, getContext()));
        }
        j.k("TubeAndImageCard 添加滑动监听器. ", Integer.valueOf(this.f1078o.hashCode()));
        RecyclerView recyclerView6 = this.f1075l;
        if (recyclerView6 != null) {
            recyclerView6.k(this.f1078o);
        }
        RecyclerView recyclerView7 = this.f1075l;
        if (recyclerView7 != null) {
            recyclerView7.i(this.f1079p);
        }
        View view = this.f1074k;
        j.c(view);
        return view;
    }

    @Override // com.apkpure.aegon.app.newcard.AppCard
    public View n(RecyclerView.s sVar) {
        return null;
    }

    @Override // com.apkpure.aegon.app.newcard.AppCard
    public void p() {
        j.k("TubeAndImageCard 移除滑动监听器. ", Integer.valueOf(this.f1078o.hashCode()));
        RecyclerView recyclerView = this.f1075l;
        if (recyclerView != null) {
            recyclerView.n0(this.f1078o);
        }
        RecyclerView recyclerView2 = this.f1075l;
        if (recyclerView2 != null) {
            recyclerView2.m0(this.f1079p);
        }
    }
}