正在查看: 万能钥匙 v1.1.23 应用的 PersistentService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 万能钥匙 v1.1.23 应用的 PersistentService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.lantern.daemon;
import android.app.Service;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Build;
import android.os.IBinder;
import com.lantern.daemon.notification.ForegroundServiceHelper;
import com.lantern.daemon.op.OPReceiver;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.wifi.connect.provider.MsgProvider;
import os.C0341a;
import pa.d;
public class PersistentService extends Service {
public static ChangeQuickRedirect changeQuickRedirect;
public a a = new a();
public class a implements ServiceConnection {
public static ChangeQuickRedirect changeQuickRedirect;
public a() {
}
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
if (PatchProxy.proxy(new Object[]{componentName}, this, changeQuickRedirect, false, 479, new Class[]{ComponentName.class}, Void.TYPE).isSupported) {
return;
}
d.a("onServiceDisconnected", new Object[0]);
PersistentService.a(PersistentService.this);
}
}
public static void a(PersistentService persistentService) {
if (PatchProxy.proxy(new Object[]{persistentService}, null, changeQuickRedirect, true, 478, new Class[]{PersistentService.class}, Void.TYPE).isSupported) {
return;
}
persistentService.b();
}
public final void b() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 477, new Class[0], Void.TYPE).isSupported) {
return;
}
Intent intent = new Intent(fm.a.a);
intent.setPackage(getPackageName());
intent.putExtra("source", "dprocess");
try {
startService(intent);
bindService(intent, this.a, 64);
} catch (Exception e) {
d.c(e);
}
MsgProvider.b(this, intent);
}
public final void c() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 475, new Class[0], Void.TYPE).isSupported) {
return;
}
boolean t = pm.a.t(this);
d.a("conf.isMsgservice %s", new Object[]{String.valueOf(t)});
if (t) {
b();
}
boolean u = pm.a.u(this);
d.a("conf.isOnepixel %s", new Object[]{String.valueOf(u)});
if (u) {
String str = Build.MANUFACTURER;
int i = Build.VERSION.SDK_INT;
d.a("MANUFACTURER %s, sdk %d", new Object[]{str, Integer.valueOf(i)});
if ((!str.equalsIgnoreCase("huawei") && !str.equalsIgnoreCase("honor")) || i < 28) {
OPReceiver.a(this);
}
}
d.a("conf.isForeground %s", new Object[]{String.valueOf(u)});
if (Build.VERSION.SDK_INT < 26) {
ForegroundServiceHelper.b(this);
}
C0341a.e("PersistentService");
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public void onCreate() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 473, new Class[0], Void.TYPE).isSupported) {
return;
}
super.onCreate();
d.a("onCreate", new Object[0]);
c();
}
@Override
public void onDestroy() {
if (PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 476, new Class[0], Void.TYPE).isSupported) {
return;
}
try {
unbindService(this.a);
} catch (Exception unused) {
}
try {
OPReceiver.b(this);
} catch (Exception unused2) {
}
super.onDestroy();
}
@Override
public int onStartCommand(Intent intent, int i, int i2) {
Object[] objArr = {intent, new Integer(i), new Integer(i2)};
ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
Class cls = Integer.TYPE;
PatchProxyResult proxy = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 474, new Class[]{Intent.class, cls, cls}, cls);
if (proxy.isSupported) {
return ((Integer) proxy.result).intValue();
}
super.onStartCommand(intent, i, i2);
return 2;
}
}