正在查看: Minits v4.9.3.32 应用的 h.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Minits v4.9.3.32 应用的 h.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package z0;
import android.app.Service;
import android.app.job.JobInfo;
import android.app.job.JobParameters;
import android.app.job.JobScheduler;
import android.app.job.JobServiceEngine;
import android.app.job.JobWorkItem;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Build;
import android.os.IBinder;
import android.os.PowerManager;
import java.util.ArrayList;
import java.util.HashMap;
public abstract class h extends Service {
public static final Object f28498s = new Object();
public static final HashMap f28499t = new HashMap();
public b f28500l;
public AbstractC0213h f28501m;
public a f28502n;
public boolean f28503o = false;
public boolean f28504p = false;
public boolean f28505q = false;
public final ArrayList f28506r;
public final class a extends AsyncTask {
public a() {
}
@Override
public Void doInBackground(Void... voidArr) {
while (true) {
e a8 = h.this.a();
if (a8 == null) {
return null;
}
h.this.g(a8.getIntent());
a8.a();
}
}
@Override
public void onCancelled(Void r12) {
h.this.i();
}
@Override
public void onPostExecute(Void r12) {
h.this.i();
}
}
public interface b {
IBinder a();
e b();
}
public static final class c extends AbstractC0213h {
public final Context f28508d;
public final PowerManager.WakeLock f28509e;
public final PowerManager.WakeLock f28510f;
public boolean f28511g;
public boolean f28512h;
public c(Context context, ComponentName componentName) {
super(componentName);
this.f28508d = context.getApplicationContext();
PowerManager powerManager = (PowerManager) context.getSystemService("power");
PowerManager.WakeLock newWakeLock = powerManager.newWakeLock(1, componentName.getClassName() + ":launch");
this.f28509e = newWakeLock;
newWakeLock.setReferenceCounted(false);
PowerManager.WakeLock newWakeLock2 = powerManager.newWakeLock(1, componentName.getClassName() + ":run");
this.f28510f = newWakeLock2;
newWakeLock2.setReferenceCounted(false);
}
@Override
public void a(Intent intent) {
Intent intent2 = new Intent(intent);
intent2.setComponent(this.f28523a);
if (this.f28508d.startService(intent2) != null) {
synchronized (this) {
try {
if (!this.f28511g) {
this.f28511g = true;
if (!this.f28512h) {
this.f28509e.acquire(60000L);
}
}
} catch (Throwable th) {
throw th;
}
}
}
}
@Override
public void c() {
synchronized (this) {
try {
if (this.f28512h) {
if (this.f28511g) {
this.f28509e.acquire(60000L);
}
this.f28512h = false;
this.f28510f.release();
}
} catch (Throwable th) {
throw th;
}
}
}
@Override
public void d() {
synchronized (this) {
try {
if (!this.f28512h) {
this.f28512h = true;
this.f28510f.acquire(600000L);
this.f28509e.release();
}
} catch (Throwable th) {
throw th;
}
}
}
@Override
public void e() {
synchronized (this) {
this.f28511g = false;
}
}
}
public final class d implements e {
public final Intent f28513a;
public final int f28514b;
public d(Intent intent, int i8) {
this.f28513a = intent;
this.f28514b = i8;
}
@Override
public void a() {
h.this.stopSelf(this.f28514b);
}
@Override
public Intent getIntent() {
return this.f28513a;
}
}
public interface e {
void a();
Intent getIntent();
}
public static final class f extends JobServiceEngine implements b {
public final h f28516a;
public final Object f28517b;
public JobParameters f28518c;
public final class a implements e {
public final JobWorkItem f28519a;
public a(JobWorkItem jobWorkItem) {
this.f28519a = jobWorkItem;
}
@Override
public void a() {
synchronized (f.this.f28517b) {
try {
JobParameters jobParameters = f.this.f28518c;
if (jobParameters != null) {
jobParameters.completeWork(this.f28519a);
}
} catch (Throwable th) {
throw th;
}
}
}
@Override
public Intent getIntent() {
Intent intent;
intent = this.f28519a.getIntent();
return intent;
}
}
public f(h hVar) {
super(hVar);
this.f28517b = new Object();
this.f28516a = hVar;
}
@Override
public IBinder a() {
IBinder binder;
binder = getBinder();
return binder;
}
@Override
public e b() {
JobWorkItem dequeueWork;
Intent intent;
synchronized (this.f28517b) {
try {
JobParameters jobParameters = this.f28518c;
if (jobParameters == null) {
return null;
}
dequeueWork = jobParameters.dequeueWork();
if (dequeueWork == null) {
return null;
}
intent = dequeueWork.getIntent();
intent.setExtrasClassLoader(this.f28516a.getClassLoader());
return new a(dequeueWork);
} catch (Throwable th) {
throw th;
}
}
}
@Override
public boolean onStartJob(JobParameters jobParameters) {
this.f28518c = jobParameters;
this.f28516a.e(false);
return true;
}
@Override
public boolean onStopJob(JobParameters jobParameters) {
boolean b8 = this.f28516a.b();
synchronized (this.f28517b) {
this.f28518c = null;
}
return b8;
}
}
public static final class g extends AbstractC0213h {
public final JobInfo f28521d;
public final JobScheduler f28522e;
public g(Context context, ComponentName componentName, int i8) {
super(componentName);
b(i8);
this.f28521d = new JobInfo.Builder(i8, this.f28523a).setOverrideDeadline(0L).build();
this.f28522e = (JobScheduler) context.getApplicationContext().getSystemService("jobscheduler");
}
@Override
public void a(Intent intent) {
this.f28522e.enqueue(this.f28521d, n.a(intent));
}
}
public h() {
if (Build.VERSION.SDK_INT >= 26) {
this.f28506r = null;
} else {
this.f28506r = new ArrayList();
}
}
public static void c(Context context, ComponentName componentName, int i8, Intent intent) {
if (intent == null) {
throw new IllegalArgumentException("work must not be null");
}
synchronized (f28498s) {
AbstractC0213h f8 = f(context, componentName, true, i8);
f8.b(i8);
f8.a(intent);
}
}
public static void d(Context context, Class cls, int i8, Intent intent) {
c(context, new ComponentName(context, (Class<?>) cls), i8, intent);
}
public static AbstractC0213h f(Context context, ComponentName componentName, boolean z8, int i8) {
AbstractC0213h cVar;
HashMap hashMap = f28499t;
AbstractC0213h abstractC0213h = (AbstractC0213h) hashMap.get(componentName);
if (abstractC0213h != null) {
return abstractC0213h;
}
if (Build.VERSION.SDK_INT < 26) {
cVar = new c(context, componentName);
} else {
if (!z8) {
throw new IllegalArgumentException("Can't be here without a job id");
}
cVar = new g(context, componentName, i8);
}
hashMap.put(componentName, cVar);
return cVar;
}
public e a() {
b bVar = this.f28500l;
if (bVar != null) {
return bVar.b();
}
synchronized (this.f28506r) {
try {
if (this.f28506r.size() <= 0) {
return null;
}
return (e) this.f28506r.remove(0);
} catch (Throwable th) {
throw th;
}
}
}
public boolean b() {
a aVar = this.f28502n;
if (aVar != null) {
aVar.cancel(this.f28503o);
}
this.f28504p = true;
return h();
}
public void e(boolean z8) {
if (this.f28502n == null) {
this.f28502n = new a();
AbstractC0213h abstractC0213h = this.f28501m;
if (abstractC0213h != null && z8) {
abstractC0213h.d();
}
this.f28502n.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
}
}
public abstract void g(Intent intent);
public boolean h() {
return true;
}
public void i() {
ArrayList arrayList = this.f28506r;
if (arrayList != null) {
synchronized (arrayList) {
try {
this.f28502n = null;
ArrayList arrayList2 = this.f28506r;
if (arrayList2 != null && arrayList2.size() > 0) {
e(false);
} else if (!this.f28505q) {
this.f28501m.c();
}
} catch (Throwable th) {
throw th;
}
}
}
}
@Override
public IBinder onBind(Intent intent) {
b bVar = this.f28500l;
if (bVar != null) {
return bVar.a();
}
return null;
}
@Override
public void onCreate() {
super.onCreate();
if (Build.VERSION.SDK_INT >= 26) {
this.f28500l = new f(this);
this.f28501m = null;
} else {
this.f28500l = null;
this.f28501m = f(this, new ComponentName(this, getClass()), false, 0);
}
}
@Override
public void onDestroy() {
super.onDestroy();
ArrayList arrayList = this.f28506r;
if (arrayList != null) {
synchronized (arrayList) {
this.f28505q = true;
this.f28501m.c();
}
}
}
@Override
public int onStartCommand(Intent intent, int i8, int i9) {
if (this.f28506r == null) {
return 2;
}
this.f28501m.e();
synchronized (this.f28506r) {
ArrayList arrayList = this.f28506r;
if (intent == null) {
intent = new Intent();
}
arrayList.add(new d(intent, i9));
e(true);
}
return 3;
}
public static abstract class AbstractC0213h {
public final ComponentName f28523a;
public boolean f28524b;
public int f28525c;
public AbstractC0213h(ComponentName componentName) {
this.f28523a = componentName;
}
public abstract void a(Intent intent);
public void b(int i8) {
if (!this.f28524b) {
this.f28524b = true;
this.f28525c = i8;
} else {
if (this.f28525c == i8) {
return;
}
throw new IllegalArgumentException("Given job ID " + i8 + " is different than previous " + this.f28525c);
}
}
public void c() {
}
public void d() {
}
public void e() {
}
}
}