导航菜单

页面标题

页面副标题

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

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

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


package com.uptodown.activities;

import J1.AbstractC0355q2;
import N1.k;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
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.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 c2.A0;
import com.uptodown.UptodownApp;
import com.uptodown.activities.H;
import com.uptodown.activities.RollbackActivity;
import f2.InterfaceC0912C;
import g2.C0953d;
import java.util.ArrayList;
import u2.H;

public final class RollbackActivity extends AbstractC0355q2 implements InterfaceC0912C {
    private final R2.g V = R2.h.a(new d3.a() {
        @Override
        public final Object invoke() {
            c2.A0 N4;
            N4 = RollbackActivity.N4(RollbackActivity.this);
            return N4;
        }
    });
    private final R2.g W = new ViewModelLazy(kotlin.jvm.internal.D.b(H.class), new d(this), new c(this), new e(null, this));
    private M1.A X;
    private final ActivityResultLauncher Y;

    public final class a implements Runnable {
        public a() {
        }

        @Override
        public void run() {
            RollbackActivity.this.W4(false);
        }
    }

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

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

            a(RollbackActivity rollbackActivity) {
                this.a = rollbackActivity;
            }

            public final Object emit(u2.H h, V2.d dVar) {
                if (h instanceof H.a) {
                    this.a.Q4().b.setVisibility(0);
                } else if (h instanceof H.c) {
                    this.a.O4(((H.a) ((H.c) h).a()).a());
                    this.a.Q4().g.setVisibility(0);
                    this.a.Q4().b.setVisibility(8);
                } else {
                    if (!(h instanceof H.b)) {
                        throw new R2.k();
                    }
                    this.a.Q4().b.setVisibility(8);
                    this.a.Q4().f.setVisibility(0);
                    this.a.Q4().f.setText(this.a.getString(2131952410));
                }
                return R2.s.a;
            }
        }

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

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

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

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

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

    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 ViewModelStore invoke() {
            return this.a.getViewModelStore();
        }
    }

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

        public e(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 RollbackActivity() {
        ActivityResultLauncher registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
            public final void onActivityResult(Object obj) {
                RollbackActivity.P4(RollbackActivity.this, (ActivityResult) obj);
            }
        });
        kotlin.jvm.internal.m.d(registerForActivityResult, "registerForActivityResult(...)");
        this.Y = registerForActivityResult;
    }

    public static final A0 N4(RollbackActivity rollbackActivity) {
        return A0.c(rollbackActivity.getLayoutInflater());
    }

    public final void O4(ArrayList arrayList) {
        M1.A a4 = this.X;
        if (a4 == null) {
            this.X = new M1.A(arrayList, this, this);
            Q4().c.setAdapter(this.X);
        } else {
            kotlin.jvm.internal.m.b(a4);
            a4.d(arrayList);
        }
    }

    public static final void P4(RollbackActivity rollbackActivity, ActivityResult activityResult) {
        if (activityResult.getResultCode() == -1) {
            rollbackActivity.L2();
            rollbackActivity.Q4().e.setVisibility(8);
            rollbackActivity.Q4().f.setText(rollbackActivity.getString(2131952293));
        }
    }

    public final A0 Q4() {
        return (A0) this.V.getValue();
    }

    public final H R4() {
        return (H) this.W.getValue();
    }

    private final void S4() {
        setContentView(Q4().getRoot());
        Drawable drawable = ContextCompat.getDrawable(this, N1.e.c);
        if (drawable != null) {
            Q4().d.setNavigationIcon(drawable);
            Q4().d.setNavigationContentDescription(getString(2131951721));
        }
        Q4().d.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                RollbackActivity.T4(RollbackActivity.this, view);
            }
        });
        TextView textView = Q4().h;
        k.a aVar = N1.k.g;
        textView.setTypeface(aVar.w());
        Q4().c.setLayoutManager(new LinearLayoutManager(this, 1, false));
        Q4().c.setItemAnimator(new DefaultItemAnimator());
        int dimension = (int) getResources().getDimension(2131166020);
        Q4().c.addItemDecoration(new w2.l(dimension, dimension));
        Q4().f.setTypeface(aVar.x());
        if (!com.uptodown.activities.preferences.a.a.e0(this)) {
            Q4().f.setText(getString(2131952307));
        }
        Q4().g.setTypeface(aVar.x());
        Q4().e.setTypeface(aVar.x());
        Q4().e.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                RollbackActivity.U4(RollbackActivity.this, view);
            }
        });
        Q4().b.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                RollbackActivity.V4(view);
            }
        });
    }

    public static final void T4(RollbackActivity rollbackActivity, View view) {
        rollbackActivity.finish();
    }

    public static final void U4(RollbackActivity rollbackActivity, View view) {
        rollbackActivity.X4();
    }

    public static final void V4(View view) {
    }

    public final void W4(boolean z) {
        R4().c(this, z);
    }

    private final void X4() {
        this.Y.launch(new Intent(getApplicationContext(), (Class<?>) GdprPrivacySettings.class), UptodownApp.F.b(this));
    }

    @Override
    public void a(int i) {
        M1.A a4;
        if (!UptodownApp.F.a0() || (a4 = this.X) == null) {
            return;
        }
        kotlin.jvm.internal.m.b(a4);
        if (i < a4.a().size()) {
            M1.A a5 = this.X;
            kotlin.jvm.internal.m.b(a5);
            if (((C0953d) a5.a().get(i)).b() != 0) {
                M1.A a6 = this.X;
                kotlin.jvm.internal.m.b(a6);
                Object obj = a6.a().get(i);
                kotlin.jvm.internal.m.d(obj, "get(...)");
                w4((C0953d) obj);
            }
        }
    }

    @Override
    public void b(int i) {
        M1.A a4;
        if (!UptodownApp.F.a0() || (a4 = this.X) == null) {
            return;
        }
        kotlin.jvm.internal.m.b(a4);
        if (i < a4.a().size()) {
            M1.A a5 = this.X;
            kotlin.jvm.internal.m.b(a5);
            if (((C0953d) a5.a().get(i)).b() != 0) {
                M1.A a6 = this.X;
                kotlin.jvm.internal.m.b(a6);
                D2(((C0953d) a6.a().get(i)).b());
            }
        }
    }

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

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

    @Override
    protected void y4() {
    }
}