正在查看: Tasker v6.5.11 应用的 ServiceWebUI.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tasker v6.5.11 应用的 ServiceWebUI.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.joaomgcd.tasker2024.webui;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import com.joaomgcd.tasker2024.edittask.repository.RepositoryEditTask;
import com.joaomgcd.tasker2024.webui.ServiceWebUI;
import com.joaomgcd.tasker2024.webui.ServiceWebUI$requestHandler$2;
import com.joaomgcd.tasker2024.webui.WebUIAction;
import com.joaomgcd.taskerm.util.x2;
import dg.o0;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import ji.n;
import kotlin.collections.h0;
import lj.e0;
import lj.j;
import lj.k;
import net.dinglisch.android.taskerm.kr;
import net.dinglisch.android.taskerm.s1;
import xj.l;
import yj.h;
import yj.p;
import yj.q;
public final class ServiceWebUI extends Hilt_ServiceWebUI {
public static final a w = new a(null);
public static final int x = 8;
private mi.b s;
private final j t = k.b(new d());
private final j u = k.b(new ServiceWebUI$requestHandler$2(this));
public RepositoryEditTask.x v;
public static final class a {
public a(h hVar) {
this();
}
public final String a() {
return "http://" + o0.o() + ":8745/";
}
private a() {
}
}
static final class b {
}
static final class c extends q implements xj.a<e0> {
final WebUIAction q;
final WebUIAction.Arg r;
final net.dinglisch.android.taskerm.c s;
c(WebUIAction webUIAction, WebUIAction.Arg arg, net.dinglisch.android.taskerm.c cVar) {
super(0);
this.q = webUIAction;
this.r = arg;
this.s = cVar;
}
public final void a() {
kr s;
RepositoryEditTask p = ServiceWebUI.this.p();
if (p == null || (s = p.s(this.q.getCode(), this.r.getId(), this.r.getValue())) == null) {
return;
}
this.s.k1(this.r.getId(), s);
}
public Object invoke() {
a();
return e0.a;
}
}
static final class d extends q implements xj.a<fg.c> {
static final class a extends q implements l<String, File> {
public static final a i = new a();
a() {
super(1);
}
public final File invoke(String str) {
p.i(str, "it");
return new File(str);
}
}
static final class b extends q implements l<fg.e, e0> {
final ServiceWebUI i;
final fg.c q;
b(ServiceWebUI serviceWebUI, fg.c cVar) {
super(1);
this.i = serviceWebUI;
this.q = cVar;
}
public final void a(fg.e eVar) {
String v = eVar.v();
if (v == null) {
v = "no path";
}
Log.d("Server", v);
ServiceWebUI$requestHandler$2.AnonymousClass1 r = this.i.r();
p.f(eVar);
this.q.m(eVar, r.f(eVar));
}
public Object invoke(Object obj) {
a((fg.e) obj);
return e0.a;
}
}
d() {
super(0);
}
public static final void d(l lVar, Object obj) {
p.i(lVar, "$tmp0");
lVar.invoke(obj);
}
public final fg.c invoke() {
fg.c cVar = new fg.c(ServiceWebUI.this, 8745, 60000, a.i);
ServiceWebUI serviceWebUI = ServiceWebUI.this;
n j = cVar.j();
final b bVar = new b(serviceWebUI, cVar);
serviceWebUI.s = j.i0(new oi.d() {
public final void accept(Object obj) {
ServiceWebUI.d.d(bVar, obj);
}
});
return cVar;
}
}
public final net.dinglisch.android.taskerm.c l(WebUIAction webUIAction) {
net.dinglisch.android.taskerm.c cVar = new net.dinglisch.android.taskerm.c(webUIAction.getCode());
cVar.o(webUIAction.getCondition());
cVar.u1(webUIAction.getLabel());
Iterator<T> it = webUIAction.getArgs().iterator();
while (it.hasNext()) {
x2.U4((l) null, new c(webUIAction, (WebUIAction.Arg) it.next(), cVar), 1, (Object) null);
}
return cVar;
}
public final List<RepositoryEditTask.ActionDescription> m() {
RepositoryEditTask p = p();
if (p != null) {
return p.E();
}
return null;
}
public final List<RepositoryEditTask.ActionCategory> n() {
RepositoryEditTask p = p();
if (p != null) {
return p.K();
}
return null;
}
private final fg.c o() {
return (fg.c) this.t.getValue();
}
public final RepositoryEditTask p() {
return q().d();
}
public final ServiceWebUI$requestHandler$2.AnonymousClass1 r() {
return (ServiceWebUI$requestHandler$2.AnonymousClass1) this.u.getValue();
}
public final WebUIAction s(net.dinglisch.android.taskerm.c cVar, int i) {
RepositoryEditTask.ActionDescriptionArg v;
int j = cVar.j();
String K = cVar.K();
s1 Q = cVar.Q();
String t0 = cVar.t0();
ek.f s = ek.j.s(0, cVar.Y());
ArrayList arrayList = new ArrayList();
h0 it = s.iterator();
while (true) {
WebUIAction.Arg arg = null;
if (!it.hasNext()) {
break;
}
int d2 = it.d();
RepositoryEditTask p = p();
if (p != null && (v = p.v(cVar.j(), d2)) != null) {
net.dinglisch.android.taskerm.j G = cVar.G(d2);
Object w2 = G instanceof net.dinglisch.android.taskerm.j ? G.w() : G instanceof net.dinglisch.android.taskerm.e ? Boolean.valueOf(((net.dinglisch.android.taskerm.e) G).R()) : G instanceof net.dinglisch.android.taskerm.h ? Integer.valueOf(((net.dinglisch.android.taskerm.h) G).v()) : null;
if (w2 != null) {
arg = new WebUIAction.Arg(d2, v.getName(), w2);
}
}
if (arg != null) {
arrayList.add(arg);
}
}
RepositoryEditTask p2 = p();
return new WebUIAction(j, K, arrayList, Q, t0, p2 != null ? p2.z(i) : null, x2.W2(Boolean.valueOf(!cVar.G1())), cVar.r0(), x2.W2(Boolean.valueOf(!cVar.L())), cVar.m0());
}
@Override
public IBinder onBind(Intent intent) {
return (IBinder) t(intent);
}
@Override
public void onCreate() {
super.onCreate();
o().o();
}
@Override
public void onDestroy() {
super.onDestroy();
o().p();
}
public final RepositoryEditTask.x q() {
RepositoryEditTask.x xVar = this.v;
if (xVar != null) {
return xVar;
}
p.z("repositoryFactory");
return null;
}
public Void t(Intent intent) {
p.i(intent, "intent");
return null;
}
}