正在查看: JADUGAR VIP LOADER v3.0 应用的 BinderC0319k1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: JADUGAR VIP LOADER v3.0 应用的 BinderC0319k1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package k0;
import J.C0006g;
import android.app.ActivityClient;
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
import android.app.IActivityManager;
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.ComponentInfo;
import android.content.pm.ResolveInfo;
import android.os.IBinder;
import android.window.WindowContainerToken;
import cn.typedef.zhcn.objio.MNative;
import java.io.Serializable;
import java.lang.ref.WeakReference;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.AbstractCollection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedDeque;
public final class BinderC0319k1 extends AbstractBinderC0372t1 {
public static final BinderC0319k1 b;
public static final ConcurrentHashMap f3192c;
public static final C0290f2 f3193d;
public static final ActivityManager f3194e;
public static final Intent f;
public static final n1.p g;
public static n1.a f3195h;
public static final n1.l f3196i;
public static n1.a f3197j;
public static final C0272c2 f3198k;
static {
BinderC0319k1 binderC0319k1 = new BinderC0319k1();
binderC0319k1.attachInterface(binderC0319k1, "top.bienvenido.mundo.IMundoWindowManagerService");
b = binderC0319k1;
f3192c = new ConcurrentHashMap();
f3193d = new C0290f2();
f3194e = (ActivityManager) AbstractC0321k3.f3200a.getSystemService("activity");
f = new Intent("android.intent.action.MAIN").addCategory("android.intent.category.HOME");
boolean z2 = AbstractC0381u4.f3261i;
g = z2 ? new C0006g(8) : AbstractC0381u4.g ? new C0006g(9) : AbstractC0381u4.f3257c ? new C0006g(10) : new C0006g(11);
f3195h = new H0(1);
f3196i = z2 ? new C0295g1(0) : AbstractC0381u4.g ? new C0295g1(1) : new C0295g1(2);
f3197j = new H0(2);
boolean z3 = AbstractC0381u4.f3260h;
C0272c2 c0272c2 = C0272c2.f3146a;
if (z3) {
try {
Field declaredField = f0.x.x().getDeclaredField("token");
declaredField.setAccessible(true);
if (!Modifier.isStatic(declaredField.getModifiers()) && !declaredField.getType().isPrimitive()) {
c0272c2 = new T1(K0.f3021a.objectFieldOffset(declaredField));
}
c0272c2 = new G1(declaredField, 2);
} catch (Exception unused) {
}
}
f3198k = c0272c2;
}
public static boolean N0(String str, String str2) {
boolean u2;
try {
ActivityInfo X02 = X0(null, str);
if (X02 == null) {
return false;
}
C0290f2 c0290f2 = S.f3061a;
String str3 = X02.processName;
C0290f2 c0290f22 = S.f3062c;
int d2 = S.d(str, str3, str2);
synchronized (c0290f22) {
u2 = c0290f22.f3170t.u(d2);
}
return u2;
} catch (Exception unused) {
return false;
}
}
public static final void O0(IBinder iBinder, boolean z2) {
((IActivityManager) K.f3020a.get()).finishActivity(iBinder, 0, (Intent) null, z2 ? 1 : 0);
}
public static final int P0(IBinder iBinder) {
return ActivityTaskManager.getService().getTaskForActivity(iBinder, false);
}
public static final WindowContainerToken Q0() {
try {
WindowContainerToken windowContainerToken = new WindowContainerToken(new C0271c1());
f3197j = new C0313j1(0, windowContainerToken);
return windowContainerToken;
} catch (Throwable unused) {
return null;
}
}
public static final void R0(IBinder iBinder, boolean z2) {
ActivityTaskManager.getService().finishActivity(iBinder, 0, (Intent) null, z2 ? 1 : 0);
}
public static ActivityManager.RecentTaskInfo S0(ConcurrentLinkedDeque concurrentLinkedDeque) {
ActivityManager.RecentTaskInfo recentTaskInfo = new ActivityManager.RecentTaskInfo();
BinderC0270c0 binderC0270c0 = (BinderC0270c0) concurrentLinkedDeque.peekFirst();
int i2 = binderC0270c0.f;
recentTaskInfo.id = i2;
recentTaskInfo.persistentId = i2;
recentTaskInfo.baseIntent = binderC0270c0.f3144d;
recentTaskInfo.affiliatedTaskId = i2;
if (AbstractC0381u4.b) {
recentTaskInfo.numActivities = 0;
recentTaskInfo.numActivities = concurrentLinkedDeque.size();
ActivityInfo activityInfo = binderC0270c0.f3142a;
recentTaskInfo.baseActivity = new ComponentName(((ComponentInfo) activityInfo).packageName, ((ComponentInfo) activityInfo).name);
ActivityInfo activityInfo2 = ((BinderC0270c0) concurrentLinkedDeque.getLast()).f3142a;
recentTaskInfo.topActivity = new ComponentName(((ComponentInfo) activityInfo2).packageName, ((ComponentInfo) activityInfo2).name);
}
if (AbstractC0381u4.f3260h) {
f3198k.c(recentTaskInfo, f3197j.b());
}
return recentTaskInfo;
}
public static Intent T0(Intent intent, String str, IBinder iBinder, ActivityInfo activityInfo) {
boolean z2;
Object obj;
ActivityInfo activityInfo2;
Object obj2;
Object a2;
try {
a2 = MNative.a(7846, null);
} catch (Throwable unused) {
}
if (a2 == null) {
z2 = false;
if (z2) {
return null;
}
if (activityInfo == null) {
try {
List Z02 = Z0(intent);
if (Z02 != null && !Z02.isEmpty()) {
activityInfo = (ActivityInfo) Z02.get(0);
}
return null;
} catch (Exception unused2) {
}
}
try {
obj = MNative.a(7853, "6b3ddc69c3890068b7c781a2d25e5ac9bba872c4da2a8d60877ec0f66805aa4f4a8a38f1eaf462f3ec9e391ace6e4e3b72c9a9d4");
} catch (Throwable unused3) {
obj = null;
}
Class cls = (Class) obj;
if (cls != null && (activityInfo2 = (ActivityInfo) cls.getConstructor(cls).newInstance(activityInfo)) != null) {
C0290f2 c0290f2 = S.f3061a;
C0388w c2 = S.c(activityInfo2.packageName, activityInfo2.processName, str);
if (c2 == null) {
return null;
}
try {
obj2 = MNative.a(7853, "6b3ddc69c3890061b7c781a2d25e5ac9bba872c4da2a8d60be7d9ad26505c33923fe41b884920df3ece649");
} catch (Throwable unused4) {
obj2 = null;
}
Class cls2 = (Class) obj2;
if (cls2 == null) {
return null;
}
return (Intent) cls2.getConstructor(cls2).newInstance(V0(iBinder, intent, c2, activityInfo2, null));
}
return null;
}
z2 = Boolean.parseBoolean(a2.toString());
if (z2) {
}
}
public static Intent U0(Intent intent, C0388w c0388w, ActivityInfo activityInfo, String str) {
try {
BinderC0270c0 binderC0270c0 = new BinderC0270c0(activityInfo, new WeakReference(null), c0388w, intent);
int i2 = c0388w.f3292e;
int i3 = activityInfo.screenOrientation;
Intent c2 = AbstractC0383v0.c(intent, i2, binderC0270c0, i3 == 0 || i3 == 6 || i3 == 8 || i3 == 11, str);
c2.addFlags(405274624);
return c2;
} catch (Exception unused) {
return f;
}
}
public static Intent V0(IBinder iBinder, Intent intent, C0388w c0388w, ActivityInfo activityInfo, IBinder[] iBinderArr) {
BinderC0270c0 binderC0270c0;
Object obj;
BinderC0270c0 binderC0270c02;
Intent intent2;
Object w2;
?? r17;
boolean z2;
boolean z3;
int i2;
Intent intent3;
boolean z4;
?? r8;
Intent intent4;
String str;
String str2;
Constructor constructor;
C0388w c0388w2 = c0388w;
if (iBinder != null) {
try {
binderC0270c0 = (BinderC0270c0) f3192c.get(iBinder);
} catch (Exception unused) {
return null;
}
} else {
binderC0270c0 = null;
}
try {
obj = MNative.a(7853, "6b3ddc69c389006ab7c781a2d25e5ac9bba872c4da2a8d60b47c83c7641fa65757b020d5e1920df3ec9e391ace6e4e3b0ab9");
} catch (Throwable unused2) {
obj = null;
}
Class cls = (Class) obj;
intent.setComponent((cls == null || (constructor = cls.getConstructor(String.class, String.class)) == null) ? null : (ComponentName) constructor.newInstance(activityInfo.packageName, activityInfo.name));
boolean z5 = false;
boolean z6 = true;
boolean z7 = iBinder == null;
if (activityInfo.launchMode == 4 || ((intent.getFlags() & 524288) == 524288 && z7)) {
intent.addFlags(268435456);
}
if ((intent.getFlags() & 268435456) != 268435456) {
if (!o1.h.a(binderC0270c0 != null ? Boolean.valueOf(binderC0270c0.g) : null, f3195h.b())) {
binderC0270c02 = binderC0270c0;
if (binderC0270c02 == null) {
if ((intent.getFlags() & 402653184) == 402653184) {
int i3 = activityInfo.launchMode;
if (Boolean.valueOf(2 <= i3 && i3 < 5).equals(f3195h.b())) {
}
}
if (activityInfo.launchMode == 3) {
str = activityInfo.name;
} else {
str = activityInfo.taskAffinity;
if (str == null && (str = activityInfo.applicationInfo.taskAffinity) == null) {
str = activityInfo.packageName;
}
}
C0290f2 c0290f2 = f3193d;
c0290f2.getClass();
C0260a2 c0260a2 = new C0260a2(c0290f2);
while (c0260a2.hasNext()) {
ConcurrentLinkedDeque concurrentLinkedDeque = (ConcurrentLinkedDeque) c0260a2.next();
BinderC0270c0 binderC0270c03 = (BinderC0270c0) concurrentLinkedDeque.peekFirst();
if (binderC0270c03 != null) {
intent2 = null;
try {
if (o1.h.a(binderC0270c03.f3143c.f3290c, c0388w2.f3290c)) {
ActivityInfo activityInfo2 = binderC0270c03.f3142a;
if (activityInfo2.launchMode == 3) {
str2 = activityInfo2.name;
} else {
String str3 = activityInfo2.taskAffinity;
str2 = (str3 == null && (str3 = activityInfo2.applicationInfo.taskAffinity) == null) ? activityInfo2.packageName : str3;
}
if (o1.h.a(str2, str)) {
if ((intent.getFlags() & 32768) != 32768) {
Iterator descendingIterator = concurrentLinkedDeque.descendingIterator();
while (true) {
if (!descendingIterator.hasNext()) {
binderC0270c02 = null;
break;
}
BinderC0270c0 binderC0270c04 = (BinderC0270c0) descendingIterator.next();
if (!binderC0270c04.g) {
binderC0270c02 = binderC0270c04;
break;
}
}
} else {
c1(concurrentLinkedDeque);
}
binderC0270c02 = binderC0270c03;
if (o1.h.a(f3195h.b(), Boolean.valueOf(binderC0270c02 == null))) {
Object b2 = f3195h.b();
if (o1.h.a(c0388w2.f3289a, activityInfo.packageName) && (o1.h.a(c0388w2.b, activityInfo.processName) || (activityInfo.flags & 1) != 0)) {
z5 = true;
}
if (o1.h.a(b2, Boolean.valueOf(z5))) {
return U0(intent, c0388w2, activityInfo, binderC0270c0 != null ? binderC0270c0.f3143c.f3289a : intent2);
}
BinderC0364s binderC0364s = BinderC0364s.b;
String str4 = activityInfo.packageName;
String str5 = c0388w2.f3290c;
binderC0364s.getClass();
C0384v1 O02 = BinderC0364s.O0(str4);
if (O02 == null || !((K3) O02.b.g).u(str5.hashCode())) {
str5 = "0";
}
C0290f2 c0290f22 = S.f3061a;
C0388w c2 = S.c(activityInfo.packageName, activityInfo.processName, str5);
if (c2 == null) {
return intent2;
}
return U0(intent, c2, activityInfo, binderC0270c0 != null ? binderC0270c0.f3143c.f3289a : intent2);
}
if (binderC0270c02 == null) {
return intent2;
}
if (o1.h.a(f3195h.b(), Boolean.valueOf(binderC0270c0 == null || binderC0270c0.f != binderC0270c02.f))) {
f3194e.moveTaskToFront(binderC0270c02.f, 0);
}
C0290f2 c0290f23 = f3193d;
int i4 = binderC0270c02.f;
synchronized (c0290f23) {
w2 = c0290f23.f3170t.w(i4);
}
ConcurrentLinkedDeque concurrentLinkedDeque2 = (ConcurrentLinkedDeque) w2;
?? r4 = concurrentLinkedDeque2 != null ? (BinderC0270c0) concurrentLinkedDeque2.peekFirst() : intent2;
if (o1.h.a(f3195h.b(), Boolean.valueOf(r4 != 0))) {
int i5 = activityInfo.launchMode;
int i6 = 536870912;
if (Boolean.valueOf(2 <= i5 && i5 < 5).equals(f3195h.b()) || (intent.getFlags() & 67239936) != 0) {
z3 = false;
if (concurrentLinkedDeque2 == null) {
return intent2;
}
ArrayList arrayList = new ArrayList(concurrentLinkedDeque2.size());
Iterator descendingIterator2 = concurrentLinkedDeque2.descendingIterator();
while (descendingIterator2.hasNext()) {
?? r10 = (BinderC0270c0) descendingIterator2.next();
if (!r10.g) {
ActivityInfo activityInfo3 = r10.f3142a;
z2 = z6;
i2 = i6;
if (o1.h.a(activityInfo3.packageName, activityInfo.packageName) && o1.h.a(activityInfo3.name, activityInfo.name)) {
if (activityInfo.launchMode == 0 && (intent.getFlags() & 537001984) == 0) {
arrayList.add(r10);
intent3 = intent2;
c1(arrayList);
r8 = intent3;
z4 = z3;
if (r8 != 0) {
C0388w c0388w3 = r8.f3143c;
if (iBinderArr != null) {
iBinderArr[z4 ? 1 : 0] = binderC0270c02.f3145e;
}
?? r02 = binderC0270c0 != null ? binderC0270c0.f3143c.f3289a : intent2;
try {
int i7 = c0388w3.f3292e;
int i8 = r8.f3142a.screenOrientation;
intent4 = AbstractC0383v0.c(intent, i7, r8, (i8 == 0 || i8 == 6 || i8 == 8 || i8 == 11) ? z2 : z4 ? 1 : 0, r02);
} catch (Exception unused3) {
intent4 = f;
}
intent4.setFlags((intent.getFlags() & 1117847552) | i2);
return intent4;
}
r17 = z4;
if (activityInfo.launchMode == 0) {
if (r4 == 0) {
return intent2;
}
r17 = z4;
if (r4.f3144d.getFlags() == intent.getFlags()) {
r17 = z4;
if (intent.filterEquals(r4.f3144d)) {
return new Intent();
}
}
}
}
intent3 = r10;
c1(arrayList);
r8 = intent3;
z4 = z3;
if (r8 != 0) {
}
} else {
arrayList.add(r10);
i6 = i2;
z6 = z2;
}
}
}
z2 = z6;
i2 = i6;
r8 = intent2;
z4 = z3;
if (r8 != 0) {
}
} else {
if (activityInfo.launchMode != 1) {
if ((intent.getFlags() & 536870912) == 536870912) {
}
z3 = false;
z2 = z6;
i2 = i6;
r8 = intent2;
z4 = z3;
if (r8 != 0) {
}
}
if (concurrentLinkedDeque2 == null) {
return intent2;
}
BinderC0270c0 binderC0270c05 = (BinderC0270c0) concurrentLinkedDeque2.peekLast();
if (!binderC0270c05.g) {
ActivityInfo activityInfo4 = binderC0270c05.f3142a;
z3 = false;
if (o1.h.a(activityInfo4.packageName, activityInfo.packageName) && o1.h.a(activityInfo4.name, activityInfo.name)) {
z2 = true;
i2 = 536870912;
r8 = binderC0270c05;
z4 = z3;
if (r8 != 0) {
}
}
z2 = z6;
i2 = i6;
r8 = intent2;
z4 = z3;
if (r8 != 0) {
}
}
z3 = false;
z2 = z6;
i2 = i6;
r8 = intent2;
z4 = z3;
if (r8 != 0) {
}
}
} else {
r17 = 0;
z2 = true;
}
BinderC0364s binderC0364s2 = BinderC0364s.b;
String str6 = activityInfo.packageName;
String str7 = c0388w2.f3290c;
binderC0364s2.getClass();
C0384v1 O03 = BinderC0364s.O0(str6);
if (O03 == null || !((K3) O03.b.g).u(str7.hashCode())) {
str7 = "0";
}
if (o1.h.a(c0388w2.f3289a, activityInfo.packageName)) {
if (!o1.h.a(c0388w2.b, activityInfo.processName)) {
}
BinderC0270c0 binderC0270c06 = new BinderC0270c0(activityInfo, new WeakReference((binderC0270c0 == null && (intent.getFlags() & 33554432) == 33554432) ? (BinderC0270c0) binderC0270c0.b.get() : binderC0270c0), c0388w2, intent);
binderC0270c06.f = binderC0270c02.f;
if (iBinderArr != null) {
iBinderArr[r17] = binderC0270c02.f3145e;
}
?? r03 = binderC0270c0 == null ? binderC0270c0.f3143c.f3289a : intent2;
int i9 = c0388w2.f3292e;
int i10 = binderC0270c06.f3142a.screenOrientation;
Intent intent5 = AbstractC0383v0.c(intent, i9, binderC0270c06, (i10 != 0 || i10 == 6 || i10 == 8 || i10 == 11) ? z2 : r17, r03);
intent5.setFlags(intent.getFlags() & 1117847552);
return intent5;
}
C0290f2 c0290f24 = S.f3061a;
c0388w2 = S.c(activityInfo.packageName, activityInfo.processName, str7);
if (c0388w2 == null) {
return intent2;
}
BinderC0270c0 binderC0270c062 = new BinderC0270c0(activityInfo, new WeakReference((binderC0270c0 == null && (intent.getFlags() & 33554432) == 33554432) ? (BinderC0270c0) binderC0270c0.b.get() : binderC0270c0), c0388w2, intent);
binderC0270c062.f = binderC0270c02.f;
if (iBinderArr != null) {
}
if (binderC0270c0 == null) {
}
int i92 = c0388w2.f3292e;
int i102 = binderC0270c062.f3142a.screenOrientation;
Intent intent52 = AbstractC0383v0.c(intent, i92, binderC0270c062, (i102 != 0 || i102 == 6 || i102 == 8 || i102 == 11) ? z2 : r17, r03);
intent52.setFlags(intent.getFlags() & 1117847552);
return intent52;
}
} else {
continue;
}
} catch (Exception unused4) {
return intent2;
}
}
}
}
intent2 = null;
if (o1.h.a(f3195h.b(), Boolean.valueOf(binderC0270c02 == null))) {
}
}
}
if (activityInfo.documentLaunchMode == 2) {
intent.addFlags(134217728);
}
binderC0270c02 = null;
if (binderC0270c02 == null) {
}
intent2 = null;
if (o1.h.a(f3195h.b(), Boolean.valueOf(binderC0270c02 == null))) {
}
}
public static Intent W0(IBinder iBinder, Intent intent, C0388w c0388w, IBinder[] iBinderArr) {
try {
List Z02 = Z0(intent);
if (Z02 != null && !Z02.isEmpty()) {
if (Z02.size() <= 1) {
return V0(iBinder, intent, c0388w, (ActivityInfo) Z02.get(0), iBinderArr);
}
Intent e2 = AbstractC0383v0.e(intent, c0388w);
return e2 == null ? f : e2;
}
return null;
} catch (Exception unused) {
return null;
}
}
public static ActivityInfo X0(Class cls, String str) {
String str2;
Object b2;
ResolveInfo resolveInfo;
Object a2;
Object obj;
if (cls == null) {
try {
obj = MNative.a(7853, "6b3ddc69c3890061b7c781a2d25e5ac9bba872c4da2a8d60be7d9ad26505c33923fe41b884920df3ece649");
} catch (Throwable unused) {
obj = null;
}
try {
cls = (Class) obj;
if (cls == null) {
return null;
}
} catch (Exception unused2) {
return null;
}
}
Constructor constructor = cls.getConstructor(String.class);
try {
a2 = MNative.a(7848, "a6beb81eda926459bfc791b5d3431086bbb375dfd16ab40fbe5d");
} catch (Throwable unused3) {
}
if (a2 != null) {
str2 = a2.toString();
Intent intent = (Intent) constructor.newInstance(str2);
Object obj2 = MNative.a(7853, "6b3ddc69c1fb2016b8cd97bfd453108eb6b379decb6a9a2f837689d87908ed7562ab0ffbccd75f");
Intent intent2 = intent.addCategory((String) ((Serializable) obj2)).setPackage(str);
b2 = f3195h.b();
BinderC0364s binderC0364s = BinderC0364s.b;
binderC0364s.getClass();
if (o1.h.a(b2, Boolean.valueOf(BinderC0364s.f3238c.containsKey(str)))) {
try {
resolveInfo = AbstractC0321k3.f3200a.getPackageManager().resolveActivity(intent2, 0);
} catch (Exception unused4) {
resolveInfo = null;
}
} else {
resolveInfo = (ResolveInfo) g1.d.G(binderC0364s.o(intent2, null, 0L));
}
if (resolveInfo == null) {
return resolveInfo.activityInfo;
}
return null;
}
str2 = null;
Intent intent3 = (Intent) constructor.newInstance(str2);
Object obj22 = MNative.a(7853, "6b3ddc69c1fb2016b8cd97bfd453108eb6b379decb6a9a2f837689d87908ed7562ab0ffbccd75f");
Intent intent22 = intent3.addCategory((String) ((Serializable) obj22)).setPackage(str);
b2 = f3195h.b();
BinderC0364s binderC0364s2 = BinderC0364s.b;
binderC0364s2.getClass();
if (o1.h.a(b2, Boolean.valueOf(BinderC0364s.f3238c.containsKey(str)))) {
}
if (resolveInfo == null) {
}
}
public static ArrayList Y0(int i2, boolean z2) {
Object w2;
ArrayList arrayList = new ArrayList();
try {
C0290f2 c0290f2 = S.f3061a;
synchronized (c0290f2) {
w2 = c0290f2.f3170t.w(i2);
}
C0388w c0388w = (C0388w) w2;
if (c0388w != null) {
C0290f2 c0290f22 = f3193d;
c0290f22.getClass();
C0260a2 c0260a2 = new C0260a2(c0290f22);
while (c0260a2.hasNext()) {
ConcurrentLinkedDeque concurrentLinkedDeque = (ConcurrentLinkedDeque) c0260a2.next();
BinderC0270c0 binderC0270c0 = (BinderC0270c0) concurrentLinkedDeque.peekFirst();
if (binderC0270c0 != null && o1.h.a(c0388w.f3290c, binderC0270c0.f3143c.f3290c) && o1.h.a(c0388w.f3289a, binderC0270c0.f3143c.f3289a) && (z2 || (binderC0270c0.f3144d.getFlags() & 8388608) == 0)) {
arrayList.add(concurrentLinkedDeque);
}
}
}
} catch (Exception unused) {
}
return arrayList;
}
public static List Z0(Intent intent) {
ComponentName component;
List<ResolveInfo> list;
try {
component = intent.getComponent();
if (component == null) {
Intent selector = intent.getSelector();
component = selector != null ? selector.getComponent() : null;
}
} catch (Exception unused) {
}
if (component != null) {
BinderC0364s.b.getClass();
ActivityInfo activityInfo = (ActivityInfo) BinderC0364s.T0(component);
if (activityInfo == null && BinderC0364s.N0(component.getPackageName())) {
try {
activityInfo = AbstractC0321k3.f3200a.getPackageManager().getActivityInfo(component, 512);
} catch (Exception unused2) {
activityInfo = null;
}
}
if (activityInfo != null) {
List singletonList = Collections.singletonList(activityInfo);
o1.h.d(singletonList, "singletonList(element)");
return singletonList;
}
return null;
}
ArrayList arrayList = new ArrayList();
List o2 = BinderC0364s.b.o(intent, null, 0L);
b.getClass();
Iterator it = o2.iterator();
while (it.hasNext()) {
arrayList.add(((ResolveInfo) it.next()).activityInfo);
}
if (arrayList.isEmpty()) {
try {
list = AbstractC0321k3.f3200a.getPackageManager().queryIntentActivities(intent, 131072);
} catch (Exception unused3) {
list = null;
}
if (list != null) {
Iterator<ResolveInfo> it2 = list.iterator();
while (it2.hasNext()) {
ActivityInfo activityInfo2 = it2.next().activityInfo;
BinderC0364s binderC0364s = BinderC0364s.b;
String str = activityInfo2.packageName;
binderC0364s.getClass();
if (BinderC0364s.N0(str)) {
arrayList.add(activityInfo2);
}
}
}
}
return arrayList;
}
public static void a1(ActivityInfo activityInfo, String str, String str2) {
E4.f2969a.post(new RunnableC0307i1(activityInfo, str, str2));
}
public static final void b1(IBinder iBinder, boolean z2) {
((IActivityManager) K.f3020a.get()).finishActivity(iBinder, 0, (Intent) null, z2);
}
public static void c1(AbstractCollection abstractCollection) {
try {
Iterator it = abstractCollection.iterator();
while (it.hasNext()) {
BinderC0270c0 binderC0270c0 = (BinderC0270c0) it.next();
n1.p pVar = g;
IBinder iBinder = binderC0270c0.f3145e;
if (iBinder != null) {
pVar.d(iBinder, Boolean.FALSE);
binderC0270c0.g = true;
}
}
} catch (Throwable unused) {
}
}
public static final int d1(IBinder iBinder) {
return ((IActivityManager) K.f3020a.get()).getTaskForActivity(iBinder, false);
}
public static final int e1(IBinder iBinder) {
return ActivityClient.getInstance().getTaskForActivity(iBinder, false);
}
public static ActivityManager.RunningTaskInfo f1(ConcurrentLinkedDeque concurrentLinkedDeque) {
ActivityManager.RunningTaskInfo runningTaskInfo = new ActivityManager.RunningTaskInfo();
BinderC0270c0 binderC0270c0 = (BinderC0270c0) concurrentLinkedDeque.peekFirst();
BinderC0270c0 binderC0270c02 = (BinderC0270c0) concurrentLinkedDeque.peekLast();
runningTaskInfo.id = binderC0270c0.f;
ActivityInfo activityInfo = binderC0270c0.f3142a;
runningTaskInfo.baseActivity = new ComponentName(((ComponentInfo) activityInfo).packageName, ((ComponentInfo) activityInfo).name);
ActivityInfo activityInfo2 = binderC0270c02.f3142a;
runningTaskInfo.topActivity = new ComponentName(((ComponentInfo) activityInfo2).packageName, ((ComponentInfo) activityInfo2).name);
runningTaskInfo.numActivities = concurrentLinkedDeque.size();
runningTaskInfo.numRunning = concurrentLinkedDeque.size();
if (AbstractC0381u4.g) {
runningTaskInfo.taskId = binderC0270c0.f;
runningTaskInfo.baseIntent = binderC0270c0.f3144d;
}
if (AbstractC0381u4.f3260h) {
f3198k.c(runningTaskInfo, f3197j.b());
}
return runningTaskInfo;
}
public static final void g1(IBinder iBinder, boolean z2) {
ActivityClient.getInstance().finishActivity(iBinder, 0, (Intent) null, z2 ? 1 : 0);
}
@Override
public final void E(String str) {
if (str == null || str.length() == 0) {
return;
}
new Thread(new r(2, str)).start();
}
@Override
public final Intent E0(IBinder iBinder, Intent intent, int i2, IBinder[] iBinderArr) {
Object w2;
if (intent == null) {
return null;
}
C0290f2 c0290f2 = S.f3061a;
synchronized (c0290f2) {
w2 = c0290f2.f3170t.w(i2);
}
C0388w c0388w = (C0388w) w2;
if (c0388w == null) {
return null;
}
return W0(iBinder, intent, c0388w, iBinderArr);
}
@Override
public final void M(String str) {
a1(null, str, "0");
}
@Override
public final boolean O() {
try {
Object a2 = MNative.a(7846, null);
if (a2 == null) {
return false;
}
return Boolean.parseBoolean(a2.toString());
} catch (Throwable unused) {
return false;
}
}
@Override
public final String Q(IBinder iBinder) {
BinderC0270c0 binderC0270c0;
try {
BinderC0270c0 binderC0270c02 = (BinderC0270c0) f3192c.get(iBinder);
if (binderC0270c02 != null && (binderC0270c0 = (BinderC0270c0) binderC0270c02.b.get()) != null) {
return binderC0270c0.f3143c.f3289a;
}
} catch (Exception unused) {
}
return null;
}
@Override
public final void V(IBinder iBinder) {
E4.f2969a.post(new X(iBinder, 2));
}
@Override
public final Intent[] d(IBinder iBinder, Intent[] intentArr, int i2, IBinder[] iBinderArr) {
Object w2;
if (intentArr == null) {
return null;
}
try {
C0290f2 c0290f2 = S.f3061a;
synchronized (c0290f2) {
w2 = c0290f2.f3170t.w(i2);
}
C0388w c0388w = (C0388w) w2;
if (c0388w == null) {
return null;
}
ArrayList arrayList = new ArrayList(intentArr.length);
for (Intent intent : intentArr) {
Intent W02 = W0(iBinder, intent, c0388w, iBinderArr);
if (W02 != null && W02.getComponent() != null) {
arrayList.add(W02);
}
}
return (Intent[]) arrayList.toArray(new Intent[0]);
} catch (Exception unused) {
return null;
}
}
@Override
public final ComponentName e0(IBinder iBinder) {
BinderC0270c0 binderC0270c0;
try {
BinderC0270c0 binderC0270c02 = (BinderC0270c0) f3192c.get(iBinder);
if (binderC0270c02 != null && (binderC0270c0 = (BinderC0270c0) binderC0270c02.b.get()) != null) {
ActivityInfo activityInfo = binderC0270c0.f3142a;
return new ComponentName(((ComponentInfo) activityInfo).packageName, ((ComponentInfo) activityInfo).name);
}
} catch (Exception unused) {
}
return null;
}
@Override
public final void j0(IBinder iBinder, IBinder iBinder2) {
if (iBinder2 instanceof BinderC0270c0) {
E4.f2969a.post(new B(iBinder2, iBinder, 1));
}
}
@Override
public final ArrayList k(long j2) {
int i2 = (int) (((-4294967296L) & j2) >>> 32);
try {
ArrayList Y02 = Y0((int) (j2 & 4294967295L), true);
int size = Y02.size();
if (size <= i2) {
i2 = size;
}
ArrayList arrayList = new ArrayList(i2);
for (int i3 = 0; i3 < i2; i3++) {
arrayList.add(f1((ConcurrentLinkedDeque) Y02.get(i3)));
}
return arrayList;
} catch (Exception unused) {
return new ArrayList();
}
}
@Override
public final void n0(I0 i02, String str, String str2, String str3, int i2) {
S.e(i02, str, str2, str3, i2);
}
@Override
public final boolean r0(IBinder iBinder, int i2) {
BinderC0270c0 binderC0270c0;
Object w2;
try {
binderC0270c0 = (BinderC0270c0) f3192c.get(iBinder);
} catch (Exception unused) {
}
if (binderC0270c0 == null) {
return false;
}
if (i2 != 0) {
int i3 = binderC0270c0.f;
C0290f2 c0290f2 = f3193d;
synchronized (c0290f2) {
w2 = c0290f2.f3170t.w(i3);
}
ConcurrentLinkedDeque concurrentLinkedDeque = (ConcurrentLinkedDeque) w2;
if (concurrentLinkedDeque == null) {
return false;
}
Iterator it = concurrentLinkedDeque.iterator();
while (it.hasNext()) {
((BinderC0270c0) it.next()).g = true;
}
} else {
binderC0270c0.g = true;
}
return true;
}
@Override
public final ArrayList v0(int i2, long j2) {
int i3 = (int) (((-4294967296L) & j2) >>> 32);
try {
ArrayList Y02 = Y0(i2, (((int) (j2 & 4294967295L)) & 8388608) != 0);
int size = Y02.size();
if (size <= i3) {
i3 = size;
}
ArrayList arrayList = new ArrayList(i3);
for (int i4 = 0; i4 < i3; i4++) {
arrayList.add(S0((ConcurrentLinkedDeque) Y02.get(i4)));
}
return arrayList;
} catch (Exception unused) {
return new ArrayList();
}
}
@Override
public final Intent z(long j2, Intent intent) {
Object w2;
String str;
Object w3;
int i2 = (int) (((-4294967296L) & j2) >>> 32);
int i3 = (int) (j2 & 4294967295L);
try {
if (i2 == 1) {
C0290f2 c0290f2 = S.f3061a;
synchronized (c0290f2) {
w2 = c0290f2.f3170t.w(i3);
}
C0388w c0388w = (C0388w) w2;
if (c0388w == null || (str = c0388w.f3290c) == null) {
str = "0";
}
return AbstractC0383v0.d(intent, str);
}
if (i2 != 2) {
if (i2 == 4 || i2 == 5) {
return AbstractC0383v0.b(i3, intent);
}
return null;
}
List Z02 = Z0(intent);
if (Z02 != null && !Z02.isEmpty()) {
C0290f2 c0290f22 = S.f3061a;
synchronized (c0290f22) {
w3 = c0290f22.f3170t.w(i3);
}
return AbstractC0383v0.e(intent, (C0388w) w3);
}
return null;
} catch (Exception unused) {
return null;
}
return null;
}
@Override
public final void z0(Intent intent, String str) {
E4.b.execute(new RunnableC0301h1(intent, str, 0));
}
}