导航菜单

页面标题

页面副标题

Housing v14.7.8 - SettingsActivity.java 源代码

正在查看: Housing v14.7.8 应用的 SettingsActivity.java JAVA 源代码文件

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


package com.contentsquare.android.analytics.internal.features.clientmode.ui.settings;

import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.activity.result.c;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.i;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.f0;
import androidx.fragment.app.s0;
import com.contentsquare.android.analytics.internal.features.clientmode.ui.developer.DeveloperActivationActivity;
import com.contentsquare.android.analytics.internal.features.clientmode.ui.settings.SettingsActivity;
import com.contentsquare.android.core.features.logging.d;
import com.newrelic.agent.android.api.v2.TraceFieldInterface;
import com.newrelic.agent.android.background.ApplicationStateMonitor;
import com.newrelic.agent.android.instrumentation.Instrumented;
import com.newrelic.agent.android.tracing.Trace;
import com.newrelic.agent.android.tracing.TraceMachine;
import com.swmansion.reanimated.b;
import d.h;
import f7.a6;
import f7.f3;
import f7.i8;
import f7.m9;
import f7.ne;
import java.util.ArrayList;
import kotlin.Metadata;
import kotlin.jvm.internal.r;
import org.jetbrains.annotations.NotNull;
import t5.k;
import t5.l;
import t5.m;

@Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0000\u0018\u00002\u00020\u00012\u00020\u0002B\u0007¢\u0006\u0004\b\u0003\u0010\u0004¨\u0006\u0005"}, d2 = {"Lcom/contentsquare/android/analytics/internal/features/clientmode/ui/settings/SettingsActivity;", "Landroidx/appcompat/app/i;", "Landroidx/fragment/app/f0$i;", "<init>", "()V", "library_release"}, k = 1, mv = {1, 8, 0})
@Instrumented
public final class SettingsActivity extends i implements f0.i, TraceFieldInterface {
    public static final int g = 0;
    public Trace _nr_trace;
    public int a;

    @NotNull
    public final a6 b = new a6();
    public ne c;
    public m9 d;
    public ScrollView e;

    @NotNull
    public final c<Intent> f;

    public SettingsActivity() {
        c<Intent> registerForActivityResult = registerForActivityResult(new h(), new b(this, 15));
        r.j(registerForActivityResult, "registerForActivityResul…)\n            }\n        }");
        this.f = registerForActivityResult;
    }

    public final void onBackPressed() {
        if (getSupportFragmentManager().U() > 0) {
            getSupportFragmentManager().x0();
            return;
        }
        super/*androidx.activity.h*/.onBackPressed();
        ne neVar = this.c;
        if (neVar == null) {
            r.o("navigator");
            throw null;
        }
        neVar.b.a().setVisibility(0);
        neVar.f = 1;
    }

    public final void onCreate(Bundle bundle) {
        final int i = 1;
        TraceMachine.startTracing("SettingsActivity");
        try {
            TraceMachine.enterMethod(this._nr_trace, "SettingsActivity#onCreate", (ArrayList) null);
        } catch (NoSuchFieldError unused) {
            TraceMachine.enterMethod((Trace) null, "SettingsActivity#onCreate", (ArrayList) null);
        }
        a6 a6Var = this.b;
        Application application = getApplication();
        r.j(application, "application");
        a6Var.getClass();
        this.d = new m9(application);
        d dVar = f3.e;
        Application application2 = getApplication();
        r.j(application2, "application");
        ne neVar = f3.a.a(application2).b;
        r.k(neVar, "<set-?>");
        this.c = neVar;
        super/*androidx.fragment.app.u*/.onCreate(bundle);
        setContentView(l.contentsquare_settings_activity);
        View findViewById = findViewById(k.settings_scrollview);
        r.j(findViewById, "findViewById(R.id.settings_scrollview)");
        this.e = (ScrollView) findViewById;
        Toolbar findViewById2 = findViewById(k.settings_toolbar);
        setSupportActionBar(findViewById2);
        if (bundle == null) {
            s0 h = getSupportFragmentManager().h();
            int i2 = k.container;
            i8 i8Var = new i8();
            if (i2 == 0) {
                throw new IllegalArgumentException("Must use non-zero containerViewId");
            }
            h.i(i2, i8Var, (String) null, 2);
            h.f();
        }
        getSupportFragmentManager().c(this);
        r.j(findViewById2, "settingsToolbar");
        ActionBar supportActionBar = getSupportActionBar();
        if (supportActionBar != null) {
            supportActionBar.m(true);
        }
        ActionBar supportActionBar2 = getSupportActionBar();
        if (supportActionBar2 != null) {
            supportActionBar2.n();
        }
        final int i3 = 0;
        findViewById2.setNavigationOnClickListener(new View.OnClickListener(this) {
            public final SettingsActivity b;

            {
                this.b = this;
            }

            @Override
            public final void onClick(View view) {
                ?? r42 = this.b;
                switch (i3) {
                    case 0:
                        int i4 = SettingsActivity.g;
                        r.k((Object) r42, "this$0");
                        r42.onBackPressed();
                        return;
                    default:
                        int i8 = SettingsActivity.g;
                        r42.a++;
                        m9 m9Var = r42.d;
                        if (m9Var == null) {
                            r.o("settingsViewModel");
                            throw null;
                        }
                        if (m9Var.a.b(r6.b.DEVELOPER_MODE_ACTIVATION_STATE, false) || r42.a != 10) {
                            return;
                        }
                        r42.f.b(new Intent((Context) r42, (Class<?>) DeveloperActivationActivity.class));
                        return;
                }
            }
        });
        String string = getResources().getString(m.contentsquare_settings_sdk_version_title, "4.36.2");
        r.j(string, "resources.getString(R.st…BuildConfig.VERSION_NAME)");
        ((TextView) findViewById(k.contentsquare_footer_version_number)).setText(string);
        ((RelativeLayout) findViewById(k.settings_footer)).setOnClickListener(new View.OnClickListener(this) {
            public final SettingsActivity b;

            {
                this.b = this;
            }

            @Override
            public final void onClick(View view) {
                ?? r42 = this.b;
                switch (i) {
                    case 0:
                        int i4 = SettingsActivity.g;
                        r.k((Object) r42, "this$0");
                        r42.onBackPressed();
                        return;
                    default:
                        int i8 = SettingsActivity.g;
                        r42.a++;
                        m9 m9Var = r42.d;
                        if (m9Var == null) {
                            r.o("settingsViewModel");
                            throw null;
                        }
                        if (m9Var.a.b(r6.b.DEVELOPER_MODE_ACTIVATION_STATE, false) || r42.a != 10) {
                            return;
                        }
                        r42.f.b(new Intent((Context) r42, (Class<?>) DeveloperActivationActivity.class));
                        return;
                }
            }
        });
        TraceMachine.exitMethod();
    }

    public final void onResume() {
        super/*androidx.fragment.app.u*/.onResume();
        this.a = 0;
        ne neVar = this.c;
        if (neVar == null) {
            r.o("navigator");
            throw null;
        }
        neVar.b.a().setVisibility(8);
        neVar.f = 2;
        m9 m9Var = this.d;
        if (m9Var == null) {
            r.o("settingsViewModel");
            throw null;
        }
        if (m9Var.a.b(r6.b.CLIENT_MODE_ACTIVATION_STATE, false)) {
            return;
        }
        finish();
    }

    public final void onStart() {
        super.onStart();
        ApplicationStateMonitor.getInstance().activityStarted();
    }

    public final void onStop() {
        super.onStop();
        ApplicationStateMonitor.getInstance().activityStopped();
    }
}