APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Silent Camera
版本号:8.12.3
包名称:com.peace.SilentCamera

MD5 校验值:6bdafb1d58f3fe7a55bbf3e7446795c3

反编译源代码说明

SettingsActivity.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package com.peace.SilentCamera;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.SeekBar;
import android.widget.Switch;
import android.widget.TextView;
import com.facebook.ads.R;
import com.facebook.ads.internal.util.common.FbValidationUtils;
import java.util.Locale;

public class SettingsActivity extends androidx.appcompat.app.c {
    App Q;
    com.peace.SilentCamera.r R;
    com.peace.SilentCamera.o0 S;
    AlertDialog T;
    com.peace.SilentCamera.c U;
    u0 V;
    Switch W;
    TextView X;
    TextView Y;
    TextView Z;

    TextView f23734a0;

    TextView f23735b0;

    TextView f23736c0;

    TextView f23737d0;

    TextView f23738e0;

    TextView f23739f0;

    TextView f23740g0;

    TextView f23741h0;

    TextView f23742i0;

    TextView f23743j0;

    TextView f23744k0;

    Switch f23745l0;

    Switch f23746m0;

    Switch f23747n0;

    Switch f23748o0;

    TextView f23749p0;

    TextView f23750q0;

    TextView f23751r0;

    TextView f23752s0;

    TextView f23753t0;

    boolean f23754u0 = false;

    String f23755v0;

    public class a implements View.OnClickListener {
        a() {
        }

        @Override
        public void onClick(View view) {
            boolean a10 = App.K.a("touchShutter", false);
            App.K.f("touchShutter", !a10);
            SettingsActivity.this.f23745l0.setChecked(!a10);
        }
    }

