正在查看: Premium Loader v1.0 应用的 n7.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Premium Loader v1.0 应用的 n7.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package k4;
import android.app.ActivityManager;
import android.app.IBinderSession;
import android.app.IServiceConnection;
import android.content.ComponentName;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ActivityInfo;
import android.content.pm.ComponentInfo;
import android.content.pm.ProviderInfo;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.os.IBinder;
import android.os.Process;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
public final class n7 extends h9 {
public static final n7 f3382b = new n7();
public static final ConcurrentHashMap f3383c = new ConcurrentHashMap();
public static final boolean f3384d;
public static final h7 f3385e;
public static final ConcurrentHashMap f3386f;
static {
boolean z4 = false;
if (kb.f3336m) {
try {
if (Class.forName("android.app.IBinderSession", false, IBinder.class.getClassLoader()).getClassLoader() != null) {
z4 = true;
}
} catch (Throwable unused) {
}
}
f3384d = z4;
f3385e = new h7();
f3386f = new ConcurrentHashMap();
}
public static ServiceInfo N0(Intent intent) {
List b5 = y6.f3634b.b(intent, null, 0);
j6.i0(b5);
ResolveInfo resolveInfo = (ResolveInfo) p3.h.B1(b5);
if (resolveInfo != null) {
return resolveInfo.serviceInfo;
}
ResolveInfo resolveInfo2 = (ResolveInfo) a4.a(new v1(intent, 5));
if (resolveInfo2 != null) {
ServiceInfo serviceInfo = resolveInfo2.serviceInfo;
if (y6.f3636d.containsKey(serviceInfo.packageName)) {
return serviceInfo;
}
}
return null;
}
public static final void O0(IBinder iBinder, Intent intent, IBinder iBinder2, IBinder iBinder3) {
try {
((m8) iBinder).f3364c = new o3.a(intent, iBinder2);
IServiceConnection asInterface = IServiceConnection.Stub.asInterface(iBinder3);
if (f3384d) {
ServiceInfo serviceInfo = ((m8) iBinder).f3363b;
asInterface.connected(new ComponentName(((ComponentInfo) serviceInfo).packageName, ((ComponentInfo) serviceInfo).name), iBinder2, (IBinderSession) null, false);
} else if (kb.f3328e) {
ServiceInfo serviceInfo2 = ((m8) iBinder).f3363b;
asInterface.connected(new ComponentName(((ComponentInfo) serviceInfo2).packageName, ((ComponentInfo) serviceInfo2).name), iBinder2, false);
} else {
ServiceInfo serviceInfo3 = ((m8) iBinder).f3363b;
asInterface.connected(new ComponentName(((ComponentInfo) serviceInfo3).packageName, ((ComponentInfo) serviceInfo3).name), iBinder2);
}
} catch (Throwable unused) {
}
}
public static final void P0(IBinder iBinder, m8 m8Var, o3.a aVar) {
try {
IServiceConnection asInterface = IServiceConnection.Stub.asInterface(iBinder);
ServiceInfo serviceInfo = m8Var.f3363b;
ComponentName componentName = new ComponentName(((ComponentInfo) serviceInfo).packageName, ((ComponentInfo) serviceInfo).name);
if (f3384d) {
asInterface.connected(componentName, (IBinder) aVar.b(), (IBinderSession) null, false);
} else if (kb.f3328e) {
asInterface.connected(componentName, (IBinder) aVar.b(), false);
} else {
asInterface.connected(componentName, (IBinder) aVar.b());
}
} catch (Throwable unused) {
}
}
@Override
public final int D(Intent intent, String str) {
m8 m8Var;
try {
ServiceInfo N0 = N0(intent);
if (N0 == null) {
return -1;
}
o3.c cVar = s7.f3498a;
e7 a5 = s7.a(N0.processName, str);
if (a5 == null || (m8Var = (m8) a5.f3205l.a(N0.name.hashCode())) == null) {
return 0;
}
m8Var.f3365d = 0;
if (!m8Var.f3367f.isEmpty()) {
return 0;
}
ma.f3369b.execute(new a3(a5, m8Var, N0, 4));
return 1;
} catch (Exception unused) {
return -1;
}
}
@Override
public final boolean G(IBinder iBinder, Intent intent, IBinder iBinder2) {
IBinder iBinder3;
try {
if (!(iBinder instanceof m8) || (iBinder3 = (IBinder) ((m8) iBinder).f3366e.remove(new Intent.FilterComparison(intent))) == null) {
return false;
}
ma.f3369b.execute(new j4.e(iBinder, intent, iBinder2, iBinder3, 2));
return true;
} catch (Throwable unused) {
return false;
}
}
@Override
public final boolean M0(IBinder iBinder) {
try {
m8 m8Var = (m8) f3383c.remove(iBinder);
if (m8Var == null) {
return false;
}
ma.f3369b.execute(new ea(m8Var, 3, iBinder));
return true;
} catch (Exception unused) {
return false;
}
}
public final void Q0(e7 e7Var) {
try {
Iterator it = e7Var.f3204k.iterator();
while (true) {
c6 c6Var = (c6) it;
if (!c6Var.hasNext()) {
break;
}
f3383c.remove((IBinder) c6Var.next());
}
for (IBinder iBinder : (IBinder[]) e7Var.f3206m.toArray(new IBinder[0])) {
m(iBinder);
}
} catch (Exception unused) {
}
}
@Override
public final int c0(Intent intent, String str, int i5) {
try {
if (!j6.k0(intent.getFlags(), 1073741824)) {
List e5 = y6.f3634b.e(intent, null, 0);
List list = (List) a4.a(new v1(intent, 4));
if (list != null) {
e5.addAll(list);
}
if (!e5.isEmpty()) {
Iterator it = e5.iterator();
while (it.hasNext()) {
ActivityInfo activityInfo = ((ResolveInfo) it.next()).activityInfo;
if (str != null && str.length() != 0) {
o3.c cVar = s7.f3498a;
e7 a5 = s7.a(activityInfo.processName, str);
if (a5 != null) {
String str2 = activityInfo.name;
try {
g7 g7Var = a5.f3201h;
if (g7Var != null) {
g7Var.w0(intent, null, str2);
}
} catch (Exception unused) {
}
}
}
h2.b bVar = s7.f3499b;
bVar.getClass();
v3.b bVar2 = new v3.b(bVar);
while (bVar2.hasNext()) {
e7 e7Var = (e7) bVar2.next();
if (z2.a.o(e7Var.f3194a, activityInfo.packageName) && z2.a.o(e7Var.f3195b, activityInfo.processName)) {
String str3 = activityInfo.name;
try {
g7 g7Var2 = e7Var.f3201h;
if (g7Var2 != null) {
g7Var2.w0(intent, null, str3);
}
} catch (Exception unused2) {
}
}
}
}
}
if (intent.getComponent() != null) {
return 0;
}
}
ArrayList b5 = f3385e.b(intent, null, false, 0);
if (!b5.isEmpty()) {
Iterator it2 = b5.iterator();
while (it2.hasNext()) {
za zaVar = (za) it2.next();
if (str != null && str.length() != 0 && !z2.a.o(zaVar.f3655f.f3477g.f3196c, str)) {
}
r2 r2Var = zaVar.f3655f;
e7 e7Var2 = r2Var.f3477g;
IBinder iBinder = r2Var.f3476f;
g7 g7Var3 = e7Var2.f3201h;
if (g7Var3 != null) {
g7Var3.w0(intent, iBinder, null);
}
}
}
} catch (Exception unused3) {
}
return 0;
}
@Override
public final IBinder h(ComponentName componentName, String str) {
try {
y6.f3634b.getClass();
ServiceInfo serviceInfo = (ServiceInfo) y6.N0(componentName);
if (serviceInfo == null && (serviceInfo = (ServiceInfo) a4.a(new u1(componentName, 3))) == null) {
return null;
}
o3.c cVar = s7.f3498a;
e7 a5 = s7.a(serviceInfo.processName, str);
if (a5 == null) {
return null;
}
return (IBinder) a5.f3205l.a(serviceInfo.name.hashCode());
} catch (Exception unused) {
return null;
}
}
@Override
public final boolean i0(String str, String str2) {
y1.f3621b.getClass();
return y1.i0(str, str2);
}
@Override
public final ArrayList l(int i5) {
Object a5;
try {
h2.b bVar = s7.f3499b;
synchronized (bVar) {
a5 = ((h6) bVar.f2864g).a(i5);
}
e7 e7Var = (e7) a5;
ArrayList arrayList = new ArrayList();
v3.b bVar2 = new v3.b(bVar);
while (bVar2.hasNext()) {
e7 e7Var2 = (e7) bVar2.next();
if (e7Var == null || (z2.a.o(e7Var.f3196c, e7Var2.f3196c) && z2.a.o(e7Var.f3194a, e7Var2.f3194a))) {
ActivityManager.RunningAppProcessInfo runningAppProcessInfo = new ActivityManager.RunningAppProcessInfo();
runningAppProcessInfo.processName = e7Var2.f3195b;
runningAppProcessInfo.pid = e7Var2.f3202i;
runningAppProcessInfo.pkgList = new String[]{e7Var2.f3194a};
runningAppProcessInfo.uid = a4.f3107c;
runningAppProcessInfo.importance = 100;
arrayList.add(runningAppProcessInfo);
}
}
return arrayList;
} catch (Exception unused) {
return new ArrayList(0);
}
}
@Override
public final boolean l0(ComponentName componentName, IBinder iBinder, int i5) {
try {
if (!(iBinder instanceof m8)) {
return false;
}
if (componentName != null && !z2.a.o(componentName.getClassName(), ((m8) iBinder).f3363b.name)) {
return true;
}
if ((i5 >= 0 && ((m8) iBinder).f3365d != i5) || !((m8) iBinder).f3367f.isEmpty()) {
return true;
}
ma.f3369b.execute(new k(iBinder, 2));
return true;
} catch (Exception unused) {
return false;
}
}
@Override
public final void m(IBinder iBinder) {
try {
r2 r2Var = (r2) f3386f.remove(iBinder);
if (r2Var == null) {
return;
}
r2Var.f3477g.f3206m.f3360f.c(iBinder.hashCode());
Iterator<E> it = r2Var.iterator();
while (it.hasNext()) {
f3385e.f((za) it.next());
}
} catch (Exception unused) {
}
}
@Override
public final void m0(int i5, IBinder iBinder, IntentFilter intentFilter) {
Object a5;
try {
h2.b bVar = s7.f3499b;
synchronized (bVar) {
a5 = ((h6) bVar.f2864g).a(i5);
}
e7 e7Var = (e7) a5;
if (e7Var != null && e7Var.f3206m.f3360f.f3253c < 100) {
ConcurrentHashMap concurrentHashMap = f3386f;
r2 r2Var = (r2) concurrentHashMap.get(iBinder);
if (r2Var == null) {
r2Var = new r2(iBinder, e7Var);
concurrentHashMap.put(iBinder, r2Var);
e7Var.f3206m.f3360f.b(iBinder.hashCode(), iBinder);
}
if (r2Var.a(intentFilter)) {
return;
}
za zaVar = new za(intentFilter, r2Var, e7Var.f3194a);
r2Var.add(zaVar);
f3385e.d(zaVar);
}
} catch (Exception unused) {
}
}
@Override
public final int n(Intent intent, IBinder iBinder, String str) {
try {
ServiceInfo N0 = N0(intent);
if (N0 == null) {
return -1;
}
o3.c cVar = s7.f3498a;
e7 f5 = s7.f(N0.packageName, N0.processName, str);
if (f5 == null) {
return 0;
}
h6 h6Var = f5.f3205l;
m8 m8Var = (m8) h6Var.a(N0.name.hashCode());
if (m8Var == null) {
m8Var = new m8(f5, N0);
h6Var.b(N0.name.hashCode(), m8Var);
g7 g7Var = f5.f3201h;
if (g7Var != null) {
g7Var.T(N0.name, null, m8Var, 0);
}
}
m8 m8Var2 = m8Var;
ConcurrentHashMap concurrentHashMap = f3383c;
if (!concurrentHashMap.containsKey(iBinder)) {
int i5 = m8Var2.f3367f.f3360f.f3253c;
if (i5 > 3000) {
return 0;
}
f5.f3204k.f3360f.b(iBinder.hashCode(), iBinder);
m8Var2.f3367f.f3360f.b(iBinder.hashCode(), iBinder);
concurrentHashMap.put(iBinder, m8Var2);
if (i5 > 500) {
ma.f3369b.execute(new a3(m8Var2, f5, iBinder, 2));
}
}
o3.a aVar = m8Var2.f3364c;
if (aVar == null || !((Intent) aVar.f3971f).filterEquals(intent)) {
ma.f3369b.execute(new j4.e(m8Var2, intent, iBinder, f5, 1));
return 1;
}
ma.f3369b.execute(new a3(iBinder, m8Var2, aVar, 3));
return 1;
} catch (Exception unused) {
return -1;
}
}
@Override
public final void r0(String str, String str2) {
try {
h2.b bVar = s7.f3499b;
bVar.getClass();
v3.b bVar2 = new v3.b(bVar);
while (bVar2.hasNext()) {
e7 e7Var = (e7) bVar2.next();
if (str != null && str.length() != 0 && !z2.a.o(e7Var.f3194a, str)) {
}
int i5 = e7Var.f3202i;
if (i5 > 0) {
Process.killProcess(i5);
} else {
g7 g7Var = e7Var.f3201h;
if (g7Var != null) {
g7Var.f0();
}
}
}
} catch (Exception unused) {
}
}
@Override
public final ComponentName w(Intent intent, String str) {
try {
ServiceInfo N0 = N0(intent);
if (N0 == null) {
return null;
}
o3.c cVar = s7.f3498a;
e7 f5 = s7.f(N0.packageName, N0.processName, str);
if (f5 == null) {
return null;
}
ma.f3369b.execute(new a3(f5, N0, intent));
return new ComponentName(((ComponentInfo) N0).packageName, ((ComponentInfo) N0).name);
} catch (Exception unused) {
return null;
}
}
@Override
public final IBinder x0(String str, String str2, ProviderInfo[] providerInfoArr, String[] strArr, int i5) {
Object a5;
IBinder V;
try {
ProviderInfo s02 = y6.f3634b.s0(str);
if (s02 == null) {
s02 = (ProviderInfo) a4.a(new n(9, str));
if (s02 != null) {
if (y6.f3636d.containsKey(s02.packageName)) {
if (s02 == null) {
return null;
}
}
}
s02 = null;
if (s02 == null) {
}
}
h2.b bVar = s7.f3499b;
synchronized (bVar) {
a5 = ((h6) bVar.f2864g).a(i5);
}
e7 e7Var = (e7) a5;
if (e7Var != null && z2.a.o(e7Var.f3194a, s02.packageName) && (z2.a.o(e7Var.f3195b, s02.processName) || s02.multiprocess)) {
providerInfoArr[0] = s02;
return null;
}
e7 f5 = s7.f(s02.packageName, s02.processName, str2);
if (f5 == null) {
return null;
}
strArr[1] = s02.authority;
g7 g7Var = f5.f3201h;
if (g7Var == null || (V = g7Var.V(str)) == null) {
return null;
}
strArr[0] = a4.f3106b + ".provider.stub" + f5.f3198e;
return V;
} catch (Exception unused) {
return null;
}
}
}