导航菜单

页面标题

页面副标题

MX Player v1.97.8 - b.java 源代码

正在查看: MX Player v1.97.8 应用的 b.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.mxtech.videoplayer.menu;

import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatCheckBox;
import androidx.appcompat.widget.AppCompatRadioButton;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.mxtech.media.FFPlayer;
import com.mxtech.videoplayer.ActivityScreen;
import com.mxtech.videoplayer.ad.online.model.bean.ReportRequest;
import com.mxtech.videoplayer.ad.online.model.bean.next.OnlineResource;
import com.mxtech.videoplayer.menu.AdjustPanelView;
import com.mxtech.videoplayer.menu.b;
import com.mxtech.videoplayer.n;
import com.truecaller.android.sdk.R;
import defpackage.s6d;
import defpackage.xlb;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Locale;
import okhttp3.p;

public class b extends xlb {
    public ArrayList h;
    public int i;
    public int j;
    public n k;
    public RecyclerView l;
    public AppCompatCheckBox m;
    public AppCompatCheckBox n;
    public AppCompatCheckBox o;
    public TextView p;
    public TextView q;
    public TextView r;
    public TextView s;
    public RelativeLayout t;
    public RelativeLayout u;
    public View v;
    public AdjustPanelView w;
    public NumberFormat x;
    public Handler y;

    public class a implements AdjustPanelView.a {
        public a() {
        }

        @Override
        public final void a(String str) {
            try {
                n nVar = b.this.k;
                nVar.m0 = (int) Math.round(Double.parseDouble(str.replace("s", "")) * 1000.0d);
                if (nVar.I != null) {
                    nVar.R0();
                }
            } catch (NumberFormatException unused) {
            }
        }

        @Override
        public final void b() {
            b.l9(b.this, 10);
        }

        @Override
        public final void c() {
            b.l9(b.this, -10);
        }
    }

    public class C0026b extends RecyclerView.e<a> {

        public class a extends RecyclerView.z {
            public AppCompatRadioButton b;
        }

        public C0026b() {
        }

        public final int getItemCount() {
            return b.this.h.size();
        }

