导航菜单

页面标题

页面副标题

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

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

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


package com.uptodown.activities;

import J1.AbstractC0355q2;
import J1.Y3;
import N1.k;
import S2.AbstractC0525o;
import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcelable;
import android.os.ResultReceiver;
import android.view.View;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.app.AppCompatActivity;
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.RecyclerView;
import b2.C0560i;
import c2.C0607t0;
import com.uptodown.UptodownApp;
import com.uptodown.activities.RecommendedActivity;
import com.uptodown.workers.DownloadWorker;
import f2.InterfaceC0934q;
import g2.C0955f;
import g2.C0957h;
import g2.C0965p;
import java.io.File;
import java.util.ArrayList;
import kotlin.jvm.internal.AbstractC1009g;
import u2.C1233m;
import u2.H;
import u2.v;

public final class RecommendedActivity extends AbstractC0355q2 {

    public static final a f258m0 = new a(null);
    private M1.Q X;
    private final ActivityResultLauncher Z;
    private final R2.g V = R2.h.a(new d3.a() {
        @Override
        public final Object invoke() {
            C0607t0 V4;
            V4 = RecommendedActivity.V4(RecommendedActivity.this);
            return V4;
        }
    });
    private final R2.g W = new ViewModelLazy(kotlin.jvm.internal.D.b(Y3.class), new i(this), new h(this), new j(null, this));
    private d Y = new d();

    public static final class a {
        public a(AbstractC1009g abstractC1009g) {
            this();
        }

        private a() {
        }
    }

    public static final class b implements f2.N {
        final int b;

        b(int i) {
            this.b = i;
        }

        @Override
        public void a() {
            ?? r02 = RecommendedActivity.this;
            String string = r02.getString(2131952006);
            kotlin.jvm.internal.m.d(string, "getString(...)");
            r02.r0(string);
        }

        @Override
        public void f() {
            ArrayList b;
            M1.Q q = RecommendedActivity.this.X;
            if (q != null && (b = q.b()) != null) {
            }
            M1.Q q3 = RecommendedActivity.this.X;
            if (q3 != null) {
                q3.notifyItemRemoved(this.b);
            }
        }
    }

    public static final class c extends RecyclerView.OnScrollListener {
        final LinearLayoutManager a;
        final RecommendedActivity b;

        c(LinearLayoutManager linearLayoutManager, RecommendedActivity recommendedActivity) {
            this.a = linearLayoutManager;
            this.b = recommendedActivity;
        }

        public void onScrolled(RecyclerView recyclerView, int i, int i4) {
            kotlin.jvm.internal.m.e(recyclerView, "recyclerView");
            if (i4 > 0) {
                int findFirstVisibleItemPosition = this.a.findFirstVisibleItemPosition();
                int childCount = this.a.getChildCount();
                int itemCount = this.a.getItemCount();
                if (this.b.a5().h() || this.b.a5().g() || childCount + findFirstVisibleItemPosition < itemCount) {
                    return;
                }
                M1.Q q = this.b.X;
                kotlin.jvm.internal.m.b(q);
                q.f(true);
                this.b.a5().f(this.b);
            }
        }
    }

    public static final class d implements f2.T {

        public static final class a implements InterfaceC0934q {
            final RecommendedActivity a;
            final int b;

            a(RecommendedActivity recommendedActivity, int i) {
                this.a = recommendedActivity;
                this.b = i;
            }

            @Override
            public void c(int i) {
                ?? r3 = this.a;
                String string = r3.getString(2131952000);
                kotlin.jvm.internal.m.d(string, "getString(...)");
                r3.r0(string);
            }

            @Override
            public void d(C0955f appInfo) {
                kotlin.jvm.internal.m.e(appInfo, "appInfo");
                String p = appInfo.p();
                if (p == null || p.length() == 0) {
                    ?? r02 = this.a;
                    String string = r02.getString(2131951925, appInfo.M());
                    kotlin.jvm.internal.m.d(string, "getString(...)");
                    r02.V1(string);
                    return;
                }
                if (new C1233m().v(appInfo.R(), this.a)) {
                    this.a.t4(new C1233m().D(this.a, appInfo.R()));
                } else {
                    this.a.o5(appInfo, this.b);
                }
            }
        }

        d() {
        }

