导航菜单

页面标题

页面副标题

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

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

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


package com.uptodown.activities;

import M1.C0457l;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import androidx.core.content.ContextCompat;
import androidx.lifecycle.LifecycleCoroutineScope;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.uptodown.activities.LanguageSettingsActivity;
import com.uptodown.activities.preferences.a;
import f2.InterfaceC0936t;
import g2.C0971w;
import java.util.ArrayList;

public final class LanguageSettingsActivity extends AbstractC0740a {
    private C0457l J;
    private a K = new a();
    private final R2.g L = R2.h.a(new d3.a() {
        @Override
        public final Object invoke() {
            c2.N k32;
            k32 = LanguageSettingsActivity.k3(LanguageSettingsActivity.this);
            return k32;
        }
    });
    private final LifecycleCoroutineScope M = LifecycleOwnerKt.getLifecycleScope(this);

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

        @Override
        public void a(C0971w lang) {
            kotlin.jvm.internal.m.e(lang, "lang");
            if (lang.a() != null) {
                LanguageSettingsActivity languageSettingsActivity = LanguageSettingsActivity.this;
                String a = lang.a();
                kotlin.jvm.internal.m.b(a);
                languageSettingsActivity.l3(a);
            }
        }
    }

    static final class b extends kotlin.coroutines.jvm.internal.d {
        Object a;
        Object b;
        int d;

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

        @Override
        public final Object invokeSuspend(Object obj) {
            this.b = obj;
            this.d |= Integer.MIN_VALUE;
            return LanguageSettingsActivity.this.n3(this);
        }
    }

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

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

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return LanguageSettingsActivity.this.new 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);
            LanguageSettingsActivity.this.m3().b.setVisibility(0);
            return R2.s.a;
        }

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

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

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

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return LanguageSettingsActivity.this.new 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);
            ArrayList arrayList = new ArrayList();
            String[] stringArray = LanguageSettingsActivity.this.getResources().getStringArray(2130903041);
            kotlin.jvm.internal.m.d(stringArray, "getStringArray(...)");
            String[] stringArray2 = LanguageSettingsActivity.this.getResources().getStringArray(2130903040);
            kotlin.jvm.internal.m.d(stringArray2, "getStringArray(...)");
            String[] stringArray3 = LanguageSettingsActivity.this.getResources().getStringArray(2130903042);
            kotlin.jvm.internal.m.d(stringArray3, "getStringArray(...)");
            int length = stringArray.length;
            for (int i = 0; i < length; i++) {
                String str = stringArray[i];
                C0971w c0971w = new C0971w();
                c0971w.f(str);
                c0971w.e(stringArray3[i]);
                c0971w.d(stringArray2[i]);
                arrayList.add(c0971w);
            }
            String l = com.uptodown.activities.preferences.a.a.l(LanguageSettingsActivity.this);
            if (l == null) {
                l = "en";
            }
            LanguageSettingsActivity languageSettingsActivity = LanguageSettingsActivity.this;
            languageSettingsActivity.J = new C0457l(arrayList, languageSettingsActivity.K, l);
            return R2.s.a;
        }

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

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

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

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return LanguageSettingsActivity.this.new e(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);
            RecyclerView recyclerView = LanguageSettingsActivity.this.m3().c;
            C0457l c0457l = LanguageSettingsActivity.this.J;
            if (c0457l == null) {
                kotlin.jvm.internal.m.u("adapter");
                c0457l = null;
            }
            recyclerView.setAdapter(c0457l);
            LanguageSettingsActivity.this.m3().b.setVisibility(8);
            return R2.s.a;
        }

        @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;

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

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return LanguageSettingsActivity.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);
                LanguageSettingsActivity languageSettingsActivity = LanguageSettingsActivity.this;
                this.a = 1;
                if (languageSettingsActivity.n3(this) == c) {
                    return c;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                R2.n.b(obj);
            }
            return R2.s.a;
        }

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

    public static final c2.N k3(LanguageSettingsActivity languageSettingsActivity) {
        return c2.N.c(languageSettingsActivity.getLayoutInflater());
    }

    public final void l3(String str) {
        u2.v a4 = u2.v.v.a(this);
        a4.a();
        a4.o1();
        a4.i();
        a.C0191a c0191a = com.uptodown.activities.preferences.a.a;
        Context applicationContext = getApplicationContext();
        kotlin.jvm.internal.m.d(applicationContext, "getApplicationContext(...)");
        c0191a.G0(applicationContext, str);
        setResult(1003);
        finish();
    }

    public final c2.N m3() {
        return (c2.N) this.L.getValue();
    }

    public final java.lang.Object n3(V2.d r8) {
        throw new UnsupportedOperationException("Method not decompiled: com.uptodown.activities.LanguageSettingsActivity.n3(V2.d):java.lang.Object");
    }

    public static final void o3(LanguageSettingsActivity languageSettingsActivity, View view) {
        languageSettingsActivity.getOnBackPressedDispatcher().onBackPressed();
    }

    public static final void p3(View view) {
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        try {
            setContentView(m3().getRoot());
            Drawable drawable = ContextCompat.getDrawable(this, N1.e.c);
            if (drawable != null) {
                m3().d.setNavigationIcon(drawable);
                m3().d.setNavigationContentDescription(getString(2131951721));
            }
            m3().e.setTypeface(N1.k.g.w());
            m3().d.setNavigationOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    LanguageSettingsActivity.o3(LanguageSettingsActivity.this, view);
                }
            });
            m3().b.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    LanguageSettingsActivity.p3(view);
                }
            });
            m3().c.setLayoutManager(new LinearLayoutManager(this, 1, false));
            m3().c.setItemAnimator(new DefaultItemAnimator());
            o3.g.d(this.M, (V2.g) null, (o3.L) null, new f(null), 3, (Object) null);
        } catch (Exception e4) {
            e4.printStackTrace();
        }
    }
}