MyRecorder v1.01.90.0219版本的 MD5 值为:c361f51174a0bf833abfa72929caf8d3
以下内容为反编译后的 SettingActivity.java 源代码,内容仅作参考
package com.myviocerecorder.voicerecorder.ui.activities;
import ak.k0;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.PowerManager;
import android.view.MenuItem;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.Switch;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import bf.a;
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
import com.google.android.exoplayer2.analytics.AnalyticsListener;
import com.myviocerecorder.voicerecorder.App;
import com.myviocerecorder.voicerecorder.activities.BaseActivity;
import com.myviocerecorder.voicerecorder.cancelsub.SettingSubsActivity;
import com.myviocerecorder.voicerecorder.constant.UserConfig;
import com.myviocerecorder.voicerecorder.ui.activities.SettingActivity;
import com.myviocerecorder.voicerecorder.view.ToolbarView;
import com.smaato.sdk.core.mvvm.model.soma.SomaRemoteSource;
import fe.m;
import fe.x;
import fe.z;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import mk.q;
import myrecorder.voicerecorder.voicememos.audiorecorder.recordingapp.R;
import nk.g0;
import nk.s;
import nk.t;
import oe.d;
import pi.a;
import xe.d0;
import xe.g;
import xe.z;
public final class SettingActivity extends BaseActivity implements View.OnClickListener {
public static final a f39523x = new a(null);
public Map<Integer, View> f39525w = new LinkedHashMap();
public final int f39524v = AnalyticsListener.EVENT_AUDIO_DECODER_RELEASED;
public static final class a {
public a() {
}
public a(nk.j jVar) {
this();
}
public final int a() {
UserConfig j10;
UserConfig j11;
UserConfig j12;
UserConfig j13;
UserConfig j14;
UserConfig j15;
App.a aVar = App.f39143g;
App b10 = aVar.b();
if ((b10 == null || (j15 = b10.j()) == null || j15.Y() != 96000) ? false : true) {
App b11 = aVar.b();
if ((b11 == null || (j14 = b11.j()) == null || j14.x() != 320000) ? false : true) {
return 0;
}
}
App b12 = aVar.b();
Integer num = null;
Integer valueOf = (b12 == null || (j13 = b12.j()) == null) ? null : Integer.valueOf(j13.Y());
s.e(valueOf);
if (valueOf.intValue() >= 44000) {
App b13 = aVar.b();
Integer valueOf2 = (b13 == null || (j12 = b13.j()) == null) ? null : Integer.valueOf(j12.x());
s.e(valueOf2);
if (valueOf2.intValue() >= 192000) {
return 1;
}
}
App b14 = aVar.b();
Integer valueOf3 = (b14 == null || (j11 = b14.j()) == null) ? null : Integer.valueOf(j11.Y());
s.e(valueOf3);
if (valueOf3.intValue() >= 22000) {
App b15 = aVar.b();
if (b15 != null && (j10 = b15.j()) != null) {
num = Integer.valueOf(j10.x());
}
s.e(num);
if (num.intValue() >= 128000) {
return 2;
}
}
return 3;
}
}
public static final class b implements ToolbarView.a {
public b() {
}
@Override
public void a(View view) {
SettingActivity.this.finish();
}
@Override
public void b(View view) {
}
}
public static final class c implements CompoundButton.OnCheckedChangeListener {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z7) {
App b10 = App.f39143g.b();
UserConfig j10 = b10 != null ? b10.j() : null;
if (j10 != null) {
j10.d1(z7);
}
if (z7) {
he.a.f44584a.b().o("settings_pause_on_call_on");
} else {
he.a.f44584a.b().o("settings_pause_on_call_off");
}
}
}
public static final class d implements CompoundButton.OnCheckedChangeListener {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z7) {
App b10 = App.f39143g.b();
UserConfig j10 = b10 != null ? b10.j() : null;
if (j10 == null) {
return;
}
j10.t1(z7);
}
}
public static final class e implements CompoundButton.OnCheckedChangeListener {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z7) {
App b10 = App.f39143g.b();
UserConfig j10 = b10 != null ? b10.j() : null;
if (j10 != null) {
j10.v1(z7);
}
if (z7) {
he.a.f44584a.b().o("settings_sreen_on_on");
} else {
he.a.f44584a.b().o("settings_sreen_on_off");
}
}
}
public static final class f extends g.d {
public f() {
}
@Override
public void b(androidx.appcompat.app.b bVar, int i10) {
if (i10 == 0) {
try {
zd.b.d(SettingActivity.this);
if (zd.b.c(SettingActivity.this)) {
((TextView) SettingActivity.this.R(wd.c.tv_logout)).setVisibility(0);
} else {
((TextView) SettingActivity.this.R(wd.c.tv_logout)).setVisibility(8);
}
} catch (Exception unused) {
return;
}
}
if (bVar == null || !bVar.isShowing()) {
return;
}
bVar.dismiss();
}
}
public static final class g implements m.a {
public g() {
}
@Override
public void a() {
}
@Override
public void b() {
SettingActivity.this.s0();
he.a.f44584a.b().o("setting_prefix_save");
}
}
public static final class h implements a.InterfaceC0069a {
public h() {
}
@Override
public void a() {
SettingActivity.this.u0();
he.a.f44584a.b().e("rate_popup_to_feedback");
}
@Override
public void b() {
he.a.f44584a.b().e("rate_popup_to_store");
z zVar = z.f54881a;
SettingActivity settingActivity = SettingActivity.this;
App b10 = App.f39143g.b();
zVar.a(settingActivity, b10 != null ? b10.getPackageName() : null);
}
@Override
public void c() {
he.a.f44584a.b().e("rate_popup_later");
}
@Override
public void d() {
he.a.f44584a.b().e("rate_popup_to_feedback");
SettingActivity.this.u0();
}
@Override
public void e() {
he.a.f44584a.b().e("rate_popup_to_feedback");
SettingActivity.this.u0();
}
@Override
public void f() {
he.a.f44584a.b().e("rate_popup_to_feedback");
SettingActivity.this.u0();
}
}
public static final class i extends t implements q<k3.c, Integer, CharSequence, k0> {
public final int f39530a;
public i(int i10) {
super(3);
this.f39530a = i10;
}
public final void a(k3.c cVar, int i10, CharSequence charSequence) {
s.h(cVar, "<anonymous parameter 0>");
s.h(charSequence, "<anonymous parameter 2>");
App b10 = App.f39143g.b();
UserConfig j10 = b10 != null ? b10.j() : null;
if (j10 == null) {
return;
}
j10.J0(i10);
}
@Override
public k0 invoke(k3.c cVar, Integer num, CharSequence charSequence) {
a(cVar, num.intValue(), charSequence);
return k0.f364a;
}
}
public static final class j extends t implements q<k3.c, Integer, CharSequence, k0> {
public static final j f39531a = new j();
public j() {
super(3);
}
public final void a(k3.c cVar, int i10, CharSequence charSequence) {
s.h(cVar, "<anonymous parameter 0>");
s.h(charSequence, "<anonymous parameter 2>");
App b10 = App.f39143g.b();
UserConfig j10 = b10 != null ? b10.j() : null;
if (j10 != null) {
j10.N0(ie.c.b()[i10]);
}
xe.c.f54824a = 0.0f;
}
@Override
public k0 invoke(k3.c cVar, Integer num, CharSequence charSequence) {
a(cVar, num.intValue(), charSequence);
return k0.f364a;
}
}
public static final class k extends t implements q<k3.c, Integer, CharSequence, k0> {
public final int f39532a;
public final g0 f39533b;
public k(int i10, g0 g0Var) {
super(3);
this.f39532a = i10;
this.f39533b = g0Var;
}
public final void a(k3.c cVar, int i10, CharSequence charSequence) {
s.h(cVar, "<anonymous parameter 0>");
s.h(charSequence, "<anonymous parameter 2>");
App.a aVar = App.f39143g;
App b10 = aVar.b();
UserConfig j10 = b10 != null ? b10.j() : null;
if (j10 != null) {
j10.m(i10);
}
if (this.f39532a != i10) {
try {
if (i10 == 0) {
Locale a10 = aVar.a();
if (a10 != null) {
App b11 = aVar.b();
s.e(b11);
xe.f.j(b11, a10);
App b12 = aVar.b();
s.e(b12);
xe.f.i(b12, a10);
App b13 = aVar.b();
if (b13 != null) {
b13.v();
}
}
} else {
Locale locale = ie.c.c().get(i10);
if (locale != null) {
App b14 = aVar.b();
s.e(b14);
xe.f.j(b14, locale);
App b15 = aVar.b();
s.e(b15);
xe.f.i(b15, locale);
App b16 = aVar.b();
if (b16 != null) {
b16.v();
}
}
}
} catch (Exception unused) {
}
this.f39533b.f48375a = true;
}
}
@Override
public k0 invoke(k3.c cVar, Integer num, CharSequence charSequence) {
a(cVar, num.intValue(), charSequence);
return k0.f364a;
}
}
public static final class l implements x.a {
public l() {
}
@Override
public void a() {
}
@Override
public void b(int i10, int i11) {
App.a aVar = App.f39143g;
App b10 = aVar.b();
UserConfig j10 = b10 != null ? b10.j() : null;
if (j10 != null) {
j10.N0(i10);
}
App b11 = aVar.b();
UserConfig j11 = b11 != null ? b11.j() : null;
if (j11 != null) {
j11.s1(i11);
}
SettingActivity.this.s0();
xe.c.f54824a = 0.0f;
}
}
public static final class m extends t implements q<k3.c, Integer, CharSequence, k0> {
public final int f39535a;
public m(int i10) {
super(3);
this.f39535a = i10;
}
public final void a(k3.c cVar, int i10, CharSequence charSequence) {
UserConfig j10;
UserConfig j11;
UserConfig j12;
UserConfig j13;
s.h(cVar, "<anonymous parameter 0>");
s.h(charSequence, "<anonymous parameter 2>");
App.a aVar = App.f39143g;
App b10 = aVar.b();
UserConfig j14 = b10 != null ? b10.j() : null;
if (j14 != null) {
j14.H0(i10);
}
if (this.f39535a != i10) {
App b11 = aVar.b();
boolean z7 = true;
if ((b11 == null || (j13 = b11.j()) == null || j13.r() != 0) ? false : true) {
he.a.f44584a.b().h("settings_recording_format_select", SomaRemoteSource.KEY_AD_FORMAT, "m4a");
return;
}
App b12 = aVar.b();
if ((b12 == null || (j12 = b12.j()) == null || j12.r() != 1) ? false : true) {
he.a.f44584a.b().h("settings_recording_format_select", SomaRemoteSource.KEY_AD_FORMAT, "aac");
return;
}
App b13 = aVar.b();
if ((b13 == null || (j11 = b13.j()) == null || j11.r() != 2) ? false : true) {
he.a.f44584a.b().h("settings_recording_format_select", SomaRemoteSource.KEY_AD_FORMAT, "amr");
return;
}
App b14 = aVar.b();
if ((b14 == null || (j10 = b14.j()) == null || j10.r() != 3) ? false : false) {
he.a.f44584a.b().h("settings_recording_format_select", SomaRemoteSource.KEY_AD_FORMAT, "mp3");
}
}
}
@Override
public k0 invoke(k3.c cVar, Integer num, CharSequence charSequence) {
a(cVar, num.intValue(), charSequence);
return k0.f364a;
}
}
public static final class n implements z.a {
public n() {
}
@Override
public void a() {
}
@Override
public void b(int i10) {
App b10 = App.f39143g.b();
UserConfig j10 = b10 != null ? b10.j() : null;
if (j10 != null) {
j10.s1(ie.c.d()[i10]);
}
SettingActivity.this.s0();
}
}
public static final class o extends t implements q<k3.c, Integer, CharSequence, k0> {
public final int f39537a;
public o(int i10) {
super(3);
this.f39537a = i10;
}
public final void a(k3.c cVar, int i10, CharSequence charSequence) {
s.h(cVar, "<anonymous parameter 0>");
s.h(charSequence, "<anonymous parameter 2>");
App b10 = App.f39143g.b();
UserConfig j10 = b10 != null ? b10.j() : null;
if (j10 == null) {
return;
}
j10.F0(i10);
}
@Override
public k0 invoke(k3.c cVar, Integer num, CharSequence charSequence) {
a(cVar, num.intValue(), charSequence);
return k0.f364a;
}
}
public static final class p implements a.e {
@Override
public void a(k3.c cVar) {
s.h(cVar, "dialog");
cVar.dismiss();
}
}
public static final void h0(SettingActivity settingActivity, DialogInterface dialogInterface) {
s.h(settingActivity, "this$0");
settingActivity.s0();
}
public static final void j0(SettingActivity settingActivity, DialogInterface dialogInterface) {
s.h(settingActivity, "this$0");
settingActivity.s0();
}
public static final void l0(SettingActivity settingActivity, g0 g0Var, DialogInterface dialogInterface) {
s.h(settingActivity, "this$0");
s.h(g0Var, "$isChoose");
settingActivity.s0();
boolean z7 = g0Var.f48375a;
}
public static final void o0(SettingActivity settingActivity, DialogInterface dialogInterface) {
s.h(settingActivity, "this$0");
settingActivity.s0();
}
public static final void r0(SettingActivity settingActivity, DialogInterface dialogInterface) {
s.h(settingActivity, "this$0");
settingActivity.s0();
}
public View R(int i10) {
Map<Integer, View> map = this.f39525w;
View view = map.get(Integer.valueOf(i10));
if (view == null) {
View findViewById = findViewById(i10);
if (findViewById != null) {
map.put(Integer.valueOf(i10), findViewById);
return findViewById;
}
return null;
}
return view;
}
public final void U() {
startActivity(new Intent(this, SettingSubsActivity.class));
}
public final void V() {
try {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setPackage("com.android.vending");
startActivity(intent);
} catch (Exception unused) {
}
}
public final void W() {
Boolean valueOf = Boolean.valueOf(isFinishing());
s.e(valueOf);
if (valueOf.booleanValue()) {
return;
}
xe.z.f54881a.b(this);
}
public final Intent X(Context context) {
s.h(context, "context");
Intent intent = new Intent("android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS");
intent.setData(Uri.parse("package:" + context.getPackageName()));
return intent;
}
public final void Y() {
int i10 = wd.c.toolbar_layout;
((ToolbarView) R(i10)).setToolbarTitle(R.string.settings);
((ToolbarView) R(i10)).setToolbarBackShow(true);
((ToolbarView) R(i10)).setOnToolbarClickListener(new b());
}
public final void Z() {
UserConfig j10;
UserConfig j11;
Boolean bool;
App b10;
UserConfig j12;
UserConfig j13;
UserConfig j14;
UserConfig j15;
UserConfig j16;
UserConfig j17;
if (Build.VERSION.SDK_INT < 23 || b0(this) || !a0(this, X(this))) {
((ConstraintLayout) R(wd.c.cl_save_guild)).setVisibility(8);
} else {
((ConstraintLayout) R(wd.c.cl_save_guild)).setVisibility(0);
}
((ConstraintLayout) R(wd.c.language_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.storage_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.prefix_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.rate_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.feedback_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.policy_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.disclaimer_layout)).setOnClickListener(this);
int i10 = wd.c.sub_cancel_layout;
((ConstraintLayout) R(i10)).setOnClickListener(this);
App.a aVar = App.f39143g;
App b11 = aVar.b();
boolean z7 = true;
if (!((b11 == null || (j17 = b11.j()) == null || !j17.o()) ? false : true)) {
App b12 = aVar.b();
if (!((b12 == null || (j16 = b12.j()) == null || !j16.n()) ? false : true)) {
App b13 = aVar.b();
if (!((b13 == null || (j15 = b13.j()) == null || !j15.p()) ? false : true)) {
((ConstraintLayout) R(i10)).setVisibility(8);
((ConstraintLayout) R(wd.c.samling_rate_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.bit_rate_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.sound_track_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.record_format_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.cl_save_guild)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.cl_quick_setting)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.share_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.more_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.audio_layout)).setOnClickListener(this);
((TextView) R(wd.c.version_tv2)).setText("1.01.90.0219");
((ConstraintLayout) R(wd.c.quality_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.version_layout)).setOnClickListener(this);
if (zd.b.c(this)) {
((TextView) R(wd.c.tv_logout)).setVisibility(8);
} else {
int i11 = wd.c.tv_logout;
((TextView) R(i11)).setOnClickListener(this);
((TextView) R(i11)).setVisibility(0);
}
int i12 = wd.c.s_pause_call;
Switch r12 = (Switch) R(i12);
App b14 = aVar.b();
bool = null;
Boolean valueOf = (b14 != null || (j14 = b14.j()) == null) ? null : Boolean.valueOf(j14.M());
s.e(valueOf);
r12.setChecked(valueOf.booleanValue());
((Switch) R(i12)).setOnCheckedChangeListener(new c());
int i13 = wd.c.s_save_pop_on;
Switch r13 = (Switch) R(i13);
App b15 = aVar.b();
Boolean valueOf2 = (b15 != null || (j13 = b15.j()) == null) ? null : Boolean.valueOf(j13.Z());
s.e(valueOf2);
r13.setChecked(valueOf2.booleanValue());
((Switch) R(i13)).setOnCheckedChangeListener(new d());
int i14 = wd.c.s_screen_on;
Switch r14 = (Switch) R(i14);
b10 = aVar.b();
if (b10 != null && (j12 = b10.j()) != null) {
bool = Boolean.valueOf(j12.b0());
}
s.e(bool);
r14.setChecked(bool.booleanValue());
((Switch) R(i14)).setOnCheckedChangeListener(new e());
s0();
}
}
}
((ConstraintLayout) R(i10)).setVisibility(0);
App b16 = aVar.b();
if ((b16 == null || (j11 = b16.j()) == null || !j11.n()) ? false : true) {
((TextView) R(wd.c.sub_cancel_tv2)).setText(R.string.subs_monthly);
}
App b17 = aVar.b();
if ((b17 == null || (j10 = b17.j()) == null || !j10.p()) ? false : false) {
((TextView) R(wd.c.sub_cancel_tv2)).setText(R.string.subs_yearly);
}
he.a.f44584a.b().o("setting_subscrip_show");
((ConstraintLayout) R(wd.c.samling_rate_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.bit_rate_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.sound_track_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.record_format_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.cl_save_guild)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.cl_quick_setting)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.share_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.more_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.audio_layout)).setOnClickListener(this);
((TextView) R(wd.c.version_tv2)).setText("1.01.90.0219");
((ConstraintLayout) R(wd.c.quality_layout)).setOnClickListener(this);
((ConstraintLayout) R(wd.c.version_layout)).setOnClickListener(this);
if (zd.b.c(this)) {
}
int i122 = wd.c.s_pause_call;
Switch r122 = (Switch) R(i122);
App b142 = aVar.b();
bool = null;
if (b142 != null) {
}
s.e(valueOf);
r122.setChecked(valueOf.booleanValue());
((Switch) R(i122)).setOnCheckedChangeListener(new c());
int i132 = wd.c.s_save_pop_on;
Switch r132 = (Switch) R(i132);
App b152 = aVar.b();
if (b152 != null) {
}
s.e(valueOf2);
r132.setChecked(valueOf2.booleanValue());
((Switch) R(i132)).setOnCheckedChangeListener(new d());
int i142 = wd.c.s_screen_on;
Switch r142 = (Switch) R(i142);
b10 = aVar.b();
if (b10 != null) {
bool = Boolean.valueOf(j12.b0());
}
s.e(bool);
r142.setChecked(bool.booleanValue());
((Switch) R(i142)).setOnCheckedChangeListener(new e());
s0();
}
public final boolean a0(Context context, Intent intent) {
s.h(context, "context");
s.h(intent, SDKConstants.PARAM_INTENT);
try {
return intent.resolveActivity(context.getPackageManager()) != null;
} catch (Exception unused) {
return false;
}
}
public final boolean b0(Activity activity) {
s.h(activity, "activity");
Object systemService = activity.getSystemService("power");
s.f(systemService, "null cannot be cast to non-null type android.os.PowerManager");
return ((PowerManager) systemService).isIgnoringBatteryOptimizations(activity.getPackageName());
}
public final void c0() {
if (isFinishing()) {
return;
}
xe.g.f(this, getString(R.string.log_out_des), "", getString(R.string.cancel), getString(R.string.log_out), 0.6f, 1.0f, new f());
}
public final void d0() {
he.a.f44584a.b().e("rate_popup_show");
bf.a.f5168a.a(this, null, new h());
}
public final void e0(Activity activity) {
s.h(activity, "activity");
try {
activity.startActivityForResult(X(activity), this.f39524v);
} catch (Exception e10) {
e10.printStackTrace();
}
}
public final void f0() {
isFinishing();
}
public final void g0() {
UserConfig j10;
if (isFinishing()) {
return;
}
App b10 = App.f39143g.b();
Integer valueOf = (b10 == null || (j10 = b10.j()) == null) ? null : Integer.valueOf(j10.t());
s.e(valueOf);
int intValue = valueOf.intValue();
k3.c cVar = new k3.c(this, k3.e.f46448a);
k3.c.A(cVar, Integer.valueOf((int) R.string.audio_source), null, 2, null);
s3.b.b(cVar, Integer.valueOf((int) R.array.audio_source_values), null, null, intValue, false, new i(intValue), 22, null);
k3.c.x(cVar, Integer.valueOf((int) R.string.select_title), null, null, 6, null);
cVar.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
SettingActivity.h0(SettingActivity.this, dialogInterface);
}
});
cVar.show();
}
public final void i0() {
UserConfig j10;
if (isFinishing()) {
return;
}
int[] b10 = ie.c.b();
App b11 = App.f39143g.b();
Integer valueOf = (b11 == null || (j10 = b11.j()) == null) ? null : Integer.valueOf(j10.x());
s.e(valueOf);
int C = bk.l.C(b10, valueOf.intValue());
k3.c cVar = new k3.c(this, k3.e.f46448a);
k3.c.A(cVar, Integer.valueOf((int) R.string.setting_bit_rate), null, 2, null);
s3.b.b(cVar, Integer.valueOf((int) R.array.bit_rate_values_show), null, null, C, false, j.f39531a, 22, null);
k3.c.x(cVar, Integer.valueOf((int) R.string.select_title), null, null, 6, null);
cVar.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
SettingActivity.j0(SettingActivity.this, dialogInterface);
}
});
cVar.show();
}
public final void k0() {
UserConfig j10;
if (isFinishing()) {
return;
}
App b10 = App.f39143g.b();
Integer valueOf = (b10 == null || (j10 = b10.j()) == null) ? null : Integer.valueOf(j10.e());
s.e(valueOf);
int intValue = valueOf.intValue();
final g0 g0Var = new g0();
k3.c cVar = new k3.c(this, k3.e.f46448a);
k3.c.A(cVar, Integer.valueOf((int) R.string.language), null, 2, null);
s3.b.b(cVar, Integer.valueOf((int) R.array.language_options), null, null, intValue, false, new k(intValue, g0Var), 22, null);
k3.c.x(cVar, Integer.valueOf((int) R.string.select_title), null, null, 6, null);
cVar.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
SettingActivity.l0(SettingActivity.this, g0Var, dialogInterface);
}
});
cVar.show();
}
public final void m0() {
if (isFinishing()) {
return;
}
new x(this, false, new l()).d();
}
public final void n0() {
UserConfig j10;
if (isFinishing()) {
return;
}
App b10 = App.f39143g.b();
Integer valueOf = (b10 == null || (j10 = b10.j()) == null) ? null : Integer.valueOf(j10.r());
s.e(valueOf);
int intValue = valueOf.intValue();
k3.c cVar = new k3.c(this, k3.e.f46448a);
k3.c.A(cVar, Integer.valueOf((int) R.string.setting_recording_format), null, 2, null);
s3.b.b(cVar, Integer.valueOf((int) R.array.record_format_values), null, null, intValue, false, new m(intValue), 22, null);
k3.c.x(cVar, Integer.valueOf((int) R.string.select_title), null, null, 6, null);
cVar.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
SettingActivity.o0(SettingActivity.this, dialogInterface);
}
});
cVar.show();
}
@Override
public void onActivityResult(int i10, int i11, Intent intent) {
super.onActivityResult(i10, i11, intent);
s0();
}
@Override
public void onClick(View view) {
Integer valueOf = view != null ? Integer.valueOf(view.getId()) : null;
if (valueOf != null && valueOf.intValue() == -1) {
finish();
} else if (valueOf != null && valueOf.intValue() == R.id.cl_save_guild) {
if (Build.VERSION.SDK_INT >= 23) {
e0(this);
}
} else if (valueOf != null && valueOf.intValue() == R.id.language_layout) {
k0();
} else if (valueOf != null && valueOf.intValue() == R.id.rate_layout) {
d0();
} else if (valueOf != null && valueOf.intValue() == R.id.feedback_layout) {
u0();
} else if (valueOf != null && valueOf.intValue() == R.id.sub_cancel_layout) {
U();
he.a.f44584a.b().o("setting_subscrip_click");
} else if (valueOf != null && valueOf.intValue() == R.id.policy_layout) {
v0();
} else if (valueOf != null && valueOf.intValue() == R.id.disclaimer_layout) {
t0();
} else if (valueOf != null && valueOf.intValue() == R.id.samling_rate_layout) {
p0();
he.a.f44584a.b().o("settings_sampling_rate");
} else if (valueOf != null && valueOf.intValue() == R.id.bit_rate_layout) {
i0();
he.a.f44584a.b().o("settings_bitrate");
} else if (valueOf != null && valueOf.intValue() == R.id.sound_track_layout) {
q0();
he.a.f44584a.b().o("settings_audio_track");
} else if (valueOf != null && valueOf.intValue() == R.id.record_format_layout) {
n0();
he.a.f44584a.b().o("settings_recording_format");
} else if (valueOf != null && valueOf.intValue() == R.id.cl_quick_setting) {
new fe.n(this).a();
he.a.f44584a.b().e("settings_quick_recording");
} else if (valueOf != null && valueOf.intValue() == R.id.more_layout) {
V();
} else if (valueOf != null && valueOf.intValue() == R.id.prefix_layout) {
new fe.m(this, new g()).b();
he.a.f44584a.b().o("setting_prefix");
} else if (valueOf != null && valueOf.intValue() == R.id.storage_layout) {
f0();
he.a.f44584a.b().o("settings_rec_path");
} else if (valueOf != null && valueOf.intValue() == R.id.share_layout) {
W();
he.a.f44584a.b().h("share_app_click", "channel", "setting_menu");
} else if (valueOf != null && valueOf.intValue() == R.id.audio_layout) {
g0();
he.a.f44584a.b().o("settings_audio_source");
} else if (valueOf != null && valueOf.intValue() == R.id.quality_layout) {
m0();
} else if (valueOf != null && valueOf.intValue() == R.id.tv_logout) {
c0();
} else if (valueOf == null) {
} else {
valueOf.intValue();
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.activity_new_setting);
jd.h.j0(this).c(true).M(d0.c(this)).c0(y()).e0((ToolbarView) R(wd.c.toolbar_layout)).D();
Z();
Y();
d.a aVar = oe.d.f48990a;
int i10 = wd.c.item_own_ad;
aVar.n(R(i10));
((TextView) R(wd.c.own_ad_title)).setVisibility(R(i10).getVisibility());
R(wd.c.own_ad_line).setVisibility(R(i10).getVisibility());
}
@Override
public boolean onOptionsItemSelected(MenuItem menuItem) {
s.h(menuItem, "item");
finish();
return true;
}
@Override
public void onRequestPermissionsResult(int i10, String[] strArr, int[] iArr) {
s.h(strArr, "permissions");
s.h(iArr, "grantResults");
super.onRequestPermissionsResult(i10, strArr, iArr);
}
@Override
public void onResume() {
super.onResume();
s0();
}
public final void p0() {
if (isFinishing()) {
return;
}
new fe.z(this, new n()).d();
}
public final void q0() {
UserConfig j10;
if (isFinishing()) {
return;
}
App b10 = App.f39143g.b();
Integer valueOf = (b10 == null || (j10 = b10.j()) == null) ? null : Integer.valueOf(j10.q());
s.e(valueOf);
int intValue = valueOf.intValue();
k3.c cVar = new k3.c(this, k3.e.f46448a);
k3.c.A(cVar, Integer.valueOf((int) R.string.setting_sound_track), null, 2, null);
s3.b.b(cVar, Integer.valueOf((int) R.array.sound_track_values), null, null, intValue, false, new o(intValue), 22, null);
k3.c.x(cVar, Integer.valueOf((int) R.string.select_title), null, null, 6, null);
cVar.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
SettingActivity.r0(SettingActivity.this, dialogInterface);
}
});
cVar.show();
}
public final void s0() {
UserConfig j10;
UserConfig j11;
UserConfig j12;
UserConfig j13;
UserConfig j14;
UserConfig j15;
UserConfig j16;
UserConfig j17;
String[] stringArray = getResources().getStringArray(R.array.language_options);
s.g(stringArray, "resources.getStringArray(R.array.language_options)");
String[] stringArray2 = getResources().getStringArray(R.array.sampling_rate_string);
s.g(stringArray2, "resources.getStringArray…ray.sampling_rate_string)");
String[] stringArray3 = getResources().getStringArray(R.array.sound_track_values);
s.g(stringArray3, "resources.getStringArray…array.sound_track_values)");
String[] stringArray4 = getResources().getStringArray(R.array.bit_rate_values_show);
s.g(stringArray4, "resources.getStringArray…ray.bit_rate_values_show)");
String[] stringArray5 = getResources().getStringArray(R.array.record_format_values);
s.g(stringArray5, "resources.getStringArray…ray.record_format_values)");
String[] stringArray6 = getResources().getStringArray(R.array.audio_source_values);
s.g(stringArray6, "resources.getStringArray…rray.audio_source_values)");
String[] stringArray7 = getResources().getStringArray(R.array.audio_quality_values);
s.g(stringArray7, "resources.getStringArray…ray.audio_quality_values)");
TextView textView = (TextView) R(wd.c.language_tv2);
StringBuilder sb2 = new StringBuilder();
sb2.append("");
App.a aVar = App.f39143g;
App b10 = aVar.b();
String str = null;
Integer valueOf = (b10 == null || (j17 = b10.j()) == null) ? null : Integer.valueOf(j17.e());
s.e(valueOf);
sb2.append(stringArray[valueOf.intValue()]);
textView.setText(sb2.toString());
int[] d10 = ie.c.d();
App b11 = aVar.b();
Integer valueOf2 = (b11 == null || (j16 = b11.j()) == null) ? null : Integer.valueOf(j16.Y());
s.e(valueOf2);
int C = bk.l.C(d10, valueOf2.intValue());
if (C < 0) {
C = 1;
}
int[] b12 = ie.c.b();
App b13 = aVar.b();
Integer valueOf3 = (b13 == null || (j15 = b13.j()) == null) ? null : Integer.valueOf(j15.x());
s.e(valueOf3);
int C2 = bk.l.C(b12, valueOf3.intValue());
if (C2 < 0) {
C2 = 2;
}
((TextView) R(wd.c.samling_rate_tv2)).setText("" + stringArray2[C]);
((TextView) R(wd.c.bit_rate_tv2)).setText("" + stringArray4[C2]);
TextView textView2 = (TextView) R(wd.c.sound_track_tv2);
StringBuilder sb3 = new StringBuilder();
sb3.append("");
App b14 = aVar.b();
Integer valueOf4 = (b14 == null || (j14 = b14.j()) == null) ? null : Integer.valueOf(j14.q());
s.e(valueOf4);
sb3.append(stringArray3[valueOf4.intValue()]);
textView2.setText(sb3.toString());
TextView textView3 = (TextView) R(wd.c.record_format_tv2);
StringBuilder sb4 = new StringBuilder();
sb4.append("");
App b15 = aVar.b();
Integer valueOf5 = (b15 == null || (j13 = b15.j()) == null) ? null : Integer.valueOf(j13.r());
s.e(valueOf5);
sb4.append(stringArray5[valueOf5.intValue()]);
textView3.setText(sb4.toString());
TextView textView4 = (TextView) R(wd.c.audio_tv2);
StringBuilder sb5 = new StringBuilder();
sb5.append("");
App b16 = aVar.b();
Integer valueOf6 = (b16 == null || (j12 = b16.j()) == null) ? null : Integer.valueOf(j12.t());
s.e(valueOf6);
sb5.append(stringArray6[valueOf6.intValue()]);
textView4.setText(sb5.toString());
TextView textView5 = (TextView) R(wd.c.path_sub);
App b17 = aVar.b();
textView5.setText((b17 == null || (j11 = b17.j()) == null) ? null : j11.a0());
StringBuilder sb6 = new StringBuilder();
sb6.append("");
a aVar2 = f39523x;
sb6.append(stringArray7[aVar2.a()]);
((TextView) R(wd.c.quality_tv2)).setText(sb6.toString());
TextView textView6 = (TextView) R(wd.c.prefix_sub);
App b18 = aVar.b();
if (b18 != null && (j10 = b18.j()) != null) {
str = j10.A();
}
textView6.setText(str);
if (aVar2.a() != 0) {
((TextView) R(wd.c.tv_quality_upgrade)).setVisibility(0);
} else {
((TextView) R(wd.c.tv_quality_upgrade)).setVisibility(8);
}
if (C != 0) {
((TextView) R(wd.c.tv_samling_upgrade)).setVisibility(0);
} else {
((TextView) R(wd.c.tv_samling_upgrade)).setVisibility(8);
}
if (Build.VERSION.SDK_INT < 23 || b0(this) || !a0(this, X(this))) {
((ConstraintLayout) R(wd.c.cl_save_guild)).setVisibility(8);
} else {
((ConstraintLayout) R(wd.c.cl_save_guild)).setVisibility(0);
}
}
public final void t0() {
new a.C0639a(this).e(Integer.valueOf((int) R.string.disclaimer), null).b(Integer.valueOf((int) R.string.disclaimer_content), null, null).c(Integer.valueOf((int) R.string.got_it), null, true, new p()).a().t();
}
public final void u0() {
he.a.f44584a.b().e("setting_feedback_click");
Intent intent = new Intent("android.intent.action.SEND");
intent.setType("plain/text");
intent.putExtra("android.intent.extra.EMAIL", new String[]{"betterapp.feedback@outlook.com"});
intent.putExtra("android.intent.extra.SUBJECT", "1.01.90.0219");
try {
intent.setPackage("com.google.android.gm");
startActivity(intent);
} catch (Exception unused) {
startActivity(Intent.createChooser(intent, ""));
}
}
public final void v0() {
he.a.f44584a.b().e("setting_privacy_click");
try {
startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://www.betterapptech.com/about-us/privacy-policy/")));
} catch (Exception e10) {
e10.printStackTrace();
}
}
}