正在查看: Tasker v6.6.3 应用的 Settings.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tasker v6.6.3 应用的 Settings.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package net.dinglisch.android.taskerm;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.SeekBar;
import android.widget.Spinner;
import android.widget.SpinnerAdapter;
import android.widget.TextView;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import com.joaomgcd.oldtaskercompat.fcm.ServiceFCM;
import com.joaomgcd.taskerm.genericaction.GenericActionActivityConfigureNotificationChannel;
import com.joaomgcd.taskerm.genericaction.GenericActionActivityPickFile;
import com.joaomgcd.taskerm.spawn.RFactory;
import com.joaomgcd.taskerm.util.ExtensionsContextKt;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import net.dinglisch.android.taskerm.HTMLView;
import net.dinglisch.android.taskerm.Settings;
import net.dinglisch.android.taskerm.d6;
import net.dinglisch.android.taskerm.fh;
import net.dinglisch.android.taskerm.fn;
import net.dinglisch.android.taskerm.fp;
import net.dinglisch.android.taskerm.sh;
import net.dinglisch.android.taskerm.ud;
import net.dinglisch.android.taskerm.wo;
public class Settings extends MyActivity implements View.OnClickListener, SensorEventListener, SeekBar.OnSeekBarChangeListener, AdapterView.OnItemSelectedListener, xf.a, ze.e {
private static final int[] m1 = {2131891228, 2131889101, 2131889102, 2131891143};
private static final int[] n1 = {2131891135, 2131888760};
private static final int[] o1 = {2131888973, 2131888972, 2131888913, 2131888912, 2131888843, 2131889103, 2131891175};
private static final int[] p1 = {2131297552, 2131297556, 2131297555, 2131297549};
private static final int[] q1 = {2131494235, 2131494233, 2131494231, 2131494232};
private static final int[] r1 = {2131890563, 2131890562, 2131890560, 2131890561};
private static final int[] s1 = {2131297404, 2131297403, 2131297410, 2131297409, 2131297405, 2131297406, 2131297407, 2131297408, 2131297402, 2131297400, 2131297401};
private static final int[] t1 = {2131297401, 2131296890};
private static final int[] u1 = {2131296417, 2131296758, 2131296760, 2131297217, 2131296961, 2131297483, 2131296423, 2131297404, 2131297071, 2131297069, 2131297408, 2131297407, 2131297035, 2131296797, 2131297705, 2131296443, 2131296941, 2131297067, 2131296943, 2131297194, 2131297196, 2131297707, 2131296445, 2131296375, 2131296927, 2131296923, 2131296925, 2131297219, 2131297113, 2131296598, 2131296813, 2131297075, 2131296886};
private static final int[] v1 = {2131297016, 2131296915, 2131297034, 2131297066, 2131296940, 2131296942, 2131297704, 2131297706, 2131296442, 2131296444, 2131297193, 2131297195, 2131296922, 2131296926, 2131296924};
private static final int[] w1;
private static int x1;
private final int[] A;
private Spinner A0;
private final int[] B;
private Spinner B0;
private final int[] C;
private CheckBox C0;
private final int[] D;
private EditText D0;
int E;
private EditText E0;
int F;
private EditText F0;
int G;
private EditText G0;
int H;
private EditText H0;
int I;
private EditText I0;
int J;
private EditText J0;
private RelativeLayout K;
private EditText K0;
private sh L;
private EditText L0;
private Bundle M;
private EditText M0;
private BroadcastReceiver N;
private EditText N0;
private ProgressDialog O;
private EditText O0;
private Button P;
private EditText P0;
private ImageButton Q;
private EditText Q0;
private ImageButton R;
private EditText R0;
private Button S;
private EditText S0;
private ImageButton T;
private EditText[] T0;
private Button U;
private EditText[] U0;
private boolean V;
private EditText[] V0;
private SharedPreferences W;
private int[] W0;
private boolean X;
private int[] X0;
private ImageView Y;
private int[] Y0;
private String Z;
private int[] Z0;
private Button a0;
private int[] a1;
private SeekBar b0;
private int[] b1;
private SeekBar c0;
private int[] c1;
private SeekBar d0;
private CheckBox[] d1;
private ImageButton e0;
private View[] e1;
private int f0;
private float f1;
private TextView g0;
private long g1;
private TextView h0;
private SensorManager h1;
private TextView i0;
private ViewPager i1;
private Spinner j0;
private n j1;
private Spinner k0;
private com.joaomgcd.taskerm.helper.h<Settings> k1;
private Spinner l0;
private AtomicBoolean l1;
private Spinner m0;
private Spinner n0;
private Spinner o0;
private Spinner p0;
private Spinner q0;
private Spinner r0;
private Spinner s0;
private Spinner t0;
private Spinner u0;
private final com.joaomgcd.taskerm.settings.u0 v;
private Spinner v0;
private final int[] w;
private Spinner w0;
private final boolean[] x;
private Spinner x0;
private final String[] y;
private Spinner y0;
private final int[] z;
private Spinner z0;
class a implements TextWatcher {
a() {
}
@Override
public void afterTextChanged(Editable editable) {
Settings.x1 |= 2;
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
}
class b implements fh.f {
final EditText a;
b(EditText editText) {
this.a = editText;
}
@Override
public void a(fh fhVar) {
if (fhVar.v()) {
return;
}
pp.W2(this.a, fhVar.B());
}
}
class c extends Handler {
c() {
}
@Override
public void handleMessage(Message message) {
if (message.what == 1) {
Settings.this.f0 = message.getData().getInt("colourIndex");
Settings.this.g3();
Settings.x1 |= 128;
xo.d(Settings.this, 2131890928);
}
}
}
class d extends Handler {
d() {
}
@Override
public void handleMessage(Message message) {
Settings.this.l1.set(false);
if (message.what != 0) {
Settings.this.finish();
} else {
Settings.this.n3();
}
}
}
class e implements View.OnClickListener {
e() {
}
@Override
public void onClick(View view) {
Settings.this.z3();
}
}
class f implements View.OnClickListener {
final int i;
f(int i) {
this.i = i;
}
@Override
public void onClick(View view) {
Settings settings = Settings.this;
settings.H3(view, settings.T0[this.i]);
}
}
class g implements View.OnClickListener {
final int i;
g(int i) {
this.i = i;
}
@Override
public void onClick(View view) {
Settings settings = Settings.this;
settings.H3(view, settings.U0[this.i]);
}
}
class h implements View.OnClickListener {
final int i;
h(int i) {
this.i = i;
}
@Override
public void onClick(View view) {
Settings settings = Settings.this;
settings.H3(view, settings.V0[this.i]);
}
}
class i extends Handler {
i() {
}
@Override
public void handleMessage(Message message) {
if (message.what == 1) {
Settings settings = Settings.this;
settings.startActivityForResult(Settings.G1(settings), -1);
}
}
}
class j extends BroadcastReceiver {
j() {
}
@Override
public void onReceive(Context context, Intent intent) {
com.joaomgcd.taskerm.util.t2.e(intent);
Settings.this.q1();
Settings.this.m3();
}
}
class k extends Handler {
k() {
}
@Override
public void handleMessage(Message message) {
Settings.this.V = true;
Settings.this.e3();
}
}
class l implements sh.j {
l() {
}
@Override
public void a(int i, int i2, boolean z) {
}
@Override
public void b(boolean z) {
}
@Override
public void c(int i) {
}
@Override
public void d(int i) {
}
@Override
public void e(int i, int i2, int i3, int i4) {
}
@Override
public boolean f(int i, int i2, boolean z) {
Settings.this.i1.setCurrentItem(i2);
return true;
}
@Override
public boolean g(int i) {
return false;
}
}
private enum m {
UI,
Monitor,
Action,
Misc
}
public class n extends PagerAdapter implements ViewPager.OnPageChangeListener {
private ViewPager a;
private Context b;
public n(Activity activity, ViewPager viewPager) {
this.b = activity;
this.a = viewPager;
viewPager.setAdapter(this);
this.a.setOnPageChangeListener(this);
}
public void c() {
Settings.this.findViewById(2131296341).setVisibility(8);
}
public void d(Boolean bool) throws Exception {
if (bool.booleanValue() || com.joaomgcd.taskerm.util.r.n()) {
Settings.this.k1.O(new Runnable() {
@Override
public final void run() {
Settings.n.this.c();
}
});
}
}
public void destroyItem(ViewGroup viewGroup, int i, Object obj) {
viewGroup.removeView((ScrollView) obj);
}
public void e() {
this.b = null;
this.a = null;
Settings.this.K = null;
Settings.this.L.M();
Settings.this.L = null;
}
public int getCount() {
return m.values().length;
}
public Object instantiateItem(ViewGroup viewGroup, int i) {
ScrollView scrollView = (ScrollView) LayoutInflater.from(this.b).inflate(Settings.q1[i], (ViewGroup) null);
viewGroup.addView(scrollView, 0);
if (i == 0) {
Settings.this.O2(scrollView);
Settings.this.t3();
Settings.this.findViewById(2131297072).setOnClickListener(Settings.this);
Settings.this.y0.setOnItemSelectedListener(Settings.this);
Settings.this.p0.setOnItemSelectedListener(Settings.this);
Settings.this.l0.setOnItemSelectedListener(Settings.this);
Settings.this.m0.setOnItemSelectedListener(Settings.this);
Settings settings = Settings.this;
settings.J = settings.y0.getSelectedItemPosition();
Settings settings2 = Settings.this;
settings2.I = settings2.p0.getSelectedItemPosition();
Settings settings3 = Settings.this;
settings3.F = settings3.l0.getSelectedItemPosition();
Settings settings4 = Settings.this;
settings4.E = settings4.m0.getSelectedItemPosition();
Settings.this.m3();
Settings settings5 = Settings.this;
settings5.D3(Settings.j1(settings5.W));
} else if (i == 1) {
Settings.this.N2(scrollView);
Settings.this.p3();
Settings.this.findViewById(2131297123).setOnClickListener(Settings.this);
Settings settings6 = Settings.this;
settings6.H = settings6.k0.getSelectedItemPosition();
Settings.this.k0.setOnItemSelectedListener(Settings.this);
if ((Settings.this.getIntent().getIntExtra("flags", 0) & 1) > 0) {
Settings.this.P.setFocusable(true);
Settings.this.P.setFocusableInTouchMode(true);
Settings.this.P.requestFocus();
}
if (pp.g() < 17) {
Settings.this.findViewById(2131297177).setVisibility(8);
}
Settings.this.k1.q0(p5.w(), new yi.d() {
@Override
public final void accept(Object obj) {
Settings.n.this.d((Boolean) obj);
}
});
if (!bp.d(Settings.this)) {
Settings.this.findViewById(2131297497).setVisibility(8);
}
if (!ud.c.b()) {
Settings.this.findViewById(2131296273).setVisibility(8);
}
Settings settings7 = Settings.this;
boolean T3 = Settings.T3(settings7.W);
Settings settings8 = Settings.this;
settings7.F3(T3, Settings.R3(settings8, settings8.W));
Settings settings9 = Settings.this;
settings9.B3(Settings.j1(settings9.W));
} else if (i == 2) {
Settings.this.L2(scrollView);
Settings.this.h3();
Settings.this.findViewById(2131296377).setOnClickListener(Settings.this);
} else if (i == 3) {
Settings.this.M2(scrollView);
Settings.this.o3();
Settings settings10 = Settings.this;
settings10.G = settings10.B0.getSelectedItemPosition();
Settings.this.B0.setOnItemSelectedListener(Settings.this);
}
Settings.this.l3(scrollView);
Settings.this.j3(scrollView);
Settings.this.w3(scrollView);
Settings.this.v3(scrollView);
Settings.this.x3(scrollView);
Settings.this.i3();
Settings.this.v.D(Settings.this.W);
return scrollView;
}
public boolean isViewFromObject(View view, Object obj) {
return view == obj;
}
public void onPageScrollStateChanged(int i) {
}
public void onPageScrolled(int i, float f, int i2) {
}
public void onPageSelected(int i) {
if (Settings.this.L.r() != i) {
Settings.this.L.S(i);
}
}
}
static {
w1 = new int[]{2131890521, 2131890437, pp.P1() ? 2131890526 : 2131890525, 2131890529, 2131890442, 2131890444, 2131890571, 2131890573, 2131890392, 2131890394, 2131890545, 2131890547, 2131890438, 2131890440, 2131890439};
x1 = 0;
}
public Settings() {
com.joaomgcd.taskerm.settings.u0 d2 = com.joaomgcd.taskerm.settings.d1.d(this);
this.v = d2;
int[] k2 = com.joaomgcd.taskerm.settings.a1.k(d2);
this.w = k2;
this.x = com.joaomgcd.taskerm.settings.a1.j(d2);
this.y = com.joaomgcd.taskerm.settings.a1.l(d2);
this.z = com.joaomgcd.taskerm.settings.a1.h(d2);
this.A = com.joaomgcd.taskerm.settings.a1.f(d2);
this.B = com.joaomgcd.taskerm.settings.a1.q(d2);
this.C = com.joaomgcd.taskerm.settings.a1.m(d2);
this.D = com.joaomgcd.taskerm.settings.a1.o(d2);
this.M = null;
this.N = null;
this.O = null;
this.X = false;
this.f0 = -1;
this.T0 = new EditText[3];
this.U0 = new EditText[qi.h()];
this.V0 = new EditText[gm.f()];
this.W0 = new int[]{2131296799, 2131296803, 2131296801};
this.X0 = new int[]{2131296798, 2131296802, 2131296800};
this.Y0 = new int[]{2131297290, 2131297294, 2131297292};
this.Z0 = new int[]{2131297289, 2131297293, 2131297291};
this.a1 = new int[]{2131296383, 2131296387, 2131296385, 2131296380};
this.b1 = new int[]{2131296382, 2131296386, 2131296384, 2131296379};
this.c1 = new int[]{2131297034, 2131296442, 2131297704, 2131296940, 2131297066, 2131296942, 2131297193, 2131297195, 2131297706, 2131296444, 2131296922, 2131296924, 2131296926};
this.d1 = new CheckBox[k2.length];
this.e1 = new View[u1.length];
this.f1 = 0.0f;
this.h1 = null;
this.k1 = new com.joaomgcd.taskerm.helper.h<>(this);
this.l1 = new AtomicBoolean(false);
}
public static int A1(Context context) {
return B1(pp.R0(context));
}
private void A3(boolean z) {
findViewById(2131296378).setVisibility(z ? 0 : 8);
}
public static int B1(SharedPreferences sharedPreferences) {
if (!sharedPreferences.contains("dragMode")) {
return sharedPreferences.getInt("dragModeNew", 4);
}
sharedPreferences.edit().remove("dragMode").commit();
return 4;
}
public static void B2(Activity activity) {
activity.getWindow().setFlags(1024, 1024);
}
public void B3(boolean z) {
findViewById(2131296375).setVisibility((!MyAccessibilityService.a() || z) ? 8 : 0);
}
public static String C1(Context context) {
return pp.R0(context).getString("googleDriveBackupsAccount", null);
}
public void C2() {
this.C0.setChecked(false);
}
private void C3() {
for (int i2 : t1) {
findViewById(i2).setVisibility(8);
}
}
public static Intent D1(Context context, boolean z, int i2) {
Intent intent = new Intent("net.dinglisch.android.tasker.ACTION_OPEN_PREFS");
intent.setPackage(context.getPackageName());
if (i2 > 0) {
intent.putExtra("tno", i2);
}
intent.putExtra("launchedExternal", z);
return intent;
}
public vj.e0 D2() {
xg.e2.b1(new Runnable() {
@Override
public final void run() {
Settings.this.C2();
}
});
return vj.e0.a;
}
public void D3(boolean z) {
findViewById(2131297668).setVisibility((!pp.S1() || z) ? 8 : 0);
}
public static String E1(int i2) {
if (i2 == 0) {
return "custntaskone";
}
if (i2 == 1) {
return "custntasktwo";
}
if (i2 != 2) {
o7.k("Settings", "gmnctk: bad index: " + i2);
}
return "custntaskthree";
}
public void E2(CompoundButton compoundButton, boolean z) {
if (z) {
com.joaomgcd.taskerm.util.bi.u(this, new ik.a() {
@Override
public final Object e() {
vj.e0 D2;
D2 = Settings.this.D2();
return D2;
}
});
} else {
k3(this, null);
}
}
private void E3(boolean z) {
findViewById(2131297124).setVisibility(z ? 0 : 8);
}
public static String F1(Context context, int i2) {
return pp.R0(context).getString(E1(i2), null);
}
private boolean F2() {
return this.X;
}
public void F3(boolean z, boolean z2) {
int i2 = ((z || z2) && !j1(this.W)) ? 0 : 8;
findViewById(2131297131).setVisibility(z ? 0 : 8);
findViewById(2131296797).setVisibility(i2);
}
public static Intent G1(Context context) {
return s1(context.getPackageName());
}
public static boolean G2(Context context) {
return pp.R0(context).getBoolean("lockIconColour", true);
}
private void G3() {
startActivityForResult(ImageSelect.s0(this, 3616), 3);
}
public static HashMap<String, List<String>> H1(Context context, HashMap<String, List<String>> hashMap) {
wo.a y1 = y1(context);
if (y1 == wo.a.Always || y1 == wo.a.WhenOff) {
f1(context, hashMap, 2131889408, "android.permission.SCHEDULE_EXACT_ALARM");
}
return hashMap;
}
public static boolean H2(Context context) {
return pp.R0(context).getBoolean("notactions", false);
}
public void H3(View view, EditText editText) {
fh fhVar = new fh(this, view);
ArrayList<fn> K = fo.j2(this).K(-2, fn.f.Alpha);
if (K.size() == 0) {
pp.j0(this, 2131887874, new Object[0]);
return;
}
Iterator<fn> it = K.iterator();
while (it.hasNext()) {
fn next = it.next();
fhVar.u(next.P0(), next.getName(), next.getIcon(), fh.d.Bottom);
}
if (fhVar.y() > 1) {
fhVar.E(this.W.getInt("lTsk", -1), true, true);
}
fhVar.F(new b(editText)).J(TextUtils.TruncateAt.MIDDLE).show();
}
public static String I1(Context context, int i2) {
return z1(context, i2, pp.R0(context).getString(L1(i2), null));
}
public static void I2(Context context) {
Intent D1 = D1(context, false, -1);
D1.setFlags(268435456);
context.startActivity(D1);
}
private void I3() {
SensorManager sensorManager = this.h1;
if (sensorManager != null) {
sensorManager.unregisterListener(this);
this.h1 = null;
}
}
public static String J1(Context context, int i2) {
return z1(context, i2, pp.R0(context).getString(K1(i2), null));
}
public void y2(final int i2, String str, String str2, final com.joaomgcd.taskerm.util.f<String> fVar) {
this.k1.B2(com.joaomgcd.taskerm.util.ac.e0(this), new Runnable() {
@Override
public final void run() {
Settings.this.x2(i2, fVar);
}
});
}
public static void J3(Context context, String str, boolean z) {
pp.R0(context).edit().putBoolean(str, !r0.getBoolean(str, z)).commit();
}
public static String K1(int i2) {
return "qstcommdoub" + i2;
}
private void K2(final int i2, final String str, final String str2, final com.joaomgcd.taskerm.util.f<String> fVar) {
final Runnable runnable = new Runnable() {
@Override
public final void run() {
Settings.this.y2(i2, str, str2, fVar);
}
};
if (com.joaomgcd.taskerm.signin.a.a(this)) {
runnable.run();
} else {
this.k1.N(new Runnable() {
@Override
public final void run() {
Settings.this.z2(runnable);
}
});
}
}
public static boolean K3(Context context) {
return pp.R0(context).getBoolean("adbLogcat", false);
}
public static String L1(int i2) {
return "qstcomm" + i2;
}
public static boolean L3(Context context) {
return pp.R0(context).getBoolean("newCellApi", false);
}
public static String M1(Context context, int i2) {
return z1(context, i2, pp.R0(context).getString(N1(i2), null));
}
public static boolean M3(Context context) {
return false;
}
public static String N1(int i2) {
return "qstcommlong" + i2;
}
public static boolean N3(Context context) {
return pp.R0(context).getBoolean("anm", false);
}
public static String O1(Context context, int i2) {
return pp.R0(context).getString(P1(i2), null);
}
public void O2(ScrollView scrollView) {
Button button = (Button) findViewById(2131296516);
this.a0 = button;
button.setOnClickListener(this);
SeekBar seekBar = (SeekBar) findViewById(2131296424);
this.c0 = seekBar;
seekBar.setMax(6);
this.c0.setOnSeekBarChangeListener(this);
this.i0 = (TextView) findViewById(2131296425);
SeekBar seekBar2 = (SeekBar) findViewById(2131297276);
this.b0 = seekBar2;
seekBar2.setMax(32);
this.b0.setOnSeekBarChangeListener(this);
this.h0 = (TextView) findViewById(2131297277);
Spinner spinner = (Spinner) findViewById(2131297032);
this.l0 = spinner;
spinner.setAdapter((SpinnerAdapter) pp.f1(this, RFactory.layout.runlog_headers));
Spinner spinner2 = (Spinner) findViewById(2131297218);
this.m0 = spinner2;
spinner2.setAdapter((SpinnerAdapter) pp.f1(this, 2130903176));
Spinner spinner3 = (Spinner) findViewById(2131296962);
this.o0 = spinner3;
spinner3.setAdapter((SpinnerAdapter) pp.h1(this, oh.s(getResources(), m1)));
Spinner spinner4 = (Spinner) findViewById(2131296854);
this.p0 = spinner4;
spinner4.setAdapter((SpinnerAdapter) pp.h1(this, oh.s(getResources(), o1)));
Spinner spinner5 = (Spinner) findViewById(2131297630);
this.y0 = spinner5;
spinner5.setAdapter((SpinnerAdapter) pp.h1(this, hp.k(this)));
ImageButton imageButton = (ImageButton) findViewById(2131296277);
this.e0 = imageButton;
imageButton.setOnClickListener(new e());
this.E0 = (EditText) findViewById(2131297070);
}
public static boolean O3(Context context) {
return pp.R0(context).getInt("clock_alarm", d6.i.b) == wo.a.Always.ordinal();
}
public static String P1(int i2) {
return "qstcommprefix" + i2;
}
public static void P2(Context context, int i2, String str) {
pp.R0(context).edit().putString(L1(i2), str).commit();
}
public static boolean P3(Context context) {
return pp.R0(context).getInt("clock_alarm", d6.i.b) == wo.a.WhenOff.ordinal();
}
public static String Q1(Context context, int i2) {
return pp.R0(context).getString(Y1(i2), null);
}
public static void Q2(Context context, int i2, String str) {
pp.R0(context).edit().putString(K1(i2), str).commit();
}
public static boolean Q3(Context context) {
return pp.R0(context).getBoolean("googleDriveBackups", false);
}
public static String R1(Context context, int i2, Bundle bundle) {
return wp.N(context, pp.R0(context).getString(S1(i2), null), bundle);
}
public static void R2(Context context, int i2, String str) {
pp.R0(context).edit().putString(N1(i2), str).commit();
}
public static boolean R3(Context context, SharedPreferences sharedPreferences) {
if (com.joaomgcd.taskerm.util.c0.l(context)) {
return true;
}
return sharedPreferences.getBoolean("mFn", true);
}
public static String S1(int i2) {
return "qstico" + i2;
}
public static void S2(Context context, int i2, String str) {
pp.R0(context).edit().putString(P1(i2), str).commit();
}
public static boolean S3(Context context) {
return T3(pp.R0(context));
}
public static String T1(Context context, int i2, Bundle bundle) {
return wp.N(context, pp.R0(context).getString(U1(i2), null), bundle);
}
public static void T2(Context context, int i2, String str) {
pp.R0(context).edit().putString(S1(i2), str).commit();
}
public static boolean T3(SharedPreferences sharedPreferences) {
return sharedPreferences.getBoolean("mSi", true);
}
public static String U1(int i2) {
return "qstlab" + i2;
}
public static void U2(Context context, int i2, String str) {
pp.R0(context).edit().putString(U1(i2), str).commit();
}
public static boolean U3(Context context) {
if (pp.S1()) {
return j1(pp.R0(context)) ? d6.i.b.a : pp.R0(context).getBoolean("hardwareAccel", d6.i.b.a);
}
return true;
}
public static String V1(Context context, int i2) {
return pp.R0(context).getString(a2(i2), null);
}
public static void V2(Context context, int i2, String str) {
pp.R0(context).edit().putString(X1(i2), str).commit();
}
public static boolean V3(Context context) {
return pp.R0(context).getBoolean("sigmotion", false);
}
public static String W1(Context context, int i2, Bundle bundle) {
return wp.N(context, pp.R0(context).getString(X1(i2), null), bundle);
}
public static void W2(Context context, int i2, String str) {
pp.R0(context).edit().putString(u1(i2), str).commit();
}
public static String X1(int i2) {
return "qstst" + i2;
}
public static void X2(Context context, int i2, String str) {
pp.R0(context).edit().putString(Y1(i2), str).commit();
}
public static String Y1(int i2) {
return "qstdc" + i2;
}
public static void Y2(Context context, int i2, String str) {
pp.R0(context).edit().putString(a2(i2), str).commit();
}
public static String Z1(int i2) {
return "qst" + i2;
}
public static void Z2(Context context, int i2, String str) {
pp.R0(context).edit().putString(Z1(i2), str).commit();
}
public static String a2(int i2) {
return "qstlc" + i2;
}
public static void a3(Context context, int i2, int i3) {
pp.R0(context).edit().putInt(d2(i2), i3).commit();
}
public static String b2(Context context, int i2) {
return pp.R0(context).getString(Z1(i2), null);
}
public static void b3(Context context, int i2, Integer num, Integer num2, Integer num3) {
pp.R0(context).edit().putString(f2(i2), sg.i4.d(num, num2, num3)).commit();
}
public static int c2(Context context, int i2) {
return pp.R0(context).getInt(d2(i2), qi.a().ordinal());
}
public static void c3(final android.app.Activity r3) {
throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.Settings.c3(android.app.Activity):void");
}
public static String d2(int i2) {
return "qsts" + i2;
}
public static void d3(final Activity activity) {
int i2 = pp.R0(activity).getInt("hideStatusBar", 1);
if (i2 == 3 || ((i2 == 1 && (activity.getClass() == SceneEdit.class || activity.getClass() == SceneEditElement.class)) || (i2 == 2 && pp.Q1(activity)))) {
xg.e2.J0(new Runnable() {
@Override
public final void run() {
Settings.B2(activity);
}
}).h();
}
}
public static sg.i4 e2(Context context, int i2) {
return sg.h4.g(pp.R0(context).getString(f2(i2), null));
}
public boolean e3() {
boolean z = false;
if (!q3(this.W)) {
if (this.V || this.W.getString("lcD", "").length() <= 0) {
r3(this.W);
setResult(-1, null);
finish();
z = true;
} else {
TextBoxDialogFragment.F(this, new k(), 2131887468, oh.g(this, 2131887157, new Object[0]), 2131886894, 2131886870, -1, 196).E(this);
}
}
if (z) {
i1();
}
return z;
}
private static void f1(Context context, HashMap<String, List<String>> hashMap, int i2, String... strArr) {
StringBuilder sb = new StringBuilder();
sb.append(oh.g(context, 2131891263, new Object[0]));
sb.append(" ");
sb.append(context.getString(i2));
String sb2 = sb.toString();
for (String str : strArr) {
pp.m(hashMap, str, sb2);
}
}
public static String f2(int i2) {
return "qstexcont" + i2;
}
public static boolean f3(Context context) {
return pp.R0(context).getBoolean("saveMemory", true);
}
public static boolean g1(Context context) {
return pp.R0(context).getBoolean("aExt", false);
}
public static String[] g2(Resources resources) {
return oh.s(resources, r1);
}
public void g3() {
int i2 = this.f0;
gp.x(this, this.e0, i2 == -1 ? gp.a(this) : fp.a(this, i2));
}
public static boolean h1(Context context) {
return pp.R0(context).getBoolean("asactions", true);
}
public static fp.a h2(SharedPreferences sharedPreferences) {
if (!sharedPreferences.contains("theme")) {
fp.a aVar = fp.a.values()[sharedPreferences.getInt("themeMaterial", d6.i.b.a.a)];
return (aVar == fp.a.MaterialYou && com.joaomgcd.taskerm.util.r.l()) ? fp.a.Auto : aVar;
}
int i2 = sharedPreferences.getInt("theme", 3);
sharedPreferences.edit().remove("theme").commit();
return i2 != 0 ? i2 != 1 ? i2 != 2 ? fp.a.LightDarkAB : fp.a.Light : fp.a.Dark : fp.a.DefaultDark;
}
private void i1() {
if ((x1 & 128) > 0) {
fo.j2(this).G0(this);
}
if ((x1 & 16) > 0) {
t6.f(getBaseContext(), this.W);
}
if ((x1 & 64) > 0) {
fo.x4(getResources(), this.W.getInt("lph", 0));
}
if ((x1 & 4) > 0) {
o7.t(this.W);
}
if ((x1 & 2) > 0) {
if (F2()) {
MonitorService.m8(this, true);
} else {
MonitorService.C8(this, true);
}
}
qi.k();
gm.i(this, true);
this.k1.o2(2131296938, "gcsa");
this.k1.o2(2131296936, "gcfb");
this.k1.p2();
}
private String[] i2() {
return j2(getResources());
}
public void i3() {
int i2 = 0;
while (true) {
CheckBox[] checkBoxArr = this.d1;
if (i2 >= checkBoxArr.length) {
break;
}
CheckBox checkBox = checkBoxArr[i2];
if (checkBox != null && !checkBox.isChecked()) {
checkBox.setOnCheckedChangeListener(null);
checkBox.setChecked(this.W.getBoolean(this.y[i2], this.x[i2]));
}
i2++;
}
CheckBox checkBox2 = this.C0;
if (checkBox2 != null) {
checkBox2.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
Settings.this.E2(compoundButton, z);
}
});
}
CheckBox checkBox3 = this.d1[27];
if (checkBox3 != null) {
checkBox3.setChecked(pg.a2.m(this, "M"));
}
}
public static boolean j1(SharedPreferences sharedPreferences) {
return false;
}
public static String[] j2(Resources resources) {
return oh.s(resources, new int[]{2131886892, 2131889104, 2131886910, 2131889107});
}
private void k1(Bundle bundle, SharedPreferences sharedPreferences) {
SharedPreferences.Editor edit = sharedPreferences.edit();
edit.clear();
for (String str : bundle.keySet()) {
Object obj = bundle.get(str);
if (obj instanceof Boolean) {
edit.putBoolean(str, ((Boolean) obj).booleanValue());
} else if (obj instanceof Float) {
edit.putFloat(str, ((Float) obj).floatValue());
} else if (obj instanceof Integer) {
edit.putInt(str, ((Integer) obj).intValue());
} else if (obj instanceof Long) {
edit.putLong(str, ((Long) obj).longValue());
} else if (obj instanceof String) {
edit.putString(str, (String) obj);
} else {
o7.k("Settings", "unhandled type set:string");
}
}
edit.commit();
}
public static void k2(Context context, String str, String str2) {
for (int i2 = 0; i2 < 3; i2++) {
if (str.equals(F1(context, i2))) {
pp.R0(context).edit().putString(E1(i2), str2).commit();
}
}
for (int i3 = 0; i3 < qi.h(); i3++) {
if (str.equals(b2(context, i3))) {
Z2(context, i3, str2);
}
}
for (int i4 = 0; i4 < gm.f(); i4++) {
if (str.equals(v1(context, i4))) {
W2(context, i4, str2);
}
}
}
public static void k3(Context context, String str) {
pp.R0(context).edit().putString("googleDriveBackupsAccount", str).commit();
}
private void l1() {
SensorManager sensorManager = (SensorManager) gi.d(this, "sensor", "Settings", "cal");
this.h1 = sensorManager;
if (sensorManager == null) {
pp.a0(this, 2131887727, new Object[0]);
return;
}
Sensor defaultSensor = sensorManager.getDefaultSensor(1);
if (defaultSensor == null) {
this.h1 = null;
pp.a0(this, 2131887863, oh.g(this, 2131891134, new Object[0]));
} else {
if (!this.h1.registerListener(this, defaultSensor, 0)) {
pp.a0(this, 2131887863, oh.g(this, 2131891134, new Object[0]));
return;
}
com.joaomgcd.taskerm.util.b7.s6(this, 5, "calibrateGestures");
this.g1 = System.currentTimeMillis();
pp.h0(this, 2131887763, new Object[0]);
}
}
private void l2() {
I3();
EditText editText = this.Q0;
if (editText == null) {
o7.G("Settings", "gestureEnd: no radius edit field");
} else {
editText.setText(Float.toString(this.f1 / 4.0f));
}
pp.j0(this, 2131888728, new Object[0]);
SharedPreferences sharedPreferences = this.W;
if (sharedPreferences == null) {
o7.G("Settings", "gestureEnd: no settings");
} else {
sharedPreferences.edit().putFloat("accMax", this.f1).commit();
}
x1 |= 2;
}
private void m1() {
if (this.l1.getAndSet(true)) {
return;
}
String action = getIntent().getAction();
if (action == null || !action.equals("net.dinglisch.android.tasker.ACTION_OPEN_PREFS")) {
ep.o0("Settings checkShowGateLock");
}
if (ep.r0(this)) {
ep.t0(this, new d()).E(this);
} else {
this.l1.set(false);
n3();
}
}
public void m3() {
String str = oh.i(this, RFactory.layout.runlog_item)[this.l0.getSelectedItemPosition()];
File v0 = HTMLView.v0(str);
this.a0.setVisibility((v0 == null || new File(v0, HTMLView.u0(getResources(), str)).exists()) ? 8 : 0);
}
public static boolean n1(Activity activity, boolean z, Handler handler) {
if (pp.g() < 27 || xo.g(activity, 2131887298) || z) {
return false;
}
TextBoxDialogFragment.F(activity, handler, 2131887522, oh.g(activity, 2131887298, new Object[0]), 2131886894, 2131891263, -1, 0).E(activity);
xo.c(activity, 2131887298);
return true;
}
private void n2() {
int intExtra;
if (r1()) {
intExtra = 1;
} else {
intExtra = getIntent().getIntExtra("tno", -1);
if (intExtra == -1) {
intExtra = getSharedPreferences(d6.k, 0).getInt("slTab", 0);
}
}
this.i1.setCurrentItem(intExtra);
}
public void n3() {
EditText editText = this.E0;
if (editText == null) {
return;
}
editText.setText(this.W.getString("lcD", ""));
}
private void o1() {
if (this.Z.equals("icon_transparent") && this.k0.getSelectedItemPosition() == 0 && pp.g() < 16) {
xo.d(this, 2131890982);
}
}
public static void o2(Context context) {
}
public static void p1(SharedPreferences sharedPreferences, SharedPreferences sharedPreferences2) {
if (sharedPreferences2.contains("ipnu")) {
return;
}
if (sharedPreferences.contains("ipn")) {
sharedPreferences.edit().putInt("ipn", net.dinglisch.android.taskerm.g.l0(sharedPreferences.getInt("ipn", 0))).commit();
}
sharedPreferences2.edit().putBoolean("ipnu", true).commit();
}
private void p2() {
RelativeLayout relativeLayout = (RelativeLayout) findViewById(2131297550);
this.K = relativeLayout;
relativeLayout.removeAllViews();
this.L = sh.A(this, this.K, 0, 0, fp.x(this));
if (fp.k(this) == fp.a.Tangerine) {
this.L.P(2130968984);
}
this.L.V(new l());
this.L.U(12);
for (int i2 = 0; i2 < p1.length; i2++) {
this.L.m(this, true);
this.L.J(i2, oh.g(this, r1[i2], new Object[0]));
this.L.G(i2);
}
this.j1.notifyDataSetChanged();
}
public void q1() {
BroadcastReceiver broadcastReceiver = this.N;
if (broadcastReceiver != null) {
unregisterReceiver(broadcastReceiver);
this.N = null;
}
ProgressDialog progressDialog = this.O;
if (progressDialog != null) {
progressDialog.dismiss();
this.O = null;
}
}
public Boolean q2(String str, boolean z) {
boolean m2 = pg.a2.m(this, str);
return (z && m2) ? Boolean.TRUE : (z || m2) ? Boolean.FALSE : Boolean.TRUE;
}
private boolean q3(android.content.SharedPreferences r25) {
throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.Settings.q3(android.content.SharedPreferences):boolean");
}
private boolean r1() {
return qi.e().equals(getIntent().getAction());
}
public static void r2(CheckBox checkBox, Boolean bool) {
checkBox.setChecked(bool.booleanValue());
}
public static Intent s1(String str) {
Intent intent = new Intent();
intent.setAction("android.settings.APPLICATION_DETAILS_SETTINGS");
intent.setData(Uri.fromParts("package", str, null));
return intent;
}
public void s2(final String str, final boolean z, final CheckBox checkBox) {
ik.a aVar = new ik.a() {
@Override
public final Object e() {
Boolean q2;
q2 = Settings.this.q2(str, z);
return q2;
}
};
try {
if (((Boolean) aVar.e()).booleanValue()) {
return;
}
if (((df.p1) com.joaomgcd.taskerm.dialog.a.I7(this, 2131887522, 2131887297).f()).o()) {
if (new GenericActionActivityConfigureNotificationChannel(str).run(this).f().b()) {
if (((Boolean) aVar.e()).booleanValue()) {
return;
}
com.joaomgcd.taskerm.dialog.a.R3(this, 2131887522, 2131887299).f();
}
}
} finally {
final Boolean valueOf = Boolean.valueOf(pg.a2.m(this, str));
xg.e2.b1(new Runnable() {
@Override
public final void run() {
Settings.r2(checkBox, valueOf);
}
});
}
}
private void s3() {
t3();
p3();
h3();
o3();
i3();
this.v.D(this.W);
}
public static String[] t1(Resources resources) {
return oh.s(resources, n1);
}
public void t2(String str, com.joaomgcd.taskerm.dialog.b bVar) {
String str2;
try {
this.k1.n1(str).h();
str2 = getString(2131888091);
} catch (Throwable th2) {
try {
String str3 = getString(2131888090) + ": " + th2.getMessage();
xg.e2.R1(this, th2);
bVar.f();
str2 = str3;
} finally {
bVar.f();
}
}
com.joaomgcd.taskerm.dialog.a.S3(this, 2131887495, str2).f();
}
public static String u1(int i2) {
return "ast" + i2;
}
public void u2(final String str) {
final com.joaomgcd.taskerm.dialog.b p = com.joaomgcd.taskerm.dialog.b.p(this, 2131890808);
this.k1.N(new Runnable() {
@Override
public final void run() {
Settings.this.t2(str, p);
}
});
}
public static boolean u3(Context context, wo.a aVar) {
return pp.R0(context).edit().putInt("clock_alarm", aVar.ordinal()).commit();
}
public static String v1(Context context, int i2) {
return pp.R0(context).getString(u1(i2), null);
}
public void v2(String str) {
this.k1.p0(com.joaomgcd.taskerm.dialog.a.R3(this, 2131887494, !ServiceFCM.J(this, str) ? 2131888088 : 2131888089));
}
public void v3(ScrollView scrollView) {
boolean U3 = U3(this);
int i2 = 0;
while (true) {
int[] iArr = this.w;
if (i2 >= iArr.length) {
return;
}
CheckBox checkBox = (CheckBox) scrollView.findViewById(iArr[i2]);
if (checkBox != null) {
if (U3) {
checkBox.setLayerType(1, null);
}
this.d1[i2] = checkBox;
checkBox.setOnClickListener(this);
}
i2++;
}
}
public static int w1(Context context, SharedPreferences sharedPreferences) {
int i2 = sharedPreferences.getInt("appcheckMethod", d6.i.a.a(context));
if (i2 != 0 || MyAccessibilityService.a()) {
return i2;
}
return 1;
}
public void w2(int i2, com.joaomgcd.taskerm.util.f fVar, com.joaomgcd.taskerm.util.pe peVar) throws Exception {
if (peVar.b() && (peVar instanceof com.joaomgcd.taskerm.util.we)) {
String j0 = com.joaomgcd.taskerm.util.ph.j0((Uri) ((com.joaomgcd.taskerm.util.we) peVar).d(), this);
EditText editText = (EditText) findViewById(i2);
if (editText != null) {
editText.setText(j0);
}
if (fVar != null) {
fVar.a(j0);
}
}
}
public static final int x1() {
return x1;
}
public void x2(final int i2, final com.joaomgcd.taskerm.util.f fVar) {
this.k1.q0(new GenericActionActivityPickFile(true).run(this), new yi.d() {
@Override
public final void accept(Object obj) {
Settings.this.w2(i2, fVar, (com.joaomgcd.taskerm.util.pe) obj);
}
});
}
public static wo.a y1(Context context) {
return (wo.a) com.joaomgcd.taskerm.util.b7.b6(pp.R0(context).getInt("clock_alarm", d6.i.b), wo.a.class);
}
private boolean y3(SharedPreferences sharedPreferences, Bundle bundle) {
for (Map.Entry<String, ?> entry : sharedPreferences.getAll().entrySet()) {
Object value = entry.getValue();
String key = entry.getKey();
if (value instanceof Boolean) {
bundle.putBoolean(key, ((Boolean) value).booleanValue());
} else if (value instanceof Float) {
bundle.putFloat(key, ((Float) value).floatValue());
} else if (value instanceof Integer) {
bundle.putInt(key, ((Integer) value).intValue());
} else if (value instanceof Long) {
bundle.putLong(key, ((Long) value).longValue());
} else if (value instanceof String) {
bundle.putString(key, (String) value);
} else {
o7.k("Settings", "unhandled type set:string");
}
}
return false;
}
private static String z1(Context context, int i2, String str) {
String O1 = O1(context, i2);
if (TextUtils.isEmpty(O1)) {
return str;
}
return O1 + "=:=" + str;
}
public void z2(Runnable runnable) {
if (!((df.p1) com.joaomgcd.taskerm.dialog.a.Q7(this, 2131890615, 2131888292).f()).o()) {
runnable.run();
} else {
com.joaomgcd.taskerm.signin.a.b(this).f();
runnable.run();
}
}
public void L2(ScrollView scrollView) {
Button button = (Button) findViewById(2131296558);
this.U = button;
button.setOnClickListener(this);
this.U.setText(oh.g(this, 2131890399, new Object[0]));
for (int i2 = 0; i2 < qi.h(); i2++) {
findViewById(this.Z0[i2]).setOnClickListener(new g(i2));
}
for (int i3 = 0; i3 < qi.h(); i3++) {
this.U0[i3] = (EditText) findViewById(this.Y0[i3]);
}
for (int i4 = 0; i4 < qi.h(); i4++) {
this.U0[i4].setHint(qi.c(getResources(), i4));
}
for (int i5 = 0; i5 < gm.f(); i5++) {
findViewById(this.b1[i5]).setOnClickListener(new h(i5));
}
for (int i6 = 0; i6 < gm.f(); i6++) {
this.V0[i6] = (EditText) findViewById(this.a1[i6]);
}
for (int i7 = 0; i7 < gm.f(); i7++) {
this.V0[i7].setHint(gm.c(this, i7, false));
}
SeekBar seekBar = (SeekBar) findViewById(2131297114);
this.d0 = seekBar;
seekBar.setOnSeekBarChangeListener(this);
this.g0 = (TextView) findViewById(2131297115);
Spinner spinner = (Spinner) findViewById(2131296352);
this.j0 = spinner;
spinner.setAdapter((SpinnerAdapter) pp.f1(this, RFactory.layout.geomeditview));
this.G0 = (EditText) findViewById(2131297016);
this.F0 = (EditText) findViewById(2131296915);
((LinearLayout) findViewById(2131296869)).setVisibility(8);
((LinearLayout) findViewById(2131296870)).setVisibility(8);
}
public void M2(ScrollView scrollView) {
Spinner spinner = (Spinner) findViewById(2131296599);
this.B0 = spinner;
spinner.setAdapter((SpinnerAdapter) pp.f1(this, RFactory.layout.button_plus_row));
this.C0 = (CheckBox) findViewById(2131296939);
ImageButton imageButton = (ImageButton) scrollView.findViewById(2131296503);
this.Q = imageButton;
imageButton.setOnClickListener(this);
ImageButton imageButton2 = (ImageButton) scrollView.findViewById(2131296501);
this.R = imageButton2;
imageButton2.setOnClickListener(this);
C3();
}
public void N2(ScrollView scrollView) {
Button button = (Button) findViewById(2131296496);
this.P = button;
button.setOnClickListener(this);
this.P.setText(oh.g(this, 2131890396, new Object[0]));
Button button2 = (Button) findViewById(2131296514);
this.S = button2;
button2.setOnClickListener(this);
this.S.setText(oh.g(this, 2131890398, new Object[0]));
ImageButton imageButton = (ImageButton) findViewById(2131296515);
this.T = imageButton;
imageButton.setOnClickListener(this);
ImageView imageView = (ImageView) findViewById(2131297184);
this.Y = imageView;
imageView.setBackgroundColor(fp.v(this));
this.Y.setOnClickListener(this);
for (int i2 = 0; i2 < 3; i2++) {
findViewById(this.X0[i2]).setOnClickListener(new f(i2));
}
Spinner spinner = (Spinner) findViewById(2131297216);
this.n0 = spinner;
spinner.setAdapter((SpinnerAdapter) pp.f1(this, RFactory.layout.mytab));
Spinner spinner2 = (Spinner) findViewById(2131296376);
this.A0 = spinner2;
spinner2.setAdapter((SpinnerAdapter) pp.h1(this, t1(getResources())));
Spinner spinner3 = (Spinner) findViewById(2131297263);
this.q0 = spinner3;
spinner3.setAdapter((SpinnerAdapter) pp.h1(this, i2()));
Spinner spinner4 = (Spinner) findViewById(2131297590);
this.r0 = spinner4;
spinner4.setAdapter((SpinnerAdapter) pp.h1(this, i2()));
Spinner spinner5 = (Spinner) findViewById(2131297533);
this.x0 = spinner5;
spinner5.setAdapter((SpinnerAdapter) pp.h1(this, i2()));
Spinner spinner6 = (Spinner) findViewById(2131296971);
this.s0 = spinner6;
spinner6.setAdapter((SpinnerAdapter) pp.h1(this, i2()));
Spinner spinner7 = (Spinner) findViewById(2131296275);
this.w0 = spinner7;
spinner7.setAdapter((SpinnerAdapter) pp.h1(this, i2()));
Spinner spinner8 = (Spinner) findViewById(2131297054);
this.t0 = spinner8;
spinner8.setAdapter((SpinnerAdapter) pp.h1(this, i2()));
Spinner spinner9 = (Spinner) findViewById(2131297081);
this.u0 = spinner9;
spinner9.setAdapter((SpinnerAdapter) pp.h1(this, i2()));
Spinner spinner10 = (Spinner) findViewById(2131297286);
this.v0 = spinner10;
spinner10.setAdapter((SpinnerAdapter) pp.h1(this, i2()));
Spinner spinner11 = (Spinner) findViewById(2131296805);
this.k0 = spinner11;
spinner11.setAdapter((SpinnerAdapter) pp.f1(this, RFactory.layout.geomeditviewdim));
this.D0 = (EditText) findViewById(2131297034);
for (int i3 = 0; i3 < 3; i3++) {
this.T0[i3] = (EditText) findViewById(this.W0[i3]);
}
if (!ep.l0(this)) {
this.T0[0].setHint(oh.g(this, 2131888831, new Object[0]));
}
this.H0 = (EditText) findViewById(2131297066);
this.K0 = (EditText) findViewById(2131296940);
this.L0 = (EditText) findViewById(2131296942);
this.M0 = (EditText) findViewById(2131297704);
this.P0 = (EditText) findViewById(2131297706);
this.N0 = (EditText) findViewById(2131296442);
this.O0 = (EditText) findViewById(2131296444);
this.I0 = (EditText) findViewById(2131297193);
this.J0 = (EditText) findViewById(2131297195);
this.Q0 = (EditText) findViewById(2131296922);
this.R0 = (EditText) findViewById(2131296926);
this.S0 = (EditText) findViewById(2131296924);
Spinner spinner12 = (Spinner) findViewById(2131296709);
this.z0 = spinner12;
spinner12.setAdapter((SpinnerAdapter) pp.h1(this, wo.g1(getResources())));
}
@Override
public void g(com.joaomgcd.taskerm.util.ac acVar, com.joaomgcd.taskerm.util.se seVar) {
}
public uk.n0 getCoroutineScope() {
return super.getCoroutineScope();
}
@Override
public com.joaomgcd.taskerm.helper.j getHelper() {
return this.k1;
}
public void h3() {
for (int i2 = 0; i2 < qi.h(); i2++) {
this.U0[i2].setText(this.W.getString(Z1(i2), ""));
}
for (int i3 = 0; i3 < gm.f(); i3++) {
this.V0[i3].setText(this.W.getString(u1(i3), ""));
}
this.G0.setText(Integer.toString(this.W.getInt("kit", 1001)));
this.F0.setText(Integer.toString(this.W.getInt("csnipD", 2)));
this.d0.setProgress(this.W.getInt("mqt", 10));
this.j0.setSelection(pp.v3(this.W.getString("kcph", "PBEWithMD5And128BitAES-CBC-OpenSSL"), oh.i(this, RFactory.layout.geocoder_item)));
if (!qi.i()) {
findViewById(2131297288).setVisibility(8);
}
if (gm.h()) {
A3(h1(this));
} else {
findViewById(2131296381).setVisibility(8);
}
}
public void j3(ScrollView scrollView) {
int c2 = fp.e0() ? gp.c(this) : ud.k0.c(getResources(), fp.W(this), null);
for (int i2 : s1) {
View findViewById = findViewById(i2);
if (findViewById != null) {
findViewById.setBackgroundColor(c2);
}
}
}
public void l3(ScrollView scrollView) {
int i2 = 0;
while (true) {
int[] iArr = this.A;
if (i2 >= iArr.length) {
return;
}
TextView textView = (TextView) scrollView.findViewById(iArr[i2]);
if (textView != null) {
textView.setText(oh.k(this, this.A[i2] == 2131297433 ? f1.v1(this) ? 2131890526 : 2131890525 : this.z[i2], new Object[0]));
}
i2++;
}
}
public void m2(final CheckBox checkBox, final boolean z, final String str) {
if (checkBox != null && com.joaomgcd.taskerm.util.r.s()) {
xg.e2.U0(new Runnable() {
@Override
public final void run() {
Settings.this.s2(str, z, checkBox);
}
});
}
}
public void o3() {
this.B0.setSelection(this.W.getInt("lph", 0));
}
@Override
public void onAccuracyChanged(Sensor sensor, int i2) {
}
@Override
protected void onActivityResult(int i2, int i3, Intent intent) {
o7.f("Settings", "oar: req: " + i2 + " result: " + i3);
if (i3 == -1 && i2 == 3) {
net.dinglisch.android.taskerm.g r0 = ImageSelect.r0(intent);
if (r0 == null) {
this.Z = "cust_notification";
r0 = new net.dinglisch.android.taskerm.g("cust_notification");
} else {
this.Z = r0.getName();
}
this.Y.setImageDrawable(r0.E(this));
x1 |= 2;
}
}
@Override
public void onClick(View view) {
int id = view.getId();
if (this.d1[20].equals(view)) {
E3(((CheckBox) view).isChecked());
return;
}
if (this.d1[25].equals(view)) {
x1 |= 128;
return;
}
if (this.d1[11].equals(view)) {
if (((CheckBox) view).isChecked()) {
this.k1.s1();
return;
}
return;
}
if (this.d1[13].equals(view)) {
x1 |= 128;
return;
}
if (this.d1[23].equals(view)) {
A3(((CheckBox) view).isChecked());
return;
}
if (this.d1[0].equals(view)) {
x1 |= 4;
xo.e(this, 1, 2131890975, 1);
return;
}
if (this.d1[3].equals(view)) {
x1 |= 4;
return;
}
if (this.d1[2].equals(view)) {
x1 |= 4;
xo.e(this, 1, 2131890960, 1);
return;
}
if (this.d1[4].equals(view)) {
x1 |= 2;
boolean isChecked = ((CheckBox) view).isChecked();
F3(this.d1[27].isChecked(), isChecked);
if (isChecked) {
return;
}
xg.e2.B2(com.joaomgcd.taskerm.dialog.a.m4(this, 2131891305, 2131887197), this);
return;
}
if (this.d1[27].equals(view)) {
x1 |= 2;
CheckBox checkBox = (CheckBox) view;
boolean isChecked2 = checkBox.isChecked();
F3(isChecked2, this.d1[4].isChecked());
if (pg.o2.b(this)) {
m2(checkBox, isChecked2, "M");
return;
} else {
n1(this, this.d1[27].isChecked(), new i());
return;
}
}
if (this.d1[14].equals(view)) {
x1 |= 8;
return;
}
if (this.Y.equals(view)) {
G3();
return;
}
if (this.P.equals(view)) {
l1();
x1 |= 2;
return;
}
if (this.S.equals(view)) {
x1 |= 2;
com.joaomgcd.taskerm.settings.d1.H(this);
return;
}
if (this.T.equals(view)) {
xg.e2.B2(com.joaomgcd.taskerm.dialog.a.R3(this, 2131890398, 2131890492), this);
return;
}
if (this.U.equals(view)) {
com.joaomgcd.taskerm.settings.d1.L(this);
return;
}
if (this.Q.equals(view)) {
K2(2131296938, "gcsa", "application/json", new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
Settings.this.u2((String) obj);
}
});
return;
}
if (this.R.equals(view)) {
K2(2131296936, "gcfb", "application/json", new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
Settings.this.v2((String) obj);
}
});
return;
}
if (this.d1[8].equals(view)) {
xo.d(this, 2131890979);
return;
}
if (!this.a0.equals(view)) {
int J1 = pp.J1(id, this.C);
if (J1 != -1) {
gi.h(this, this.B[J1], this.D[J1]);
return;
}
return;
}
this.a0.setVisibility(8);
String str = oh.i(this, RFactory.layout.runlog_item)[this.l0.getSelectedItemPosition()];
q1();
j jVar = new j();
this.N = jVar;
ExtensionsContextKt.V3(this, jVar, TaskerIntent.c(oh.g(this, 2131887481, new Object[0])));
if (!HTMLView.r0(this, str)) {
this.a0.setVisibility(0);
} else if (this.O == null) {
this.O = HTMLView.F0(this);
}
}
@Override
public void onCreate(Bundle bundle) {
setResult(0);
super.onCreate(bundle);
this.k1.g0();
if (this.C.length != this.D.length) {
o7.k("Settings", "bad internal data");
finish();
return;
}
setContentView(2131494230);
this.W = pp.R0(this);
ViewPager findViewById = findViewById(2131297224);
this.i1 = findViewById;
findViewById.setOffscreenPageLimit(3);
this.j1 = new n(this, this.i1);
net.dinglisch.android.taskerm.a.T(this, false);
if (fp.f()) {
zq.a(getActionBar(), 0.0f);
}
p2();
n2();
setTitle(oh.g(this, 2131886733, new Object[0]));
x1 = 0;
Bundle bundle2 = new Bundle();
this.M = bundle2;
y3(this.W, bundle2);
this.V = this.W.getString("lcD", "").length() > 0;
this.X = getIntent().getBooleanExtra("launchedExternal", true);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
net.dinglisch.android.taskerm.a.d(this, 3, menu);
menu.add(0, 2, 0, oh.g(this, 2131890395, new Object[0]));
menu.add(0, 0, 0, oh.g(this, 2131888891, new Object[0]));
menu.add(0, 1, 0, oh.g(this, 2131889097, new Object[0]));
return true;
}
@Override
public void onDestroy() {
super.onDestroy();
this.i1 = null;
this.j1.e();
this.j1 = null;
this.M = null;
this.N = null;
this.O = null;
this.P = null;
this.U = null;
this.W = null;
this.k1.h0();
}
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i2, long j2) {
int i3;
int id = adapterView.getId();
if (id == 2131296376) {
x1 |= 2;
}
if (id == 2131296805) {
if (i2 != this.H) {
x1 |= 2;
o1();
return;
}
return;
}
if (id == 2131296599 && i2 != (i3 = this.G)) {
x1 |= 64;
if (i2 < i3 && i2 != 1) {
xo.e(this, 1, 2131890890, 1);
return;
} else {
if (i2 != i3) {
xo.e(this, 1, 2131890863, 1);
return;
}
return;
}
}
if (id == 2131296854 && i2 != this.I) {
x1 |= 512;
return;
}
if (id == 2131297630) {
this.e0.setVisibility(i2 == fp.a.MaterialYou.ordinal() ? 8 : 0);
if (i2 != this.J) {
x1 |= 128;
if (i2 == fp.a.Auto.ordinal() || i2 == fp.a.AutoDefault.ordinal()) {
com.joaomgcd.taskerm.dialog.a.p7(this, 2131887138);
return;
} else {
xo.d(this, 2131890928);
return;
}
}
return;
}
if (id == 2131297218) {
if (i2 != this.E) {
x1 |= 32;
}
} else if (id == 2131297032) {
if (this.l0.getSelectedItemPosition() != this.F) {
x1 |= 16;
if (t6.c(HTMLView.A0(getResources(), this.l0.getSelectedItemPosition()))) {
xo.d(this, 2131890907);
} else {
pp.i0(this, "Warning: no userguide for this language yet", new Object[0]);
}
}
m3();
}
}
@Override
public boolean onKeyDown(int i2, KeyEvent keyEvent) {
if (i2 != 4 || e3()) {
return super.onKeyDown(i2, keyEvent);
}
return true;
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
@Override
public boolean onOptionsItemSelected(MenuItem menuItem) {
int itemId = menuItem.getItemId();
if (itemId == 0) {
HTMLView.H0(this, "gestures.html", -1, HTMLView.g.Inform);
} else if (itemId == 1) {
HTMLView.G0(this, "index.html");
} else if (itemId == 2) {
this.W.edit().clear().commit();
s3();
x1 = 1791;
} else if (itemId == 3) {
Bundle bundle = this.M;
if (bundle != null) {
k1(bundle, this.W);
}
finish();
} else {
if (itemId != 16908332) {
return false;
}
e3();
}
return true;
}
@Override
protected void onPause() {
SharedPreferences.Editor edit = getSharedPreferences(d6.k, 0).edit();
edit.putInt("slTab", this.L.r());
edit.commit();
I3();
q1();
if (this.X) {
ep.o0("Settings onPause");
}
super.onPause();
}
@Override
public void onProgressChanged(SeekBar seekBar, int i2, boolean z) {
if (seekBar.equals(this.d0)) {
this.g0.setText(Integer.toString(this.d0.getProgress()));
} else if (seekBar.equals(this.c0)) {
this.i0.setText(Integer.toString(this.c0.getProgress()));
} else {
this.h0.setText(Integer.toString(this.b0.getProgress() + 8));
x1 |= 1;
}
}
@Override
protected void onResume() {
super.onResume();
}
@Override
public void onSaveInstanceState(Bundle bundle) {
super.onSaveInstanceState(bundle);
}
@Override
public void onSensorChanged(SensorEvent sensorEvent) {
float[] fArr = sensorEvent.values;
float f2 = fArr[0];
float f3 = fArr[1];
float f4 = fArr[2];
if (Math.abs(f2) > this.f1) {
this.f1 = Math.abs(f2);
}
if (Math.abs(f3) > this.f1) {
this.f1 = Math.abs(f3);
}
if (Math.abs(f4) > this.f1) {
this.f1 = Math.abs(f4);
}
if (System.currentTimeMillis() - this.g1 > 4000.0f) {
l2();
}
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
@Override
protected void onUserLeaveHint() {
super.onUserLeaveHint();
ep.o0("Settings onUserLeaveHint");
}
public void p3() {
if (pp.S1()) {
findViewById(2131296804).setVisibility(8);
}
this.A0.setSelection(w1(this, this.W));
this.z0.setSelection(this.W.getInt("clock_alarm", d6.i.b));
this.Z = this.W.getString("cust_notification", MonitorService.O3(this));
this.Y.setImageResource(getResources().getIdentifier(this.Z, "drawable", getPackageName()));
this.Q0.setText(Float.toString(this.W.getFloat("accMR", 3.5f)));
this.R0.setText(Long.toString(this.W.getLong("acMSr", 300L)));
this.S0.setText(Long.toString(this.W.getLong("acrmd", 1200L)));
this.D0.setText(Long.toString(this.W.getLong("lperiod", 1500L)));
for (int i2 = 0; i2 < 3; i2++) {
this.T0[i2].setText(this.W.getString(E1(i2), ""));
}
this.H0.setText(Long.toString(this.W.getLong("luped", 30L)));
this.K0.setText(Long.toString(this.W.getLong("guped", 120L)));
this.L0.setText(Long.toString(this.W.getLong("gupt", 90L)));
this.M0.setText(Long.toString(this.W.getLong("wfpiod", 120L)));
this.P0.setText(Long.toString(this.W.getLong("wip", 10L)));
this.N0.setText(Long.toString(this.W.getLong("btpiod", 120L)));
this.O0.setText(Long.toString(this.W.getLong("bttp", 15L)));
this.I0.setText(Long.toString(this.W.getLong("lfdd", 600L)));
this.J0.setText(Long.toString(this.W.getLong("sows", 60L)));
this.n0.setSelection(this.W.getInt("oss", 0));
this.A0.setSelection(this.W.getInt("appcheckMethod", d6.i.a.a(this)));
this.k0.setSelection(this.W.getInt("sbl", 0));
this.v0.setSelection(this.W.getInt("proxWhenOff", 1));
this.w0.setSelection(this.W.getInt("accelWhenOff", 1));
this.t0.setSelection(this.W.getInt("lightWhenOff", 1));
this.u0.setSelection(this.W.getInt("magnetWhenOff", 2));
this.q0.setSelection(this.W.getInt("pressureWhenOff", 1));
this.r0.setSelection(this.W.getInt("tempWhenOff", 2));
this.x0.setSelection(this.W.getInt("stepsWhenOff", 2));
this.s0.setSelection(this.W.getInt("humidityWhenOff", 2));
if (ud.f0.h()) {
E3(H2(this));
} else {
findViewById(2131296797).setVisibility(8);
}
if (!ud.c.b()) {
findViewById(2131296273).setVisibility(8);
}
if (!bp.d(this)) {
findViewById(2131297497).setVisibility(8);
}
if (com.joaomgcd.taskerm.util.c0.l(this)) {
findViewById(2131297130).setVisibility(8);
}
}
public void r3(SharedPreferences sharedPreferences) {
SharedPreferences.Editor editor;
if (sharedPreferences.contains("listMarginWidthPercent")) {
editor = null;
} else {
editor = sharedPreferences.edit();
editor.putInt("listMarginWidthPercent", 20);
}
if (editor != null) {
editor.commit();
}
}
public void t3() {
this.c0.setProgress(this.W.getInt("apl", 4));
this.b0.setProgress(this.W.getInt("pTs", 17) - 8);
this.l0.setSelection(HTMLView.B0(getResources(), t6.b(this.W)));
this.m0.setSelection(this.W.getInt("uiori", 0));
this.o0.setSelection(this.W.getInt("hideStatusBar", 1));
this.p0.setSelection(B1(this.W));
this.y0.setSelection(h2(this.W).ordinal());
this.f0 = this.W.getInt("accentIndex", -1);
g3();
m1();
}
public void w3(ScrollView scrollView) {
int i2 = 0;
while (true) {
int[] iArr = this.C;
if (i2 >= iArr.length) {
return;
}
ImageButton imageButton = (ImageButton) scrollView.findViewById(iArr[i2]);
if (imageButton != null) {
imageButton.setOnClickListener(this);
}
i2++;
}
}
public void x3(ScrollView scrollView) {
for (int i2 : this.c1) {
EditText editText = (EditText) findViewById(i2);
if (editText != null) {
editText.addTextChangedListener(new a());
}
}
}
public void z3() {
c5.F(this, new c(), 1).C(this);
}
}