导航菜单

页面标题

页面副标题

Uptodown App Store v6.80 - FreeUpSpaceActivity.java 源代码

正在查看: Uptodown App Store v6.80 应用的 FreeUpSpaceActivity.java JAVA 源代码文件

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


package com.uptodown.activities;

import M1.C0448c;
import N1.k;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.view.KeyEvent;
import android.view.View;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.core.content.ContextCompat;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.SimpleItemAnimator;
import b2.C0552a;
import com.uptodown.UptodownApp;
import com.uptodown.activities.C0747h;
import com.uptodown.activities.FreeUpSpaceActivity;
import f2.InterfaceC0919b;
import f2.InterfaceC0924g;
import g2.C0953d;
import g2.C0955f;
import java.util.ArrayList;
import java.util.Iterator;
import u2.H;

public final class FreeUpSpaceActivity extends AbstractC0740a {
    private C0448c L;
    private C0955f M;
    private final R2.g J = R2.h.a(new d3.a() {
        @Override
        public final Object invoke() {
            c2.E m32;
            m32 = FreeUpSpaceActivity.m3(FreeUpSpaceActivity.this);
            return m32;
        }
    });
    private final R2.g K = new ViewModelLazy(kotlin.jvm.internal.D.b(C0747h.class), new e(this), new d(this), new f(null, this));
    private final a N = new a();

    public static final class a implements InterfaceC0919b {
        a() {
        }

        @Override
        public void a(int i) {
            C0448c c0448c;
            ArrayList a;
            C0953d c0953d;
            String o;
            if (!UptodownApp.F.a0() || (c0448c = FreeUpSpaceActivity.this.L) == null || (a = c0448c.a()) == null || (c0953d = (C0953d) a.get(i)) == null || (o = c0953d.o()) == null) {
                return;
            }
            new N1.j(FreeUpSpaceActivity.this).h(o);
        }

        @Override
        public void b(int i) {
        }
    }

    static final class b extends kotlin.coroutines.jvm.internal.l implements d3.p {
        int a;
        final String c;
        final String d;

        b(String str, String str2, V2.d dVar) {
            super(2, dVar);
            this.c = str;
            this.d = str2;
        }

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return FreeUpSpaceActivity.this.new b(this.c, this.d, dVar);
        }

        @Override
        public final java.lang.Object invokeSuspend(java.lang.Object r4) {
            throw new UnsupportedOperationException("Method not decompiled: com.uptodown.activities.FreeUpSpaceActivity.b.invokeSuspend(java.lang.Object):java.lang.Object");
        }