        public final void onBindViewHolder(@NonNull RecyclerView.z zVar, final int i) {
            a aVar = (a) zVar;
            AppCompatRadioButton appCompatRadioButton = aVar.b;
            b bVar = b.this;
            appCompatRadioButton.setText(((ActivityScreen.o) bVar.h.get(i)).a);
            aVar.b.setChecked(i == bVar.j);
            final int i2 = 0;
            ((RecyclerView.z) aVar).itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    switch (i2) {
                        case 0:
                            b.C0026b c0026b = (b.C0026b) this;
                            b bVar2 = b.this;
                            bVar2.f.Ta();
                            ActivityScreen activityScreen = bVar2.f;
                            int i3 = bVar2.i;
                            int i4 = i;
                            activityScreen.oa(i4 == i3 ? null : (ActivityScreen.o) bVar2.h.get(i4), i4);
                            bVar2.j = i4;
                            c0026b.notifyDataSetChanged();
                            break;
                        default:
                            a aVar2 = this;
                            aVar2.getClass();
                            if (!en2.a(400L)) {
                                String str = aVar2.i[i];
                                wqe wqeVar = (wqe) aVar2.j.b;
                                OnlineResource onlineResource = wqeVar.b;
                                if (onlineResource != null) {
                                    String str2 = wqeVar.c;
                                    mdg u = d0d.u("reportSubmitted");
                                    HashMap hashMap = ((h71) u).b;
                                    hashMap.put("eventCategory", "videoDetailsScreen");
                                    hashMap.put("eventAction", "reportSubmitted");
                                    d0d.c(u, "itemID", onlineResource.getId());
                                    d0d.c(u, "itemType", d0d.F(onlineResource.getType()));
                                    d0d.c(u, "reasonType", str);
                                    d0d.c(u, "fromStack", str2);
                                    d0d.l(onlineResource, hashMap);
                                    gfh.d(u);
                                    ReportRequest reportRequest = new ReportRequest();
                                    reportRequest.msg_type = "user_report";
                                    reportRequest.r_id = wqeVar.b.getId();
                                    reportRequest.r_content = new String[]{str};
                                    reportRequest.r_type = wqeVar.b.getType();
                                    c cVar = new c();
                                    cVar.b = "POST";
                                    cVar.a = "https://androidapi.mxplay.com/v1/user_report/";
                                    cVar.e(reportRequest);
                                    new xe0(cVar).d(new vqe(wqeVar));
                                    break;
                                }
                            }
                            break;
                    }
                }
            });
        }

        @NonNull
        public final RecyclerView.z onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
            View a2 = l21.a(viewGroup, 2131558598, viewGroup, false);
            a aVar = new a(a2);
            aVar.b = a2.findViewById(2131365552);
            return aVar;
        }
    }

    public static void l9(b bVar, int i) {
        n nVar = bVar.k;
        nVar.m0 += i;
        if (nVar.I != null) {
            nVar.R0();
        }
        bVar.w.setEditText(bVar.x.format(bVar.k.m0 / 1000.0d) + "s");
    }

    public final void m9() {
        com.mxtech.media.b bVar;
        int audioStream;
        n nVar = this.k;
        if (nVar == null || !nVar.b0() || z4i.e(this)) {
            return;
        }
        Uri uri = this.k.o;
        if (sgj.l(uri == null ? null : uri.toString())) {
            this.p.setVisibility(8);
        } else if (this.k.X()) {
            this.p.setTextColor(getResources().getColor(R.color.white));
            this.p.setOnClickListener(new qb2(this, 2));
        } else {
            this.p.setTextColor(getResources().getColor(2131102884));
            this.p.setOnClickListener(null);
        }
        com.mxtech.media.b bVar2 = this.k.I;
        boolean z = false;
        if (bVar2 == null || (bVar2.N() & 16) == 0) {
            this.r.setTextColor(getResources().getColor(2131102884));
            this.w.setVisibility(8);
        } else {
            this.r.setTextColor(getResources().getColor(R.color.white));
            this.w.setVisibility(0);
        }
        this.w.setEditText(this.x.format(this.k.m0 / 1000.0d) + "s");
        this.w.setOnChangeListener(new a());
        if (this.k.Y()) {
            this.t.setOnClickListener(new th1(this, 4));
            this.s.setTextColor(getResources().getColor(R.color.white));
            this.n.setChecked(s6d.v);
            this.n.setEnabled(true);
        } else {
            this.t.setOnClickListener(null);
            this.s.setTextColor(getResources().getColor(2131102884));
            this.n.setEnabled(false);
        }
        if (bVar2 == null || (bVar2.N() & 32) == 0 || (audioStream = bVar2.getAudioStream()) < 0 || bVar2.M(audioStream) < 2) {
            this.q.setTextColor(getResources().getColor(2131102884));
            this.q.setOnClickListener(null);
        } else {
            this.q.setTextColor(getResources().getColor(R.color.white));
            this.q.setOnClickListener(new ah(this, 11));
        }
        if (this.k.Y() && (bVar = this.k.I) != null) {
            FFPlayer s = bVar.s();
            if (s instanceof FFPlayer) {
                FFPlayer fFPlayer = s;
                if (fFPlayer.isPrepared()) {
                    boolean isFixBrokenAudioNeeded = fFPlayer.isFixBrokenAudioNeeded();
                    if (isFixBrokenAudioNeeded) {
                        this.o.setChecked(s6d.w);
                        this.u.setVisibility(0);
                        this.u.setOnClickListener(new bh(this, 9));
                    }
                    z = isFixBrokenAudioNeeded;
                }
            }
        }
        if (z) {
            return;
        }
        this.u.setVisibility(8);
        this.u.setOnClickListener(null);
    }

    public final View onCreateView(@NonNull LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        return layoutInflater.inflate(2131559787, viewGroup, false);
    }

    public final void onStop() {
        super.onStop();
        Handler handler = this.y;
        if (handler != null) {
            handler.removeCallbacksAndMessages(null);
        }
    }

    @Override
    public final void onViewCreated(@NonNull View view, Bundle bundle) {
        super.onViewCreated(view, bundle);
        if (this.k == null) {
            ActivityScreen activityScreen = this.f;
            p pVar = z4i.a;
            if (jz9.N(activityScreen)) {
                this.f.Ta();
                return;
            }
            return;
        }
        NumberFormat numberFormat = NumberFormat.getInstance(Locale.getDefault());
        this.x = numberFormat;
        numberFormat.setMinimumFractionDigits(2);
        this.x.setMaximumFractionDigits(2);
        this.l = view.findViewById(2131365769);
        this.m = view.findViewById(2131362587);
        this.n = view.findViewById(2131362563);
        this.o = view.findViewById(2131362571);
        this.p = (TextView) view.findViewById(2131367144);
        this.q = (TextView) view.findViewById(2131367102);
        this.r = (TextView) view.findViewById(2131367306);
        this.t = (RelativeLayout) view.findViewById(2131365725);
        this.u = (RelativeLayout) view.findViewById(2131365732);
        this.s = (TextView) view.findViewById(2131366893);
        this.v = view.findViewById(2131367552);
        this.w = (AdjustPanelView) view.findViewById(2131361989);
        ArrayList arrayList = this.h;
        if (arrayList == null || arrayList.size() == 0) {
            this.v.setVisibility(8);
        }
        ArrayList arrayList2 = this.h;
        if (arrayList2 != null && arrayList2.size() > 0) {
            RecyclerView recyclerView = this.l;
            getContext();
            recyclerView.setLayoutManager(new LinearLayoutManager(1));
            this.l.setAdapter(new C0026b());
        }
        this.m.setChecked(this.k.H);
        this.m.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                int i;
                b bVar = b.this;
                n nVar = bVar.k;
                if (nVar == null || !nVar.b0()) {
                    return;
                }
                bVar.k.H0(z);
                bVar.k.y0();
                ArrayList arrayList3 = bVar.h;
                if (arrayList3 == null || arrayList3.size() == 0 || bVar.j >= bVar.h.size() || (i = bVar.j) < 0) {
                    return;
                }
                bVar.f.oa((ActivityScreen.o) bVar.h.get(i), bVar.j);
                if (bVar.y == null) {
                    bVar.y = new Handler(Looper.getMainLooper());
                }
                bVar.y.postDelayed(new ng0(bVar, 9), 200L);
            }
        });
        m9();
    }
}