        @Override
        public void a(int i) {
            if (!UptodownApp.F.a0() || RecommendedActivity.this.X == null) {
                return;
            }
            M1.Q q = RecommendedActivity.this.X;
            kotlin.jvm.internal.m.b(q);
            if (q.b().isEmpty()) {
                return;
            }
            M1.Q q3 = RecommendedActivity.this.X;
            kotlin.jvm.internal.m.b(q3);
            Object obj = q3.b().get(i);
            kotlin.jvm.internal.m.d(obj, "get(...)");
            RecommendedActivity.this.D2(((g2.U) obj).a());
        }

        @Override
        public void b(View v, int i) {
            kotlin.jvm.internal.m.e(v, "v");
            if (!UptodownApp.F.a0() || RecommendedActivity.this.X == null) {
                return;
            }
            M1.Q q = RecommendedActivity.this.X;
            kotlin.jvm.internal.m.b(q);
            if (q.b().isEmpty()) {
                return;
            }
            RecommendedActivity recommendedActivity = RecommendedActivity.this;
            M1.Q q3 = recommendedActivity.X;
            kotlin.jvm.internal.m.b(q3);
            Object obj = q3.b().get(i);
            kotlin.jvm.internal.m.d(obj, "get(...)");
            recommendedActivity.X4((g2.U) obj, i);
        }

        @Override
        public void c(int i) {
            if (RecommendedActivity.this.X != null) {
                M1.Q q = RecommendedActivity.this.X;
                kotlin.jvm.internal.m.b(q);
                if (q.b().isEmpty()) {
                    return;
                }
                ?? r22 = RecommendedActivity.this;
                M1.Q q3 = ((RecommendedActivity) r22).X;
                kotlin.jvm.internal.m.b(q3);
                new C0560i(r22, ((g2.U) q3.b().get(i)).a(), new a(RecommendedActivity.this, i), LifecycleOwnerKt.getLifecycleScope(RecommendedActivity.this));
            }
        }

        @Override
        public void d(int i) {
            if (RecommendedActivity.this.X != null) {
                M1.Q q = RecommendedActivity.this.X;
                kotlin.jvm.internal.m.b(q);
                if (q.b().isEmpty()) {
                    return;
                }
                M1.Q q3 = RecommendedActivity.this.X;
                kotlin.jvm.internal.m.b(q3);
                Object obj = q3.b().get(i);
                kotlin.jvm.internal.m.d(obj, "get(...)");
                g2.U u = (g2.U) obj;
                String f = u.f();
                if (f == null || f.length() == 0) {
                    ?? r02 = RecommendedActivity.this;
                    String string = r02.getString(2131952013, u.e());
                    kotlin.jvm.internal.m.d(string, "getString(...)");
                    r02.V1(string);
                    return;
                }
                PackageManager packageManager = RecommendedActivity.this.getPackageManager();
                String f4 = u.f();
                kotlin.jvm.internal.m.b(f4);
                Intent launchIntentForPackage = packageManager.getLaunchIntentForPackage(f4);
                if (launchIntentForPackage != null) {
                    RecommendedActivity.this.startActivity(launchIntentForPackage);
                    return;
                }
                ?? r03 = RecommendedActivity.this;
                String string2 = r03.getString(2131952013, u.e());
                kotlin.jvm.internal.m.d(string2, "getString(...)");
                r03.V1(string2);
            }
        }

        @Override
        public void e(long j, C0957h category) {
            kotlin.jvm.internal.m.e(category, "category");
            if (UptodownApp.F.a0()) {
                RecommendedActivity.this.p5(j, category);
            }
        }

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

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

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

            a(RecommendedActivity recommendedActivity) {
                this.a = recommendedActivity;
            }

            public final Object emit(u2.H h, V2.d dVar) {
                if (h instanceof H.a) {
                    if (this.a.X == null) {
                        this.a.Z4().b.setVisibility(0);
                    }
                } else if (h instanceof H.c) {
                    H.c cVar = (H.c) h;
                    if (((ArrayList) cVar.a()).size() == 0) {
                        this.a.Z4().h.setVisibility(0);
                        this.a.Z4().f.setVisibility(0);
                    } else {
                        this.a.Z4().d.setVisibility(0);
                        this.a.Z4().g.setVisibility(0);
                        this.a.W4((ArrayList) cVar.a());
                    }
                    this.a.Z4().b.setVisibility(8);
                } else {
                    if (!(h instanceof H.b)) {
                        throw new R2.k();
                    }
                    M1.Q q = this.a.X;
                    if (q != null) {
                        q.f(false);
                    }
                }
                return R2.s.a;
            }
        }

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

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return RecommendedActivity.this.new e(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 i4 = RecommendedActivity.this.a5().i();
                a aVar = new a(RecommendedActivity.this);
                this.a = 1;
                if (i4.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 ((e) create(j, dVar)).invokeSuspend(R2.s.a);
        }
    }

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

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

