Fing.apk(点击下载) / w0.java


package e.f.a.a.b.i.k;

import android.content.res.Resources;
import android.os.Bundle;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.overlook.android.fing.R;
import com.overlook.android.fing.ui.marketing.onboarding.base.OnboardingActivity;
import com.overlook.android.fing.vl.components.BulletPoint;
import com.overlook.android.fing.vl.components.Header;
import com.overlook.android.fing.vl.components.IconView;
import com.overlook.android.fing.vl.components.Separator;
import com.overlook.android.fing.vl.components.h1;
import e.f.a.a.b.j.j;
import e.f.a.a.b.j.k;
import e.f.a.a.b.j.l;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;

/* compiled from: ReleaseNotesFragment */
public class w0 extends com.overlook.android.fing.ui.marketing.onboarding.base.b {
    private static final DateFormat q0 = new SimpleDateFormat("MMMM d, yyyy", Locale.ENGLISH);
    private RecyclerView n0;
    private d o0;
    private List<e.f.a.a.b.b.c> p0 = new ArrayList();

    /* compiled from: ReleaseNotesFragment */
    public static class b {

        /* renamed from: a  reason: collision with root package name */
        private String f22704a;
        private Date b;

        public b(String str, String str2) {
            this.f22704a = str;
            try {
                this.b = w0.q0.parse(str2);
            } catch (ParseException unused) {
                this.b = null;
            }
        }
    }

    /* compiled from: ReleaseNotesFragment */
    public static class c {

        /* renamed from: a  reason: collision with root package name */
        private int f22705a;
        private String b;

        public c(int i2, String str) {
            this.f22705a = i2;
            this.b = str;
        }
    }

    /* access modifiers changed from: private */
    /* compiled from: ReleaseNotesFragment */
    public class d extends RecyclerView.e<h1<View>> {
        d(a aVar) {
        }

        private e.f.a.a.b.b.c z(int i2) {
            if (i2 < 0 || i2 >= w0.this.p0.size()) {
                return null;
            }
            return (e.f.a.a.b.b.c) w0.this.p0.get(i2);
        }

        @Override // androidx.recyclerview.widget.RecyclerView.e
        public int e() {
            if (w0.this.m0() == null) {
                return 0;
            }
            return w0.this.p0.size();
        }

        @Override // androidx.recyclerview.widget.RecyclerView.e
        public long f(int i2) {
            return (long) i2;
        }

