Silent Camera v8.11.1版本的 MD5 值为:461a6aeaae6d6fdb2f75be73cf9b5c5d
以下内容为反编译后的 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.internal.util.common.FbValidationUtils;
import java.util.Locale;
public class SettingsActivity extends androidx.appcompat.app.c {
App O;
com.peace.SilentCamera.p P;
com.peace.SilentCamera.m0 Q;
AlertDialog R;
com.peace.SilentCamera.a S;
com.peace.SilentCamera.s0 T;
Switch U;
TextView V;
TextView W;
TextView X;
TextView Y;
TextView Z;
TextView f24077a0;
TextView f24078b0;
TextView f24079c0;
TextView f24080d0;
TextView f24081e0;
TextView f24082f0;
TextView f24083g0;
TextView f24084h0;
TextView f24085i0;
Switch f24086j0;
Switch f24087k0;
Switch f24088l0;
Switch f24089m0;
TextView f24090n0;
TextView f24091o0;
TextView f24092p0;
TextView f24093q0;
TextView f24094r0;
boolean f24095s0 = false;
String f24096t0;
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.f24086j0.setChecked(!a10);
}
}
public class a0 implements View.OnClickListener {
a0() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.W("com.peace.Weather");
App.K.g("versionCodeOpen_com.peace.Weather", 307);
}
}
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.W("com.peace.Fitness");
App.K.g("versionCodeOpen_com.peace.Fitness", 307);
}
}
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.f24087k0.setChecked(!a10);
}
}
public class c0 implements View.OnClickListener {
c0() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.W("com.peace.MusicRecognizer");
App.K.g("versionCodeOpen_com.peace.MusicRecognizer", 307);
}
}
public class d implements CompoundButton.OnCheckedChangeListener {
d() {
}
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z9) {
SettingsActivity settingsActivity = SettingsActivity.this;
if (settingsActivity.f24095s0 || Build.VERSION.SDK_INT < 23) {
App.K.f("geoTag", z9);
return;
}
settingsActivity.f24088l0.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.W("com.peace.VoiceRecorder");
App.K.g("versionCodeOpen_com.peace.VoiceRecorder", 307);
}
}
public class e implements View.OnClickListener {
e() {
}
@Override
public void onClick(View view) {
SettingsActivity settingsActivity = SettingsActivity.this;
if (settingsActivity.f24095s0 || Build.VERSION.SDK_INT < 23) {
boolean a10 = App.K.a("geoTag", false);
App.K.f("geoTag", !a10);
SettingsActivity.this.f24088l0.setChecked(!a10);
} else {
settingsActivity.f24088l0.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 f24106a;
e0(TextView textView) {
this.f24106a = textView;
}
@Override
public void onProgressChanged(SeekBar seekBar, int i9, boolean z9) {
if (i9 == seekBar.getMax()) {
App.K.g("burstTime", 0);
this.f24106a.setText(SettingsActivity.this.getString(C0351R.string.max_speed));
return;
}
int i10 = i9 + 1;
App.K.g("burstTime", 1000 / i10);
this.f24106a.setText(i10 + SettingsActivity.this.getString(C0351R.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 f24109a;
f0(TextView textView) {
this.f24109a = textView;
}
@Override
public void onProgressChanged(SeekBar seekBar, int i9, boolean z9) {
int i10 = i9 + 3;
App.K.g("burstNumMax", i10);
this.f24109a.setText(i10 + SettingsActivity.this.getString(C0351R.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.f24089m0.setChecked(!a10);
}
}
public class g0 implements View.OnClickListener {
g0() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.c0(FbValidationUtils.FB_PACKAGE);
}
}
public class h implements View.OnClickListener {
h() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.h0();
}
}
public class h0 implements View.OnClickListener {
h0() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.R.dismiss();
}
}
public class i implements View.OnClickListener {
i() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.g0();
}
}
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.f24090n0.setText(settingsActivity.getString(C0351R.string.max_speed));
return;
}
SettingsActivity.this.f24090n0.setText((1000 / b10) + SettingsActivity.this.getString(C0351R.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 i9, long j9) {
SettingsActivity settingsActivity = SettingsActivity.this;
settingsActivity.f24091o0 = (TextView) settingsActivity.findViewById(C0351R.id.textViewAspect);
if (i9 == 0) {
SettingsActivity settingsActivity2 = SettingsActivity.this;
settingsActivity2.f24091o0.setText(settingsActivity2.getString(C0351R.string.aspect_169));
} else if (i9 == 1) {
SettingsActivity settingsActivity3 = SettingsActivity.this;
settingsActivity3.f24091o0.setText(settingsActivity3.getString(C0351R.string.aspect_32));
} else if (i9 == 2) {
SettingsActivity settingsActivity4 = SettingsActivity.this;
settingsActivity4.f24091o0.setText(settingsActivity4.getString(C0351R.string.aspect_43));
} else if (i9 == 3) {
SettingsActivity settingsActivity5 = SettingsActivity.this;
settingsActivity5.f24091o0.setText(settingsActivity5.getString(C0351R.string.aspect_11));
}
App.K.g("aspect", i9);
SettingsActivity.this.P.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 i9, long j9) {
if (i9 == 0) {
App.K.g("notification", 1);
SettingsActivity settingsActivity = SettingsActivity.this;
settingsActivity.f24094r0.setText(settingsActivity.getString(C0351R.string.on));
} else if (i9 == 1) {
App.K.g("notification", 2);
SettingsActivity settingsActivity2 = SettingsActivity.this;
settingsActivity2.f24094r0.setText(settingsActivity2.getString(C0351R.string.priority_only));
} else if (i9 == 2) {
App.K.g("notification", 0);
SettingsActivity settingsActivity3 = SettingsActivity.this;
settingsActivity3.f24094r0.setText(settingsActivity3.getString(C0351R.string.off));
}
SettingsActivity.this.P.a();
}
}
public class l implements View.OnClickListener {
l() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.T.b();
}
}
public class l0 implements AdapterView.OnItemClickListener {
l0() {
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i9, long j9) {
if (i9 == 0) {
App.K.g("volumeKey", 0);
SettingsActivity settingsActivity = SettingsActivity.this;
settingsActivity.f24092p0.setText(settingsActivity.getString(C0351R.string.shutter));
} else if (i9 == 1) {
App.K.g("volumeKey", 1);
SettingsActivity settingsActivity2 = SettingsActivity.this;
settingsActivity2.f24092p0.setText(settingsActivity2.getString(C0351R.string.zoom));
} else if (i9 == 2) {
App.K.g("volumeKey", 2);
SettingsActivity settingsActivity3 = SettingsActivity.this;
settingsActivity3.f24092p0.setText(settingsActivity3.getString(C0351R.string.exposure));
} else if (i9 == 3) {
App.K.g("volumeKey", 4);
SettingsActivity settingsActivity4 = SettingsActivity.this;
settingsActivity4.f24092p0.setText(settingsActivity4.getString(C0351R.string.burst));
} else if (i9 == 4) {
App.K.g("volumeKey", 3);
SettingsActivity settingsActivity5 = SettingsActivity.this;
settingsActivity5.f24092p0.setText(settingsActivity5.getString(C0351R.string.none));
}
SettingsActivity.this.P.a();
}
}
public class m implements View.OnClickListener {
m() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.T.c();
}
}
public class m0 implements View.OnClickListener {
m0() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.Z();
SettingsActivity.this.P.a();
}
}
public class n implements View.OnClickListener {
n() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.b0();
}
}
public class n0 implements View.OnClickListener {
n0() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.c0("com.twitter.android");
}
}
public class o implements View.OnClickListener {
o() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.X();
}
}
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(C0351R.string.recommend_text));
intent.putExtra("android.intent.extra.TEXT", SettingsActivity.this.f24096t0);
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.f0();
}
}
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.m0.f24214v, 307);
}
}
public class q implements View.OnClickListener {
q() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.W("com.peace.SilentVideo");
App.K.g("versionCodeOpen_com.peace.SilentVideo", 307);
}
}
public class q0 implements View.OnClickListener {
q0() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.e0();
}
}
public class r implements View.OnClickListener {
r() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.W("com.peace.TextScanner");
App.K.g("versionCodeOpen_com.peace.TextScanner", 307);
}
}
public class r0 implements View.OnClickListener {
r0() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.d0();
}
}
public class s implements View.OnClickListener {
s() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.W("com.peace.QRcodeReader");
App.K.g("versionCodeOpen_com.peace.QRcodeReader", 307);
}
}
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.W("com.peace.Flashlight");
App.K.g("versionCodeOpen_com.peace.Flashlight", 307);
}
}
public class u implements View.OnClickListener {
u() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.W("com.peace.Compass");
App.K.g("versionCodeOpen_com.peace.Compass", 307);
}
}
public class v implements View.OnClickListener {
v() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.c0("jp.naver.line.android");
}
}
public class w implements View.OnClickListener {
w() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.W("com.peace.Calculator");
App.K.g("versionCodeOpen_com.peace.Calculator", 307);
}
}
public class x implements View.OnClickListener {
x() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.W("com.peace.Magnifier");
App.K.g("versionCodeOpen_com.peace.Magnifier", 307);
}
}
public class y implements View.OnClickListener {
y() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.W("com.peace.IdPhoto");
App.K.g("versionCodeOpen_com.peace.IdPhoto", 307);
}
}
public class z implements View.OnClickListener {
z() {
}
@Override
public void onClick(View view) {
SettingsActivity.this.W("com.peace.Timer");
App.K.g("versionCodeOpen_com.peace.Timer", 307);
}
}
void T() {
String action = getIntent().getAction();
if (action == null || !action.equals(PurchaseActivity.class.getSimpleName())) {
return;
}
startActivity(new Intent(this, (Class<?>) PurchaseActivity.class));
}
boolean U() {
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 V(String str) {
return getPackageManager().getLaunchIntentForPackage(str) != null;
}
void W(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 X() {
try {
startActivity(new Intent("android.intent.action.VIEW", Uri.parse(getString(C0351R.string.privacy_policy_url))));
} catch (Throwable th) {
App.h(th);
}
}
void Y() {
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.f24067c0) {
requestPermissions(new String[]{"android.permission.POST_NOTIFICATIONS"}, 1);
App.K.h("requestNotificationPermissionLastTimeMillis", currentTimeMillis);
}
}
}
}
}
void Z() {
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);
i0();
}
void a0() {
setContentView(C0351R.layout.activity_settings);
((ImageButton) findViewById(C0351R.id.imageButtonReturn)).setOnClickListener(new k());
findViewById(C0351R.id.imageButtonLine).setOnClickListener(new v());
findViewById(C0351R.id.imageButtonFacebook).setOnClickListener(new g0());
findViewById(C0351R.id.imageButtonTwitter).setOnClickListener(new n0());
findViewById(C0351R.id.imageButtonGmail).setOnClickListener(new o0());
this.V = (TextView) findViewById(C0351R.id.textViewNewLabelPremiumEdition);
Switch r02 = (Switch) findViewById(C0351R.id.switchPremiumEdition);
this.U = r02;
r02.setClickable(false);
((LinearLayout) findViewById(C0351R.id.linearLayoutPremiumEdition)).setOnClickListener(new p0());
this.f24090n0 = (TextView) findViewById(C0351R.id.textViewBurst);
((LinearLayout) findViewById(C0351R.id.linearLayoutBurst)).setOnClickListener(new q0());
this.f24091o0 = (TextView) findViewById(C0351R.id.textViewAspect);
((LinearLayout) findViewById(C0351R.id.linearLayoutAspect)).setOnClickListener(new r0());
Switch r03 = (Switch) findViewById(C0351R.id.switchTouchShutter);
this.f24086j0 = r03;
r03.setOnCheckedChangeListener(new s0());
((LinearLayout) findViewById(C0351R.id.linearLayoutTouchShutter)).setOnClickListener(new a());
Switch r04 = (Switch) findViewById(C0351R.id.switchVibration);
this.f24087k0 = r04;
r04.setOnCheckedChangeListener(new b());
((LinearLayout) findViewById(C0351R.id.linearLayoutVibration)).setOnClickListener(new c());
this.f24095s0 = U();
Switch r05 = (Switch) findViewById(C0351R.id.switchGeoTag);
this.f24088l0 = r05;
r05.setClickable(false);
this.f24088l0.setOnCheckedChangeListener(new d());
((LinearLayout) findViewById(C0351R.id.linearLayoutGeoTag)).setOnClickListener(new e());
Switch r06 = (Switch) findViewById(C0351R.id.switchMirror);
this.f24089m0 = r06;
r06.setOnCheckedChangeListener(new f());
((LinearLayout) findViewById(C0351R.id.linearLayoutMirror)).setOnClickListener(new g());
this.f24092p0 = (TextView) findViewById(C0351R.id.textViewVolumeKey);
((LinearLayout) findViewById(C0351R.id.linearLayoutVolumeKey)).setOnClickListener(new h());
((LinearLayout) findViewById(C0351R.id.linearLayoutReset)).setOnClickListener(new i());
this.f24093q0 = (TextView) findViewById(C0351R.id.textViewSavePath);
((LinearLayout) findViewById(C0351R.id.linearLayoutSavePath)).setOnClickListener(new j());
((LinearLayout) findViewById(C0351R.id.linearLayoutRate)).setOnClickListener(new l());
((LinearLayout) findViewById(C0351R.id.linearLayoutReport)).setOnClickListener(new m());
((LinearLayout) findViewById(C0351R.id.linearLayoutShare)).setOnClickListener(new n());
((LinearLayout) findViewById(C0351R.id.linearLayoutPrivacyPolicy)).setOnClickListener(new o());
this.f24094r0 = (TextView) findViewById(C0351R.id.textViewNotification);
((LinearLayout) findViewById(C0351R.id.linearLayoutNotification)).setOnClickListener(new p());
this.W = (TextView) findViewById(C0351R.id.textViewNewLabelSilentVideo);
if (V("com.peace.SilentVideo")) {
findViewById(C0351R.id.linearLayoutSilentVideo).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutSilentVideo).setOnClickListener(new q());
}
this.X = (TextView) findViewById(C0351R.id.textViewNewLabelTextScanner);
if (V("com.peace.TextScanner")) {
findViewById(C0351R.id.linearLayoutTextScanner).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutTextScanner).setOnClickListener(new r());
}
this.Y = (TextView) findViewById(C0351R.id.textViewNewLabelQrCodeReader);
if (V("com.peace.QRcodeReader")) {
findViewById(C0351R.id.linearLayoutQrCodeReader).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutQrCodeReader).setOnClickListener(new s());
}
this.f24077a0 = (TextView) findViewById(C0351R.id.textViewNewLabelFlashlight);
if (V("com.peace.Flashlight")) {
findViewById(C0351R.id.linearLayoutFlashlight).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutFlashlight).setOnClickListener(new t());
}
this.f24078b0 = (TextView) findViewById(C0351R.id.textViewNewLabelCompass);
if (V("com.peace.Compass")) {
findViewById(C0351R.id.linearLayoutCompass).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutCompass).setOnClickListener(new u());
}
this.f24079c0 = (TextView) findViewById(C0351R.id.textViewNewLabelCalculator);
if (V("com.peace.Calculator")) {
findViewById(C0351R.id.linearLayoutCalculator).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutCalculator).setOnClickListener(new w());
}
this.f24080d0 = (TextView) findViewById(C0351R.id.textViewNewLabelMagnifier);
if (V("com.peace.Magnifier")) {
findViewById(C0351R.id.linearLayoutMagnifier).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutMagnifier).setOnClickListener(new x());
}
this.Z = (TextView) findViewById(C0351R.id.textViewNewLabelIdPhoto);
if (V("com.peace.IdPhoto")) {
findViewById(C0351R.id.linearLayoutIdPhoto).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutIdPhoto).setOnClickListener(new y());
}
this.f24081e0 = (TextView) findViewById(C0351R.id.textViewNewLabelTimer);
if (V("com.peace.Timer")) {
findViewById(C0351R.id.linearLayoutTimer).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutTimer).setOnClickListener(new z());
}
this.f24082f0 = (TextView) findViewById(C0351R.id.textViewNewLabelWeather);
if (!Locale.getDefault().getLanguage().equals(Locale.JAPAN.getLanguage()) || V("com.peace.Weather")) {
findViewById(C0351R.id.linearLayoutWeather).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutWeather).setOnClickListener(new a0());
}
this.f24083g0 = (TextView) findViewById(C0351R.id.textViewNewLabelFitness);
if (V("com.peace.Fitness")) {
findViewById(C0351R.id.linearLayoutFitness).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutFitness).setOnClickListener(new b0());
}
this.f24084h0 = (TextView) findViewById(C0351R.id.textViewNewLabelMusicRecognizer);
if (V("com.peace.MusicRecognizer")) {
findViewById(C0351R.id.linearLayoutMusicRecognizer).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutMusicRecognizer).setOnClickListener(new c0());
}
this.f24085i0 = (TextView) findViewById(C0351R.id.textViewNewLabelVoiceRecorder);
if (V("com.peace.VoiceRecorder")) {
findViewById(C0351R.id.linearLayoutVoiceRecorder).setVisibility(8);
} else {
findViewById(C0351R.id.linearLayoutVoiceRecorder).setOnClickListener(new d0());
}
if (App.e()) {
findViewById(C0351R.id.frameLayoutNativeAd).setVisibility(8);
} else {
com.peace.SilentCamera.a aVar = new com.peace.SilentCamera.a(this, C0351R.id.frameLayoutNativeAd);
this.S = aVar;
aVar.k();
}
com.peace.SilentCamera.s0 s0Var = new com.peace.SilentCamera.s0(this, this.R);
this.T = s0Var;
if (s0Var.d()) {
this.T.e();
} else {
Y();
}
}
void b0() {
Intent intent = new Intent();
intent.setAction("android.intent.action.SEND");
intent.setType("text/plain");
intent.putExtra("android.intent.extra.TEXT", this.f24096t0);
startActivity(intent);
}
void c0(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(C0351R.string.recommend_text) + " " + this.f24096t0));
} else {
intent.setAction("android.intent.action.SEND");
intent.setPackage(str);
intent.setType("text/plain");
intent.putExtra("android.intent.extra.TEXT", this.f24096t0);
}
startActivity(intent);
App.g("share", "app", str);
}
} catch (Throwable th) {
App.h(th);
}
}
void d0() {
com.peace.SilentCamera.p pVar = new com.peace.SilentCamera.p(this);
this.P = pVar;
pVar.n(C0351R.string.aspect);
this.P.d(new String[]{getString(C0351R.string.aspect_169), getString(C0351R.string.aspect_32), getString(C0351R.string.aspect_43), getString(C0351R.string.aspect_11)}, new j0());
this.P.p();
}
public void e0() {
AlertDialog alertDialog = this.R;
if (alertDialog == null || !alertDialog.isShowing()) {
View inflate = ((LayoutInflater) getSystemService("layout_inflater")).inflate(C0351R.layout.dialog_burst, (ViewGroup) findViewById(C0351R.id.burstLayout));
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setView(inflate);
AlertDialog create = builder.create();
this.R = create;
create.getWindow().setBackgroundDrawable(new ColorDrawable(0));
TextView textView = (TextView) inflate.findViewById(C0351R.id.textViewBurstSpeed);
SeekBar seekBar = (SeekBar) inflate.findViewById(C0351R.id.seekBarBurstSpeed);
int b10 = App.K.b("burstTime", 100);
if (b10 == 0) {
textView.setText(getString(C0351R.string.max_speed));
seekBar.setProgress(seekBar.getMax());
} else {
int i9 = 1000 / b10;
textView.setText(i9 + getString(C0351R.string.fps));
seekBar.setProgress(i9 + (-1));
}
seekBar.setOnSeekBarChangeListener(new e0(textView));
TextView textView2 = (TextView) inflate.findViewById(C0351R.id.textViewBurstNum);
int b11 = App.K.b("burstNumMax", 20);
textView2.setText(b11 + getString(C0351R.string.count));
SeekBar seekBar2 = (SeekBar) inflate.findViewById(C0351R.id.seekBarBurstNum);
seekBar2.setProgress(b11 + (-3));
seekBar2.setOnSeekBarChangeListener(new f0(textView2));
((Button) inflate.findViewById(C0351R.id.okButton)).setOnClickListener(new h0());
this.R.setOnDismissListener(new i0());
if (isFinishing()) {
return;
}
this.R.show();
}
}
void f0() {
com.peace.SilentCamera.p pVar = new com.peace.SilentCamera.p(this);
this.P = pVar;
pVar.n(C0351R.string.notification);
this.P.d(new String[]{getString(C0351R.string.on), getString(C0351R.string.priority_only), getString(C0351R.string.off)}, new k0());
this.P.p();
}
void g0() {
com.peace.SilentCamera.p pVar = new com.peace.SilentCamera.p(this);
this.P = pVar;
pVar.o(getString(C0351R.string.reset));
this.P.f(getString(C0351R.string.reset_alert));
this.P.m(getString(C0351R.string.yes), new m0());
this.P.h(getString(C0351R.string.cancel), null);
this.P.p();
}
void h0() {
com.peace.SilentCamera.p pVar = new com.peace.SilentCamera.p(this);
this.P = pVar;
pVar.n(C0351R.string.volumekey);
this.P.d(new String[]{getString(C0351R.string.shutter), getString(C0351R.string.zoom), getString(C0351R.string.exposure), getString(C0351R.string.burst), getString(C0351R.string.none)}, new l0());
this.P.p();
}
void i0() {
int b10 = App.K.b("burstTime", 100);
if (b10 == 0) {
this.f24090n0.setText(getString(C0351R.string.max_speed));
} else {
this.f24090n0.setText((1000 / b10) + getString(C0351R.string.fps));
}
int b11 = App.K.b("aspect", 0);
if (b11 == 0) {
this.f24091o0.setText(getString(C0351R.string.aspect_169));
} else if (b11 == 1) {
this.f24091o0.setText(getString(C0351R.string.aspect_32));
} else if (b11 == 2) {
this.f24091o0.setText(getString(C0351R.string.aspect_43));
} else if (b11 == 3) {
this.f24091o0.setText(getString(C0351R.string.aspect_11));
}
this.f24086j0.setChecked(App.K.a("touchShutter", false));
this.f24087k0.setChecked(App.K.a("vibration", false));
this.f24088l0.setChecked(App.K.a("geoTag", false));
this.f24089m0.setChecked(App.K.a("mirror", false));
int b12 = App.K.b("volumeKey", 0);
if (b12 == 0) {
this.f24092p0.setText(getString(C0351R.string.shutter));
} else if (b12 == 1) {
this.f24092p0.setText(getString(C0351R.string.zoom));
} else if (b12 == 2) {
this.f24092p0.setText(getString(C0351R.string.exposure));
} else if (b12 == 4) {
this.f24092p0.setText(getString(C0351R.string.burst));
} else if (b12 == 3) {
this.f24092p0.setText(getString(C0351R.string.none));
}
this.f24093q0.setText(App.K.d("path", App.N).replace(App.M, getString(C0351R.string.internal_memory)));
int b13 = App.K.b("notification", 1);
if (b13 == 1) {
this.f24094r0.setText(getString(C0351R.string.on));
} else if (b13 == 2) {
this.f24094r0.setText(getString(C0351R.string.priority_only));
} else if (b13 == 0) {
this.f24094r0.setText(getString(C0351R.string.off));
}
this.Q.d();
if (this.Q.b(PurchaseActivity.class.getSimpleName())) {
this.V.setVisibility(0);
} else {
this.V.setVisibility(8);
}
this.U.setChecked(App.e());
if (this.Q.b("com.peace.SilentVideo")) {
this.W.setVisibility(0);
} else {
this.W.setVisibility(8);
}
if (this.Q.b("com.peace.TextScanner")) {
this.X.setVisibility(0);
} else {
this.X.setVisibility(8);
}
if (this.Q.b("com.peace.QRcodeReader")) {
this.Y.setVisibility(0);
} else {
this.Y.setVisibility(8);
}
if (this.Q.b("com.peace.IdPhoto")) {
this.Z.setVisibility(0);
} else {
this.Z.setVisibility(8);
}
if (this.Q.b("com.peace.Flashlight")) {
this.f24077a0.setVisibility(0);
} else {
this.f24077a0.setVisibility(8);
}
if (this.Q.b("com.peace.Compass")) {
this.f24078b0.setVisibility(0);
} else {
this.f24078b0.setVisibility(8);
}
if (this.Q.b("com.peace.Calculator")) {
this.f24079c0.setVisibility(0);
} else {
this.f24079c0.setVisibility(8);
}
if (this.Q.b("com.peace.Magnifier")) {
this.f24080d0.setVisibility(0);
} else {
this.f24080d0.setVisibility(8);
}
if (this.Q.b("com.peace.Timer")) {
this.f24081e0.setVisibility(0);
} else {
this.f24081e0.setVisibility(8);
}
if (this.Q.b("com.peace.Weather")) {
this.f24082f0.setVisibility(0);
} else {
this.f24082f0.setVisibility(8);
}
if (this.Q.b("com.peace.Fitness")) {
this.f24083g0.setVisibility(0);
} else {
this.f24083g0.setVisibility(8);
}
if (this.Q.b("com.peace.MusicRecognizer")) {
this.f24084h0.setVisibility(0);
} else {
this.f24084h0.setVisibility(8);
}
if (this.Q.b("com.peace.VoiceRecorder")) {
this.f24085i0.setVisibility(0);
} else {
this.f24085i0.setVisibility(8);
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
this.O = (App) getApplication();
this.Q = new com.peace.SilentCamera.m0(this);
this.T = new com.peace.SilentCamera.s0(this, this.R);
this.f24096t0 = "https://play.google.com/store/apps/details?id=" + getPackageName() + "&hl=" + Locale.getDefault().getLanguage();
a0();
T();
}
@Override
public void onDestroy() {
super.onDestroy();
com.peace.SilentCamera.a aVar = this.S;
if (aVar != null) {
aVar.g();
}
}
@Override
public void onRequestPermissionsResult(int i9, String[] strArr, int[] iArr) {
int checkSelfPermission;
super.onRequestPermissionsResult(i9, strArr, iArr);
if (Build.VERSION.SDK_INT >= 23) {
if (i9 == 0) {
boolean U = U();
this.f24095s0 = U;
if (U) {
boolean a10 = App.K.a("geoTag", false);
App.K.f("geoTag", !a10);
this.f24088l0.setChecked(!a10);
return;
}
return;
}
if (i9 == 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();
i0();
}
}