        @Override
        public final Object invoke(o3.J j, V2.d dVar) {
            return ((b) create(j, dVar)).invokeSuspend(R2.s.a);
        }
    }

    static final class c extends kotlin.coroutines.jvm.internal.l implements d3.p {
        int a;

        static final class a implements r3.f {
            final FreeUpSpaceActivity a;

            static final class C0171a extends kotlin.coroutines.jvm.internal.l implements d3.p {
                int a;
                final FreeUpSpaceActivity b;

                C0171a(FreeUpSpaceActivity freeUpSpaceActivity, V2.d dVar) {
                    super(2, dVar);
                    this.b = freeUpSpaceActivity;
                }

                @Override
                public final V2.d create(Object obj, V2.d dVar) {
                    return new C0171a(this.b, dVar);
                }

                @Override
                public final Object invokeSuspend(Object obj) {
                    W2.b.c();
                    if (this.a != 0) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    R2.n.b(obj);
                    this.b.p3().c.setVisibility(0);
                    return R2.s.a;
                }

                @Override
                public final Object invoke(o3.J j, V2.d dVar) {
                    return ((C0171a) create(j, dVar)).invokeSuspend(R2.s.a);
                }
            }

            static final class b extends kotlin.coroutines.jvm.internal.l implements d3.p {
                int a;
                final FreeUpSpaceActivity b;
                final u2.H c;

                public static final class C0172a implements InterfaceC0924g {
                    final FreeUpSpaceActivity a;

                    static final class C0173a extends kotlin.coroutines.jvm.internal.l implements d3.p {
                        int a;
                        final FreeUpSpaceActivity b;
                        final String c;
                        final long d;

                        C0173a(FreeUpSpaceActivity freeUpSpaceActivity, String str, long j, V2.d dVar) {
                            super(2, dVar);
                            this.b = freeUpSpaceActivity;
                            this.c = str;
                            this.d = j;
                        }

                        @Override
                        public final V2.d create(Object obj, V2.d dVar) {
                            return new C0173a(this.b, this.c, this.d, dVar);
                        }

                        @Override
                        public final Object invokeSuspend(Object obj) {
                            W2.b.c();
                            if (this.a != 0) {
                                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                            }
                            R2.n.b(obj);
                            int q3 = this.b.q3(this.c);
                            if (q3 >= 0) {
                                C0448c c0448c = this.b.L;
                                ArrayList a = c0448c != null ? c0448c.a() : null;
                                kotlin.jvm.internal.m.b(a);
                                ((C0953d) a.get(q3)).b0(this.d);
                                C0448c c0448c2 = this.b.L;
                                if (c0448c2 != null) {
                                    c0448c2.notifyItemChanged(this.b.q3(this.c));
                                }
                            }
                            return R2.s.a;
                        }

                        @Override
                        public final Object invoke(o3.J j, V2.d dVar) {
                            return ((C0173a) create(j, dVar)).invokeSuspend(R2.s.a);
                        }
                    }

                    C0172a(FreeUpSpaceActivity freeUpSpaceActivity) {
                        this.a = freeUpSpaceActivity;
                    }

                    @Override
                    public void a(String packageName, long j) {
                        kotlin.jvm.internal.m.e(packageName, "packageName");
                        o3.g.d(LifecycleOwnerKt.getLifecycleScope(this.a), o3.Y.c(), (o3.L) null, new C0173a(this.a, packageName, j, null), 2, (Object) null);
                    }
                }

                b(FreeUpSpaceActivity freeUpSpaceActivity, u2.H h, V2.d dVar) {
                    super(2, dVar);
                    this.b = freeUpSpaceActivity;
                    this.c = h;
                }

                @Override
                public final V2.d create(Object obj, V2.d dVar) {
                    return new b(this.b, this.c, dVar);
                }

                @Override
                public final Object invokeSuspend(Object obj) {
                    W2.b.c();
                    if (this.a != 0) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    R2.n.b(obj);
                    this.b.p3().c.setVisibility(8);
                    this.b.x3(((C0747h.a) ((H.c) this.c).a()).a());
                    if (!((Boolean) this.b.r3().c().getValue()).booleanValue()) {
                        new C0552a(new C0172a(this.b), LifecycleOwnerKt.getLifecycleScope(this.b), this.b);
                        this.b.r3().c().setValue(kotlin.coroutines.jvm.internal.b.a(true));
                    }
                    return R2.s.a;
                }

                @Override
                public final Object invoke(o3.J j, V2.d dVar) {
                    return ((b) create(j, dVar)).invokeSuspend(R2.s.a);
                }
            }

            a(FreeUpSpaceActivity freeUpSpaceActivity) {
                this.a = freeUpSpaceActivity;
            }

            public final Object emit(u2.H h, V2.d dVar) {
                if (h instanceof H.a) {
                    Object g = o3.g.g(o3.Y.c(), new C0171a(this.a, null), dVar);
                    return g == W2.b.c() ? g : R2.s.a;
                }
                if (h instanceof H.c) {
                    Object g4 = o3.g.g(o3.Y.c(), new b(this.a, h, null), dVar);
                    return g4 == W2.b.c() ? g4 : R2.s.a;
                }
                if (h instanceof H.b) {
                    return R2.s.a;
                }
                throw new R2.k();
            }
        }

        c(V2.d dVar) {
            super(2, dVar);
        }

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return FreeUpSpaceActivity.this.new c(dVar);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c = W2.b.c();
            int i = this.a;
            if (i == 0) {
                R2.n.b(obj);
                r3.I d = FreeUpSpaceActivity.this.r3().d();
                a aVar = new a(FreeUpSpaceActivity.this);
                this.a = 1;
                if (d.collect(aVar, this) == c) {
                    return c;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                R2.n.b(obj);
            }
            throw new R2.d();
        }

        @Override
        public final Object invoke(o3.J j, V2.d dVar) {
            return ((c) create(j, dVar)).invokeSuspend(R2.s.a);
        }
    }

    public static final class d extends kotlin.jvm.internal.n implements d3.a {
        final ComponentActivity a;

        public d(ComponentActivity componentActivity) {
            super(0);
            this.a = componentActivity;
        }

        @Override
        public final ViewModelProvider.Factory invoke() {
            return this.a.getDefaultViewModelProviderFactory();
        }
    }

    public static final class e extends kotlin.jvm.internal.n implements d3.a {
        final ComponentActivity a;

        public e(ComponentActivity componentActivity) {
            super(0);
            this.a = componentActivity;
        }

        @Override
        public final ViewModelStore invoke() {
            return this.a.getViewModelStore();
        }
    }

    public static final class f extends kotlin.jvm.internal.n implements d3.a {
        final d3.a a;
        final ComponentActivity b;

        public f(d3.a aVar, ComponentActivity componentActivity) {
            super(0);
            this.a = aVar;
            this.b = componentActivity;
        }

        @Override
        public final CreationExtras invoke() {
            CreationExtras creationExtras;
            d3.a aVar = this.a;
            return (aVar == null || (creationExtras = (CreationExtras) aVar.invoke()) == null) ? this.b.getDefaultViewModelCreationExtras() : creationExtras;
        }
    }

    public static final c2.E m3(FreeUpSpaceActivity freeUpSpaceActivity) {
        return c2.E.c(freeUpSpaceActivity.getLayoutInflater());
    }

    public final int o3(String str) {
        C0448c c0448c = this.L;
        ArrayList a4 = c0448c != null ? c0448c.a() : null;
        if (a4 == null || a4.isEmpty()) {
            return -1;
        }
        C0448c c0448c2 = this.L;
        ArrayList a5 = c0448c2 != null ? c0448c2.a() : null;
        kotlin.jvm.internal.m.b(a5);
        Iterator it = a5.iterator();
        int i = 0;
        while (it.hasNext()) {
            int i4 = i + 1;
            if (m3.m.p(((C0953d) it.next()).o(), str, true)) {
                return i;
            }
            i = i4;
        }
        return -1;
    }

    public final c2.E p3() {
        return (c2.E) this.J.getValue();
    }

    public final int q3(String str) {
        C0448c c0448c = this.L;
        ArrayList a4 = c0448c != null ? c0448c.a() : null;
        if (a4 == null || a4.isEmpty()) {
            return -1;
        }
        C0448c c0448c2 = this.L;
        ArrayList a5 = c0448c2 != null ? c0448c2.a() : null;
        kotlin.jvm.internal.m.b(a5);
        Iterator it = a5.iterator();
        int i = 0;
        while (it.hasNext()) {
            int i4 = i + 1;
            if (m3.m.p(((C0953d) it.next()).o(), str, true)) {
                return i;
            }
            i = i4;
        }
        return -1;
    }

    public final C0747h r3() {
        return (C0747h) this.K.getValue();
    }

    private final void s3() {
        setContentView(p3().getRoot());
        Drawable drawable = ContextCompat.getDrawable(this, N1.e.c);
        if (drawable != null) {
            p3().e.setNavigationIcon(drawable);
            p3().e.setNavigationContentDescription(getString(2131951721));
        }
        p3().e.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                FreeUpSpaceActivity.t3(FreeUpSpaceActivity.this, view);
            }
        });
        TextView textView = p3().f;
        k.a aVar = N1.k.g;
        textView.setTypeface(aVar.w());
        p3().b.g.setTypeface(aVar.x());
        p3().b.h.setTypeface(aVar.x());
        p3().b.f.setTypeface(aVar.w());
        p3().b.f.setVisibility(8);
        w3();
        int dimension = (int) getResources().getDimension(2131166020);
        p3().d.addItemDecoration(new w2.l(dimension, dimension));
        p3().d.setLayoutManager(new LinearLayoutManager(this, 1, false));
        p3().d.setItemAnimator(new DefaultItemAnimator());
        SimpleItemAnimator itemAnimator = p3().d.getItemAnimator();
        kotlin.jvm.internal.m.b(itemAnimator);
        itemAnimator.setSupportsChangeAnimations(false);
        p3().c.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                FreeUpSpaceActivity.u3(view);
            }
        });
    }

    public static final void t3(FreeUpSpaceActivity freeUpSpaceActivity, View view) {
        freeUpSpaceActivity.finish();
    }

    public static final void u3(View view) {
    }

    public final void v3(boolean z) {
        r3().b(this, z);
    }

    public final void w3() {
        throw new UnsupportedOperationException("Method not decompiled: com.uptodown.activities.FreeUpSpaceActivity.w3():void");
    }

    public final void x3(ArrayList arrayList) {
        C0448c c0448c = this.L;
        if (c0448c == null) {
            this.L = new C0448c(arrayList, this, this.N);
            p3().d.setAdapter(this.L);
        } else {
            kotlin.jvm.internal.m.b(c0448c);
            c0448c.b(arrayList);
        }
    }

    public final Object n3(String str, String str2, V2.d dVar) {
        Object g = o3.g.g(o3.Y.c(), new b(str2, str, null), dVar);
        return g == W2.b.c() ? g : R2.s.a;
    }

    @Override
    protected void onCreate(Bundle bundle) {
        Bundle extras;
        Parcelable parcelable;
        Object parcelable2;
        super.onCreate(bundle);
        Intent intent = getIntent();
        if (intent != null && (extras = intent.getExtras()) != null && extras.containsKey("appInfo")) {
            Intent intent2 = getIntent();
            kotlin.jvm.internal.m.b(intent2);
            Bundle extras2 = intent2.getExtras();
            kotlin.jvm.internal.m.b(extras2);
            if (Build.VERSION.SDK_INT >= 33) {
                parcelable2 = extras2.getParcelable("appInfo", C0955f.class);
                parcelable = (Parcelable) parcelable2;
            } else {
                parcelable = extras2.getParcelable("appInfo");
            }
            this.M = (C0955f) parcelable;
        }
        s3();
        o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), (V2.g) null, (o3.L) null, new c(null), 3, (Object) null);
    }

    public boolean onKeyDown(int i, KeyEvent event) {
        kotlin.jvm.internal.m.e(event, "event");
        if (i != 82) {
            return super.onKeyDown(i, event);
        }
        p3().e.showOverflowMenu();
        return true;
    }

    @Override
    protected void onResume() {
        super.onResume();
        v3(true);
        u2.F.a.h(this);
    }
}