导航菜单

页面标题

页面副标题

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

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

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


package com.mxtech.mediamanager;

import android.animation.AnimatorSet;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Handler;
import android.text.format.Formatter;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.appcompat.widget.Toolbar;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.m;
import com.m.x.player.pandora.common.fromstack.From;
import com.m.x.player.pandora.common.fromstack.FromStack;
import com.mxtech.mediamanager.view.MediaManagerCleanInfoView;
import com.mxtech.mediamanager.view.MediaManagerCleanScanView;
import defpackage.adb;
import defpackage.bdb;
import defpackage.cdb;
import defpackage.eg8;
import defpackage.eh;
import defpackage.esg;
import defpackage.foa;
import defpackage.h7f;
import defpackage.i0g;
import defpackage.il6;
import defpackage.j1b;
import defpackage.leb;
import defpackage.mg0;
import defpackage.ng0;
import defpackage.ng3;
import defpackage.no2;
import defpackage.qbg;
import defpackage.qya;
import defpackage.tj5;
import defpackage.tya;
import defpackage.uh1;
import defpackage.uk;
import java.util.Locale;
import kotlin.Function;
import kotlin.Metadata;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function1;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;

@Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u00012\u00020\u0002B\u0007¢\u0006\u0004\b\u0003\u0010\u0004J\u0017\u0010\b\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u0005H\u0007¢\u0006\u0004\b\b\u0010\t¨\u0006\n"}, d2 = {"Lcom/mxtech/mediamanager/MediaManagerCleanerActivity;", "Lqya;", "Lil6;", "<init>", "()V", "Lleb;", "event", "", "onEvent", "(Lleb;)V", "Player_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
public final class MediaManagerCleanerActivity extends qya implements il6 {
    public static final int B = 0;
    public gf t;
    public FromStack u;
    public long v;
    public boolean w;

    @NotNull
    public final asg x = o9a.b(new foa(1));

    @NotNull
    public final asg y = o9a.b(new pb3(this, 2));

    @NotNull
    public final asg z = o9a.b(new ng3(2));

    @NotNull
    public final a A = new a();

    public static final class a extends rtc {
        public a() {
            super(true);
        }

        public final void handleOnBackPressed() {
            int i = MediaManagerCleanerActivity.B;
            ?? r0 = MediaManagerCleanerActivity.this;
            ((eg8) r0.z.getValue()).d();
            if (((eg8) r0.z.getValue()).e(r0)) {
                return;
            }
            r0.finish();
        }
    }

    public static final class b implements hrc, aq6 {
        public final Function1 b;

        public b(Function1 function1) {
            this.b = function1;
        }

        public final void a(Object obj) {
            this.b.invoke(obj);
        }

        @NotNull
        public final Function<?> c() {
            return this.b;
        }

        public final boolean equals(Object obj) {
            if ((obj instanceof hrc) && (obj instanceof aq6)) {
                return this.b.equals(((aq6) obj).c());
            }
            return false;
        }

        public final int hashCode() {
            return this.b.hashCode();
        }
    }

    @Override
    public final void d6(int i) {
        h6(i == 2);
        g6();
    }

    public final cdb f6() {
        return (cdb) this.y.getValue();
    }

    public final void finish() {
        super/*android.app.Activity*/.finish();
        ((eg8) this.z.getValue()).release();
    }

    @Override
    public final FromStack fromStack() {
        FromStack q;
        if (this.u == null) {
            FromStack g = pzh.g(getIntent());
            this.u = g;
            if (g == null || (q = g.newAndPush(From.create("localMediaManagerCleaner", "localMediaManagerCleaner", "localMediaManagerCleaner"))) == null) {
                q = pzh.q(From.create("localMediaManagerCleaner", "localMediaManagerCleaner", "localMediaManagerCleaner"));
            }
            this.u = q;
        }
        return this.u;
    }

    public final void g6() {
        gf gfVar = this.t;
        if (gfVar == null) {
            gfVar = null;
        }
        Toolbar toolbar = gfVar.h;
        toolbar.setContentInsetStartWithNavigation(0);
        toolbar.setPadding(toolbar.getPaddingLeft(), qbg.a(tya.m), toolbar.getPaddingRight(), toolbar.getPaddingBottom());
        h7f.a.a(getApplicationContext(), toolbar, 2131166180);
    }

