正在查看: Tasker v6.6.3 应用的 ActionEdit.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tasker v6.6.3 应用的 ActionEdit.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package net.dinglisch.android.taskerm;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.graphics.PorterDuff;
import android.hardware.Camera;
import android.media.AudioManager;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.ActionMode;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
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.ListAdapter;
import android.widget.ListView;
import android.widget.SeekBar;
import android.widget.TextView;
import com.joaomgcd.taskerm.spawn.RFactory;
import com.joaomgcd.taskerm.util.ExtensionsContextKt;
import com.joaomgcd.taskerservercommon.ConstantsCommonTaskerServer;
import java.io.File;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TimeZone;
import net.dinglisch.android.taskerm.ActionEdit;
import net.dinglisch.android.taskerm.FileSelect;
import net.dinglisch.android.taskerm.HTMLView;
import net.dinglisch.android.taskerm.a6;
import net.dinglisch.android.taskerm.bk;
import net.dinglisch.android.taskerm.fh;
import net.dinglisch.android.taskerm.g7;
import net.dinglisch.android.taskerm.ho;
import net.dinglisch.android.taskerm.ik;
import net.dinglisch.android.taskerm.ji;
import net.dinglisch.android.taskerm.jl;
import net.dinglisch.android.taskerm.ko;
import net.dinglisch.android.taskerm.mj;
import net.dinglisch.android.taskerm.qj;
import net.dinglisch.android.taskerm.ud;
import net.dinglisch.android.taskerm.z0;
import net.dinglisch.android.taskerm.zj;
import yf.e;
public class ActionEdit extends HasArgsEdit implements AdapterView.OnItemSelectedListener, TextWatcher, jl.l, xf.a, ze.e {
private static List<ResolveInfo> Z0 = null;
private static ArrayList<String> a1 = null;
private static int b1 = -1;
private ImageButton A0;
private LinearLayout B0;
private LinearLayout C0;
private LinearLayout D0;
private jl E0;
private MyScrollView F0;
private LinearLayout G0;
private ListView H0;
private net.dinglisch.android.taskerm.c N0;
private int O0;
public Bundle Q0;
private boolean U0;
private ImageView n0;
private String q0;
private CheckBox r0;
private LinearLayout s0;
private EditText t0;
private CheckBox u0;
private EditText v0;
private EditText w0;
private ImageButton x0;
private ImageButton y0;
private ImageButton z0;
public yf.v m0 = new yf.v(this);
private Camera o0 = null;
private z5 p0 = null;
private String I0 = null;
private ArrayList<String> J0 = null;
private ArrayList<String> K0 = null;
private boolean L0 = false;
private int M0 = -1;
private b0 P0 = b0.None;
private List<String> R0 = null;
private String S0 = null;
private int T0 = 99;
private CompoundButton.OnCheckedChangeListener V0 = new k();
private int W0 = 11;
boolean X0 = false;
private fj Y0 = null;
class a extends Handler {
a() {
}
@Override
public void handleMessage(Message message) {
if (message.what != 0) {
ActionEdit.this.P3();
return;
}
ActionEdit actionEdit = ActionEdit.this;
actionEdit.C = true;
actionEdit.M5(d4.w(true), 62);
}
}
private static class a0 extends Handler {
WeakReference<ActionEdit> a;
int b;
a0(ActionEdit actionEdit, int i) {
this.a = new WeakReference<>(actionEdit);
this.b = i;
}
@Override
public void handleMessage(Message message) {
ActionEdit actionEdit = this.a.get();
int i = message.what;
if (i == 1) {
o7.F("ActionEdit", "ae exit");
pp.j0(actionEdit, 2131886894, new Object[0]);
actionEdit.Q5();
} else {
if (i != 2) {
return;
}
Bundle data = message.getData();
int i2 = data.getInt("l");
pp.b0(actionEdit, data.getString("m").replaceFirst("\\s*Uncaught\\s*SyntaxError:\\s*", ""), new Object[0]);
pp.E1(actionEdit.v[this.b], i2);
actionEdit.Q5();
}
}
}
class b extends Handler {
b() {
}
@Override
public void handleMessage(Message message) {
if (message.what == 0) {
ActionEdit actionEdit = ActionEdit.this;
pp.W2(actionEdit.v[actionEdit.D], wg.d(message.getData().getInt("colour")));
}
}
}
public enum b0 {
None,
UI,
Exe
}
class c extends Handler {
final int a;
c(int i) {
this.a = i;
}
@Override
public void handleMessage(Message message) {
if (message.what == 1) {
ActionEdit.this.v[this.a].setText(message.getData().getString("text"));
}
}
}
class d extends Handler {
final int a;
final yi.d b;
d(int i, yi.d dVar) {
this.a = i;
this.b = dVar;
}
@Override
public void handleMessage(Message message) {
if (message.what == 1) {
ActionEdit.this.v[this.a].setText(message.getData().getString("text"));
if (this.b != null) {
try {
this.b.accept(Integer.valueOf(message.getData().getInt("index")));
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
}
class e extends Handler {
e() {
}
@Override
public void handleMessage(Message message) {
if (message.what == 1 && ActionEdit.this.a5()) {
ActionEdit.b1 = message.getData().getInt("index");
ActivityInfo activityInfo = ((ResolveInfo) ActionEdit.Z0.get(ActionEdit.b1)).activityInfo;
Intent intent = new Intent();
intent.setComponent(new ComponentName(activityInfo.packageName, activityInfo.name));
intent.setAction("android.speech.tts.engine.CHECK_TTS_DATA");
ActionEdit.this.q0 = activityInfo.packageName;
try {
ActionEdit.this.M5(intent, 50);
ActionEdit.this.C = true;
} catch (ActivityNotFoundException unused) {
pp.a0(ActionEdit.this, 2131887794, new Object[0]);
}
}
}
}
class f extends Handler {
f() {
}
@Override
public void handleMessage(Message message) {
if (message.what == 1 && ActionEdit.this.a5()) {
String string = message.getData().getString("text");
String str = ((ResolveInfo) ActionEdit.Z0.get(ActionEdit.b1)).activityInfo.packageName;
ActionEdit actionEdit = ActionEdit.this;
actionEdit.v[actionEdit.D].setText(str + ConstantsCommonTaskerServer.ID_SEPARATOR + string);
}
}
}
class g extends Handler {
g() {
}
@Override
public void handleMessage(Message message) {
if (message.what == 1) {
String string = message.getData().getString("text");
ActionEdit actionEdit = ActionEdit.this;
actionEdit.v[actionEdit.D].setText(string);
int parseInt = Integer.parseInt(string);
SharedPreferences S0 = pp.S0(ActionEdit.this);
int e4 = ActionEdit.this.e4();
k1.q(S0, e4);
int k = k1.k(S0, e4);
if (k <= 0 || parseInt <= k) {
return;
}
xo.e(ActionEdit.this, 1, 2131890966, 1);
}
}
}
class h extends Handler {
final int a;
final int b;
h(int i, int i2) {
this.a = i;
this.b = i2;
}
@Override
public void handleMessage(Message message) {
String string;
ah ahVar;
if (message.what != 1 || (string = message.getData().getString("text")) == null) {
return;
}
String f = gl.f(ActionEdit.this, string);
int j = ActionEdit.this.N0.j();
if (!z0.X0(j, this.a) || z0.Y0(f, j, this.a)) {
ahVar = null;
} else {
go L0 = ActionEdit.this.L0();
ahVar = L0.p(f) ? z0.G1(ActionEdit.this.getResources(), j, this.a, L0.d0(f)) : new ah(2131887918, new String[]{f});
}
if (ahVar != null) {
ahVar.a(ActionEdit.this);
return;
}
ActionEdit.this.v[this.a].setText(f);
ActionEdit.this.R[this.a].setText(f);
ActionEdit.this.N0.o0(this.a, f);
ActionEdit.this.I3(this.a);
if (this.b == 2131887549) {
if (z0.j1(j)) {
ActionEdit.this.n5(1);
} else {
ActionEdit.this.n5(this.a);
}
}
if (ActionEdit.this.N0.j() == 51) {
ActionEdit.this.N0.o0(4, pp.m1(ActionEdit.this.v[4]));
ActionEdit.this.n5(4);
}
}
}
class i extends Handler {
final int a;
final EditText b;
i(int i, EditText editText) {
this.a = i;
this.b = editText;
}
private void c(String str, int i) {
EditText editText = this.b;
if (editText == null) {
ActionEdit actionEdit = ActionEdit.this;
editText = actionEdit.N0(actionEdit.N0);
}
if (editText == null) {
o7.k("ActionEdit", "no text focus on return from variable select");
return;
}
boolean z = false;
if (!wp.R0(ActionEdit.this, i)) {
pp.a0(ActionEdit.this, 2131891073, new Object[0]);
return;
}
int Q2 = ActionEdit.this.N0.j() == 129 ? -1 : pp.Q2(ActionEdit.this, editText, 524289);
String m1 = pp.m1(editText);
boolean z2 = m1.startsWith("%") && m1.endsWith("(");
int O3 = ActionEdit.this.O3(editText);
if (!z2 && O3 != -1 && ((ActionEdit.this.N0.j() == 345 && O3 == 1) || z0.D0(ActionEdit.this.N0.j(), O3).equals("uvar"))) {
z = true;
}
if (!str.startsWith("%")) {
str = wp.I0(i);
}
if (ActionEdit.this.N0.j() == 129 && O3 == 0) {
str = wp.Z1(str);
}
Boolean V3 = ActionEdit.this.m0.V3(O3);
boolean z3 = (V3 == null || !V3.booleanValue()) ? z : true;
String J3 = ActionEdit.this.m0.J3(editText, O3, m1, str);
if (z3) {
pp.W2(editText, J3);
} else {
wp.P0(ActionEdit.this, J3, editText);
if (z2) {
pp.G1(ActionEdit.this, editText, ")");
}
}
if (Q2 != -1) {
pp.Q2(ActionEdit.this, editText, Q2);
}
wp.w(ActionEdit.this, i);
}
public void d(int i, String str) {
if (ActionEdit.this.Y0 != null) {
ActionEdit.this.Y0.dismiss();
}
ActionEdit.this.Y0 = null;
c(str, i);
}
public void e(final int i, String str, ArrayList arrayList) {
ActionEdit.this.t2(i, str, arrayList, new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
ActionEdit.i.this.d(i, (String) obj);
}
});
}
@Override
public void handleMessage(Message message) {
try {
int i = message.what;
if (i == 1 || i == 2) {
final String string = message.getData().getString("text");
int i2 = message.getData().getInt("index");
int i3 = message.getData().getInt("boo");
if (i2 < i3 && !string.startsWith("%")) {
string = ji.r(string);
}
final int i4 = this.a == 2131887427 ? i2 - i3 : i2;
if (i2 >= i3) {
ArrayList arrayList = new ArrayList();
wp.s0(ActionEdit.this, null, arrayList, false);
i4 = ((Integer) arrayList.get(i4)).intValue();
}
if (message.what == 2) {
ActionEdit.this.A.p3(new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
ActionEdit.i.this.e(i4, string, (ArrayList) obj);
}
});
if (message.what != 2) {
ActionEdit.this.Y0 = null;
return;
}
return;
}
c(string, i4);
}
if (message.what != 2) {
ActionEdit.this.Y0 = null;
}
} catch (Throwable th2) {
if (message.what != 2) {
ActionEdit.this.Y0 = null;
}
throw th2;
}
}
}
class j extends Handler {
j() {
}
@Override
public void handleMessage(Message message) {
ActionEdit.this.m0.D5();
}
}
class k implements CompoundButton.OnCheckedChangeListener {
k() {
}
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean z) {
if (z) {
ActionEdit.this.t0.setVisibility(0);
ActionEdit.this.t0.requestFocus();
} else {
ActionEdit.this.t0.setVisibility(8);
ActionEdit.this.t0.setText("");
}
}
}
class l implements fh.f {
final EditText a;
l(EditText editText) {
this.a = editText;
}
@Override
public void a(fh fhVar) {
if (fhVar.v()) {
return;
}
pp.W2(this.a, sd.a(fhVar.A()));
}
}
class m extends Handler {
final List a;
final String[] b;
final EditText c;
m(List list, String[] strArr, EditText editText) {
this.a = list;
this.b = strArr;
this.c = editText;
}
@Override
public void handleMessage(Message message) {
if (message.what == 1) {
int i = message.getData().getInt("index");
String str = ((String) this.a.get(i)) + "\n" + this.b[i];
pp.W2(this.c, str);
ActionEdit.this.N0.o0(2, str);
for (int i2 = 3; i2 <= 9; i2++) {
ActionEdit.this.n5(i2);
if (ActionEdit.this.v[i2].getVisibility() != 0) {
pp.W2(ActionEdit.this.v[i2], "");
} else if (i2 == 3) {
ActionEdit.this.v[3].requestFocus();
}
}
ActionEdit.this.n5(0);
if (ActionEdit.this.v[0].getVisibility() == 0) {
ActionEdit.this.v[0].requestFocus();
} else {
pp.W2(ActionEdit.this.v[0], "");
}
}
}
}
class n extends Handler {
final List a;
final List b;
final boolean c;
final EditText d;
n(List list, List list2, boolean z, EditText editText) {
this.a = list;
this.b = list2;
this.c = z;
this.d = editText;
}
@Override
public void handleMessage(Message message) {
int i = message.what;
if (i != 1) {
if (i == 2) {
int i2 = message.getData().getInt("index");
ActionEdit.this.M5(a6.A(a6.P(((String) this.a.get(i2)) + "." + ((String) this.b.get(i2)))), 57);
return;
}
return;
}
int i3 = message.getData().getInt("index");
String str = ((String) this.a.get(i3)) + "." + ((String) this.b.get(i3));
String F = a6.F(str);
if (F != null) {
str = F;
}
if (this.c) {
String[] a0 = a6.a0(pp.m1(this.d));
pp.W2(this.d, a6.j(str) + " " + a0[1]);
return;
}
pp.W2(this.d, str);
pp.W2(ActionEdit.this.v[2], "");
for (int i4 = 3; i4 <= 9; i4++) {
pp.W2(ActionEdit.this.v[i4], "");
}
pp.W2(ActionEdit.this.v[2], "");
}
}
class o extends Handler {
final String[] a;
final int b;
o(String[] strArr, int i) {
this.a = strArr;
this.b = i;
}
@Override
public void handleMessage(Message message) {
EditText editText;
if (message.what == 1) {
String str = this.a[message.getData().getInt("index")];
int i = this.b;
if (i == -1) {
ActionEdit actionEdit = ActionEdit.this;
editText = actionEdit.N0(actionEdit.N0);
} else {
editText = ActionEdit.this.v[i];
}
if (editText != null) {
pp.W2(editText, str);
}
}
}
}
class p extends Handler {
final EditText a;
p(EditText editText) {
this.a = editText;
}
@Override
public void handleMessage(Message message) {
if (message.what == 1) {
String string = message.getData().getString("text");
if (!this.a.getText().toString().endsWith(".")) {
string = "." + string;
}
this.a.append(string);
}
}
}
class q extends jh {
q(Context context, rg rgVar, ImageView imageView, ImageView imageView2, ImageView imageView3) {
super(context, rgVar, imageView, imageView2, imageView3);
}
@Override
public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {
int itemId = menuItem.getItemId();
if (itemId == 2) {
ActionEdit.this.M3(d().f());
ActionEdit.this.v();
return true;
}
if (itemId != 3) {
return true;
}
g(ActionEdit.this.H0);
return true;
}
@Override
public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
super.onCreateActionMode(actionMode, menu);
return ActionEdit.this.U(actionMode);
}
@Override
public void onDestroyActionMode(ActionMode actionMode) {
super.onDestroyActionMode(actionMode);
ActionEdit.this.U(null);
}
@Override
public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {
super.e(actionMode, menu, false);
if (this.g == -1) {
return false;
}
net.dinglisch.android.taskerm.a.k(ActionEdit.this, 2, menu);
if (d().b()) {
return true;
}
net.dinglisch.android.taskerm.a.P(ActionEdit.this, 3, menu);
return true;
}
}
static class r {
static final int[] a;
static final int[] b;
static {
int[] iArr = new int[ko.h.a.values().length];
b = iArr;
try {
iArr[ko.h.a.TimerRemaining.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
b[ko.h.a.ActionAvailable.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
b[ko.h.a.StateAvailable.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
b[ko.h.a.EventAvailable.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
int[] iArr2 = new int[ko.a.EnumC0104a.values().length];
a = iArr2;
try {
iArr2[ko.a.EnumC0104a.PackageVersion.ordinal()] = 1;
} catch (NoSuchFieldError unused5) {
}
try {
a[ko.a.EnumC0104a.PackageVersionLabel.ordinal()] = 2;
} catch (NoSuchFieldError unused6) {
}
try {
a[ko.a.EnumC0104a.PackageName.ordinal()] = 3;
} catch (NoSuchFieldError unused7) {
}
}
}
class s implements View.OnTouchListener {
s() {
}
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
jl jlVar = ActionEdit.this.E0;
ActionEdit actionEdit = ActionEdit.this;
return jlVar.h0(actionEdit, actionEdit.H0, ActionEdit.this.y(), motionEvent);
}
}
class t implements AdapterView.OnItemClickListener {
t() {
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
ActionEdit.this.O5(i);
}
}
class u implements TextWatcher {
u() {
}
@Override
public void afterTextChanged(Editable editable) {
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
ActionEdit.this.l4(charSequence);
}
}
class v extends Handler {
final net.dinglisch.android.taskerm.c a;
final int b;
v(net.dinglisch.android.taskerm.c cVar, int i) {
this.a = cVar;
this.b = i;
}
@Override
public void handleMessage(Message message) {
if (message.what == 1) {
String string = message.getData().getString("text");
this.a.o0(ActionEdit.this.D, string);
ActionEdit.this.v[this.b].setText(string);
ActionEdit.this.I3(this.b);
ActionEdit.this.J3();
}
}
}
class w extends Handler {
final net.dinglisch.android.taskerm.c a;
final int b;
w(net.dinglisch.android.taskerm.c cVar, int i) {
this.a = cVar;
this.b = i;
}
@Override
public void handleMessage(Message message) {
if (message.what == 1) {
String str = ActionEdit.this.L0().v().get(message.getData().getInt("index"));
this.a.o0(ActionEdit.this.D, str);
ActionEdit.this.v[this.b].setText(str);
ActionEdit.this.I3(this.b);
}
}
}
class x implements yi.d<df.p1> {
x() {
}
@Override
public void accept(df.p1 p1Var) throws Exception {
if (p1Var.k()) {
ExtensionsContextKt.a0(ActionEdit.this, "https://tasker.joaoapps.com/userguide/en/matching.html");
}
}
}
class y extends Handler {
y() {
}
@Override
public void handleMessage(Message message) {
if (message.what != 0) {
ActionEdit.this.P3();
return;
}
ActionEdit actionEdit = ActionEdit.this;
actionEdit.C = false;
actionEdit.M5(MyDeviceAdminReceiver.d(actionEdit), 56);
ActionEdit.this.C = true;
}
}
class z extends Handler {
z() {
}
@Override
public void handleMessage(Message message) {
if (message.what != 0) {
ActionEdit.this.P3();
return;
}
ActionEdit actionEdit = ActionEdit.this;
actionEdit.C = true;
MyAccessibilityService.w(actionEdit);
}
}
public void A4(int i2, ArrayList arrayList) {
Intent G = ji.G(this, ji.c.Action, this.N0.a(0), i2, wp.a0(this, arrayList));
if (G != null) {
M5(G, 51);
}
}
private void A5(int i2, int i3) {
fj D = fj.D(this, new h(i2, i3), i3);
if (i3 == 2131887543) {
D.G(Y3(b4()));
} else {
List<String> c4 = c4();
for (String str : z0.J(this.N0.j(), i2)) {
if (str != null && !c4.contains(str)) {
c4.add(0, gl.k(this, str));
}
}
D.G(c4);
}
D.C(this);
}
public void B4(int i2, int i3) {
this.U[i2].setCheckedNoSignal(false);
pp.a0(this, 2131887860, new Object[0]);
this.m0.E5(i3, i2);
}
private void B5(int i2, int i3, Collection<String> collection, int i4) {
C5(i2, i3, collection, i4, false);
}
public void C4(View view) {
if (!z0.e1(this.N0.j()) || this.H0.getAdapter().getCount() < 3) {
O5(-1);
} else {
pp.a0(this, 2131887832, 3);
}
}
private void C5(int i2, int i3, Collection<String> collection, int i4, boolean z2) {
D5(i2, i3, collection, i4, z2, null);
}
public void D4(CompoundButton compoundButton, boolean z2) {
if (this.N0.j() == 549) {
n5(2);
}
}
private void D5(int i2, int i3, Collection<String> collection, int i4, boolean z2, yi.d<Integer> dVar) {
if (collection == null) {
return;
}
this.D = i2;
if (collection.size() == 0 && i4 != -1) {
pp.n0(this, i4, new Object[0]);
return;
}
fj D = fj.D(this, new d(i2, dVar), i3);
if (collection.getClass() == List.class || collection.getClass() == ArrayList.class || collection.getClass() == LinkedList.class) {
D.G((List) collection);
} else {
D.H((Set) collection);
}
if (z2) {
D.b0();
}
D.C(this);
}
public void E4(Boolean bool) throws Exception {
if (bool.booleanValue()) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.R3(this, 2131891186, 2131886933));
return;
}
this.C = true;
if (this.N0.j() == 915) {
HTMLView.H0(this, "cpu.html", -1, HTMLView.g.Inform);
} else {
p5();
}
}
private void E5(int i2, int i3, String[] strArr, int i4) {
F5(i2, i3, strArr, i4, false);
}
private void F3() {
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar == null || cVar.j() != 664) {
return;
}
a6.J(W3());
}
public void F4(com.joaomgcd.taskerm.util.pe peVar) throws Exception {
P3();
}
private void F5(int i2, int i3, String[] strArr, int i4, boolean z2) {
this.D = i2;
if (strArr.length == 0 && i4 != -1) {
pp.n0(this, i4, new Object[0]);
return;
}
fj D = fj.D(this, new c(i2), i3);
D.I(strArr);
if (z2) {
D.b0();
}
D.C(this);
}
private void G3() {
if (this.N0.j() == 47) {
String m1 = pp.m1(this.v[0]);
mj.e eVar = mj.e.values()[U0(1)];
if (eVar == mj.e.Overlay) {
go L0 = L0();
if (L0.p(m1) && L0.h(m1)) {
gi.h(this, 2131891305, 2131887287);
}
}
if (mj.x2(eVar)) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.m4(this, 2131889455, 2131888179));
}
}
}
public void G4(df.p1 p1Var) throws Exception {
P3();
}
private void G5() {
int size = Z0.size();
String[] strArr = new String[size];
for (int i2 = 0; i2 < size; i2++) {
String charSequence = getPackageManager().getApplicationLabel(Z0.get(i2).activityInfo.applicationInfo).toString();
strArr[i2] = charSequence;
if (TextUtils.isEmpty(charSequence)) {
strArr[i2] = "<" + oh.g(this, 2131891293, new Object[0]).toLowerCase() + ">";
}
}
fj.D(this, new e(), 2131891002).I(strArr).C(this);
}
private void H3() {
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar != null) {
cVar.m(getPackageManager(), L0(), this.I0, null);
}
}
public void H4(int i2, String str) throws Exception {
if (TextUtils.isEmpty(str)) {
return;
}
N1(i2, str);
}
private void H5() {
fj.D(this, new f(), 2131891003).G(a1).C(this);
}
public boolean I3(int i2) {
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar != null) {
boolean W0 = cVar.W0(i2);
H3();
if (W0 != this.N0.W0(i2)) {
n5(i2);
return true;
}
}
return false;
}
public void I4(String str) {
this.v0.setText(str);
}
public void J3() {
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar != null) {
int j2 = cVar.j();
if (z0.W0(j2)) {
n5(z0.H(j2));
}
}
}
public void J4(View view) {
this.m0.U4(new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
ActionEdit.this.I4((String) obj);
}
});
}
private void K3() {
super.A0(this.W0);
}
public void K4(View view) {
J5(2131887427, this.v0);
}
private void K5() {
ExecuteService.Q7(this);
finish();
}
private void L3() {
if (Y4()) {
l5();
this.N0.E(this, bk.c.Standard);
bk A0 = this.N0.A0();
zj.a aVar = zj.a.Single;
A0.m5(aVar);
bk A02 = this.N0.A0();
if (this.N0.j() != 551) {
aVar = zj.a.None;
}
A02.m5(aVar);
g7 n4 = A02.n4(this, this.E0, g7.g.Build, null);
this.H0.setAdapter((ListAdapter) n4);
h5(n4);
this.F0.setNestingWorkaround(true);
} else {
this.F0.setNestingWorkaround(false);
}
U5();
}
public void L4(View view) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.R3(this, 2131890229, 2131890230));
}
public static void L5(Activity activity, Context context, fn fnVar, int i2, Integer num, String str, String str2, ArrayList<String> arrayList, List<String> list, int i3) {
net.dinglisch.android.taskerm.c A0;
if (i2 >= 0 && (A0 = fnVar.A0(i2)) != null && A0.j() >= 1000) {
ji.c cVar = ji.c.Action;
if (!ji.T(cVar, A0.j())) {
gi.t(activity, A0, cVar, 1, 2);
return;
}
}
activity.startActivityForResult(new e.b().a(context, new e.b.a(fnVar, i2, num, str, str2, arrayList, list, i3)), 65031);
}
public void M3(List<Integer> list) {
this.N0.A0().p4(list);
k4();
}
public void M4(View view) {
J5(2131887427, this.v0);
}
public void M5(Intent intent, int i2) {
this.C = true;
try {
startActivityForResult(intent, i2);
} catch (SecurityException unused) {
this.C = false;
pp.a0(this, 2131887732, new Object[0]);
} catch (Exception e2) {
this.C = false;
pp.b0(this, e2.toString(), new Object[0]);
}
}
private void N3() {
jl jlVar = this.E0;
if (jlVar != null) {
jlVar.i0();
this.E0 = null;
}
this.n0 = null;
Z0 = null;
a1 = null;
this.o0 = null;
this.p0 = null;
this.s0 = null;
this.r0 = null;
this.t0 = null;
this.B0 = null;
this.F0 = null;
this.G0 = null;
this.H0 = null;
this.J0 = null;
this.N0 = null;
this.Q0 = null;
this.R0 = null;
this.m0.h0();
}
public vj.e0 N4() {
q5(this, this.N0.r0(), null);
return vj.e0.a;
}
private void N5() {
Intent intent = new Intent("android.intent.action.PICK");
intent.setType("image/*");
M5(intent, 53);
}
public int O3(EditText editText) {
if (this.N0 != null && editText != null) {
for (int i2 = 0; i2 < this.N0.e0(); i2++) {
if (editText.equals(this.v[i2])) {
return i2;
}
}
}
return -1;
}
public void O4(net.dinglisch.android.taskerm.k kVar, DialogInterface dialogInterface) {
if (!this.E) {
i4(kVar.z(), kVar.g());
}
this.z = null;
}
public void O5(int i2) {
this.D = i2;
Intent intent = new Intent(this, (Class<?>) ListItemEdit.class);
boolean z2 = false;
if (i2 != -1) {
intent.putExtra("item", this.N0.A0().t4(i2).X(0).c0());
}
bk A0 = this.N0.A0();
if (A0 != null && A0.H4()) {
z2 = true;
}
intent.putExtra("showSelect", z2);
intent.putExtra("imageSelectFlags", z0.e1(this.N0.j()) ? 36 : 383);
startActivityForResult(intent, 63);
}
public void P3() {
throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.ActionEdit.P3():void");
}
public void P4(MyScrollView myScrollView, DialogInterface dialogInterface) {
this.E = true;
if (this.N0 == null) {
E3();
} else if (myScrollView != null) {
myScrollView.setVisibility(0);
}
this.z = null;
}
private void P5(int i2) {
this.C = false;
try {
M5(bi.j(), i2);
this.C = true;
} catch (ActivityNotFoundException unused) {
pp.a0(this, 2131887782, new Object[0]);
P3();
}
}
public void Q4(String str, EditText editText, HashMap hashMap) {
LinkedList linkedList = new LinkedList();
LinkedList linkedList2 = new LinkedList();
a6.c b2 = a6.b(W3(), str, a6.a.Both, null, null, null, hashMap, "lookupFields");
if (b2.a != null) {
a6.N(W3(), b2, linkedList, linkedList2);
}
if (linkedList.isEmpty()) {
pp.j0(this, 2131887874, new Object[0]);
return;
}
int size = linkedList.size();
String[] strArr = new String[size];
for (int i2 = 0; i2 < size; i2++) {
strArr[i2] = a6.F(((Class) linkedList2.get(i2)).getName());
}
fj.D(this, new p(editText), 2131889621).G(linkedList).S(strArr).C(this);
}
public void Q5() {
o7.f("ActionEdit", "stop JSI");
z5 z5Var = this.p0;
if (z5Var == null) {
o7.G("ActionEdit", "stopJSI: null");
} else {
z5Var._stop();
this.p0 = null;
}
this.Y[0].setVisibility(0);
}
private String R3() {
return pp.m1(this.v[1]);
}
public void R4(java.lang.String r21, android.widget.EditText r22, java.util.HashMap r23) {
throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.ActionEdit.R4(java.lang.String, android.widget.EditText, java.util.HashMap):void");
}
private void R5() {
if (X5()) {
g5();
ExecuteService.f6(this, new net.dinglisch.android.taskerm.c[]{this.N0}, TaskerAppWidgetConfigure.i(this), true);
}
}
private z0.c S3() {
return z0.c.values()[U0(0)];
}
public void S4(boolean z2, int i2, int i3, HashMap hashMap) {
int i4;
String F;
qp qpVar = a6.h;
int size = hashMap == null ? 0 : hashMap.size();
List<String> d2 = qpVar.d();
String[] D = z2 ? a6.D() : new String[0];
int size2 = size + d2.size() + D.length;
String[] strArr = new String[size2];
String[] strArr2 = new String[size2];
if (hashMap != null) {
i4 = 0;
for (Map.Entry entry : hashMap.entrySet()) {
if (wp.W0((String) entry.getKey())) {
strArr[i4] = (String) entry.getKey();
strArr2[i4] = a6.F((String) entry.getValue());
i4++;
} else {
d2.add(((String) entry.getKey()) + '\n' + ((String) entry.getValue()));
}
}
} else {
i4 = 0;
}
Collections.sort(d2);
int i5 = 0;
while (i5 < d2.size()) {
String str = d2.get(i5);
if (str.contains("\n")) {
String[] split = str.split("\\n");
String str2 = split[0];
F = split[1];
str = str2;
} else {
Class<?> e2 = qpVar.e(d2.get(i5));
F = e2 != null ? a6.F(e2.getName()) : "";
}
strArr[i4] = str;
strArr2[i4] = F;
i5++;
i4++;
}
Class<?>[] C = a6.C();
int i6 = 0;
while (i6 < D.length) {
strArr[i4] = D[i6];
strArr2[i4] = a6.F(C[i6].getName());
i6++;
i4++;
}
if (size2 == 0) {
pp.j0(this, 2131887874, new Object[0]);
} else {
fj.D(this, new o(strArr, i2), i3).I(strArr).S(strArr2).C(this);
}
}
private void S5(String str, String str2, boolean z2) {
if (this.p0 != null) {
o7.G("ActionEdit", "jsi not null");
return;
}
if (str.length() > 0) {
z5 runPureScript = z5.runPureScript(this, z5.ACTION_EDIT_ID, null, 100, z2, str, str2, new Bundle(), new a0(this, this.D));
this.p0 = runPureScript;
if (runPureScript != null) {
this.Y[0].setVisibility(4);
}
}
}
private String T3(int i2, int i3) {
String N0 = z0.N0(i3, i2);
return N0 == null ? this.m0.u3(i2) : N0;
}
public void T4(boolean z2, df.p1 p1Var) throws Exception {
if (p1Var.o()) {
P5(64);
} else if (z2) {
E3();
} else {
P3();
}
}
private void T5(int i2, int i3) {
if (i2 == 65 && i3 == 3) {
n5(4);
}
}
private String[] U3(String str) {
return a6.u(str);
}
public void U4(fj fjVar) {
this.Y0 = fjVar;
}
private void U5() {
if (Y4()) {
ListAdapter adapter = this.H0.getAdapter();
int count = adapter == null ? 0 : adapter.getCount();
pp.S2(this.H0, g7.u(this));
this.H0.setVisibility(count > 0 ? 0 : 8);
r1 = 0;
}
this.G0.setVisibility(r1);
}
private String V3(String str) {
String[] t2 = a6.t(str);
if (t2 != null) {
return a6.s(t2[1], false);
}
return null;
}
private void V4(int i2) {
qj qjVar;
ik.a<vj.e0> v3 = this.m0.v3(i2, M0(i2));
if (v3 != null) {
v3.e();
return;
}
if (this.N0.j() == 69) {
String m1 = pp.m1(this.v[3]);
qj.k kVar = qj.m1()[U0(1)];
if (m1.length() > 0) {
try {
qjVar = qj.g0(new ii(m1));
} catch (Exception e2) {
pp.b0(this, "oops: " + e2.toString(), new Object[0]);
qjVar = null;
}
if (qjVar == null) {
pp.b0(this, "oops", new Object[0]);
} else if (qjVar.E1() != kVar) {
qj.k[] m12 = qj.m1();
int i3 = 0;
while (i3 < m12.length && m12[i3] != qjVar.E1()) {
i3++;
}
this.V[1].setSelection(i3, false);
}
} else {
qjVar = qj.Y0(this, kVar);
}
if (qjVar != null) {
startActivityForResult(new Intent(this, (Class<?>) SceneEditElement.class).putExtra("el", qjVar.X(0).c0()).putExtra("sc", new mj().X(0).c0()).putExtra("flags", 264), 60);
}
}
}
private boolean V5(int i2, String str, Integer num) {
if (str.startsWith("%")) {
if (wp.c1(str)) {
return true;
}
return pp.a0(this, 2131887699, str);
}
if (num != null) {
if (k1.t(i2, num.intValue())) {
return true;
}
return pp.a0(this, 2131887921, oh.g(this, 2131889787, new Object[0]), str);
}
return pp.b0(this, str + ": " + oh.g(this, 2131887872, new Object[0]), new Object[0]);
}
private Context W3() {
return this.I0 != null ? this : getApplicationContext();
}
private boolean W4() {
ik.e eVar = ik.e.values()[U0(2)];
return eVar == ik.e.MoveToMarker || eVar == ik.e.MoveToMarkerAnimated || eVar == ik.e.MoveToPoint || eVar == ik.e.MoveToPointAnimated || eVar == ik.e.SetZoom;
}
private List<String> X3(String str) {
return Z3(str, -1);
}
private void X4(List<Integer> list, int i2) {
this.N0.A0().G4(list, i2);
k4();
}
private boolean X5() {
throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.ActionEdit.X5():boolean");
}
private List<String> Y3(String str) {
return Z3(str, this.N0.j());
}
private boolean Y4() {
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar == null) {
return false;
}
int j2 = cVar.j();
return j2 == 551 || j2 == 157 || (z0.e1(j2) && ud.f0.h());
}
private boolean Y5() {
return uk.M4(U0(2));
}
private List<String> Z3(String str, int i2) {
String str2 = this.I0;
if (str2 == null || !str2.equals(str)) {
go L0 = L0();
return L0.p(str) ? L0.o(str, i2) : new ArrayList();
}
ArrayList arrayList = new ArrayList();
Iterator<String> it = this.J0.iterator();
while (it.hasNext()) {
String[] split = it.next().split("::dvd::");
if (i2 == -1 || i2 == 143) {
arrayList.add(split[0]);
} else {
int[] n1 = qj.n1(qj.k.valueOf(split[1]));
int length = n1.length;
int i3 = 0;
while (true) {
if (i3 >= length) {
break;
}
if (n1[i3] == i2) {
arrayList.add(split[0]);
break;
}
i3++;
}
}
}
return arrayList;
}
private int Z4(EditText editText, String str) {
if (TextUtils.isEmpty(str)) {
str = "%";
}
editText.setLines(1);
gi.o(editText, 524289);
pp.W2(editText, str);
return 0;
}
private boolean Z5() {
return xk.u4(U0(2));
}
private qj.k a4(String str, String str2) {
String str3 = this.I0;
if (str3 == null || !str3.equals(str)) {
go L0 = L0();
if (L0.p(str) && L0.b(str, str2, false)) {
return L0.I(str, str2);
}
return null;
}
Iterator<String> it = this.J0.iterator();
while (it.hasNext()) {
String[] split = it.next().split("::dvd::");
if (split[0].equals(str2)) {
return qj.k.valueOf(split[1]);
}
}
return null;
}
public boolean a5() {
if (Z0 == null) {
Z0 = getPackageManager().queryIntentActivities(new Intent("android.speech.tts.engine.CHECK_TTS_DATA"), 0);
}
boolean F = pp.F(Z0);
boolean z2 = !F;
if (F) {
pp.n0(this, 2131887864, new Object[0]);
}
return z2;
}
private String b4() {
String str;
String m1 = pp.m1(this.v[0]);
return (!m1.startsWith("%") || (str = this.I0) == null) ? m1 : str;
}
private void b5() {
Camera camera = this.o0;
if (camera != null) {
camera.release();
this.o0 = null;
}
}
private List<String> c4() {
ArrayList<String> W = L0().W(-2, mj.i.Alpha, true);
String str = this.I0;
if (str != null && !W.contains(str)) {
W.add(0, this.I0);
pp.f3(W);
}
return W;
}
private ge.v d4() {
return z0.l(this.V[0].getSelectedItemPosition());
}
private boolean d5() {
throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.ActionEdit.d5():boolean");
}
public int e4() {
return U0(0);
}
private void e5(boolean z2, int i2) {
AudioManager audioManager;
int y0 = z0.y0(i2);
if (y0 == -1 || (audioManager = (AudioManager) gi.d(this, "audio", "ActionEdit", "saveRestoreStream")) == null) {
return;
}
if (z2) {
if (this.M0 == -1) {
this.M0 = audioManager.getStreamVolume(y0);
}
} else if (this.M0 != -1) {
pp.K2(this, y0);
try {
audioManager.setStreamVolume(y0, this.M0, 0);
} catch (Exception e2) {
o7.k("ActionEdit", e2.toString());
}
this.M0 = -1;
}
}
private Camera f4() {
if (this.o0 == null) {
int U0 = U0(0);
int j2 = CameraProxy.j(U0 != 0 ? 1 : 0);
if (j2 == -1) {
o7.G("ActionEdit", "couldn't get cam index for tasker index " + U0);
} else {
this.o0 = CameraProxy.e(j2, "ActionEdit", "getSelectedCamera");
}
}
return this.o0;
}
private boolean f5(String str) {
String str2 = this.I0;
return (str2 != null && str2.equals(str)) || L0().p(str) || gl.P(str);
}
private z0.f g4() {
return z0.f.values()[U0(0)];
}
private void g5() {
throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.ActionEdit.g5():void");
}
private List<String> h4(boolean z2) {
Bundle extras;
ArrayList arrayList = new ArrayList();
Intent V3 = ExtensionsContextKt.V3(this, null, new IntentFilter("net.dinglisch.android.zoom.ACTION_QUERY_NAMES"));
if (V3 != null && (extras = V3.getExtras()) != null) {
for (String str : extras.keySet()) {
if (z2 && str.contains("/")) {
arrayList.add(str.replaceFirst("/", " / "));
} else if (!z2 && !str.contains("/")) {
arrayList.add(str);
}
}
}
Collections.sort(arrayList);
return arrayList;
}
private void h5(rg rgVar) {
this.H0.setMultiChoiceModeListener(new q(this, rgVar, this.n0, null, null));
}
private void i4(int i2, String str) {
r1 r1Var;
if (i2 != -1) {
this.m0.T3(i2);
this.m0.P4(i2);
com.joaomgcd.taskerm.util.t9.d0(this, i2);
int i3 = this.D;
if (i3 == -1) {
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar != null) {
e5(false, cVar.j());
if (z0.b(i2)) {
r1Var = this.N0.T();
net.dinglisch.android.taskerm.c cVar2 = new net.dinglisch.android.taskerm.c(i2);
this.N0 = cVar2;
if (i2 != 38 || i2 == 40) {
d5();
return;
}
cVar2.p(r1Var);
invalidateOptionsMenu();
k5();
if (i2 == 35 || i2 == 37) {
this.N0.p(new r1(new q1()));
} else if (i2 == 130) {
this.y[1] = true;
this.N0.y(1).L("%priority");
} else if (i2 == 256) {
xo.e(this, 1, 2131890947, 1);
} else if (i2 == 235) {
xo.d(this, 2131890880);
} else if (i2 == 307) {
this.m0.x2(2131890915);
} else if (i2 == 915) {
xo.e(this, 1, 2131890965, 1);
} else if (i2 == 551) {
this.m0.x2(2131890919);
} else if (i2 == 254) {
this.m0.y2(2131890970, "https://issuetracker.google.com/issues/141889136");
} else if (i2 == 244 && com.joaomgcd.taskerm.util.r.x()) {
this.m0.y2(2131890980, "https://issuetracker.google.com/issues/225186417");
} else if (i2 == 95 || i2 == 97) {
xo.d(this, 2131890874);
} else if (i2 == 150) {
xo.e(this, 1, 2131890905, 1);
} else if (i2 == 3877) {
xo.e(this, 1, 2131890942, 1);
} else if (i2 == 3155) {
xo.d(this, 2131890944);
} else if (i2 == 1221) {
xo.e(this, 1, 2131890943, 1);
} else if (i2 == 42) {
xo.e(this, 1, 2131890963, 1);
} else if (i2 == 444) {
xo.e(this, 1, 2131890973, 1);
} else if (i2 == 525 || i2 == 536 || i2 == 538) {
gi.h(this, 2131891107, 2131890939);
} else if (i2 == 118 || i2 == 116 || i2 == 117) {
gi.i(this, 2131891107, 2131890938, new j());
} else if (com.joaomgcd.taskerm.util.r.s() && i2 == 523) {
xo.e(this, 1, 2131890936, 1);
} else if (i2 == 176) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.Y5(this));
} else if (this.m0.Q4(i2)) {
this.m0.K3(this.N0);
} else if (i2 == 113 && pp.T1()) {
gi.h(this, 2131886613, 2131887352);
} else {
z0.g(i2);
}
n5(-1);
this.m0.T4(this.N0, str);
L3();
F3();
if (this.N0.e0() > 0 && this.N0.t0(0) == 2) {
this.D = 0;
M5(AppSelect.G0(this, true, this.N0.j() == 20, false, false, this.N0.j() == 20, true, null, null), 6);
}
}
}
r1Var = null;
net.dinglisch.android.taskerm.c cVar22 = new net.dinglisch.android.taskerm.c(i2);
this.N0 = cVar22;
if (i2 != 38) {
}
d5();
return;
}
this.v[i3].setText(z0.v(i2));
}
this.F0.setVisibility(0);
}
private void j4(final int i2) {
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar == null) {
MyActivity.L(this, "handleChoosePress tAction null");
return;
}
int j2 = cVar.j();
this.v[i2].requestFocus();
if (j2 == 156) {
this.D = i2;
y5(this.e0[i2], this.v[i2]);
} else if (j2 == 915) {
if (i2 > 1) {
this.D = i2;
r5();
return;
}
} else if (j2 == 135 && i2 == 2) {
B5(i2, 2131887559, this.R0, -1);
}
String D0 = z0.D0(j2, i2);
int i3 = 0;
if (D0.equals("iuri")) {
this.D = i2;
M5(new Intent("net.dinglisch.android.zoom.ACTION_IMAGE_SELECT"), 55);
} else if (D0.equals("zelem")) {
B5(i2, 2131887575, h4(true), 2131887867);
} else if (D0.equals("js")) {
h2(i2);
} else if (D0.equals("jsl")) {
i2(i2);
} else if (D0.equals("jfu")) {
w5(pp.m1(this.v[1]), this.v[i2]);
} else if (D0.equals("jc")) {
u5(this.v[i2], false);
} else if (D0.equals("jp")) {
v5(pp.m1(this.v[i2]), this.v[i2]);
} else if (D0.equals("sname")) {
if (c4().isEmpty()) {
pp.n0(this, 2131887862, new Object[0]);
} else {
A5(i2, 2131887549);
}
} else if (D0.equals("sename")) {
String b4 = b4();
List<String> Y3 = Y3(b4);
if (Y3 == null) {
pp.n0(this, 2131887918, b4);
} else if (Y3.isEmpty()) {
pp.n0(this, 2131887861, b4);
} else {
A5(i2, 2131887543);
}
} else if (D0.equals("psize")) {
Camera f4 = f4();
if (f4 != null) {
E5(i2, 2131887525, CameraProxy.n(f4, false), 2131887791);
}
} else if (D0.equals("zwidg")) {
B5(i2, 2131887577, h4(false), 2131887868);
} else if (D0.equals("cpug")) {
int e4 = e4();
E5(i2, 2131887477, k1.e(e4, false, "ActionEdit/" + e4), -1);
} else if (D0.equals("f")) {
this.C = true;
g2(i2, FileSelect.e.File, j2 == 422 ? ".zip" : null);
} else if (D0.equals("col")) {
this.D = i2;
String m1 = pp.m1(this.v[i2]);
if (m1.length() == 0) {
m1 = "#FF000000";
}
t5(wg.b(m1));
} else if (D0.equals("b")) {
this.D = i2;
N5();
} else if (D0.equals("ctit")) {
B5(i2, 2131887408, ug.K(getContentResolver(), R3()), 2131891097);
} else if (D0.equals("cloc")) {
B5(i2, 2131887407, ug.B(getContentResolver(), R3()), 2131891096);
} else if (D0.equals("sset")) {
this.m0.W4(this.V, this.v);
} else if (D0.equals("adbsc")) {
this.m0.V4(i2, j2);
} else if (D0.equals("locradi")) {
this.m0.X4(i2);
} else if (D0.equals("notcatoreo")) {
this.m0.k2(this.v, i2);
} else if (D0.equals("apppakc")) {
this.m0.E1(this.v, i2);
} else if (D0.equals("applpakc")) {
this.m0.g2(this.v, i2);
} else if (D0.equals("simc")) {
this.m0.W3(this.v, i2);
} else if (D0.equals("img")) {
this.m0.V1(this.v, i2);
} else if (D0.equals("toggle")) {
this.m0.m2(this.v, i2);
} else if (D0.equals("mattdevi")) {
this.m0.i2(this.v, i2);
} else if (D0.equals("inpval")) {
this.m0.a2(this.v, i2);
} else if (D0.equals("imgs")) {
this.m0.X1(this.v, i2);
} else if (D0.equals("strbool")) {
this.m0.G1(this.v, i2);
} else if (D0.equals("dttmms")) {
this.m0.Q1(this.v, i2);
} else if (D0.equals("dttms")) {
this.m0.O1(this.v, i2);
}
if (this.m0.Y3(i2)) {
this.m0.O3(new yf.b(i2, cVar));
return;
}
if (D0.equals("pkgName")) {
this.D = i2;
startActivityForResult(AppSelect.G0(this, true, false, false, false, true, false, null, null), 8);
return;
}
if (D0.equals("tz")) {
ArrayList arrayList = new ArrayList();
String[] availableIDs = TimeZone.getAvailableIDs();
int length = availableIDs.length;
while (i3 < length) {
String str = availableIDs[i3];
if (str.startsWith("Etc/")) {
str = str.substring(4);
}
if (str.length() > 0) {
arrayList.add(str);
}
i3++;
}
B5(i2, 2131887426, arrayList, -1);
return;
}
if (D0.equals("ccal")) {
B5(i2, 2131887406, ug.u(getContentResolver(), -1, true, true).keySet(), 2131891098);
return;
}
if (D0.equals("r")) {
File file = new File(Environment.getExternalStorageDirectory(), "sl4a/scripts");
if (!file.exists() || !file.isDirectory()) {
pp.a0(this, 2131887724, new Object[0]);
return;
}
File[] listFiles = file.listFiles();
if (listFiles == null || listFiles.length == 0) {
pp.a0(this, 2131887725, new Object[0]);
return;
}
String[] strArr = new String[listFiles.length];
while (i3 < listFiles.length) {
strArr[i3] = listFiles[i3].getName();
i3++;
}
F5(i2, 2131886720, strArr, -1, true);
return;
}
if (D0.equals("mime")) {
E5(i2, 2131888739, oh.i(this, RFactory.layout.scroll_up_indicator), -1);
return;
}
if (D0.equals("act")) {
this.D = i2;
s5();
return;
}
if (D0.equals("ssid")) {
this.D = i2;
this.m0.y1(this.v[i2]);
return;
}
if (D0.equals("d")) {
this.C = true;
g2(i2, FileSelect.e.Dir, null);
return;
}
if (D0.equals("i")) {
List<String> q0 = ImageSelect.q0(this.w, false, false);
if (!pp.F(q0)) {
String[] f2 = t5.f();
int length2 = f2.length;
while (i3 < length2) {
String str2 = f2[i3];
if (str2 != null) {
q0.add(str2);
}
i3++;
}
Collections.sort(q0);
}
B5(i2, 2131888279, q0, -1);
return;
}
if (D0.equals("rtn")) {
this.D = i2;
M5(ij.c(c5(j2)), 52);
return;
}
if (D0.equals("a")) {
B5(i2, 2131891126, TaskerAppWidgetConfigure.n(this, false), 2131887857);
return;
}
if (D0.equals("at")) {
B5(i2, 2131891126, TaskerAppWidgetConfigure.n(this, true), 2131887857);
return;
}
if (D0.equals("l")) {
if (a5()) {
b1 = -1;
a1 = null;
G5();
return;
}
return;
}
if (D0.equals("la")) {
j2(i2);
return;
}
if (D0.equals("p") || D0.equals("pv")) {
this.m0.B2(com.joaomgcd.taskerm.util.ac.d0(this), new Runnable() {
@Override
public final void run() {
ActionEdit.this.u4(i2);
}
});
return;
}
if (D0.equals("prof")) {
m2(i2, false);
return;
}
if (D0.equals("m")) {
this.D = i2;
o2(cVar.j() == 552 ? new v(cVar, i2) : new w(cVar, i2), L0());
return;
}
if (i2 == 1) {
int U0 = U0(0);
if (j2 == 346) {
if (xg.w(this, this.v[i2], false)) {
this.D = i2;
this.C = true;
return;
}
return;
}
if (j2 == 343) {
this.C = true;
g2(i2, FileSelect.e.File, null);
return;
}
if (j2 == 344) {
int i4 = r.a[ko.a.e(U0).ordinal()];
if (i4 == 1 || i4 == 2 || i4 == 3) {
this.D = i2;
M5(AppSelect.G0(this, true, false, false, false, true, true, null, null), 6);
return;
}
return;
}
if (j2 != 347) {
if (j2 == 342) {
this.C = true;
g2(i2, FileSelect.e.File, null);
return;
} else {
if (j2 == 345) {
I5(2131887427);
return;
}
return;
}
}
int i5 = r.b[ko.h.d(U0).ordinal()];
if (i5 == 1) {
B5(i2, 2131891126, TaskerAppWidgetConfigure.n(this, true), 2131887857);
return;
}
if (i5 == 2) {
this.D = i2;
a2(i2);
} else if (i5 == 3) {
this.D = i2;
n2(i2);
} else {
if (i5 != 4) {
return;
}
this.D = i2;
f2(i2);
}
}
}
private void k4() {
this.N0.A0().I4();
U5();
J3();
}
private void k5() {
for (int i2 = 0; i2 < this.N0.e0(); i2++) {
int t0 = this.N0.t0(i2);
boolean z2 = t0 == 0 && this.N0.y(i2).I();
if (!z2 && t0 == 2) {
net.dinglisch.android.taskerm.d M = this.N0.M(i2);
z2 = M.z() > 0 && wp.K(M.H());
}
this.y[i2] = z2;
}
}
public void l4(CharSequence charSequence) {
net.dinglisch.android.taskerm.c Q3;
ViewGroup viewGroup = this.N[1];
if (TextUtils.isEmpty(charSequence)) {
this.D0.setVisibility(8);
viewGroup.setVisibility(this.N0.j() != 130 ? 8 : 0);
return;
}
viewGroup.setVisibility(8);
this.D0.setVisibility(0);
Editable text = this.w0.getText();
if ((text == null || TextUtils.isEmpty(text.toString())) && (Q3 = Q3()) != null) {
this.w0.setText(String.valueOf(Q3.L0()));
}
}
private void l5() {
net.dinglisch.android.taskerm.c cVar = this.N0;
pp.M2(this, 2131297061, (cVar == null || !(cVar.j() == 551 || this.N0.j() == 157)) ? 2131891137 : 2131889713);
}
private void m4(int i2) {
wp.O0(this.v[i2]);
String D0 = z0.D0(this.N0.j(), i2);
if (this.N0.j() == 664 || D0.equals("uvar")) {
this.A.p3(new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
ActionEdit.this.w4((ArrayList) obj);
}
});
} else {
I5(2131887427);
}
}
private void m5(int i2, int i3, int i4) {
int c0 = z0.c0(i2, i3);
int d0 = z0.d0(i2, i3);
this.P[i3].setMax(c0 - d0);
SeekBar seekBar = this.P[i3];
if (d0 != Integer.MIN_VALUE) {
i4 -= d0;
}
seekBar.setProgress(i4);
}
public void n5(int r48) {
throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.ActionEdit.n5(int):void");
}
private boolean o4(int i2, int i3) {
if (i2 == 188) {
return true;
}
return i2 == 133 && i3 == 1 && U0(0) == 26;
}
private void o5() {
super.Z1(this, this.W0);
}
private boolean p4() {
return z0.V0(U0(0));
}
private boolean q4(int i2) {
return this.N0.j() == 64 && i2 == 3;
}
public static void q5(Activity activity, String str, String str2) {
HTMLView.H0(activity, HasArgsEdit.Q0("ah", str, str2), -1, HTMLView.g.Inform);
}
private boolean r4(int i2) {
if (!q4(i2)) {
return false;
}
int U0 = U0(2);
return U0 == ik.e.MoveToPoint.ordinal() || U0 == ik.e.MoveToPointAnimated.ordinal();
}
private void r5() {
fj.D(this, new g(), 2131887476).I(k1.d(e4())).C(this);
}
private boolean s4(int i2) {
return (!q4(i2) || r4(i2) || t4(i2)) ? false : true;
}
public void s5() {
final net.dinglisch.android.taskerm.k kVar = new net.dinglisch.android.taskerm.k(this);
this.E = false;
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar == null) {
kVar.B(true, this.P0 != b0.None);
} else {
cVar.p(K0());
kVar.E(this.N0.j());
kVar.C(false, this.P0 != b0.None, z0.M(this.N0.j()).intValue());
}
kVar.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
ActionEdit.this.O4(kVar, dialogInterface);
}
});
final MyScrollView myScrollView = this.F0;
kVar.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public final void onCancel(DialogInterface dialogInterface) {
ActionEdit.this.P4(myScrollView, dialogInterface);
}
});
if (myScrollView != null) {
myScrollView.setVisibility(4);
}
this.m0.U3();
kVar.show();
this.z = kVar;
}
private boolean t4(int i2) {
return q4(i2) && U0(2) == ik.e.SetZoom.ordinal();
}
private void t5(int i2) {
a1.y(this, new b(), i2).x(this);
}
public void u4(int i2) {
if (xg.w(this, this.v[i2], false)) {
this.D = i2;
this.C = true;
}
}
private void u5(EditText editText, boolean z2) {
String[] y2 = a6.y(W3());
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
int[] iArr = new int[y2.length];
int L = fp.L(this);
int C = fp.C(this, 2130968883, "ActionEdit/sjfc2");
int length = y2.length;
int i2 = 0;
int i3 = 0;
while (i2 < length) {
String str = y2[i2];
int lastIndexOf = str.lastIndexOf(46);
arrayList.add(str.substring(lastIndexOf + 1, str.length()));
arrayList2.add(str.substring(0, lastIndexOf));
int i4 = i3 + 1;
iArr[i3] = ud.k(a6.b0(str)[0]) == null ? C : L;
i2++;
i3 = i4;
}
if (arrayList.size() == 0) {
pp.j0(this, 2131887874, new Object[0]);
} else {
fj.D(this, new n(arrayList2, arrayList, z2, editText), 2131889514).Z(2131890882).G(arrayList).R(arrayList2).P(iArr).C(this);
}
}
public ti.v v4(String str, String str2, List list, String str3) throws Exception {
return TextUtils.isEmpty(str3) ? super.X0(str, str2, list) : ti.r.w(str3);
}
private void v5(final String str, final EditText editText) {
this.m0.H4(new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
ActionEdit.this.Q4(str, editText, (HashMap) obj);
}
});
}
public void w4(ArrayList arrayList) {
if (wp.a0(this, arrayList).isEmpty()) {
pp.j0(this, 2131887865, new Object[0]);
} else {
I5(2131887571);
}
}
private void w5(final String str, final EditText editText) {
this.m0.H4(new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
ActionEdit.this.R4(str, editText, (HashMap) obj);
}
});
}
public void x4(final int i2, final int i3, Boolean bool) throws Exception {
if (bool.booleanValue()) {
return;
}
xg.e2.b1(new Runnable() {
@Override
public final void run() {
ActionEdit.this.B4(i2, i3);
}
});
}
private void x5(final int i2, final int i3, final boolean z2) {
this.m0.H4(new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
ActionEdit.this.S4(z2, i3, i2, (HashMap) obj);
}
});
}
public void y4(boolean z2, int i2, HashMap hashMap) {
String m1 = pp.m1(this.v[1]);
String str = null;
if (m1.isEmpty()) {
str = a6.P(null);
} else {
String str2 = a6.b(W3(), m1, a6.a.Both, null, null, null, hashMap, "lookupHelp").a;
if (str2 == null) {
pp.j0(this, 2131887874, new Object[0]);
} else if (z2) {
String m12 = pp.m1(this.v[i2]);
if (m12.startsWith("assign") || m12.startsWith("new")) {
pp.j0(this, 2131887874, new Object[0]);
} else {
str = a6.Q(str2, m12);
}
} else {
str = a6.P(str2);
}
}
if (str != null) {
M5(a6.A(str), 57);
}
}
private void y5(View view, EditText editText) {
fh fhVar = new fh(this, view);
int[] c2 = sd.c();
for (int i2 = 0; i2 < c2.length; i2++) {
fhVar.j(i2, c2[i2]);
}
fhVar.F(new l(editText)).show();
}
public static vj.e0 z4(String str) {
o7.f("ActionEdit", str);
return vj.e0.a;
}
private void z5(final boolean z2) {
this.m0.q0(com.joaomgcd.taskerm.dialog.a.Q3(this), new yi.d() {
@Override
public final void accept(Object obj) {
ActionEdit.this.T4(z2, (df.p1) obj);
}
});
}
public void E3() {
if (this.P0 != b0.None) {
K5();
} else {
finish();
}
}
public void I5(int i2) {
J5(i2, null);
}
public void J5(int i2, EditText editText) {
super.q2(i2, false, this.N0, new i(i2, editText), new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
ActionEdit.this.U4((fj) obj);
}
});
}
@Override
public go L0() {
return this.P0 == b0.Exe ? fo.x1(this) : fo.l2(this);
}
@Override
public w4 O0() {
return Q3();
}
public net.dinglisch.android.taskerm.c Q3() {
return this.N0;
}
@Override
public void U1(int i2) {
n5(i2);
}
protected boolean W5(int i2) {
if (Z0()) {
return super.C2(false, true, true);
}
if (i2 == 35 || i2 == 37) {
return pp.a0(this, 2131887795, new Object[0]);
}
return true;
}
@Override
public ti.r<String> X0(final String str, final String str2, final List<String> list) {
return this.m0.K4(str, str2, list).t(new yi.e() {
@Override
public final Object a(Object obj) {
ti.v v4;
v4 = ActionEdit.this.v4(str, str2, list, (String) obj);
return v4;
}
});
}
@Override
public void afterTextChanged(Editable editable) {
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar == null || cVar.j() != 60) {
return;
}
n5(4);
n5(5);
n5(7);
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i2, int i3, int i4) {
}
public int c5(int i2) {
if (i2 == 566) {
return 4;
}
return i2 == 457 ? ij.g(U0(0)) : ij.g(U0(0));
}
@Override
public void e(jl.k kVar, int i2) {
List<Integer> linkedList;
if (y()) {
linkedList = ((rg) this.H0.getAdapter()).f();
v();
} else {
linkedList = new LinkedList<>();
linkedList.add(Integer.valueOf(this.E0.H()));
}
if (kVar == jl.k.DropBin) {
M3(linkedList);
} else if (i2 != -1) {
X4(linkedList, i2);
}
}
@Override
public void g(com.joaomgcd.taskerm.util.ac acVar, com.joaomgcd.taskerm.util.se seVar) {
if (Arrays.asList(acVar.s0()).contains("android.permission.NOTIFICATION_ACCESS")) {
z5(true);
} else {
if (this.m0.R3(acVar, seVar)) {
return;
}
this.m0.O(new Runnable() {
@Override
public final void run() {
ActionEdit.this.s5();
}
});
}
}
public void i5() {
net.dinglisch.android.taskerm.c cVar = this.N0;
int j2 = cVar == null ? -1 : cVar.j();
super.F1((j2 == 300 || j2 == 40 || j2 == 38 || this.P0 != b0.None) ? 8 : 0);
M1();
}
public void j5(final int i2, ti.r<String> rVar) {
this.m0.q0(rVar, new yi.d() {
@Override
public final void accept(Object obj) {
ActionEdit.this.H4(i2, (String) obj);
}
});
}
public void n4() {
this.E0.b0(this, "ActionEdit", this.H0, this.n0, null, null, null, false, false, (ImageView) findViewById(2131297343), (ImageView) findViewById(2131297341), this.F0, this);
}
@Override
protected void onActivityResult(int i2, int i3, Intent intent) {
String str;
String L0;
int i4;
if (this.m0.w1(i2, i3, intent) || this.m0.M3(i2, i3, intent)) {
return;
}
boolean z2 = false;
if (!super.n1(i2, i3, intent)) {
if (i2 == 61) {
P3();
} else if (i2 == 64) {
if (!bi.v()) {
E3();
}
} else if (i2 == 62) {
d4.D(this, i3, intent);
P3();
} else if (i2 == 63) {
if (i3 == -1) {
h7 h7Var = new h7(new ii(intent.getBundleExtra("item")));
bk A0 = this.N0.A0();
if (this.D == -1) {
A0.m4(h7Var);
U5();
this.F0.fullScroll(130);
this.D = A0.w4() - 1;
} else {
A0.u4().set(this.D, h7Var);
}
if (h7Var.q()) {
A0.N4(this.D);
} else {
A0.q4(this.D);
}
A0.I4();
}
} else if (i2 == 60) {
if (i3 == -1 && intent.hasExtra("el")) {
Bundle bundleExtra = intent.getBundleExtra("el");
if (bundleExtra == null) {
o7.G("ActionEdit", "no result bundle");
} else {
pp.W2(this.v[3], qj.g0(new ii(bundleExtra)).X(0).e0(0));
}
}
} else if (i2 == 6) {
if (i3 == -1) {
f1 f1Var = new f1(new ii(intent.getBundleExtra("ssc")));
if (this.N0.t0(this.D) == 2) {
if (this.N0.j() == 173) {
net.dinglisch.android.taskerm.d M = this.N0.M(this.D);
M.q();
for (int i5 = 0; i5 < f1Var.h1(); i5++) {
M.p(f1Var.n1(i5), f1Var.e1(i5), f1Var.g1(i5));
}
} else {
this.N0.k1(this.D, f1Var.m1(), f1Var.d1(), f1Var.f1());
}
if (!I3(this.D)) {
n5(this.D);
}
if (this.N0.j() == 18) {
xo.e(this, 1, 2131890906, 1);
}
this.m0.N3(this.D);
} else if (this.N0.j() == 344 && (i4 = this.D) == 1) {
pp.W2(this.v[i4], f1Var.m1());
} else {
this.N0.j0(this.D).q0(f1Var.m1(), f1Var.d1());
C0(this.N0, this.D);
}
}
} else if (i2 == 7) {
if (i3 == -1) {
String string = intent.getExtras().getString("path");
int j2 = this.N0.j();
W0(string, z0.D0(j2, this.D), j2 == 118 || j2 == 116, this.N0.j() == 420 && this.D == 0);
}
} else if (i2 == 59) {
xo.d(this, 2131890903);
} else if (i2 == 56) {
if (i3 == -1) {
gi.h(this, 2131891305, 2131887186);
}
} else if (i2 == 5) {
if (i3 == -1) {
Bundle bundleExtra2 = intent.getBundleExtra("actisss");
if (bundleExtra2 == null) {
o7.k("ActionEdit", "oar: null action bundle");
} else {
this.N0.A0().B4(L0(), getPackageManager(), this.D, new net.dinglisch.android.taskerm.c(new ii(bundleExtra2)), (Y4() && z0.e1(this.N0.j())) ? false : true);
H3();
}
}
} else if (i2 != 3) {
if (i2 == 55) {
if (i3 == -1) {
String dataString = intent.getDataString();
this.v[this.D].setText(dataString != null ? dataString : "");
}
} else if (i2 == 58 || i2 == 4) {
if (i3 == -1) {
if (this.N0 == null) {
o7.k("ActionEdit", "oar: icon select: no action");
} else if (this.D == -1) {
o7.k("ActionEdit", "oar: icon select: no editingArgNo");
} else {
net.dinglisch.android.taskerm.g r0 = ImageSelect.r0(intent);
if (i2 == 58) {
if (r0 == null) {
this.N0.j0(this.D).n0();
} else {
this.N0.m1(this.D, r0);
}
n5(this.D);
if (r0 != null && pp.T1() && z0.e1(this.N0.j()) && (!r0.Z() || (r0.U() != 0 && r0.U() != -1))) {
xo.e(this, 1, 2131890935, 1);
}
} else {
this.N0.A0().C4(getPackageManager(), this.D, r0);
if (z0.e1(this.N0.j()) && pp.T1()) {
xo.e(this, 1, 2131890934, 1);
}
}
}
}
} else if (i2 == 53) {
if (i3 == -1) {
if (intent == null) {
o7.G("ActionEdit", "imageSelectResult: no data intent");
L0 = null;
} else {
L0 = pp.L0(getContentResolver(), intent.getData(), "_data");
}
if (L0 == null) {
pp.a0(this, 2131887779, new Object[0]);
} else {
String B2 = pp.B2(L0);
this.v[this.D].setText(B2);
this.N0.o0(this.D, B2);
J3();
}
}
} else if (xg.l(i2)) {
int j3 = this.N0.j();
if (!xg.n(i2, i3, intent, getContentResolver(), this.v[this.D], (j3 == 95 || j3 == 99) ? 2 : (j3 == 41 || j3 == 41 || j3 == 250 || j3 == 111) ? 1 : 0, true)) {
pp.n0(this, 2131887780, new Object[0]);
}
} else if (i2 == 52) {
if (i3 == -1) {
int c5 = c5(this.N0.j());
Bundle extras = intent.getExtras();
if (extras != null) {
String k2 = ij.k(this, c5, ij.e(extras), true);
o7.f("ActionEdit", "--------title: " + k2);
this.v[this.D].setText(k2 != null ? k2 : "");
}
}
} else if (i2 == 51) {
this.D = 0;
if (i3 == -1) {
Bundle s2 = ji.s(intent);
if (s2 != null) {
if (ji.i0(s2)) {
if (ho.c.m(s2)) {
net.dinglisch.android.taskerm.h y2 = this.N0.y(3);
if (!this.y[3] && (!y2.k() || y2.v() == 0)) {
int d0 = z0.d0(this.N0.j(), 3);
int c0 = z0.c0(this.N0.j(), 3);
int i6 = ho.c.i(s2);
int i7 = i6 / 1000;
if (i7 < d0) {
i7 = d0;
} else if (i7 > c0) {
i7 = c0;
}
o7.f("ActionEdit", "timeout req " + i6 + "ms min: " + d0 + "s max " + c0 + "s used: " + i7 + "s");
this.N0.u1(3, i7);
}
ho.c.e(s2);
} else {
this.N0.u1(3, 0);
}
this.N0.p1(0, s2);
net.dinglisch.android.taskerm.c cVar = this.N0;
ji.f0(cVar, cVar.j(), ji.c.Action);
n5(-1);
} else {
pp.a0(this, 2131887886, new Object[0]);
}
}
} else if (i3 == 0) {
o7.f("ActionEdit", "Cancelled");
} else {
o7.f("ActionEdit", "R: " + i3);
}
} else if (i2 == 50) {
if (i3 == 1 || ((str = this.q0) != null && str.equals("com.svox.classic") && i3 == 0)) {
if (intent == null) {
pp.a0(this, 2131887911, new Object[0]);
} else if (intent.getExtras() == null) {
pp.a0(this, 2131887910, new Object[0]);
} else {
if (intent.hasExtra("availableVoices")) {
o7.f("ActionEdit", "try get voices from EXTRA_AVAILABLE_VOICES");
a1 = intent.getStringArrayListExtra("availableVoices");
}
if (pp.F(a1)) {
o7.f("ActionEdit", "no voices so far...");
if (intent.hasExtra("dataFilesInfo")) {
o7.f("ActionEdit", "try get voices from EXTRA_VOICE_DATA_FILES_INFO");
String[] stringArrayExtra = intent.getStringArrayExtra("dataFilesInfo");
if (!pp.r(stringArrayExtra)) {
o7.f("ActionEdit", "array empty");
a1 = new ArrayList<>();
for (String str2 : stringArrayExtra) {
o7.f("ActionEdit", "found file: " + stringArrayExtra);
if (!a1.contains(str2)) {
a1.add(str2);
}
}
}
}
}
if (pp.F(a1)) {
pp.a0(this, 2131887912, new Object[0]);
} else {
n5(1);
this.D = 1;
H5();
}
}
} else if (i3 == -2) {
pp.h0(this, 2131886148, new Object[0]);
M5(new Intent("android.speech.tts.engine.INSTALL_TTS_DATA"), 57);
z2 = this.C;
} else {
pp.b0(this, oh.g(this, 2131887909, new Object[0]) + ": " + i3, new Object[0]);
}
}
} else if (i3 == -1) {
this.N0.j0(this.D).r0(this.F.getPath());
n5(this.D);
}
}
this.C = z2;
}
@Override
public void onClick(View view) {
char c2;
int i2;
ArrayList<String> arrayList;
boolean z2;
boolean z3;
f1 f1Var;
char c3;
if (super.o1(view, this.N0)) {
if (this.J.equals(view)) {
I5(2131887427);
return;
} else if (this.L.equals(view)) {
x5(2131886414, -1, false);
return;
} else {
if (this.K.equals(view)) {
this.m0.Z1(N0(this.N0));
return;
}
return;
}
}
final int i3 = 0;
while (i3 < 17) {
final int j2 = this.N0.j();
if (view == this.Z[i3]) {
this.D = i3;
if (j2 == 664) {
final boolean z4 = i3 == 2;
if (z4 || i3 == 1) {
this.m0.H4(new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
ActionEdit.this.y4(z4, i3, (HashMap) obj);
}
});
}
} else if (j2 == 130) {
if (i3 == 8) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.R3(this, 2131889919, 2131888291));
} else if (i3 == 6) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.R3(this, 2131889744, 2131888183));
} else if (i3 == 9) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.R3(this, 2131889454, 2131888175));
} else if (i3 == 7) {
this.m0.q0(com.joaomgcd.taskerm.dialog.a.U3(this, getString(2131889745), getString(2131888180), new com.joaomgcd.taskerm.util.h0(this, 2131889593, new Object[0])), new x());
} else {
this.m0.c4(this.N0, i3);
}
} else if (j2 == 25 && i3 == 1) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.R3(this, 2131889854, 2131888178));
} else if (j2 == 123 && i3 == 7) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.R3(this, 2131890064, 2131888197));
} else if (j2 == 123 && i3 == 8) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.R3(this, 2131891058, 2131888196));
} else if (j2 == 159 && i3 == 0) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.R3(this, 2131889804, 2131888220));
} else if (j2 == 47 && i3 == 8) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.S3(this, 2131889455, com.joaomgcd.taskerm.util.b7.j6(2131888176, this, new Object[0]) + "\n\n" + com.joaomgcd.taskerm.util.b7.j6(2131888179, this, new Object[0])));
} else if (j2 == 47 && i3 == 9) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.S3(this, 2131889956, com.joaomgcd.taskerm.util.b7.j6(2131888204, this, new Object[0])));
} else if (j2 == 47 && i3 == 10) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.S3(this, 2131889376, com.joaomgcd.taskerm.util.b7.j6(2131888203, this, new Object[0])));
} else if (j2 == 523 && i3 == 2) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.S3(this, 2131886465, com.joaomgcd.taskerm.util.b7.j6(2131888182, this, new Object[0])));
} else if (j2 == 162 && i3 == 7) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.S3(this, 2131889675, com.joaomgcd.taskerm.util.b7.j6(2131888201, this, new Object[0])));
} else if (j2 == 162 && i3 == 8) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.S3(this, 2131889723, com.joaomgcd.taskerm.util.b7.j6(2131888202, this, new Object[0])));
} else if (j2 == 162 && (i3 == 9 || i3 == 10 || i3 == 11)) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.S3(this, 2131889530, com.joaomgcd.taskerm.util.b7.j6(2131888199, this, new Object[0])));
} else if (j2 == 162 && i3 == 12) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.S3(this, 2131889531, com.joaomgcd.taskerm.util.b7.j6(2131888200, this, new Object[0])));
} else if (j2 == 171 && i3 == 4) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.S3(this, 2131889591, com.joaomgcd.taskerm.util.b7.j6(2131886786, this, new Object[0])));
} else {
this.m0.c4(this.N0, i3);
}
} else {
if (view == this.Y[i3]) {
this.D = i3;
if (j2 == 156) {
R5();
} else {
if (j2 == 664) {
c3 = 334;
x5(2131886414, i3, i3 != 0);
} else {
c3 = 334;
if (j2 == 665) {
x5(2131886414, i3, false);
} else if (j2 == 877 && (i3 == 4 || i3 == 5 || i3 == 6)) {
x5(2131886414, i3, false);
} else if (j2 == 39 && i3 == 1) {
x5(2131886414, i3, false);
} else if (j2 == 129) {
S5(pp.m1(this.v[i3]), pp.m1(this.v[1]), this.U[2].isChecked());
} else if (j2 == 131) {
String m1 = pp.m1(this.v[0]);
if (m1.length() == 0) {
pp.a0(this, 2131887900, new Object[0]);
} else {
String E2 = pp.E2(m1);
if (E2 == null) {
pp.a0(this, 2131887726, new Object[0]);
} else {
try {
startActivityForResult(com.joaomgcd.taskerm.util.ph.s0(new File(E2), this, "text/javascript", "android.intent.action.VIEW", new ik.l() {
@Override
public final Object invoke(Object obj) {
vj.e0 z42;
z42 = ActionEdit.z4((String) obj);
return z42;
}
}, true, "JavaScript Editor"), 59);
} catch (Exception unused) {
pp.b0(this, "no editor", new Object[0]);
}
}
}
} else {
u2(this.N0.j0(i3).A0(this));
}
}
c2 = c3;
}
} else {
c2 = 334;
if (view == this.X[i3]) {
if (this.N0.t0(i3) == 2) {
this.D = i3;
boolean z5 = j2 == 20 || j2 == 173;
boolean z6 = j2 == 20;
if (j2 == 252) {
arrayList = mh.n(getPackageManager());
z2 = true;
z3 = true;
f1Var = null;
} else if (j2 == 173) {
net.dinglisch.android.taskerm.d M = this.N0.M(1);
f1 f1Var2 = new f1();
for (int i4 = 0; i4 < M.z(); i4++) {
f1Var2.Y0(M.I(i4), M.s(i4), M.y(i4));
}
f1Var = f1Var2;
arrayList = null;
z2 = false;
z3 = false;
} else {
arrayList = null;
z2 = true;
z3 = true;
f1Var = null;
}
M5(AppSelect.G0(this, z2, z6, false, false, z5, z3, arrayList, f1Var), 6);
} else if (this.N0.t0(i3) == 1) {
A5(i3, 2131887549);
} else if (this.N0.t0(i3) == 4) {
this.D = i3;
int i5 = j2 != 138 ? 292 : 260;
if (this.P0 == b0.None && j2 != 138) {
i5 |= 8;
}
if (j2 == 138) {
i2 = i5 | 512;
} else {
if (j2 != 188) {
i5 |= 128;
}
if (z0.e1(j2)) {
if (!ud.c0.c()) {
i5 |= 512;
}
i5 |= 6144;
}
i2 = i5 | 83;
}
M5(ImageSelect.s0(this, i2), 58);
}
} else if (view == this.e0[i3]) {
j4(i3);
} else if (view == this.f0[i3]) {
m4(i3);
} else if (view == this.a0[i3]) {
this.P[i3].incrementProgressBy(z0.M0(j2, i3));
SeekBar seekBar = this.P[i3];
onProgressChanged(seekBar, seekBar.getProgress(), true);
} else if (view == this.b0[i3]) {
this.P[i3].incrementProgressBy(0 - z0.M0(j2, i3));
SeekBar seekBar2 = this.P[i3];
onProgressChanged(seekBar2, seekBar2.getProgress(), true);
} else if (view.equals(this.c0[i3])) {
this.D = 0;
if (z0.f1(j2)) {
this.A.p3(new com.joaomgcd.taskerm.util.f() {
@Override
public final void a(Object obj) {
ActionEdit.this.A4(j2, (ArrayList) obj);
}
});
} else {
V4(i3);
}
} else if (view == this.d0[i3]) {
String w1 = w1(this.N0, i3);
n5(i3);
v1(this.N0, i3, w1, t4(i3));
T5(j2, i3);
} else {
MyCheckBox myCheckBox = this.U[i3];
if (view == myCheckBox) {
if (z0.H(j2) != -1) {
this.N0.o1(i3, myCheckBox.isChecked());
J3();
}
this.m0.E5(j2, i3);
if (j2 == 47 && i3 == 5 && !myCheckBox.isChecked()) {
xo.e(this, 1, 2131890983, 1);
} else if (j2 == 15 && i3 == 4) {
this.N0.o1(4, this.U[4].isChecked());
n5(0);
}
if (j2 == 123 && i3 == 8) {
this.N0.o1(2, false);
n5(2);
} else if (j2 == 376 && i3 == 2) {
this.N0.o1(2, this.U[2].isChecked());
n5(3);
} else if (j2 == 113 && i3 == 1) {
xo.e(this, 1, 2131890904, 1);
} else if (j2 == 810 && i3 == 1) {
xo.e(this, 1, 2131890872, 1);
} else if (j2 == 443 && i3 == 1) {
n5(2);
} else if (j2 == 104 && i3 == 2) {
n5(1);
n5(3);
} else if (j2 == 598 && i3 == 6) {
n5(7);
} else if (j2 == 547 && i3 == 3) {
n5(5);
}
if (j2 == 130 && i3 == 6) {
n5(7);
} else if (j2 == 443 && i3 == 3 && myCheckBox.isChecked()) {
this.m0.p0(com.joaomgcd.taskerm.dialog.a.E3(this));
} else if (j2 == 41 && !pp.w1(getPackageManager(), "sms")) {
xo.e(this, 1, 2131890931, 1);
} else if ((j2 == 18 && i3 == 1) || ((j2 == 667 && i3 == 9) || ((j2 == 412 && i3 == 3) || ((j2 == 123 && i3 == 2) || ((j2 == 406 && i3 == 2) || ((j2 == 404 && i3 == 2) || ((j2 == 405 && i3 == 2) || ((j2 == 400 && i3 == 2) || ((j2 == 409 && i3 == 2) || ((j2 == 408 && i3 == 2) || this.m0.D4(i3))))))))))) {
if (myCheckBox.isChecked()) {
this.m0.q0(p5.r(this), new yi.d() {
@Override
public final void accept(Object obj) {
ActionEdit.this.x4(i3, j2, (Boolean) obj);
}
});
}
} else if (!this.m0.P3(i3, myCheckBox.isChecked())) {
D1(i3, false);
}
}
}
}
i3++;
}
c2 = 334;
i3++;
}
}
@Override
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
J3();
getActionBar().hide();
net.dinglisch.android.taskerm.a.T(this, true);
getActionBar().show();
invalidateOptionsMenu();
super.onConfigurationChanged(configuration);
}
@Override
public void onCreate(Bundle bundle) {
super.p1(bundle, 2131492894);
G1(false, 2131891300, 2131890068);
this.E0 = new jl();
this.t0 = (EditText) findViewById(2131297024);
this.u0 = (CheckBox) findViewById(2131297022);
this.v0 = (EditText) findViewById(2131297303);
this.w0 = (EditText) findViewById(2131297306);
this.x0 = (ImageButton) findViewById(2131296553);
this.y0 = (ImageButton) findViewById(2131296554);
this.z0 = (ImageButton) findViewById(2131296556);
this.A0 = (ImageButton) findViewById(2131296555);
this.u0.setOnCheckedChangeListener(this.V0);
this.B0 = (LinearLayout) findViewById(2131297025);
this.C0 = (LinearLayout) findViewById(2131297305);
this.D0 = (LinearLayout) findViewById(2131297308);
q1(true);
((TextView) findViewById(2131297712)).setText(oh.g(this, 2131889723, new Object[0]) + " ");
this.r0 = (CheckBox) findViewById(2131296782);
this.s0 = (LinearLayout) findViewById(2131296784);
pp.M2(this, 2131296783, 2131889545);
pp.M2(this, 2131297304, 2131890224);
pp.M2(this, 2131297307, 2131890229);
this.G0 = (LinearLayout) findViewById(2131297062);
ListView listView = (ListView) findViewById(2131297060);
this.H0 = listView;
listView.setOnTouchListener(new s());
this.H0.setChoiceMode(3);
this.H0.setItemsCanFocus(false);
this.H0.setOnItemClickListener(new t());
ImageView imageView = (ImageView) findViewById(2131296538);
this.n0 = imageView;
if (imageView != null) {
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
ActionEdit.this.C4(view);
}
});
if (fp.e0()) {
this.n0.setColorFilter(fp.L(this), PorterDuff.Mode.SRC_IN);
}
}
MyScrollView myScrollView = (MyScrollView) findViewById(2131296768);
this.F0 = myScrollView;
x1(myScrollView);
t1(17, 90111);
for (int i2 = 0; i2 < 17; i2++) {
this.Z[i2].setOnClickListener(this);
this.a0[i2].setOnClickListener(this);
this.b0[i2].setOnClickListener(this);
this.d0[i2].setOnClickListener(this);
this.U[i2].setOnClickListener(this);
this.Y[i2].setOnClickListener(this);
this.c0[i2].setOnClickListener(this);
}
this.v[3].addTextChangedListener(this);
this.v[6].addTextChangedListener(this);
this.v0.addTextChangedListener(new u());
this.U[1].setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public final void onCheckedChanged(CompoundButton compoundButton, boolean z2) {
ActionEdit.this.D4(compoundButton, z2);
}
});
if (bundle == null) {
this.Q0 = getIntent().getExtras();
} else {
this.Q0 = bundle.getBundle("savedState");
this.S0 = bundle.getString("ilabel");
if (bundle.containsKey("ttsv")) {
a1 = bundle.getStringArrayList("ttsv");
}
if (bundle.containsKey("ttse")) {
b1 = bundle.getInt("ttse");
}
}
Bundle bundle2 = this.Q0;
if (bundle2 == null) {
return;
}
this.O0 = bundle2.getInt("actioncode", -1);
setTitle(oh.g(this, 2131886724, new Object[0]));
if (bundle2.containsKey("raf")) {
this.P0 = b0.valueOf(bundle2.getString("raf"));
}
this.R0 = bundle2.getStringArrayList("lbl");
this.T0 = bundle2.getInt("noa");
if (bundle2.containsKey("sc")) {
this.I0 = bundle2.getString("sc");
this.J0 = bundle2.getStringArrayList("el");
}
if (bundle2.containsKey("dsn")) {
this.K0 = bundle2.getStringArrayList("dsn");
}
int i3 = bundle2.getInt("actionindex", -1);
String string = bundle2.getString("actionsearch");
Bundle bundle3 = bundle2.getBundle("aci");
if (i3 != -1) {
this.N0 = new net.dinglisch.android.taskerm.c(i3);
k5();
n5(-1);
i4(this.N0.j(), string);
L3();
} else if (bundle3 != null) {
net.dinglisch.android.taskerm.c cVar = new net.dinglisch.android.taskerm.c(new ii(bundle3));
this.N0 = cVar;
if (bundle == null) {
this.S0 = cVar.S0() ? this.N0.v0() : null;
}
H3();
k5();
n5(-1);
L3();
int j2 = this.N0.j();
if (!(z0.q(j2) ? xo.e(this, 1, 2131890850, 1) : false) && j2 == 551) {
xo.e(this, 0, 2131890918, 2);
}
F3();
} else if (bundle == null) {
this.D = -1;
s5();
}
n4();
o5();
this.m0.g0();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
net.dinglisch.android.taskerm.a.M(this, 8, 2131891136, menu);
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar != null && cVar.r0() != null) {
net.dinglisch.android.taskerm.a.v(this, 7777, menu);
}
return super.r1(menu, 2131888892, 2131888748);
}
@Override
public void onDestroy() {
super.onDestroy();
N3();
}
@Override
public void onItemSelected(android.widget.AdapterView<?> r17, android.view.View r18, int r19, long r20) {
throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.ActionEdit.onItemSelected(android.widget.AdapterView, android.view.View, int, long):void");
}
@Override
public boolean onKeyDown(int i2, KeyEvent keyEvent) {
if (i2 != 4 || d5()) {
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 == 6) {
E3();
return true;
}
if (itemId == 8) {
this.D = -1;
s5();
return true;
}
if (itemId == 7777) {
if (this.N0.r0() != null) {
this.m0.q0(com.joaomgcd.taskerm.util.ac.Y0(this), new yi.d() {
@Override
public final void accept(Object obj) {
ActionEdit.this.E4((Boolean) obj);
}
});
}
return true;
}
if (itemId != 16908332) {
return s1(menuItem, "help/ah_index.html", "activity_actionedit.html");
}
d5();
return true;
}
@Override
protected void onPause() {
o7.f("ActionEdit", "onpause");
super.onPause();
this.m0.Q3();
b5();
if (this.p0 != null) {
Q5();
}
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar != null) {
e5(false, cVar.j());
}
if (this.P0 == b0.None || this.C) {
return;
}
if (this.L0 || isFinishing()) {
K5();
}
}
@Override
public void onProgressChanged(SeekBar seekBar, int i2, boolean z2) {
String num;
int i3;
if (z2) {
seekBar.requestFocus();
if (this.P == null) {
o7.k("ActionEdit", "onProgressChanged: null seekers");
return;
}
if (this.R == null) {
o7.k("ActionEdit", "onProgressChanged: null seekers");
return;
}
if (this.N0 == null) {
o7.k("ActionEdit", "onProgressChanged: null action");
return;
}
int i4 = 0;
while (i4 < this.N0.e0()) {
SeekBar seekBar2 = this.P[i4];
if (seekBar2 == null) {
o7.k("ActionEdit", "onProgressChanged: null seeker index " + i4);
} else if (this.R[i4] == null) {
o7.k("ActionEdit", "onProgressChanged: null text view index " + i4);
} else if (seekBar.equals(seekBar2)) {
int j2 = this.N0.j();
String T3 = T3(i4, j2);
int progress = seekBar.getProgress();
int d0 = t4(i4) ? 1 : z0.d0(j2, i4);
if (d0 > Integer.MIN_VALUE) {
progress += d0;
}
T5(j2, i4);
boolean z3 = i4 == 2;
if (z0.H(j2) != -1 && i2 + d0 == 600) {
num = oh.g(this, 2131891228, new Object[0]);
} else if (z0.f1(j2)) {
num = i2 == 0 ? oh.g(this, 2131891230, new Object[0]) : d0 + i2 == z0.c0(j2, i4) ? oh.g(this, 2131891228, new Object[0]) : Integer.toString(progress);
} else if (j2 == 47 && (i4 == 3 || z3)) {
if (progress == 100) {
i3 = 2131891159;
} else if (progress == 0) {
if (!z3) {
i3 = 2131891287;
}
i3 = 2131891212;
} else if (progress == 200) {
if (!z3) {
i3 = 2131891154;
}
i3 = 2131891256;
} else if (progress < 100) {
if (!z3) {
i3 = 2131891298;
}
i3 = 2131891212;
} else {
if (!z3) {
i3 = 2131891176;
}
i3 = 2131891256;
}
num = oh.g(this, i3, new Object[0]);
} else {
num = Integer.toString(progress);
}
if (T3 != null) {
num = num + T3;
}
this.R[i4].setText(num);
int y0 = z0.y0(j2);
if (y0 != -1) {
try {
AudioManager audioManager = (AudioManager) gi.d(this, "audio", "ActionEdit", "opc");
if (audioManager != null) {
e5(true, j2);
pp.K2(this, y0);
audioManager.setStreamVolume(y0, progress, 4);
}
} catch (SecurityException unused) {
z5(true);
}
}
this.m0.a3(i4, i2);
return;
}
i4++;
}
}
}
@Override
public void onRequestPermissionsResult(int i2, String[] strArr, int[] iArr) {
super.onRequestPermissionsResult(i2, strArr, iArr);
this.m0.x1(i2, strArr, iArr);
}
@Override
protected void onResume() {
super.onResume();
this.m0.S3();
}
@Override
protected void onSaveInstanceState(Bundle bundle) {
super.onSaveInstanceState(bundle);
o7.f("ActionEdit", "OSIS");
Bundle bundle2 = this.Q0;
if (bundle2 == null) {
return;
}
if (this.N0 != null) {
g5();
bundle2.putBundle("aci", this.N0.X(0).c0());
}
bundle2.putInt("actioncode", this.O0);
bundle2.putInt("actionindex", -1);
String str = this.I0;
if (str != null) {
bundle.putString("sc", str);
bundle.putStringArrayList("el", this.J0);
}
ArrayList<String> arrayList = this.K0;
if (arrayList != null) {
bundle.putStringArrayList("dsn", arrayList);
}
bundle.putString("raf", this.P0.toString());
bundle.putBundle("savedState", bundle2);
bundle.putString("ilabel", this.S0);
bundle.putStringArrayList("ttsv", a1);
bundle.putInt("ttse", b1);
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
EditText N0 = N0(this.N0);
if (D2(N0)) {
N0.clearFocus();
}
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i2, int i3, int i4) {
}
@Override
public void onUserLeaveHint() {
super.onUserLeaveHint();
if (this.P0 == b0.None || this.C) {
return;
}
this.L0 = true;
}
public void p5() {
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar == null) {
return;
}
this.m0.e4(cVar.n0(), new ik.a() {
@Override
public final Object e() {
vj.e0 N4;
N4 = ActionEdit.this.N4();
return N4;
}
});
}
@Override
public boolean y0() {
net.dinglisch.android.taskerm.c cVar = this.N0;
if (cVar == null) {
return false;
}
return z0.b(cVar.j());
}
}