正在查看: Minits v4.9.3.32 应用的 WatchDogService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Minits v4.9.3.32 应用的 WatchDogService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.xone.android.framework.services;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Process;
import android.os.SystemClock;
import com.xone.android.framework.AbstractC0564f;
import com.xone.android.framework.mainEntry;
import com.xone.android.framework.xoneApp;
import com.xone.android.utils.Utils;
import fb.AbstractC0692e;
import ha.N;
public final class WatchDogService extends Service {
public static AlarmManager a() {
Object systemService = xoneApp.Z0().getSystemService("alarm");
if (systemService != null) {
return (AlarmManager) systemService;
}
throw new NullPointerException("Cannot obtain alarm manager service");
}
public static Intent b(Context context) {
Intent intent = new Intent(context, (Class<?>) WatchDogService.class);
intent.putExtra("isFrameworkDeadScheduledTask", true);
intent.putExtra("nOriginalProcessId", Process.myPid());
intent.setFlags(268435456);
return intent;
}
public static boolean c() {
mainEntry S = xoneApp.Z0().S();
if (S == null) {
return true;
}
return S.c();
}
public static boolean d() {
Context context = xoneApp.getContext();
return PendingIntent.getService(context, 12538, b(context), Utils.l2(true, 536870912)) != null;
}
public static void e() {
Context context = xoneApp.getContext();
Intent intent = new Intent(context, (Class<?>) mainEntry.class);
intent.setAction("android.intent.action.MAIN");
intent.addCategory("android.intent.category.LAUNCHER");
intent.addFlags(536870912);
a().set(1, System.currentTimeMillis() + 70, PendingIntent.getActivity(context, AbstractC0564f.A0, intent, Utils.l2(true, 268435456)));
}
public static void g() {
Context context = xoneApp.getContext();
a().setInexactRepeating(2, SystemClock.elapsedRealtime() + 10000, 10000L, PendingIntent.getService(context, 12538, b(context), Utils.l2(true, 134217728)));
}
public static void h() {
Context context = xoneApp.getContext();
Intent b = b(context);
if (PendingIntent.getService(context, 12538, b, Utils.l2(true, 536870912)) == null) {
return;
}
a().cancel(PendingIntent.getService(context, 12538, b, Utils.l2(true, 268435456)));
}
public final boolean f(Bundle bundle) {
if (bundle.getInt("nOriginalProcessId", -1) != Process.myPid()) {
Utils.l("XOneAndroidFramework", "WatchDog service: Process ID is different from the saved one");
}
return c();
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public int onStartCommand(Intent intent, int i, int i2) {
if (intent == null) {
return super.onStartCommand(null, i, i2);
}
Bundle extras = intent.getExtras();
if (!AbstractC0692e.a(extras, "isFrameworkDeadScheduledTask", false)) {
return super.onStartCommand(intent, i, i2);
}
if (f(extras)) {
Context context = xoneApp.getContext();
if (N.d(context) && Utils.e3(context)) {
Utils.l("XOneAndroidFramework", "WatchDog service: Someone has killed the framework, but work profile lock screen is still active. Skipping this cycle.");
} else {
Utils.l("XOneAndroidFramework", "WatchDog service: Someone has killed the framework, restarting.");
h();
e();
}
} else {
Utils.l("XOneAndroidFramework", "WatchDog service: Framework OK...");
}
return super.onStartCommand(intent, i, i2);
}
}