正在查看: Fancy Optimizer v4.6.3 应用的 AppLockSettingsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Fancy Optimizer v4.6.3 应用的 AppLockSettingsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.fancyclean.boost.applock.ui.activity;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Vibrator;
import android.view.View;
import androidx.annotation.NonNull;
import com.fancyclean.boost.applock.config.ConfigChangeController;
import com.thinkyeah.common.ui.dialog.c;
import com.thinkyeah.common.ui.thinklist.a;
import com.thinkyeah.common.ui.view.TitleBar;
import java.util.ArrayList;
import jl.c;
import t5.i;
import vj.h;
public class AppLockSettingsActivity extends com.fancyclean.boost.applock.ui.activity.b {
public static final h f146x = h.f(AppLockSettingsActivity.class);
public n5.a r;
public i5.a s;
public com.thinkyeah.common.ui.thinklist.a t;
public com.thinkyeah.common.ui.thinklist.a u;
public final a v = new a();
public final b w = new b();
public class a implements c.a {
public a() {
}
public final void c(int i, int i10) {
wk.d dVar = AppLockSettingsActivity.this;
if (i10 == 101) {
new c().j0(dVar, "ChooseLockTypeDialogFragment");
} else {
if (i10 != 104) {
return;
}
dVar.startActivity(new Intent((Context) dVar, (Class<?>) SecurityQuestionActivity.class));
}
}
}
public class b implements a.c {
public b() {
}
public final boolean a(int i, boolean z10) {
return true;
}
public final void b(int i, boolean z10) {
SharedPreferences.Editor edit;
boolean z11 = true;
?? r12 = AppLockSettingsActivity.this;
if (i == 1) {
i5.a.c(r12).h(z10);
if (z10) {
r12.s.i();
return;
} else {
r12.s.k();
}
}
if (i == 105) {
Context context = r12.r.a;
SharedPreferences sharedPreferences = context.getSharedPreferences("app_lock", 0);
edit = sharedPreferences != null ? sharedPreferences.edit() : null;
if (edit == null) {
z11 = false;
} else {
edit.putBoolean("fingerprint_unlock_enabled", z10);
edit.apply();
}
if (z11) {
ConfigChangeController.a(7, context);
return;
}
return;
}
if (i == 102) {
r12.r.e(z10);
return;
}
if (i == 103) {
r12.r.i(z10);
return;
}
switch (i) {
case 201:
r12.r.c(z10);
break;
case 202:
SharedPreferences sharedPreferences2 = r12.getSharedPreferences("app_lock", 0);
edit = sharedPreferences2 != null ? sharedPreferences2.edit() : null;
if (edit != null) {
edit.putBoolean("lock_new_apps_hint_enabled", z10);
edit.apply();
break;
}
break;
case 203:
Context context2 = r12.r.a;
SharedPreferences sharedPreferences3 = context2.getSharedPreferences("app_lock", 0);
edit = sharedPreferences3 != null ? sharedPreferences3.edit() : null;
if (edit == null) {
z11 = false;
} else {
edit.putBoolean("vibration_feedback_enabled", z10);
edit.apply();
}
if (z11) {
ConfigChangeController.a(15, context2);
break;
}
break;
}
}
}
public static class c extends com.thinkyeah.common.ui.dialog.c<AppLockSettingsActivity> {
public class a implements View.OnClickListener {
public a() {
}
@Override
public final void onClick(View view) {
c cVar = c.this;
cVar.dismiss();
AppLockSettingsActivity activity = cVar.getActivity();
if (activity != null) {
AppLockSettingsActivity.X2(activity, 1);
}
}
}
public class b implements View.OnClickListener {
public b() {
}
@Override
public final void onClick(View view) {
c cVar = c.this;
cVar.dismiss();
AppLockSettingsActivity activity = cVar.getActivity();
if (activity != null) {
AppLockSettingsActivity.X2(activity, 2);
}
}
}
@NonNull
public final Dialog onCreateDialog(Bundle bundle) {
View inflate = View.inflate(getContext(), 2131558586, null);
inflate.findViewById(2131363811).setOnClickListener(new a());
inflate.findViewById(2131363814).setOnClickListener(new b());
c.a aVar = new c.a(getContext());
aVar.g(2131886711);
aVar.x = inflate;
return aVar.a();
}
}
public static void X2(AppLockSettingsActivity appLockSettingsActivity, int i) {
if (i == 1) {
appLockSettingsActivity.startActivity(new Intent((Context) appLockSettingsActivity, (Class<?>) ChooseLockPatternActivity.class));
} else if (i == 2) {
appLockSettingsActivity.startActivity(new Intent((Context) appLockSettingsActivity, (Class<?>) ChooseLockPinActivity.class));
} else {
f146x.d(android.support.v4.media.b.i("Unexpected lockType: ", i), (Throwable) null);
}
}
@Override
public final void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(2131558448);
this.r = n5.a.a(this);
this.s = i5.a.c(this);
TitleBar.a configure = findViewById(2131363196).getConfigure();
configure.e(2131887457);
configure.g(new i(this));
configure.a();
ArrayList arrayList = new ArrayList();
String string = getString(2131886776);
SharedPreferences sharedPreferences = getSharedPreferences("app_lock", 0);
com.thinkyeah.common.ui.thinklist.a aVar = new com.thinkyeah.common.ui.thinklist.a(string, this, sharedPreferences == null ? false : sharedPreferences.getBoolean("lock_enabled", false), 1);
b bVar = this.w;
aVar.setToggleButtonClickListener(bVar);
arrayList.add(aVar);
findViewById(2131363202).setAdapter(new jl.b(arrayList));
ArrayList arrayList2 = new ArrayList();
jl.d dVar = new jl.d(this, 101, getString(2131887015));
a aVar2 = this.v;
dVar.setThinkItemClickListener(aVar2);
arrayList2.add(dVar);
String string2 = getString(2131887018);
SharedPreferences sharedPreferences2 = getSharedPreferences("app_lock", 0);
com.thinkyeah.common.ui.thinklist.a aVar3 = new com.thinkyeah.common.ui.thinklist.a(string2, this, sharedPreferences2 == null ? false : sharedPreferences2.getBoolean("hide_pattern_path_enabled", false), 102);
aVar3.setComment(getString(2131887011));
aVar3.setToggleButtonClickListener(bVar);
this.t = aVar3;
arrayList2.add(aVar3);
String string3 = getString(2131887023);
SharedPreferences sharedPreferences3 = getSharedPreferences("app_lock", 0);
com.thinkyeah.common.ui.thinklist.a aVar4 = new com.thinkyeah.common.ui.thinklist.a(string3, this, sharedPreferences3 == null ? false : sharedPreferences3.getBoolean("random_password_keyboard_enabled", false), 103);
aVar4.setComment(getString(2131887012));
aVar4.setToggleButtonClickListener(bVar);
this.u = aVar4;
arrayList2.add(aVar4);
jl.d dVar2 = new jl.d(this, 104, getString(2131887025));
dVar2.setThinkItemClickListener(aVar2);
arrayList2.add(dVar2);
if (i5.d.b(this).a()) {
String string4 = getString(2131887017);
SharedPreferences sharedPreferences4 = getSharedPreferences("app_lock", 0);
com.thinkyeah.common.ui.thinklist.a aVar5 = new com.thinkyeah.common.ui.thinklist.a(string4, this, sharedPreferences4 == null ? false : sharedPreferences4.getBoolean("fingerprint_unlock_enabled", false), 105);
aVar5.setToggleButtonClickListener(bVar);
arrayList2.add(aVar5);
}
findViewById(2131363204).setAdapter(new jl.b(arrayList2));
ArrayList arrayList3 = new ArrayList();
String string5 = getString(2131887016);
SharedPreferences sharedPreferences5 = getSharedPreferences("app_lock", 0);
com.thinkyeah.common.ui.thinklist.a aVar6 = new com.thinkyeah.common.ui.thinklist.a(string5, this, sharedPreferences5 == null ? false : sharedPreferences5.getBoolean("delay_lock_enabled", false), 201);
aVar6.setComment(getString(2131887010));
aVar6.setToggleButtonClickListener(bVar);
arrayList3.add(aVar6);
String string6 = getString(2131887022);
SharedPreferences sharedPreferences6 = getSharedPreferences("app_lock", 0);
com.thinkyeah.common.ui.thinklist.a aVar7 = new com.thinkyeah.common.ui.thinklist.a(string6, this, sharedPreferences6 == null ? true : sharedPreferences6.getBoolean("lock_new_apps_hint_enabled", true), 202);
aVar7.setToggleButtonClickListener(bVar);
arrayList3.add(aVar7);
Vibrator vibrator = (Vibrator) getSystemService("vibrator");
if (vibrator != null && vibrator.hasVibrator()) {
String string7 = getString(2131887027);
SharedPreferences sharedPreferences7 = getSharedPreferences("app_lock", 0);
com.thinkyeah.common.ui.thinklist.a aVar8 = new com.thinkyeah.common.ui.thinklist.a(string7, this, sharedPreferences7 != null ? sharedPreferences7.getBoolean("vibration_feedback_enabled", true) : true, 203);
aVar8.setToggleButtonClickListener(bVar);
arrayList3.add(aVar8);
}
findViewById(2131363198).setAdapter(new jl.b(arrayList3));
}
@Override
public final void onStart() {
super.onStart();
SharedPreferences sharedPreferences = getSharedPreferences("app_lock", 0);
int i = sharedPreferences == null ? 1 : sharedPreferences.getInt("lock_type", 1);
if (i == 1) {
this.t.setVisibility(0);
com.thinkyeah.common.ui.thinklist.a aVar = this.t;
SharedPreferences sharedPreferences2 = getSharedPreferences("app_lock", 0);
aVar.setToggleButtonStatus(sharedPreferences2 != null ? sharedPreferences2.getBoolean("hide_pattern_path_enabled", false) : false);
this.u.setVisibility(8);
return;
}
if (i == 2) {
this.t.setVisibility(8);
this.u.setVisibility(0);
com.thinkyeah.common.ui.thinklist.a aVar2 = this.u;
SharedPreferences sharedPreferences3 = getSharedPreferences("app_lock", 0);
aVar2.setToggleButtonStatus(sharedPreferences3 != null ? sharedPreferences3.getBoolean("random_password_keyboard_enabled", false) : false);
}
}
}