            a(RecommendedActivity recommendedActivity) {
                this.a = recommendedActivity;
            }

            public final Object b(boolean z, V2.d dVar) {
                this.a.Z4().d.setChecked(!z);
                if (z) {
                    this.a.Z4().g.setText(this.a.getString(2131952520));
                } else {
                    this.a.Z4().g.setText(this.a.getString(2131952524));
                }
                return R2.s.a;
            }

            public Object emit(Object obj, V2.d dVar) {
                return b(((Boolean) obj).booleanValue(), dVar);
            }
        }

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

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return RecommendedActivity.this.new f(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 j = RecommendedActivity.this.a5().j();
                a aVar = new a(RecommendedActivity.this);
                this.a = 1;
                if (j.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 ((f) create(j, dVar)).invokeSuspend(R2.s.a);
        }
    }

    public static final class g implements InterfaceC0934q {
        final C0957h b;

        g(C0957h c0957h) {
            this.b = c0957h;
        }

        @Override
        public void c(int i) {
            ?? r3 = RecommendedActivity.this;
            String string = r3.getString(2131951688);
            kotlin.jvm.internal.m.d(string, "getString(...)");
            r3.r0(string);
        }

        @Override
        public void d(C0955f appInfo) {
            kotlin.jvm.internal.m.e(appInfo, "appInfo");
            if (RecommendedActivity.this.isFinishing()) {
                return;
            }
            Intent intent = new Intent((Context) RecommendedActivity.this, (Class<?>) AppDetailActivity.class);
            intent.putExtra("appInfo", appInfo);
            intent.putExtra("viewCategory", this.b);
            AppCompatActivity appCompatActivity = RecommendedActivity.this;
            appCompatActivity.startActivity(intent, UptodownApp.F.a(appCompatActivity));
        }
    }

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

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

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

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

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

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

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

        public j(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;
        }
    }

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

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

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

        @Override
        public final Object invokeSuspend(Object obj) {
            String str;
            Object obj2;
            W2.b.c();
            if (this.a != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            R2.n.b(obj);
            if (RecommendedActivity.this.X != null) {
                M1.Q q = RecommendedActivity.this.X;
                kotlin.jvm.internal.m.b(q);
                if (!q.b().isEmpty() && (str = this.c) != null && str.length() != 0) {
                    M1.Q q3 = RecommendedActivity.this.X;
                    kotlin.jvm.internal.m.b(q3);
                    ArrayList b = q3.b();
                    String str2 = this.c;
                    int size = b.size();
                    int i = 0;
                    while (true) {
                        if (i >= size) {
                            obj2 = null;
                            break;
                        }
                        obj2 = b.get(i);
                        i++;
                        if (kotlin.jvm.internal.m.a(((g2.U) obj2).f(), str2)) {
                            break;
                        }
                    }
                    M1.Q q4 = RecommendedActivity.this.X;
                    kotlin.jvm.internal.m.b(q4);
                    int K = AbstractC0525o.K(q4.b(), (g2.U) obj2);
                    if (K > -1) {
                        M1.Q q5 = RecommendedActivity.this.X;
                        kotlin.jvm.internal.m.b(q5);
                        q5.notifyItemChanged(K);
                    } else {
                        RecommendedActivity.this.n5();
                    }
                    return R2.s.a;
                }
            }
            RecommendedActivity.this.n5();
            return R2.s.a;
        }

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

    public RecommendedActivity() {
        ActivityResultLauncher registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
            public final void onActivityResult(Object obj) {
                RecommendedActivity.m5((ActivityResult) obj);
            }
        });
        kotlin.jvm.internal.m.d(registerForActivityResult, "registerForActivityResult(...)");
        this.Z = registerForActivityResult;
    }

    public static final C0607t0 V4(RecommendedActivity recommendedActivity) {
        return C0607t0.c(recommendedActivity.getLayoutInflater());
    }

    public final void W4(ArrayList arrayList) {
        M1.Q q = this.X;
        if (q == null) {
            this.X = new M1.Q(arrayList, this, this.Y);
            Z4().c.setAdapter(this.X);
            return;
        }
        kotlin.jvm.internal.m.b(q);
        q.a(arrayList);
        M1.Q q3 = this.X;
        if (q3 != null) {
            q3.f(false);
        }
    }

    public final void X4(final g2.U u, final int i4) {
        String string = getString(2131951930, u.e());
        kotlin.jvm.internal.m.d(string, "getString(...)");
        P1(string, new d3.a() {
            @Override
            public final Object invoke() {
                R2.s Y4;
                Y4 = RecommendedActivity.Y4(RecommendedActivity.this, u, i4);
                return Y4;
            }
        });
    }

    public static final R2.s Y4(RecommendedActivity recommendedActivity, g2.U u, int i4) {
        b bVar = recommendedActivity.new b(i4);
        if (UptodownApp.F.a0()) {
            new b2.p(recommendedActivity, LifecycleOwnerKt.getLifecycleScope(recommendedActivity)).c(u.a(), bVar);
        }
        return R2.s.a;
    }

    public final C0607t0 Z4() {
        return (C0607t0) this.V.getValue();
    }

    public final Y3 a5() {
        return (Y3) this.W.getValue();
    }

    private final void b5() {
        setContentView(Z4().getRoot());
        Drawable drawable = ContextCompat.getDrawable(this, N1.e.c);
        C0607t0 Z4 = Z4();
        if (drawable != null) {
            Z4.e.setNavigationIcon(drawable);
            Z4.e.setNavigationContentDescription(getString(2131951721));
        }
        Z4.e.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                RecommendedActivity.c5(RecommendedActivity.this, view);
            }
        });
        TextView textView = Z4.i;
        k.a aVar = N1.k.g;
        textView.setTypeface(aVar.w());
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, 1, false);
        Z4.c.setLayoutManager(linearLayoutManager);
        Z4.c.setItemAnimator(new DefaultItemAnimator());
        DefaultItemAnimator defaultItemAnimator = new DefaultItemAnimator();
        defaultItemAnimator.setSupportsChangeAnimations(false);
        int dimension = (int) getResources().getDimension(2131166020);
        Z4.c.addItemDecoration(new w2.l(dimension, dimension));
        Z4.c.setItemAnimator(defaultItemAnimator);
        Z4.g.setTypeface(aVar.x());
        Z4.h.setTypeface(aVar.x());
        Z4.f.setTypeface(aVar.x());
        Z4.f.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                RecommendedActivity.d5(RecommendedActivity.this, view);
            }
        });
        Z4().d.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                RecommendedActivity.e5(RecommendedActivity.this, view);
            }
        });
        Z4.b.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                RecommendedActivity.f5(view);
            }
        });
        Z4.c.addOnScrollListener(new c(linearLayoutManager, this));
    }

    public static final void c5(RecommendedActivity recommendedActivity, View view) {
        recommendedActivity.finish();
    }

    public static final void d5(RecommendedActivity recommendedActivity, View view) {
        recommendedActivity.setResult(1);
        recommendedActivity.finish();
    }

    public static final void e5(RecommendedActivity recommendedActivity, View view) {
        if (UptodownApp.F.a0()) {
            recommendedActivity.a5().e(recommendedActivity);
        }
    }

    public static final void f5(View view) {
    }

    private final void i5() {
        String g4;
        g2.S e4 = g2.S.m.e(this);
        if (e4 == null || (g4 = e4.g()) == null || g4.length() == 0) {
            new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
                @Override
                public final void run() {
                    RecommendedActivity.j5(RecommendedActivity.this);
                }
            }, 500L);
        } else {
            a5().f(this);
        }
    }

    public static final void j5(final RecommendedActivity recommendedActivity) {
        String string = recommendedActivity.getString(2131952549);
        kotlin.jvm.internal.m.d(string, "getString(...)");
        recommendedActivity.Q1(string, new d3.a() {
            @Override
            public final Object invoke() {
                R2.s k5;
                k5 = RecommendedActivity.k5(RecommendedActivity.this);
                return k5;
            }
        }, new d3.a() {
            @Override
            public final Object invoke() {
                R2.s l5;
                l5 = RecommendedActivity.l5(RecommendedActivity.this);
                return l5;
            }
        });
    }

    public static final R2.s k5(RecommendedActivity recommendedActivity) {
        recommendedActivity.q5();
        AlertDialog k22 = recommendedActivity.k2();
        if (k22 != null) {
            k22.dismiss();
        }
        return R2.s.a;
    }

    public static final R2.s l5(RecommendedActivity recommendedActivity) {
        recommendedActivity.finish();
        return R2.s.a;
    }

    public static final void m5(ActivityResult activityResult) {
        activityResult.getResultCode();
    }

    public final void n5() {
        M1.Q q = this.X;
        if (q != null) {
            q.notifyDataSetChanged();
        }
    }

    public final void o5(C0955f c0955f, int i4) {
        Parcelable parcelableExtra;
        Object parcelableExtra2;
        v.a aVar = u2.v.v;
        Context applicationContext = getApplicationContext();
        kotlin.jvm.internal.m.d(applicationContext, "getApplicationContext(...)");
        u2.v a4 = aVar.a(applicationContext);
        a4.a();
        C0965p d0 = a4.d0(String.valueOf(c0955f.A()));
        a4.i();
        if (d0 == null) {
            UptodownApp.F.b0(c0955f, this);
            M1.Q q = this.X;
            if (q != null) {
                kotlin.jvm.internal.m.b(q);
                ((g2.U) q.b().get(i4)).m(c0955f.A());
                M1.Q q3 = this.X;
                if (q3 != null) {
                    q3.notifyItemChanged(i4);
                    return;
                }
                return;
            }
            return;
        }
        DownloadWorker.a aVar2 = DownloadWorker.d;
        if (!aVar2.l(d0)) {
            if (d0.f() && d0.n() != null) {
                UptodownApp.a aVar3 = UptodownApp.F;
                File n = d0.n();
                kotlin.jvm.internal.m.b(n);
                aVar3.X(n, this, c0955f.N());
                return;
            }
            if (d0.L()) {
                d0.S(this);
                M1.Q q4 = this.X;
                if (q4 != null) {
                    q4.notifyItemChanged(i4);
                    return;
                }
                return;
            }
            return;
        }
        aVar2.d(c0955f.e());
        UptodownApp.a aVar4 = UptodownApp.F;
        String R = c0955f.R();
        kotlin.jvm.internal.m.b(R);
        aVar4.e0(R);
        u2.F.a.h(this);
        Intent intent = getIntent();
        kotlin.jvm.internal.m.d(intent, "getIntent(...)");
        if (Build.VERSION.SDK_INT >= 33) {
            parcelableExtra2 = intent.getParcelableExtra("downloadResultReceiver", ResultReceiver.class);
            parcelableExtra = (Parcelable) parcelableExtra2;
        } else {
            parcelableExtra = intent.getParcelableExtra("downloadResultReceiver");
        }
        ResultReceiver resultReceiver = (ResultReceiver) parcelableExtra;
        if (resultReceiver != null) {
            Bundle bundle = new Bundle();
            bundle.putParcelable("download", d0);
            R2.s sVar = R2.s.a;
            resultReceiver.send(207, bundle);
        }
    }

    private final void q5() {
        this.Z.launch(new Intent((Context) this, (Class<?>) LoginActivity.class), UptodownApp.F.b(this));
    }

    @Override
    public void I2() {
        M1.Q q = this.X;
        if (q != null) {
            q.d();
        }
    }

    @Override
    public void R2(File xapkFile) {
        kotlin.jvm.internal.m.e(xapkFile, "xapkFile");
        M1.Q q = this.X;
        if (q != null) {
            q.d();
        }
        M1.Q q3 = this.X;
        if (q3 != null) {
            q3.c(xapkFile, this);
        }
    }

    @Override
    public void S2(File file, int i4) {
        kotlin.jvm.internal.m.e(file, "file");
        M1.Q q = this.X;
        if (q != null) {
            q.c(file, this);
        }
    }

    @Override
    public void V2(File xapkFile) {
        kotlin.jvm.internal.m.e(xapkFile, "xapkFile");
        M1.Q q = this.X;
        if (q != null) {
            q.e(xapkFile, this);
        }
    }

    public final void g5() {
        M1.Q q = this.X;
        if (q != null) {
            q.d();
        }
    }

    public final void h5(String str) {
        M1.Q q = this.X;
        if (q != null) {
            q.d();
        }
        if (str == null || str.length() == 0) {
            return;
        }
        String string = getString(2131952082, str);
        kotlin.jvm.internal.m.d(string, "getString(...)");
        r0(string);
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        b5();
        o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new e(null), 2, (Object) null);
        o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new f(null), 2, (Object) null);
    }

    @Override
    protected void onResume() {
        super.onResume();
        i5();
    }

    public final void p5(long j4, C0957h floatingCategory) {
        kotlin.jvm.internal.m.e(floatingCategory, "floatingCategory");
        if (j4 > 0) {
            new C0560i(this, j4, new g(floatingCategory), LifecycleOwnerKt.getLifecycleScope(this));
        } else {
            F2();
            R2.s sVar = R2.s.a;
        }
    }

    public final void r5(String str) {
        o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new k(str, null), 2, (Object) null);
    }

    @Override
    protected void y4() {
    }
}