        @Override // androidx.recyclerview.widget.RecyclerView.e
        public int g(int i2) {
            return ((e.f.a.a.b.b.c) w0.this.p0.get(i2)).b();
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [androidx.recyclerview.widget.RecyclerView$x, int] */
        @Override // androidx.recyclerview.widget.RecyclerView.e
        public void q(h1<View> h1Var, int i2) {
            h1<View> h1Var2 = h1Var;
            e.f.a.a.b.b.c cVar = (e.f.a.a.b.b.c) w0.this.p0.get(i2);
            boolean z = true;
            if (cVar.b() == 0) {
                Header header = (Header) h1Var2.f1428a;
                String str = (String) cVar.a();
                int dimensionPixelSize = w0.this.w0().getDimensionPixelSize(R.dimen.spacing_small);
                if (i2 != 0) {
                    z = false;
                }
                header.setPadding(0, z ? 0 : dimensionPixelSize, 0, dimensionPixelSize);
                header.C(str);
            } else if (cVar.b() == 1) {
                Header header2 = (Header) h1Var2.f1428a;
                b bVar = (b) cVar.a();
                if (bVar != null) {
                    int dimensionPixelSize2 = w0.this.w0().getDimensionPixelSize(R.dimen.spacing_regular);
                    if (i2 != 0) {
                        z = false;
                    }
                    header2.setPadding(0, z ? 0 : dimensionPixelSize2, 0, dimensionPixelSize2);
                    header2.C(bVar.f22704a);
                    if (bVar.b != null) {
                        header2.x(j.b(bVar.b.getTime(), k.DATE, l.LONG));
                        header2.y(0);
                        return;
                    }
                    header2.y(8);
                }
            } else if (cVar.b() == 2) {
                ((Header) h1Var2.f1428a).C((String) cVar.a());
            } else if (cVar.b() == 3) {
                BulletPoint bulletPoint = (BulletPoint) h1Var2.f1428a;
                String str2 = (String) cVar.a();
                Resources w0 = w0.this.w0();
                e.f.a.a.b.b.c z2 = z(i2 - 1);
                e.f.a.a.b.b.c z3 = z(i2 + 1);
                int dimensionPixelSize3 = w0.getDimensionPixelSize(R.dimen.spacing_mini);
                int i3 = (z2 == null || z2.b() != 3) ? dimensionPixelSize3 : dimensionPixelSize3 / 2;
                if (z3 != null && z3.b() == 3) {
                    dimensionPixelSize3 /= 2;
                }
                bulletPoint.setPadding(0, i3, 0, dimensionPixelSize3);
                bulletPoint.d(Html.fromHtml(str2));
            } else if (cVar.b() == 4) {
                IconView iconView = (IconView) h1Var2.f1428a;
                c cVar2 = (c) cVar.a();
                if (w0.this.m0() != null && cVar2 != null) {
                    iconView.setImageResource(cVar2.f22705a);
                    if (cVar2.b != null) {
                        iconView.setOnClickListener(new g0(this, cVar2));
                    } else {
                        iconView.setOnClickListener(null);
                    }
                }
            }
        }

        /* Return type fixed from 'androidx.recyclerview.widget.RecyclerView$x' to match base method */
        @Override // androidx.recyclerview.widget.RecyclerView.e
        public h1<View> r(ViewGroup viewGroup, int i2) {
            h1 h1Var;
            Resources w0 = w0.this.w0();
            int dimensionPixelSize = w0.getDimensionPixelSize(R.dimen.spacing_small);
            if (i2 == 0) {
                Header header = new Header(w0.this.m0());
                header.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));
                header.E(2, 28.0f);
                header.D(4);
                return new h1(header);
            }
            if (i2 == 1) {
                IconView iconView = new IconView(w0.this.m0());
                iconView.setImageResource(R.mipmap.ic_launcher);
                iconView.setScaleType(ImageView.ScaleType.FIT_CENTER);
                iconView.p(true);
                Header header2 = new Header(w0.this.m0());
                header2.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));
                header2.t(iconView, null);
                iconView.r(e.e.a.a.a.a.s(40.0f), e.e.a.a.a.a.s(40.0f));
                h1Var = new h1(header2);
            } else if (i2 == 2) {
                Header header3 = new Header(w0.this.m0());
                header3.setPaddingRelative(0, dimensionPixelSize, 0, dimensionPixelSize);
                header3.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));
                header3.A(10);
                header3.E(0, (float) w0.getDimensionPixelSize(R.dimen.font_h2));
                h1Var = new h1(header3);
            } else if (i2 == 3) {
                BulletPoint bulletPoint = new BulletPoint(w0.this.m0());
                bulletPoint.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));
                return new h1(bulletPoint);
            } else if (i2 == 4) {
                IconView iconView2 = new IconView(w0.this.m0());
                iconView2.setAdjustViewBounds(true);
                iconView2.setScaleType(ImageView.ScaleType.FIT_CENTER);
                iconView2.setPaddingRelative(0, dimensionPixelSize, 0, dimensionPixelSize);
                iconView2.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));
                return new h1(iconView2);
            } else if (i2 != 5) {
                return new h1(new View(w0.this.m0()));
            } else {
                Separator separator = new Separator(w0.this.m0());
                separator.setPadding(0, dimensionPixelSize, 0, 0);
                separator.setLayoutParams(new ViewGroup.LayoutParams(-1, e.e.a.a.a.a.s(1.0f) + dimensionPixelSize));
                return new h1(separator);
            }
            return h1Var;
        }
    }

    @Override // com.overlook.android.fing.ui.marketing.onboarding.base.b
    public OnboardingActivity.a J2() {
        return OnboardingActivity.a.RELEASE_NOTES;
    }

    public void R2(int i2) {
        this.p0.add(new e.f.a.a.b.b.c(i2, null));
    }

    public void S2(int i2, Object obj) {
        this.p0.add(new e.f.a.a.b.b.c(i2, obj));
    }

    @Override // com.overlook.android.fing.ui.marketing.onboarding.base.b, com.overlook.android.fing.ui.base.j, androidx.fragment.app.Fragment
    public View Z0(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View Z0 = super.Z0(layoutInflater, viewGroup, bundle);
        if (m0() != null) {
            this.e0.setVisibility(8);
        }
        S2(0, C0(R.string.prefs_releasenote_header_title));
        S2(1, new b("Fing 11.1", "Apr 20, 2021"));
        S2(3, C0(R.string.releasenote_fing1110_section1_bullet1));
        S2(3, C0(R.string.releasenote_title));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 11.0.2", "Mar 30, 2021", this, 1, R.string.releasenote_title));
        S2(3, C0(R.string.releasenote_fing1020_android_section1_bullet2));
        S2(3, C0(R.string.releasenote_fing1020_section1_bullet1));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 11.0.1", "Mar 15, 2021", this, 1, R.string.releasenote_title));
        R2(5);
        S2(2, e.a.a.a.a.u("Fing 11", "Feb 22, 2021", this, 1, R.string.releasenote_fing1100_section1));
        S2(3, C0(R.string.releasenote_fing1100_section1_bullet1));
        S2(3, C0(R.string.releasenote_fing1100_section1_bullet2));
        S2(2, C0(R.string.releasenote_title));
        S2(3, C0(R.string.releasenote_fing1100_section1_bullet3));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 10.3", "Feb 1, 2021", this, 1, R.string.releasenote_fing1030_section1_bullet1));
        S2(3, C0(R.string.releasenote_fing1030_section1_bullet2));
        R2(5);
        S2(1, new b("Fing 10.2", "Jan 19, 2021"));
        S2(3, C0(R.string.releasenote_fing1020_android_section1_bullet1));
        S2(3, C0(R.string.releasenote_fing1020_android_section1_bullet2));
        S2(3, C0(R.string.releasenote_fing1020_section1_bullet1));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 10.1.1", "Dec 14, 2020", this, 1, R.string.releasenote_fing1011_android_section1_bullet1));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 10.1", "Dec 11, 2020", this, 1, R.string.releasenote_title));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 10.0.1", "Nov 9, 2020", this, 1, R.string.releasenote_fing1001_android_section1_bullet1));
        S2(3, C0(R.string.releasenote_fing1001_android_section1_bullet2));
        R2(5);
        S2(1, new b("Fing 10", "Oct 26, 2020"));
        S2(3, C0(R.string.releasenote_fing1000_section1_bullet1));
        S2(3, C0(R.string.releasenote_fing1000_section1_bullet2));
        S2(3, C0(R.string.releasenote_fing1000_section1_bullet3));
        S2(3, C0(R.string.releasenote_fing1000_section1_bullet4));
        S2(2, C0(R.string.releasenote_subtitle));
        S2(3, C0(R.string.releasenote_fing1000_android_section2_bullet1));
        S2(3, C0(R.string.releasenote_fing1000_android_section2_bullet2));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 9.2.1", "Sep 14, 2020", this, 1, R.string.releasenote_title));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 9.2", "Aug 25, 2020", this, 1, R.string.releasenote_fing920_android_section1_bullet1));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 9.1.3", "Aug 05, 2020", this, 1, R.string.releasenote_fing913_android_section1_bullet1));
        S2(3, C0(R.string.releasenote_fing913_android_section1_bullet2));
        R2(5);
        S2(1, new b("Fing 9.1.1", "Jul 20, 2020"));
        S2(3, C0(R.string.releasenote_fing911_android_section1_bullet1));
        S2(3, C0(R.string.releasenote_fing911_android_section1_bullet2));
        S2(3, C0(R.string.releasenote_fing911_android_section1_bullet3));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 9.1", "Jun 22, 2020", this, 1, R.string.releasenote_fing910_section1_bullet1));
        S2(3, C0(R.string.releasenote_title));
        R2(5);
        S2(1, new b("Fing 9.0.4", "Jun 15, 2020"));
        S2(3, C0(R.string.releasenote_fing904_android_section1_bullet1));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 9.0.3", "Jun 12, 2020", this, 1, R.string.releasenote_fing903_android_section1_bullet1));
        R2(5);
        S2(3, e.a.a.a.a.u("Fing 9.0.2", "Jun 10, 2020", this, 1, R.string.releasenote_fing902_android_section1_bullet1));
        S2(3, C0(R.string.releasenote_fing902_android_section1_bullet2));
        S2(3, C0(R.string.releasenote_title));
        R2(5);
        S2(2, e.a.a.a.a.u("Fing 9.0.1", "May 29, 2020", this, 1, R.string.releasenote_fing900_section1));
        S2(3, C0(R.string.releasenote_fing900_section1_bullet1));
        S2(4, new c(R.drawable.fing9_video, "https://www.youtube.com/watch?v=otvtyxsRhug&feature=youtu.be"));
        S2(3, C0(R.string.releasenote_fing900_section1_bullet2));
        S2(3, C0(R.string.releasenote_fing900_section1_bullet3));
        S2(3, C0(R.string.releasenote_fing900_section1_bullet4));
        S2(3, C0(R.string.releasenote_fing900_section1_bullet5));
        this.h0.setVisibility(8);
        this.g0.n(L2() ? R.string.generic_done : R.string.generic_next);
        this.g0.setOnClickListener(new f0(this));
        if (m0() != null) {
            this.o0 = new d(null);
            RecyclerView recyclerView = new RecyclerView(m0(), null);
            this.n0 = recyclerView;
            recyclerView.B0(this.o0);
            this.n0.F0(new LinearLayoutManager(m0()));
            this.n0.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));
            this.c0.removeAllViewsInLayout();
            this.c0.addView(this.n0);
        }
        return Z0;
    }

    @Override // androidx.fragment.app.Fragment
    public void p1() {
        super.p1();
        j.z(this, "Release_Notes");
    }
}