    public final void h6(boolean z) {
        if (z) {
            gf gfVar = this.t;
            if (gfVar == null) {
                gfVar = null;
            }
            ViewGroup.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) gfVar.i.getLayoutParams();
            ((ConstraintLayout.LayoutParams) layoutParams).v = -1;
            ((ConstraintLayout.LayoutParams) layoutParams).u = 2131363015;
            gf gfVar2 = this.t;
            if (gfVar2 == null) {
                gfVar2 = null;
            }
            gfVar2.i.setLayoutParams(layoutParams);
            gf gfVar3 = this.t;
            if (gfVar3 == null) {
                gfVar3 = null;
            }
            ConstraintLayout.LayoutParams layoutParams2 = gfVar3.d.getLayoutParams();
            layoutParams2.t = -1;
            layoutParams2.s = 2131366644;
            layoutParams2.j = 2131366596;
            ((ViewGroup.MarginLayoutParams) layoutParams2).topMargin = 0;
            layoutParams2.setMarginStart(0);
            gf gfVar4 = this.t;
            if (gfVar4 == null) {
                gfVar4 = null;
            }
            gfVar4.d.setLayoutParams(layoutParams2);
            gf gfVar5 = this.t;
            if (gfVar5 == null) {
                gfVar5 = null;
            }
            ConstraintLayout.LayoutParams layoutParams3 = gfVar5.c.getLayoutParams();
            ((ViewGroup.MarginLayoutParams) layoutParams3).topMargin = ((j1b) getResources()).a.getDimensionPixelOffset(2131165917);
            gf gfVar6 = this.t;
            if (gfVar6 == null) {
                gfVar6 = null;
            }
            gfVar6.c.setLayoutParams(layoutParams3);
            gf gfVar7 = this.t;
            if (gfVar7 == null) {
                gfVar7 = null;
            }
            ConstraintLayout.LayoutParams layoutParams4 = (ConstraintLayout.LayoutParams) gfVar7.b.getLayoutParams();
            ((ViewGroup.MarginLayoutParams) layoutParams4).topMargin = ((j1b) getResources()).a.getDimensionPixelOffset(2131165657);
            gf gfVar8 = this.t;
            (gfVar8 != null ? gfVar8 : null).b.setLayoutParams(layoutParams4);
            return;
        }
        gf gfVar9 = this.t;
        if (gfVar9 == null) {
            gfVar9 = null;
        }
        ViewGroup.LayoutParams layoutParams5 = (ConstraintLayout.LayoutParams) gfVar9.i.getLayoutParams();
        ((ConstraintLayout.LayoutParams) layoutParams5).v = 0;
        ((ConstraintLayout.LayoutParams) layoutParams5).u = -1;
        gf gfVar10 = this.t;
        if (gfVar10 == null) {
            gfVar10 = null;
        }
        gfVar10.i.setLayoutParams(layoutParams5);
        gf gfVar11 = this.t;
        if (gfVar11 == null) {
            gfVar11 = null;
        }
        ConstraintLayout.LayoutParams layoutParams6 = gfVar11.d.getLayoutParams();
        layoutParams6.t = 0;
        layoutParams6.s = -1;
        layoutParams6.j = 2131366644;
        ((ViewGroup.MarginLayoutParams) layoutParams6).topMargin = ((j1b) getResources()).a.getDimensionPixelOffset(2131165966);
        layoutParams6.setMarginStart(((j1b) getResources()).a.getDimensionPixelOffset(2131165727));
        gf gfVar12 = this.t;
        if (gfVar12 == null) {
            gfVar12 = null;
        }
        gfVar12.d.setLayoutParams(layoutParams6);
        gf gfVar13 = this.t;
        if (gfVar13 == null) {
            gfVar13 = null;
        }
        ConstraintLayout.LayoutParams layoutParams7 = gfVar13.c.getLayoutParams();
        ((ViewGroup.MarginLayoutParams) layoutParams7).topMargin = ((j1b) getResources()).a.getDimensionPixelOffset(2131166064);
        gf gfVar14 = this.t;
        if (gfVar14 == null) {
            gfVar14 = null;
        }
        gfVar14.c.setLayoutParams(layoutParams7);
        gf gfVar15 = this.t;
        if (gfVar15 == null) {
            gfVar15 = null;
        }
        ConstraintLayout.LayoutParams layoutParams8 = (ConstraintLayout.LayoutParams) gfVar15.b.getLayoutParams();
        ((ViewGroup.MarginLayoutParams) layoutParams8).topMargin = ((j1b) getResources()).a.getDimensionPixelOffset(2131165648);
        gf gfVar16 = this.t;
        (gfVar16 != null ? gfVar16 : null).b.setLayoutParams(layoutParams8);
    }

    public final void j6() {
        if (this.w) {
            if (this.v <= 0) {
                gf gfVar = this.t;
                if (gfVar == null) {
                    gfVar = null;
                }
                gfVar.b.setVisibility(8);
                gf gfVar2 = this.t;
                if (gfVar2 == null) {
                    gfVar2 = null;
                }
                gfVar2.i.setVisibility(8);
                gf gfVar3 = this.t;
                if (gfVar3 == null) {
                    gfVar3 = null;
                }
                gfVar3.d.setVisibility(8);
                gf gfVar4 = this.t;
                if (gfVar4 == null) {
                    gfVar4 = null;
                }
                gfVar4.c.setVisibility(0);
                gf gfVar5 = this.t;
                (gfVar5 != null ? gfVar5 : null).j.setText(getResources().getString(2131888764, "GB"));
                return;
            }
            gf gfVar6 = this.t;
            if (gfVar6 == null) {
                gfVar6 = null;
            }
            gfVar6.b.setVisibility(8);
            gf gfVar7 = this.t;
            if (gfVar7 == null) {
                gfVar7 = null;
            }
            gfVar7.i.setVisibility(0);
            gf gfVar8 = this.t;
            if (gfVar8 == null) {
                gfVar8 = null;
            }
            gfVar8.d.setVisibility(0);
            gf gfVar9 = this.t;
            if (gfVar9 == null) {
                gfVar9 = null;
            }
            gfVar9.c.setVisibility(8);
            gf gfVar10 = this.t;
            if (gfVar10 == null) {
                gfVar10 = null;
            }
            AppCompatTextView appCompatTextView = gfVar10.k;
            long j = this.v;
            String str = "";
            appCompatTextView.setText(j <= 0 ? "" : eb6.e(3, 0, Formatter.formatFileSize(this, j)));
            gf gfVar11 = this.t;
            AppCompatTextView appCompatTextView2 = (gfVar11 != null ? gfVar11 : null).l;
            Resources resources = getResources();
            long j2 = this.v;
            if (j2 > 0) {
                String upperCase = Formatter.formatFileSize(this, j2).toUpperCase(Locale.ROOT);
                str = upperCase.substring(upperCase.length() - 2, upperCase.length());
            }
            appCompatTextView2.setText(resources.getString(2131888764, str));
        }
    }

    public final void k6(int i) {
        FromStack fromStack = fromStack();
        Intent intent = new Intent((Context) this, (Class<?>) MediaManagerCleanListActivity.class);
        intent.putExtra("clean_type", i);
        intent.putExtra(FromStack.FROM_LIST, fromStack);
        startActivity(intent);
    }

    public final void l6(MediaManagerCleanInfoView mediaManagerCleanInfoView, int i, int i2) {
        mediaManagerCleanInfoView.u.d.setText(getResources().getQuantityString(i, i2, Integer.valueOf(i2)));
    }

    @Override
    public final void onCreate(Bundle bundle) {
        setTheme(i0g.b().h("private_folder_theme"));
        super.onCreate(bundle);
        ConstraintLayout inflate = getLayoutInflater().inflate(2131558492, (ViewGroup) null, false);
        int i = 2131362693;
        MediaManagerCleanScanView mediaManagerCleanScanView = (MediaManagerCleanScanView) a7.o(2131362693, inflate);
        if (mediaManagerCleanScanView != null) {
            i = 2131362695;
            LinearLayout linearLayout = (LinearLayout) a7.o(2131362695, inflate);
            if (linearLayout != null) {
                i = 2131363015;
                ScrollView scrollView = (ScrollView) a7.o(2131363015, inflate);
                if (scrollView != null) {
                    i = 2131364192;
                    AppCompatImageView o = a7.o(2131364192, inflate);
                    if (o != null) {
                        i = 2131364482;
                        MediaManagerCleanInfoView mediaManagerCleanInfoView = (MediaManagerCleanInfoView) a7.o(2131364482, inflate);
                        if (mediaManagerCleanInfoView != null) {
                            i = 2131364483;
                            MediaManagerCleanInfoView mediaManagerCleanInfoView2 = (MediaManagerCleanInfoView) a7.o(2131364483, inflate);
                            if (mediaManagerCleanInfoView2 != null) {
                                i = 2131366596;
                                Toolbar o2 = a7.o(2131366596, inflate);
                                if (o2 != null) {
                                    i = 2131366644;
                                    LinearLayout linearLayout2 = (LinearLayout) a7.o(2131366644, inflate);
                                    if (linearLayout2 != null) {
                                        i = 2131366929;
                                        AppCompatTextView o3 = a7.o(2131366929, inflate);
                                        if (o3 != null) {
                                            i = 2131367323;
                                            if (a7.o(2131367323, inflate) != null) {
                                                i = 2131367334;
                                                AppCompatTextView o4 = a7.o(2131367334, inflate);
                                                if (o4 != null) {
                                                    i = 2131367348;
                                                    AppCompatTextView o5 = a7.o(2131367348, inflate);
                                                    if (o5 != null) {
                                                        i = 2131367782;
                                                        MediaManagerCleanInfoView mediaManagerCleanInfoView3 = (MediaManagerCleanInfoView) a7.o(2131367782, inflate);
                                                        if (mediaManagerCleanInfoView3 != null) {
                                                            this.t = new gf(inflate, mediaManagerCleanScanView, linearLayout, scrollView, o, mediaManagerCleanInfoView, mediaManagerCleanInfoView2, o2, linearLayout2, o3, o4, o5, mediaManagerCleanInfoView3);
                                                            getOnBackPressedDispatcher().b(this.A);
                                                            gf gfVar = this.t;
                                                            if (gfVar == null) {
                                                                gfVar = null;
                                                            }
                                                            setContentView(gfVar.a);
                                                            qbg.g(this);
                                                            esg.g(this);
                                                            tj5.e(this);
                                                            g6();
                                                            h6(this.q == 2);
                                                            gf gfVar2 = this.t;
                                                            if (gfVar2 == null) {
                                                                gfVar2 = null;
                                                            }
                                                            gfVar2.g.s(2131888766, new uh1(this, 1));
                                                            gf gfVar3 = this.t;
                                                            if (gfVar3 == null) {
                                                                gfVar3 = null;
                                                            }
                                                            gfVar3.f.s(2131888765, new bl3(this, 2));
                                                            gf gfVar4 = this.t;
                                                            if (gfVar4 == null) {
                                                                gfVar4 = null;
                                                            }
                                                            gfVar4.m.s(2131888768, new eh(this, 5));
                                                            f6().d.observe(this, new b(new sb1(this, 4)));
                                                            f6().i.observe(this, new b(new tb1(this, 4)));
                                                            f6().g.observe(this, new b(new ub1(this, 4)));
                                                            f6().f.observe(this, new b(new iq3(this, 2)));
                                                            f6().j.observe(this, new b(new jq3(this, 1)));
                                                            f6().h.observe(this, new b(new kq3(this, 3)));
                                                            f6().k.observe(this, new b(new nd1(this, 4)));
                                                            gf gfVar5 = this.t;
                                                            if (gfVar5 == null) {
                                                                gfVar5 = null;
                                                            }
                                                            gfVar5.e.setOnClickListener(new no2(this, 3));
                                                            gf gfVar6 = this.t;
                                                            if (gfVar6 == null) {
                                                                gfVar6 = null;
                                                            }
                                                            gfVar6.i.setVisibility(8);
                                                            gf gfVar7 = this.t;
                                                            if (gfVar7 == null) {
                                                                gfVar7 = null;
                                                            }
                                                            gfVar7.d.setVisibility(8);
                                                            gf gfVar8 = this.t;
                                                            if (gfVar8 == null) {
                                                                gfVar8 = null;
                                                            }
                                                            gfVar8.c.setVisibility(8);
                                                            gf gfVar9 = this.t;
                                                            if (gfVar9 == null) {
                                                                gfVar9 = null;
                                                            }
                                                            gfVar9.b.setVisibility(0);
                                                            ((Handler) this.x.getValue()).postDelayed(new ng0(this, 8), 300L);
                                                            cdb f6 = f6();
                                                            xfg.C(f6.r(), (CoroutineContext) null, (fs3) null, new bdb(f6, null), 3);
                                                            cdb f62 = f6();
                                                            xfg.C(f62.r(), (CoroutineContext) null, (fs3) null, new adb(f62, null), 3);
                                                            ((eg8) this.z.getValue()).loadAd();
                                                            return;
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
    }

    @Override
    public final void onDestroy() {
        AnimatorSet animatorSet;
        super.onDestroy();
        tj5.h(this);
        ((Handler) this.x.getValue()).removeCallbacksAndMessages(null);
        gf gfVar = this.t;
        MediaManagerCleanScanView mediaManagerCleanScanView = (gfVar != null ? gfVar : null).b;
        AnimatorSet animatorSet2 = mediaManagerCleanScanView.v;
        if (animatorSet2 == null || !animatorSet2.isRunning() || (animatorSet = mediaManagerCleanScanView.v) == null) {
            return;
        }
        animatorSet.cancel();
    }

    @vgg(threadMode = ThreadMode.MAIN)
    public final void onEvent(@NotNull leb event) {
        if (tj5.a.contains(this)) {
            int i = event.a;
            asg asgVar = this.x;
            if (i == 0) {
                ((Handler) asgVar.getValue()).postDelayed(new uk(this, 6), 500L);
            } else {
                if (i != 2) {
                    return;
                }
                ((Handler) asgVar.getValue()).postDelayed(new mg0(this, 3), 500L);
            }
        }
    }

    @Override
    @NotNull
    public final m mo25getActivity() {
        return this;
    }
}