正在查看: Tasker v6.6.3 应用的 ActivityAIChat.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tasker v6.6.3 应用的 ActivityAIChat.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.joaomgcd.oldtaskercompat.aigenerator.ui;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import androidx.activity.ComponentActivity;
import androidx.compose.ui.platform.AndroidCompositionLocals_androidKt;
import androidx.core.app.ShareCompat;
import androidx.lifecycle.v0;
import com.joaomgcd.oldtaskercompat.aigenerator.ui.ActivityAIChat;
import com.joaomgcd.taskerm.action.input.GenericActionPickInput;
import com.joaomgcd.taskerm.util.b7;
import com.joaomgcd.taskerm.util.l7;
import com.joaomgcd.taskerm.util.pe;
import d5.a;
import java.io.OutputStream;
import java.util.List;
import v0.m;
public final class ActivityAIChat extends Hilt_ActivityAIChat {
@bk.f(c = "com.joaomgcd.oldtaskercompat.aigenerator.ui.ActivityAIChat$onCreate$1$1$2$1", f = "ActivityAIChat.kt", l = {143}, m = "invokeSuspend")
static final class a extends bk.m implements ik.p<uk.n0, zj.e<? super vj.e0>, Object> {
int t;
final d5 u;
final Context v;
final ActivityAIChat w;
final b.h<String, Uri> x;
final v0.q1<g3> y;
@bk.f(c = "com.joaomgcd.oldtaskercompat.aigenerator.ui.ActivityAIChat$onCreate$1$1$2$1$1", f = "ActivityAIChat.kt", l = {148, 165}, m = "invokeSuspend")
static final class C0043a extends bk.m implements ik.p<d3, zj.e<? super vj.e0>, Object> {
int t;
Object u;
final Context v;
final ActivityAIChat w;
final d5 x;
final b.h<String, Uri> y;
final v0.q1<g3> z;
C0043a(Context context, ActivityAIChat activityAIChat, d5 d5Var, b.h<String, Uri> hVar, v0.q1<g3> q1Var, zj.e<? super C0043a> eVar) {
super(2, eVar);
this.v = context;
this.w = activityAIChat;
this.x = d5Var;
this.y = hVar;
this.z = q1Var;
}
public static final vj.e0 C(d5 d5Var, d3 d3Var, String str) {
d5Var.w1().d().n(str, ((f3) d3Var).a());
return vj.e0.a;
}
public final Object n(d3 d3Var, zj.e<? super vj.e0> eVar) {
return m(d3Var, eVar).t(vj.e0.a);
}
public final zj.e<vj.e0> m(Object obj, zj.e<?> eVar) {
C0043a c0043a = new C0043a(this.v, this.w, this.x, this.y, this.z, eVar);
c0043a.u = obj;
return c0043a;
}
public final Object t(Object obj) {
final d3 d3Var = (d3) this.u;
Object c = ak.b.c();
int i = this.t;
try {
try {
} catch (Throwable unused) {
l7.e1(b7.j6(2131891156, this.v, new Object[0]), this.v);
}
} catch (Exception e) {
l7.e1("Error importing: " + e.getMessage(), this.v);
f3 f3Var = (f3) d3Var;
this.x.w1().d().n((Object) null, f3Var.a());
this.x.w1().m().invoke(f3Var.a().e());
}
if (i != 0) {
if (i == 1) {
vj.s.b(obj);
this.x.E1((String) obj);
return vj.e0.a;
}
if (i != 2) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
vj.s.b(obj);
this.x.w1().d().n((Object) null, ((f3) d3Var).a());
this.x.w1().m().invoke(((f3) d3Var).a().e());
return vj.e0.a;
}
vj.s.b(obj);
if (d3Var instanceof j3) {
l7.e1(((j3) d3Var).a(), this.v);
} else if (d3Var instanceof h3) {
ActivityAIChat activityAIChat = this.w;
String c2 = ((h3) d3Var).a().c();
String b = ((h3) d3Var).a().b();
String a = ((h3) d3Var).a().a();
List<String> d = ((h3) d3Var).a().d();
this.u = bk.l.a(d3Var);
this.t = 1;
obj = activityAIChat.S(c2, b, a, d, this);
if (obj == c) {
return c;
}
this.x.E1((String) obj);
} else if (d3Var instanceof f3) {
ComponentActivity componentActivity = this.w;
String b2 = ((f3) d3Var).b();
final d5 d5Var = this.x;
ti.r<pe> v0 = com.joaomgcd.taskerm.datashare.export.d.v0(componentActivity, b2, new ik.l() {
public final Object invoke(Object obj2) {
vj.e0 C;
C = ActivityAIChat.a.C0043a.C(d5.this, d3Var, (String) obj2);
return C;
}
});
this.u = d3Var;
this.t = 2;
if (ze.m.k(v0, this) == c) {
return c;
}
this.x.w1().d().n((Object) null, ((f3) d3Var).a());
this.x.w1().m().invoke(((f3) d3Var).a().e());
} else if (d3Var instanceof g3) {
g3 g3Var = (g3) d3Var;
ActivityAIChat.X(this.z, g3Var);
this.y.a(g3Var.b());
} else {
if (!(d3Var instanceof e3)) {
throw new vj.o();
}
ActivityAIChat.V(this.x, this.w);
}
return vj.e0.a;
}
}
a(d5 d5Var, Context context, ActivityAIChat activityAIChat, b.h<String, Uri> hVar, v0.q1<g3> q1Var, zj.e<? super a> eVar) {
super(2, eVar);
this.u = d5Var;
this.v = context;
this.w = activityAIChat;
this.x = hVar;
this.y = q1Var;
}
public final zj.e<vj.e0> m(Object obj, zj.e<?> eVar) {
return new a(this.u, this.v, this.w, this.x, this.y, eVar);
}
public final Object t(Object obj) {
Object c = ak.b.c();
int i = this.t;
if (i == 0) {
vj.s.b(obj);
xk.y<d3> z1 = this.u.z1();
C0043a c0043a = new C0043a(this.v, this.w, this.u, this.x, this.y, null);
this.t = 1;
if (xk.g.g(z1, c0043a, this) == c) {
return c;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
vj.s.b(obj);
}
return vj.e0.a;
}
public final Object n(uk.n0 n0Var, zj.e<? super vj.e0> eVar) {
return m(n0Var, eVar).t(vj.e0.a);
}
}
@bk.f(c = "com.joaomgcd.oldtaskercompat.aigenerator.ui.ActivityAIChat$onCreate$1$1$saveFileLauncher$1$1$1", f = "ActivityAIChat.kt", l = {104}, m = "invokeSuspend")
static final class b extends bk.m implements ik.p<uk.n0, zj.e<? super vj.e0>, Object> {
int t;
final Context u;
final Uri v;
final g3 w;
final ActivityAIChat x;
final v0.q1<g3> y;
@bk.f(c = "com.joaomgcd.oldtaskercompat.aigenerator.ui.ActivityAIChat$onCreate$1$1$saveFileLauncher$1$1$1$1", f = "ActivityAIChat.kt", l = {109}, m = "invokeSuspend")
static final class a extends bk.m implements ik.l<zj.e<? super vj.e0>, Object> {
int t;
final Context u;
final Uri v;
final g3 w;
final ActivityAIChat x;
final v0.q1<g3> y;
@bk.f(c = "com.joaomgcd.oldtaskercompat.aigenerator.ui.ActivityAIChat$onCreate$1$1$saveFileLauncher$1$1$1$1$2", f = "ActivityAIChat.kt", l = {}, m = "invokeSuspend")
static final class C0044a extends bk.m implements ik.l<zj.e<? super vj.e0>, Object> {
int t;
final Context u;
final Uri v;
final ActivityAIChat w;
C0044a(Context context, Uri uri, ActivityAIChat activityAIChat, zj.e<? super C0044a> eVar) {
super(1, eVar);
this.u = context;
this.v = uri;
this.w = activityAIChat;
}
public final Object invoke(zj.e<? super vj.e0> eVar) {
return z(eVar).t(vj.e0.a);
}
public final Object t(Object obj) {
ak.b.c();
if (this.t != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
vj.s.b(obj);
Intent addFlags = new ShareCompat.IntentBuilder(this.u).setType("text/plain").setStream(this.v).setSubject(this.w.getString(2131890733)).getIntent().addFlags(1);
jk.p.h(addFlags, "addFlags(...)");
this.u.startActivity(Intent.createChooser(addFlags, this.w.getString(2131890575)));
return vj.e0.a;
}
public final zj.e<vj.e0> z(zj.e<?> eVar) {
return new C0044a(this.u, this.v, this.w, eVar);
}
}
a(Context context, Uri uri, g3 g3Var, ActivityAIChat activityAIChat, v0.q1<g3> q1Var, zj.e<? super a> eVar) {
super(1, eVar);
this.u = context;
this.v = uri;
this.w = g3Var;
this.x = activityAIChat;
this.y = q1Var;
}
public final Object invoke(zj.e<? super vj.e0> eVar) {
return z(eVar).t(vj.e0.a);
}
public final Object t(Object obj) {
Object c = ak.b.c();
int i = this.t;
if (i == 0) {
vj.s.b(obj);
OutputStream openOutputStream = this.u.getContentResolver().openOutputStream(this.v);
if (openOutputStream != null) {
try {
byte[] bytes = this.w.a().getBytes(sk.d.b);
jk.p.h(bytes, "getBytes(...)");
openOutputStream.write(bytes);
vj.e0 e0Var = vj.e0.a;
gk.b.a(openOutputStream, (Throwable) null);
} finally {
}
}
ActivityAIChat activityAIChat = this.x;
Context context = this.u;
v0.q1<g3> q1Var = this.y;
uk.m2 c2 = uk.d1.c();
C0044a c0044a = new C0044a(this.u, this.v, this.x, null);
this.t = 1;
if (b.C(activityAIChat, context, q1Var, c2, c0044a, this) == c) {
return c;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
vj.s.b(obj);
}
return vj.e0.a;
}
public final zj.e<vj.e0> z(zj.e<?> eVar) {
return new a(this.u, this.v, this.w, this.x, this.y, eVar);
}
}
@bk.f(c = "com.joaomgcd.oldtaskercompat.aigenerator.ui.ActivityAIChat$onCreate$1$1$saveFileLauncher$1$1$1$runSafely$2", f = "ActivityAIChat.kt", l = {91, 97, 97, 97}, m = "invokeSuspend")
static final class C0045b extends bk.m implements ik.p<uk.n0, zj.e<? super vj.e0>, Object> {
Object t;
int u;
final ik.l<zj.e<? super vj.e0>, Object> v;
final ActivityAIChat w;
final Context x;
final v0.q1<g3> y;
@bk.f(c = "com.joaomgcd.oldtaskercompat.aigenerator.ui.ActivityAIChat$onCreate$1$1$saveFileLauncher$1$1$1$runSafely$2$1", f = "ActivityAIChat.kt", l = {}, m = "invokeSuspend")
static final class a extends bk.m implements ik.p<uk.n0, zj.e<? super vj.e0>, Object> {
int t;
final v0.q1<g3> u;
a(v0.q1<g3> q1Var, zj.e<? super a> eVar) {
super(2, eVar);
this.u = q1Var;
}
public final zj.e<vj.e0> m(Object obj, zj.e<?> eVar) {
return new a(this.u, eVar);
}
public final Object t(Object obj) {
ak.b.c();
if (this.t != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
vj.s.b(obj);
ActivityAIChat.X(this.u, null);
return vj.e0.a;
}
public final Object n(uk.n0 n0Var, zj.e<? super vj.e0> eVar) {
return m(n0Var, eVar).t(vj.e0.a);
}
}
C0045b(ik.l<? super zj.e<? super vj.e0>, ? extends Object> lVar, ActivityAIChat activityAIChat, Context context, v0.q1<g3> q1Var, zj.e<? super C0045b> eVar) {
super(2, eVar);
this.v = lVar;
this.w = activityAIChat;
this.x = context;
this.y = q1Var;
}
public final zj.e<vj.e0> m(Object obj, zj.e<?> eVar) {
return new C0045b(this.v, this.w, this.x, this.y, eVar);
}
public final Object t(Object obj) {
Object c = ak.b.c();
int i = this.u;
int i2 = 4;
try {
} catch (Throwable th) {
try {
th.printStackTrace();
l7.e1(this.w.getString(2131887746, th.getMessage()), this.x);
uk.m2 c2 = uk.d1.c();
a aVar = new a(this.y, null);
this.u = 3;
if (uk.i.g(c2, aVar, this) == c) {
return c;
}
} catch (Throwable th2) {
uk.m2 c3 = uk.d1.c();
a aVar2 = new a(this.y, null);
this.t = th2;
this.u = i2;
if (uk.i.g(c3, aVar2, this) == c) {
return c;
}
throw th2;
}
}
if (i == 0) {
vj.s.b(obj);
ik.l<zj.e<? super vj.e0>, Object> lVar = this.v;
this.u = 1;
if (lVar.invoke(this) == c) {
return c;
}
} else {
if (i != 1) {
if (i == 2 || i == 3) {
vj.s.b(obj);
return vj.e0.a;
}
if (i != 4) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
Throwable th3 = (Throwable) this.t;
vj.s.b(obj);
throw th3;
}
vj.s.b(obj);
}
uk.m2 c4 = uk.d1.c();
i2 = this.y;
a aVar3 = new a(i2, null);
this.u = 2;
if (uk.i.g(c4, aVar3, this) == c) {
return c;
}
return vj.e0.a;
}
public final Object n(uk.n0 n0Var, zj.e<? super vj.e0> eVar) {
return m(n0Var, eVar).t(vj.e0.a);
}
}
b(Context context, Uri uri, g3 g3Var, ActivityAIChat activityAIChat, v0.q1<g3> q1Var, zj.e<? super b> eVar) {
super(2, eVar);
this.u = context;
this.v = uri;
this.w = g3Var;
this.x = activityAIChat;
this.y = q1Var;
}
public static final Object C(ActivityAIChat activityAIChat, Context context, v0.q1<g3> q1Var, zj.i iVar, ik.l<? super zj.e<? super vj.e0>, ? extends Object> lVar, zj.e<? super vj.e0> eVar) {
Object g = uk.i.g(iVar, new C0045b(lVar, activityAIChat, context, q1Var, null), eVar);
return g == ak.b.c() ? g : vj.e0.a;
}
public final Object n(uk.n0 n0Var, zj.e<? super vj.e0> eVar) {
return m(n0Var, eVar).t(vj.e0.a);
}
public final zj.e<vj.e0> m(Object obj, zj.e<?> eVar) {
return new b(this.u, this.v, this.w, this.x, this.y, eVar);
}
public final Object t(Object obj) {
Object c = ak.b.c();
int i = this.t;
if (i == 0) {
vj.s.b(obj);
ActivityAIChat activityAIChat = this.x;
Context context = this.u;
v0.q1<g3> q1Var = this.y;
uk.j0 b = uk.d1.b();
a aVar = new a(this.u, this.v, this.w, this.x, this.y, null);
this.t = 1;
if (C(activityAIChat, context, q1Var, b, aVar, this) == c) {
return c;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
vj.s.b(obj);
}
return vj.e0.a;
}
}
public final Object S(String str, String str2, String str3, List<String> list, zj.e<? super String> eVar) {
ti.r c;
c = GenericActionPickInput.Companion.c(this, str, (r18 & 4) != 0 ? null : str2, (r18 & 8) != 0 ? null : str3, (r18 & 16) != 0 ? null : null, (r18 & 32) != 0 ? false : false, (r18 & 64) != 0 ? null : null);
return ze.m.k(c, eVar);
}
public static final vj.e0 T(final ActivityAIChat activityAIChat, v0.m mVar, int i) {
if ((i & 3) == 2 && mVar.v()) {
mVar.C();
} else {
if (v0.p.J()) {
v0.p.S(1635130669, i, -1, "com.joaomgcd.oldtaskercompat.aigenerator.ui.ActivityAIChat.onCreate.<anonymous> (ActivityAIChat.kt:72)");
}
kd.g.d(false, false, d1.c.e(-2055123869, true, new ik.p() {
public final Object n(Object obj, Object obj2) {
vj.e0 U;
U = ActivityAIChat.U(ActivityAIChat.this, (v0.m) obj, ((Integer) obj2).intValue());
return U;
}
}, mVar, 54), mVar, 384, 3);
if (v0.p.J()) {
v0.p.R();
}
}
return vj.e0.a;
}
public static final vj.e0 U(final ActivityAIChat activityAIChat, v0.m mVar, int i) {
if ((i & 3) == 2 && mVar.v()) {
mVar.C();
} else {
if (v0.p.J()) {
v0.p.S(-2055123869, i, -1, "com.joaomgcd.oldtaskercompat.aigenerator.ui.ActivityAIChat.onCreate.<anonymous>.<anonymous> (ActivityAIChat.kt:73)");
}
final Context context = (Context) mVar.m(AndroidCompositionLocals_androidKt.g());
mVar.f(1729797275);
androidx.lifecycle.i a2 = e5.a.a.a(mVar, 6);
if (a2 == null) {
throw new IllegalStateException("No ViewModelStoreOwner was provided via LocalViewModelStoreOwner");
}
d5 c = e5.c.c(jk.k0.b(d5.class), a2, (String) null, (v0.c) null, a2 instanceof androidx.lifecycle.i ? a2.g() : a.a.b, mVar, 0, 0);
mVar.R();
final d5 d5Var = c;
Object g = mVar.g();
m.a aVar = v0.m.a;
if (g == aVar.a()) {
g = v0.g3.j((Object) null, (v0.f3) null, 2, (Object) null);
mVar.M(g);
}
final v0.q1 q1Var = (v0.q1) g;
e.b bVar = new e.b("text/plain");
boolean l = mVar.l(activityAIChat) | mVar.l(context);
Object g2 = mVar.g();
if (l || g2 == aVar.a()) {
g2 = new ik.l() {
public final Object invoke(Object obj) {
vj.e0 Y;
Y = ActivityAIChat.Y(ActivityAIChat.this, context, q1Var, (Uri) obj);
return Y;
}
};
mVar.M(g2);
}
b.h a3 = b.c.a(bVar, (ik.l) g2, mVar, 0);
boolean l2 = mVar.l(d5Var) | mVar.l(activityAIChat);
Object g3 = mVar.g();
if (l2 || g3 == aVar.a()) {
g3 = new ik.a() {
public final Object e() {
vj.e0 Z;
Z = ActivityAIChat.Z(d5.this, activityAIChat);
return Z;
}
};
mVar.M(g3);
}
b.d.a(false, (ik.a) g3, mVar, 0, 1);
boolean l3 = mVar.l(d5Var) | mVar.l(context) | mVar.l(activityAIChat) | mVar.l(a3);
Object g4 = mVar.g();
if (l3 || g4 == aVar.a()) {
a aVar2 = new a(d5Var, context, activityAIChat, a3, q1Var, null);
mVar.M(aVar2);
g4 = aVar2;
}
v0.p0.e(d5Var, (ik.p) g4, mVar, 0);
a1.G0(d5Var, mVar, 0);
if (v0.p.J()) {
v0.p.R();
}
}
return vj.e0.a;
}
public static final void V(d5 d5Var, ActivityAIChat activityAIChat) {
d5Var.w1().k().e();
activityAIChat.setResult(-1);
activityAIChat.finish();
}
private static final g3 W(v0.q1<g3> q1Var) {
return (g3) q1Var.getValue();
}
public static final void X(v0.q1<g3> q1Var, g3 g3Var) {
q1Var.setValue(g3Var);
}
public static final vj.e0 Y(ActivityAIChat activityAIChat, Context context, v0.q1 q1Var, Uri uri) {
g3 W = W(q1Var);
if (uri == null || W == null) {
l7.e1(activityAIChat.getString(2131890270), context);
X(q1Var, null);
} else {
uk.i.d(androidx.lifecycle.s.a(activityAIChat), uk.d1.b(), (uk.p0) null, new b(context, uri, W, activityAIChat, q1Var, null), 2, (Object) null);
}
return vj.e0.a;
}
public static final vj.e0 Z(d5 d5Var, ActivityAIChat activityAIChat) {
V(d5Var, activityAIChat);
return vj.e0.a;
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
b.e.b(this, (v0.r) null, d1.c.c(1635130669, true, new ik.p() {
public final Object n(Object obj, Object obj2) {
vj.e0 T;
T = ActivityAIChat.T(ActivityAIChat.this, (v0.m) obj, ((Integer) obj2).intValue());
return T;
}
}), 1, (Object) null);
}
}