    public class a0 implements View.OnClickListener {
        a0() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.Weather");
            App.K.g("versionCodeOpen_com.peace.Weather", 318);
        }
    }

    public class b implements CompoundButton.OnCheckedChangeListener {
        b() {
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z9) {
            App.K.f("vibration", z9);
        }
    }

    public class b0 implements View.OnClickListener {
        b0() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.Fitness");
            App.K.g("versionCodeOpen_com.peace.Fitness", 318);
        }
    }

    public class c implements View.OnClickListener {
        c() {
        }

        @Override
        public void onClick(View view) {
            boolean a10 = App.K.a("vibration", false);
            App.K.f("vibration", !a10);
            SettingsActivity.this.f23746m0.setChecked(!a10);
        }
    }

    public class c0 implements View.OnClickListener {
        c0() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.MusicRecognizer");
            App.K.g("versionCodeOpen_com.peace.MusicRecognizer", 318);
        }
    }

    public class d implements CompoundButton.OnCheckedChangeListener {
        d() {
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z9) {
            SettingsActivity settingsActivity = SettingsActivity.this;
            if (settingsActivity.f23754u0 || Build.VERSION.SDK_INT < 23) {
                App.K.f("geoTag", z9);
                return;
            }
            settingsActivity.f23747n0.setChecked(false);
            App.K.f("geoTag", false);
            SettingsActivity.this.requestPermissions(new String[]{"android.permission.ACCESS_FINE_LOCATION"}, 0);
        }
    }

    public class d0 implements View.OnClickListener {
        d0() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.VoiceRecorder");
            App.K.g("versionCodeOpen_com.peace.VoiceRecorder", 318);
        }
    }

    public class e implements View.OnClickListener {
        e() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity settingsActivity = SettingsActivity.this;
            if (settingsActivity.f23754u0 || Build.VERSION.SDK_INT < 23) {
                boolean a10 = App.K.a("geoTag", false);
                App.K.f("geoTag", !a10);
                SettingsActivity.this.f23747n0.setChecked(!a10);
            } else {
                settingsActivity.f23747n0.setChecked(false);
                App.K.f("geoTag", false);
                SettingsActivity.this.requestPermissions(new String[]{"android.permission.ACCESS_FINE_LOCATION"}, 0);
            }
        }
    }

    public class e0 implements SeekBar.OnSeekBarChangeListener {

        final TextView f23765a;

        e0(TextView textView) {
            this.f23765a = textView;
        }

        @Override
        public void onProgressChanged(SeekBar seekBar, int i10, boolean z9) {
            if (i10 == seekBar.getMax()) {
                App.K.g("burstTime", 0);
                this.f23765a.setText(SettingsActivity.this.getString(R.string.max_speed));
                return;
            }
            int i11 = i10 + 1;
            App.K.g("burstTime", 1000 / i11);
            this.f23765a.setText(i11 + SettingsActivity.this.getString(R.string.fps));
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
        }
    }

    public class f implements CompoundButton.OnCheckedChangeListener {
        f() {
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z9) {
            App.K.f("mirror", z9);
        }
    }

    public class f0 implements SeekBar.OnSeekBarChangeListener {

        final TextView f23768a;

        f0(TextView textView) {
            this.f23768a = textView;
        }

        @Override
        public void onProgressChanged(SeekBar seekBar, int i10, boolean z9) {
            int i11 = i10 + 3;
            App.K.g("burstNumMax", i11);
            this.f23768a.setText(i11 + SettingsActivity.this.getString(R.string.count));
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
        }
    }

    public class g implements View.OnClickListener {
        g() {
        }

        @Override
        public void onClick(View view) {
            boolean a10 = App.K.a("mirror", false);
            App.K.f("mirror", !a10);
            SettingsActivity.this.f23748o0.setChecked(!a10);
        }
    }

    public class g0 implements View.OnClickListener {
        g0() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.y0(FbValidationUtils.FB_PACKAGE);
        }
    }

    public class h implements View.OnClickListener {
        h() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.D0();
        }
    }

    public class h0 implements View.OnClickListener {
        h0() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.T.dismiss();
        }
    }

    public class i implements View.OnClickListener {
        i() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.C0();
        }
    }

    public class i0 implements DialogInterface.OnDismissListener {
        i0() {
        }

        @Override
        public void onDismiss(DialogInterface dialogInterface) {
            int b10 = App.K.b("burstTime", 100);
            if (b10 == 0) {
                SettingsActivity settingsActivity = SettingsActivity.this;
                settingsActivity.f23749p0.setText(settingsActivity.getString(R.string.max_speed));
                return;
            }
            SettingsActivity.this.f23749p0.setText((1000 / b10) + SettingsActivity.this.getString(R.string.fps));
        }
    }

    public class j implements View.OnClickListener {
        j() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.startActivity(new Intent(SettingsActivity.this, (Class<?>) FilePathActivity.class));
        }
    }

    public class j0 implements AdapterView.OnItemClickListener {
        j0() {
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i10, long j10) {
            SettingsActivity settingsActivity = SettingsActivity.this;
            settingsActivity.f23750q0 = (TextView) settingsActivity.findViewById(R.id.textViewAspect);
            if (i10 == 0) {
                SettingsActivity settingsActivity2 = SettingsActivity.this;
                settingsActivity2.f23750q0.setText(settingsActivity2.getString(R.string.aspect_169));
            } else if (i10 == 1) {
                SettingsActivity settingsActivity3 = SettingsActivity.this;
                settingsActivity3.f23750q0.setText(settingsActivity3.getString(R.string.aspect_32));
            } else if (i10 == 2) {
                SettingsActivity settingsActivity4 = SettingsActivity.this;
                settingsActivity4.f23750q0.setText(settingsActivity4.getString(R.string.aspect_43));
            } else if (i10 == 3) {
                SettingsActivity settingsActivity5 = SettingsActivity.this;
                settingsActivity5.f23750q0.setText(settingsActivity5.getString(R.string.aspect_11));
            }
            App.K.g("aspect", i10);
            SettingsActivity.this.R.a();
        }
    }

    public class k implements View.OnClickListener {
        k() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.finish();
        }
    }

    public class k0 implements AdapterView.OnItemClickListener {
        k0() {
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i10, long j10) {
            if (i10 == 0) {
                App.K.g("notification", 1);
                SettingsActivity settingsActivity = SettingsActivity.this;
                settingsActivity.f23753t0.setText(settingsActivity.getString(R.string.on));
            } else if (i10 == 1) {
                App.K.g("notification", 2);
                SettingsActivity settingsActivity2 = SettingsActivity.this;
                settingsActivity2.f23753t0.setText(settingsActivity2.getString(R.string.priority_only));
            } else if (i10 == 2) {
                App.K.g("notification", 0);
                SettingsActivity settingsActivity3 = SettingsActivity.this;
                settingsActivity3.f23753t0.setText(settingsActivity3.getString(R.string.off));
            }
            SettingsActivity.this.R.a();
        }
    }

    public class l implements View.OnClickListener {
        l() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.V.b();
        }
    }

    public class l0 implements AdapterView.OnItemClickListener {
        l0() {
        }

        @Override
        public void onItemClick(AdapterView<?> adapterView, View view, int i10, long j10) {
            if (i10 == 0) {
                App.K.g("volumeKey", 0);
                SettingsActivity settingsActivity = SettingsActivity.this;
                settingsActivity.f23751r0.setText(settingsActivity.getString(R.string.shutter));
            } else if (i10 == 1) {
                App.K.g("volumeKey", 1);
                SettingsActivity settingsActivity2 = SettingsActivity.this;
                settingsActivity2.f23751r0.setText(settingsActivity2.getString(R.string.zoom));
            } else if (i10 == 2) {
                App.K.g("volumeKey", 2);
                SettingsActivity settingsActivity3 = SettingsActivity.this;
                settingsActivity3.f23751r0.setText(settingsActivity3.getString(R.string.exposure));
            } else if (i10 == 3) {
                App.K.g("volumeKey", 4);
                SettingsActivity settingsActivity4 = SettingsActivity.this;
                settingsActivity4.f23751r0.setText(settingsActivity4.getString(R.string.burst));
            } else if (i10 == 4) {
                App.K.g("volumeKey", 3);
                SettingsActivity settingsActivity5 = SettingsActivity.this;
                settingsActivity5.f23751r0.setText(settingsActivity5.getString(R.string.none));
            }
            SettingsActivity.this.R.a();
        }
    }

    public class m implements View.OnClickListener {
        m() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.V.c();
        }
    }

    public class m0 implements View.OnClickListener {
        m0() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.v0();
            SettingsActivity.this.R.a();
        }
    }

    public class n implements View.OnClickListener {
        n() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.x0();
        }
    }

    public class n0 implements View.OnClickListener {
        n0() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.y0("com.twitter.android");
        }
    }

    public class o implements View.OnClickListener {
        o() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.t0();
        }
    }

    public class o0 implements View.OnClickListener {
        o0() {
        }

        @Override
        public void onClick(View view) {
            try {
                Intent intent = new Intent();
                intent.setAction("android.intent.action.SEND");
                intent.putExtra("android.intent.extra.SUBJECT", SettingsActivity.this.getString(R.string.recommend_text));
                intent.putExtra("android.intent.extra.TEXT", SettingsActivity.this.f23755v0);
                intent.setType("text/Gmail");
                intent.setPackage("com.google.android.gm");
                SettingsActivity.this.startActivity(intent);
            } catch (Throwable th) {
                App.h(th);
            }
        }
    }

    public class p implements View.OnClickListener {
        p() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.B0();
        }
    }

    public class p0 implements View.OnClickListener {
        p0() {
        }

        @Override
        public void onClick(View view) {
            if (App.e()) {
                return;
            }
            SettingsActivity.this.startActivity(new Intent(SettingsActivity.this, (Class<?>) PurchaseActivity.class));
            App.K.g(com.peace.SilentCamera.o0.f23880v, 318);
        }
    }

    public class q implements View.OnClickListener {
        q() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.SilentVideo");
            App.K.g("versionCodeOpen_com.peace.SilentVideo", 318);
        }
    }

    public class q0 implements View.OnClickListener {
        q0() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.A0();
        }
    }

    public class r implements View.OnClickListener {
        r() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.TextScanner");
            App.K.g("versionCodeOpen_com.peace.TextScanner", 318);
        }
    }

    public class r0 implements View.OnClickListener {
        r0() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.z0();
        }
    }

    public class s implements View.OnClickListener {
        s() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.QRcodeReader");
            App.K.g("versionCodeOpen_com.peace.QRcodeReader", 318);
        }
    }

    public class s0 implements CompoundButton.OnCheckedChangeListener {
        s0() {
        }

        @Override
        public void onCheckedChanged(CompoundButton compoundButton, boolean z9) {
            App.K.f("touchShutter", z9);
        }
    }

    public class t implements View.OnClickListener {
        t() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.Flashlight");
            App.K.g("versionCodeOpen_com.peace.Flashlight", 318);
        }
    }

    public class u implements View.OnClickListener {
        u() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.Compass");
            App.K.g("versionCodeOpen_com.peace.Compass", 318);
        }
    }

    public class v implements View.OnClickListener {
        v() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.y0("jp.naver.line.android");
        }
    }

    public class w implements View.OnClickListener {
        w() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.Calculator");
            App.K.g("versionCodeOpen_com.peace.Calculator", 318);
        }
    }

    public class x implements View.OnClickListener {
        x() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.Magnifier");
            App.K.g("versionCodeOpen_com.peace.Magnifier", 318);
        }
    }

    public class y implements View.OnClickListener {
        y() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.IdPhoto");
            App.K.g("versionCodeOpen_com.peace.IdPhoto", 318);
        }
    }

    public class z implements View.OnClickListener {
        z() {
        }

        @Override
        public void onClick(View view) {
            SettingsActivity.this.s0("com.peace.Timer");
            App.K.g("versionCodeOpen_com.peace.Timer", 318);
        }
    }

    public void A0() {
        AlertDialog alertDialog = this.T;
        if (alertDialog == null || !alertDialog.isShowing()) {
            View inflate = ((LayoutInflater) getSystemService("layout_inflater")).inflate(R.layout.dialog_burst, (ViewGroup) findViewById(R.id.burstLayout));
            AlertDialog.Builder builder = new AlertDialog.Builder(this);
            builder.setView(inflate);
            AlertDialog create = builder.create();
            this.T = create;
            create.getWindow().setBackgroundDrawable(new ColorDrawable(0));
            TextView textView = (TextView) inflate.findViewById(R.id.textViewBurstSpeed);
            SeekBar seekBar = (SeekBar) inflate.findViewById(R.id.seekBarBurstSpeed);
            int b10 = App.K.b("burstTime", 100);
            if (b10 == 0) {
                textView.setText(getString(R.string.max_speed));
                seekBar.setProgress(seekBar.getMax());
            } else {
                int i10 = 1000 / b10;
                textView.setText(i10 + getString(R.string.fps));
                seekBar.setProgress(i10 + (-1));
            }
            seekBar.setOnSeekBarChangeListener(new e0(textView));
            TextView textView2 = (TextView) inflate.findViewById(R.id.textViewBurstNum);
            int b11 = App.K.b("burstNumMax", 20);
            textView2.setText(b11 + getString(R.string.count));
            SeekBar seekBar2 = (SeekBar) inflate.findViewById(R.id.seekBarBurstNum);
            seekBar2.setProgress(b11 + (-3));
            seekBar2.setOnSeekBarChangeListener(new f0(textView2));
            ((Button) inflate.findViewById(R.id.okButton)).setOnClickListener(new h0());
            this.T.setOnDismissListener(new i0());
            if (isFinishing()) {
                return;
            }
            this.T.show();
        }
    }

    void B0() {
        com.peace.SilentCamera.r rVar = new com.peace.SilentCamera.r(this);
        this.R = rVar;
        rVar.n(R.string.notification);
        this.R.d(new String[]{getString(R.string.on), getString(R.string.priority_only), getString(R.string.off)}, new k0());
        this.R.p();
    }

    void C0() {
        com.peace.SilentCamera.r rVar = new com.peace.SilentCamera.r(this);
        this.R = rVar;
        rVar.o(getString(R.string.reset));
        this.R.f(getString(R.string.reset_alert));
        this.R.m(getString(R.string.yes), new m0());
        this.R.h(getString(R.string.cancel), null);
        this.R.p();
    }

    void D0() {
        com.peace.SilentCamera.r rVar = new com.peace.SilentCamera.r(this);
        this.R = rVar;
        rVar.n(R.string.volumekey);
        this.R.d(new String[]{getString(R.string.shutter), getString(R.string.zoom), getString(R.string.exposure), getString(R.string.burst), getString(R.string.none)}, new l0());
        this.R.p();
    }

    void E0() {
        int b10 = App.K.b("burstTime", 100);
        if (b10 == 0) {
            this.f23749p0.setText(getString(R.string.max_speed));
        } else {
            this.f23749p0.setText((1000 / b10) + getString(R.string.fps));
        }
        int b11 = App.K.b("aspect", 0);
        if (b11 == 0) {
            this.f23750q0.setText(getString(R.string.aspect_169));
        } else if (b11 == 1) {
            this.f23750q0.setText(getString(R.string.aspect_32));
        } else if (b11 == 2) {
            this.f23750q0.setText(getString(R.string.aspect_43));
        } else if (b11 == 3) {
            this.f23750q0.setText(getString(R.string.aspect_11));
        }
        this.f23745l0.setChecked(App.K.a("touchShutter", false));
        this.f23746m0.setChecked(App.K.a("vibration", false));
        this.f23747n0.setChecked(App.K.a("geoTag", false));
        this.f23748o0.setChecked(App.K.a("mirror", false));
        int b12 = App.K.b("volumeKey", 0);
        if (b12 == 0) {
            this.f23751r0.setText(getString(R.string.shutter));
        } else if (b12 == 1) {
            this.f23751r0.setText(getString(R.string.zoom));
        } else if (b12 == 2) {
            this.f23751r0.setText(getString(R.string.exposure));
        } else if (b12 == 4) {
            this.f23751r0.setText(getString(R.string.burst));
        } else if (b12 == 3) {
            this.f23751r0.setText(getString(R.string.none));
        }
        this.f23752s0.setText(App.K.d("path", App.N).replace(App.M, getString(R.string.internal_memory)));
        int b13 = App.K.b("notification", 1);
        if (b13 == 1) {
            this.f23753t0.setText(getString(R.string.on));
        } else if (b13 == 2) {
            this.f23753t0.setText(getString(R.string.priority_only));
        } else if (b13 == 0) {
            this.f23753t0.setText(getString(R.string.off));
        }
        this.S.d();
        if (this.S.b(PurchaseActivity.class.getSimpleName())) {
            this.X.setVisibility(0);
        } else {
            this.X.setVisibility(8);
        }
        this.W.setChecked(App.e());
        if (this.S.b("com.peace.SilentVideo")) {
            this.Y.setVisibility(0);
        } else {
            this.Y.setVisibility(8);
        }
        if (this.S.b("com.peace.TextScanner")) {
            this.Z.setVisibility(0);
        } else {
            this.Z.setVisibility(8);
        }
        if (this.S.b("com.peace.QRcodeReader")) {
            this.f23734a0.setVisibility(0);
        } else {
            this.f23734a0.setVisibility(8);
        }
        if (this.S.b("com.peace.IdPhoto")) {
            this.f23735b0.setVisibility(0);
        } else {
            this.f23735b0.setVisibility(8);
        }
        if (this.S.b("com.peace.Flashlight")) {
            this.f23736c0.setVisibility(0);
        } else {
            this.f23736c0.setVisibility(8);
        }
        if (this.S.b("com.peace.Compass")) {
            this.f23737d0.setVisibility(0);
        } else {
            this.f23737d0.setVisibility(8);
        }
        if (this.S.b("com.peace.Calculator")) {
            this.f23738e0.setVisibility(0);
        } else {
            this.f23738e0.setVisibility(8);
        }
        if (this.S.b("com.peace.Magnifier")) {
            this.f23739f0.setVisibility(0);
        } else {
            this.f23739f0.setVisibility(8);
        }
        if (this.S.b("com.peace.Timer")) {
            this.f23740g0.setVisibility(0);
        } else {
            this.f23740g0.setVisibility(8);
        }
        if (this.S.b("com.peace.Weather")) {
            this.f23741h0.setVisibility(0);
        } else {
            this.f23741h0.setVisibility(8);
        }
        if (this.S.b("com.peace.Fitness")) {
            this.f23742i0.setVisibility(0);
        } else {
            this.f23742i0.setVisibility(8);
        }
        if (this.S.b("com.peace.MusicRecognizer")) {
            this.f23743j0.setVisibility(0);
        } else {
            this.f23743j0.setVisibility(8);
        }
        if (this.S.b("com.peace.VoiceRecorder")) {
            this.f23744k0.setVisibility(0);
        } else {
            this.f23744k0.setVisibility(8);
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.Q = (App) getApplication();
        this.S = new com.peace.SilentCamera.o0(this);
        this.V = new u0(this, this.T);
        this.f23755v0 = "https://play.google.com/store/apps/details?id=" + getPackageName() + "&hl=" + Locale.getDefault().getLanguage();
        w0();
        p0();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        com.peace.SilentCamera.c cVar = this.U;
        if (cVar != null) {
            cVar.g();
        }
    }

    @Override
    public void onRequestPermissionsResult(int i10, String[] strArr, int[] iArr) {
        int checkSelfPermission;
        super.onRequestPermissionsResult(i10, strArr, iArr);
        if (Build.VERSION.SDK_INT >= 23) {
            if (i10 == 0) {
                boolean q02 = q0();
                this.f23754u0 = q02;
                if (q02) {
                    boolean a10 = App.K.a("geoTag", false);
                    App.K.f("geoTag", !a10);
                    this.f23747n0.setChecked(!a10);
                    return;
                }
                return;
            }
            if (i10 == 1) {
                checkSelfPermission = checkSelfPermission("android.permission.POST_NOTIFICATIONS");
                if (checkSelfPermission == 0) {
                    App.g("request_notification_permission", "result", "granted");
                } else {
                    App.g("request_notification_permission", "result", "denied");
                }
            }
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        E0();
    }

    void p0() {
        String action = getIntent().getAction();
        if (action == null || !action.equals(PurchaseActivity.class.getSimpleName())) {
            return;
        }
        startActivity(new Intent(this, (Class<?>) PurchaseActivity.class));
    }

    boolean q0() {
        int checkSelfPermission;
        int checkSelfPermission2;
        if (Build.VERSION.SDK_INT < 23) {
            return true;
        }
        checkSelfPermission = checkSelfPermission("android.permission.ACCESS_FINE_LOCATION");
        if (checkSelfPermission == 0) {
            return true;
        }
        checkSelfPermission2 = checkSelfPermission("android.permission.ACCESS_COARSE_LOCATION");
        return checkSelfPermission2 == 0;
    }

    boolean r0(String str) {
        return getPackageManager().getLaunchIntentForPackage(str) != null;
    }

    void s0(String str) {
        try {
            Intent launchIntentForPackage = getPackageManager().getLaunchIntentForPackage(str);
            if (launchIntentForPackage == null) {
                App.g("link_app", "app", str);
                launchIntentForPackage = new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=" + str));
                launchIntentForPackage.setPackage("com.android.vending");
            }
            startActivity(launchIntentForPackage);
        } catch (Throwable th) {
            App.h(th);
        }
    }

    void t0() {
        try {
            startActivity(new Intent("android.intent.action.VIEW", Uri.parse(getString(R.string.privacy_policy_url))));
        } catch (Throwable th) {
            App.h(th);
        }
    }

    void u0() {
        int checkSelfPermission;
        boolean shouldShowRequestPermissionRationale;
        long longValue = App.K.c("requestNotificationPermissionLastTimeMillis", 0L).longValue();
        if (Build.VERSION.SDK_INT >= 33) {
            checkSelfPermission = checkSelfPermission("android.permission.POST_NOTIFICATIONS");
            if (checkSelfPermission != 0) {
                shouldShowRequestPermissionRationale = shouldShowRequestPermissionRationale("android.permission.POST_NOTIFICATIONS");
                if (shouldShowRequestPermissionRationale || longValue == 0) {
                    long currentTimeMillis = System.currentTimeMillis();
                    if (currentTimeMillis - longValue > PermissionActivity.f23724e0) {
                        requestPermissions(new String[]{"android.permission.POST_NOTIFICATIONS"}, 1);
                        App.K.h("requestNotificationPermissionLastTimeMillis", currentTimeMillis);
                    }
                }
            }
        }
    }

    void v0() {
        App.K.g("cameraID", 0);
        App.K.g("mode", 0);
        App.K.g("flash", 0);
        App.K.f("autoFocus", true);
        App.K.f("macroFocus", false);
        App.K.g("sceneMode", 0);
        App.K.g("whiteBalance", 0);
        App.K.g("colorEffect", 0);
        App.K.g("guideMode", 0);
        App.K.g("burstNumMax", 20);
        App.K.g("burstTime", 100);
        App.K.g("timerSeconds", 0);
        App.K.g("aspect", 0);
        App.K.f("touchShutter", false);
        App.K.f("vibration", false);
        App.K.f("geoTag", false);
        App.K.f("mirror", false);
        App.K.g("volumeKey", 0);
        App.K.g("notification", 1);
        App.K.i("path", App.N);
        App.K.f("enableDisplayMode", false);
        App.K.g("displayMode", 0);
        App.K.g("nightMode", 1);
        App.K.f("level", false);
        E0();
    }

    void w0() {
        setContentView(R.layout.activity_settings);
        ((ImageButton) findViewById(R.id.imageButtonReturn)).setOnClickListener(new k());
        findViewById(R.id.imageButtonLine).setOnClickListener(new v());
        findViewById(R.id.imageButtonFacebook).setOnClickListener(new g0());
        findViewById(R.id.imageButtonTwitter).setOnClickListener(new n0());
        findViewById(R.id.imageButtonGmail).setOnClickListener(new o0());
        this.X = (TextView) findViewById(R.id.textViewNewLabelPremiumEdition);
        Switch r02 = (Switch) findViewById(R.id.switchPremiumEdition);
        this.W = r02;
        r02.setClickable(false);
        ((LinearLayout) findViewById(R.id.linearLayoutPremiumEdition)).setOnClickListener(new p0());
        this.f23749p0 = (TextView) findViewById(R.id.textViewBurst);
        ((LinearLayout) findViewById(R.id.linearLayoutBurst)).setOnClickListener(new q0());
        this.f23750q0 = (TextView) findViewById(R.id.textViewAspect);
        ((LinearLayout) findViewById(R.id.linearLayoutAspect)).setOnClickListener(new r0());
        Switch r03 = (Switch) findViewById(R.id.switchTouchShutter);
        this.f23745l0 = r03;
        r03.setOnCheckedChangeListener(new s0());
        ((LinearLayout) findViewById(R.id.linearLayoutTouchShutter)).setOnClickListener(new a());
        Switch r04 = (Switch) findViewById(R.id.switchVibration);
        this.f23746m0 = r04;
        r04.setOnCheckedChangeListener(new b());
        ((LinearLayout) findViewById(R.id.linearLayoutVibration)).setOnClickListener(new c());
        this.f23754u0 = q0();
        Switch r05 = (Switch) findViewById(R.id.switchGeoTag);
        this.f23747n0 = r05;
        r05.setClickable(false);
        this.f23747n0.setOnCheckedChangeListener(new d());
        ((LinearLayout) findViewById(R.id.linearLayoutGeoTag)).setOnClickListener(new e());
        Switch r06 = (Switch) findViewById(R.id.switchMirror);
        this.f23748o0 = r06;
        r06.setOnCheckedChangeListener(new f());
        ((LinearLayout) findViewById(R.id.linearLayoutMirror)).setOnClickListener(new g());
        this.f23751r0 = (TextView) findViewById(R.id.textViewVolumeKey);
        ((LinearLayout) findViewById(R.id.linearLayoutVolumeKey)).setOnClickListener(new h());
        ((LinearLayout) findViewById(R.id.linearLayoutReset)).setOnClickListener(new i());
        this.f23752s0 = (TextView) findViewById(R.id.textViewSavePath);
        ((LinearLayout) findViewById(R.id.linearLayoutSavePath)).setOnClickListener(new j());
        ((LinearLayout) findViewById(R.id.linearLayoutRate)).setOnClickListener(new l());
        ((LinearLayout) findViewById(R.id.linearLayoutReport)).setOnClickListener(new m());
        ((LinearLayout) findViewById(R.id.linearLayoutShare)).setOnClickListener(new n());
        ((LinearLayout) findViewById(R.id.linearLayoutPrivacyPolicy)).setOnClickListener(new o());
        this.f23753t0 = (TextView) findViewById(R.id.textViewNotification);
        ((LinearLayout) findViewById(R.id.linearLayoutNotification)).setOnClickListener(new p());
        this.Y = (TextView) findViewById(R.id.textViewNewLabelSilentVideo);
        if (r0("com.peace.SilentVideo")) {
            findViewById(R.id.linearLayoutSilentVideo).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutSilentVideo).setOnClickListener(new q());
        }
        this.Z = (TextView) findViewById(R.id.textViewNewLabelTextScanner);
        if (r0("com.peace.TextScanner")) {
            findViewById(R.id.linearLayoutTextScanner).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutTextScanner).setOnClickListener(new r());
        }
        this.f23734a0 = (TextView) findViewById(R.id.textViewNewLabelQrCodeReader);
        if (r0("com.peace.QRcodeReader")) {
            findViewById(R.id.linearLayoutQrCodeReader).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutQrCodeReader).setOnClickListener(new s());
        }
        this.f23736c0 = (TextView) findViewById(R.id.textViewNewLabelFlashlight);
        if (r0("com.peace.Flashlight")) {
            findViewById(R.id.linearLayoutFlashlight).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutFlashlight).setOnClickListener(new t());
        }
        this.f23737d0 = (TextView) findViewById(R.id.textViewNewLabelCompass);
        if (r0("com.peace.Compass")) {
            findViewById(R.id.linearLayoutCompass).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutCompass).setOnClickListener(new u());
        }
        this.f23738e0 = (TextView) findViewById(R.id.textViewNewLabelCalculator);
        if (r0("com.peace.Calculator")) {
            findViewById(R.id.linearLayoutCalculator).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutCalculator).setOnClickListener(new w());
        }
        this.f23739f0 = (TextView) findViewById(R.id.textViewNewLabelMagnifier);
        if (r0("com.peace.Magnifier")) {
            findViewById(R.id.linearLayoutMagnifier).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutMagnifier).setOnClickListener(new x());
        }
        this.f23735b0 = (TextView) findViewById(R.id.textViewNewLabelIdPhoto);
        if (r0("com.peace.IdPhoto")) {
            findViewById(R.id.linearLayoutIdPhoto).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutIdPhoto).setOnClickListener(new y());
        }
        this.f23740g0 = (TextView) findViewById(R.id.textViewNewLabelTimer);
        if (r0("com.peace.Timer")) {
            findViewById(R.id.linearLayoutTimer).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutTimer).setOnClickListener(new z());
        }
        this.f23741h0 = (TextView) findViewById(R.id.textViewNewLabelWeather);
        if (!Locale.getDefault().getLanguage().equals(Locale.JAPAN.getLanguage()) || r0("com.peace.Weather")) {
            findViewById(R.id.linearLayoutWeather).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutWeather).setOnClickListener(new a0());
        }
        this.f23742i0 = (TextView) findViewById(R.id.textViewNewLabelFitness);
        if (r0("com.peace.Fitness")) {
            findViewById(R.id.linearLayoutFitness).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutFitness).setOnClickListener(new b0());
        }
        this.f23743j0 = (TextView) findViewById(R.id.textViewNewLabelMusicRecognizer);
        if (r0("com.peace.MusicRecognizer")) {
            findViewById(R.id.linearLayoutMusicRecognizer).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutMusicRecognizer).setOnClickListener(new c0());
        }
        this.f23744k0 = (TextView) findViewById(R.id.textViewNewLabelVoiceRecorder);
        if (r0("com.peace.VoiceRecorder")) {
            findViewById(R.id.linearLayoutVoiceRecorder).setVisibility(8);
        } else {
            findViewById(R.id.linearLayoutVoiceRecorder).setOnClickListener(new d0());
        }
        if (App.e()) {
            findViewById(R.id.frameLayoutNativeAd).setVisibility(8);
        } else {
            com.peace.SilentCamera.c cVar = new com.peace.SilentCamera.c(this, R.id.frameLayoutNativeAd);
            this.U = cVar;
            cVar.n();
        }
        u0 u0Var = new u0(this, this.T);
        this.V = u0Var;
        if (u0Var.d()) {
            this.V.e();
        } else {
            u0();
        }
    }

    void x0() {
        Intent intent = new Intent();
        intent.setAction("android.intent.action.SEND");
        intent.setType("text/plain");
        intent.putExtra("android.intent.extra.TEXT", this.f23755v0);
        startActivity(intent);
    }

    void y0(String str) {
        try {
            if (getPackageManager().getLaunchIntentForPackage(str) != null) {
                Intent intent = new Intent();
                if (str.equals("jp.naver.line.android")) {
                    intent.setAction("android.intent.action.VIEW");
                    intent.setData(Uri.parse("line://msg/text/" + getString(R.string.recommend_text) + "     " + this.f23755v0));
                } else {
                    intent.setAction("android.intent.action.SEND");
                    intent.setPackage(str);
                    intent.setType("text/plain");
                    intent.putExtra("android.intent.extra.TEXT", this.f23755v0);
                }
                startActivity(intent);
                App.g("share", "app", str);
            }
        } catch (Throwable th) {
            App.h(th);
        }
    }

    void z0() {
        com.peace.SilentCamera.r rVar = new com.peace.SilentCamera.r(this);
        this.R = rVar;
        rVar.n(R.string.aspect);
        this.R.d(new String[]{getString(R.string.aspect_169), getString(R.string.aspect_32), getString(R.string.aspect_43), getString(R.string.aspect_11)}, new j0());
        this.R.p();
    }
}