正在查看: Engineering Physics 2 v13.0 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Engineering Physics 2 v13.0 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.onesignal;
import android.app.Service;
import android.app.job.JobInfo;
import android.app.job.JobScheduler;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import android.os.PowerManager;
import defpackage.H6;
import java.util.ArrayList;
import java.util.HashMap;
public abstract class i extends Service {
public static final Object h = new Object();
public static final HashMap i = new HashMap();
public JobIntentService$JobServiceEngineImpl c;
public JobIntentService$WorkEnqueuer d;
public JobIntentService$CommandProcessor e;
public boolean f = false;
public final ArrayList g = new ArrayList();
public static JobIntentService$WorkEnqueuer b(final Context context, final ComponentName componentName, boolean z, final int i2, final boolean z2) {
JobIntentService$WorkEnqueuer jobIntentService$WorkEnqueuer;
Object obj = new Object(componentName, z2) {
private ComponentName componentName;
private boolean useWakefulService;
{
this.componentName = componentName;
this.useWakefulService = z2;
}
};
HashMap hashMap = i;
JobIntentService$WorkEnqueuer jobIntentService$WorkEnqueuer2 = (JobIntentService$WorkEnqueuer) hashMap.get(obj);
if (jobIntentService$WorkEnqueuer2 == null) {
if (Build.VERSION.SDK_INT < 26 || z2) {
jobIntentService$WorkEnqueuer = new JobIntentService$WorkEnqueuer(context, componentName) {
private final Context mContext;
private final PowerManager.WakeLock mLaunchWakeLock;
boolean mLaunchingService;
private final PowerManager.WakeLock mRunWakeLock;
boolean mServiceProcessing;
{
super(componentName);
this.mContext = context.getApplicationContext();
PowerManager powerManager = (PowerManager) context.getSystemService("power");
PowerManager.WakeLock newWakeLock = powerManager.newWakeLock(1, componentName.getClassName() + ":launch");
this.mLaunchWakeLock = newWakeLock;
newWakeLock.setReferenceCounted(false);
PowerManager.WakeLock newWakeLock2 = powerManager.newWakeLock(1, componentName.getClassName() + ":run");
this.mRunWakeLock = newWakeLock2;
newWakeLock2.setReferenceCounted(false);
}
@Override
public void enqueueWork(Intent intent) {
Intent intent2 = new Intent(intent);
intent2.setComponent(this.mComponentName);
if (this.mContext.startService(intent2) != null) {
synchronized (this) {
try {
if (!this.mLaunchingService) {
this.mLaunchingService = true;
if (!this.mServiceProcessing) {
this.mLaunchWakeLock.acquire(60000L);
}
}
} finally {
}
}
}
}
@Override
public void serviceProcessingFinished() {
synchronized (this) {
try {
if (this.mServiceProcessing) {
if (this.mLaunchingService) {
this.mLaunchWakeLock.acquire(60000L);
}
this.mServiceProcessing = false;
this.mRunWakeLock.release();
}
} catch (Throwable th) {
throw th;
}
}
}
@Override
public void serviceProcessingStarted() {
synchronized (this) {
try {
if (!this.mServiceProcessing) {
this.mServiceProcessing = true;
this.mRunWakeLock.acquire(600000L);
this.mLaunchWakeLock.release();
}
} catch (Throwable th) {
throw th;
}
}
}
@Override
public void serviceStartReceived() {
synchronized (this) {
this.mLaunchingService = false;
}
}
};
} else {
if (!z) {
throw new IllegalArgumentException("Can't be here without a job id");
}
jobIntentService$WorkEnqueuer = new JobIntentService$WorkEnqueuer(context, componentName, i2) {
private final JobInfo mJobInfo;
private final JobScheduler mJobScheduler;
{
super(componentName);
ensureJobId(i2);
this.mJobInfo = new JobInfo.Builder(i2, this.mComponentName).setOverrideDeadline(0L).build();
this.mJobScheduler = (JobScheduler) context.getApplicationContext().getSystemService("jobscheduler");
}
@Override
public void enqueueWork(Intent intent) {
D.s(this.mJobScheduler, this.mJobInfo, D.g(intent));
}
};
}
jobIntentService$WorkEnqueuer2 = jobIntentService$WorkEnqueuer;
hashMap.put(obj, jobIntentService$WorkEnqueuer2);
}
return jobIntentService$WorkEnqueuer2;
}
public final void a(boolean z) {
if (this.e == null) {
this.e = new AsyncTask<Void, Void, Void>() {
@Override
public Void doInBackground(Void... voidArr) {
JobIntentService$GenericWorkItem jobIntentService$GenericWorkItem;
while (true) {
i iVar = i.this;
JobIntentService$JobServiceEngineImpl jobIntentService$JobServiceEngineImpl = iVar.c;
if (jobIntentService$JobServiceEngineImpl == null || (jobIntentService$GenericWorkItem = jobIntentService$JobServiceEngineImpl.dequeueWork()) == null) {
synchronized (iVar.g) {
try {
jobIntentService$GenericWorkItem = iVar.g.size() > 0 ? (JobIntentService$GenericWorkItem) iVar.g.remove(0) : null;
} finally {
}
}
}
if (jobIntentService$GenericWorkItem == null) {
return null;
}
i iVar2 = i.this;
Intent intent = jobIntentService$GenericWorkItem.getIntent();
FCMIntentJobService fCMIntentJobService = (FCMIntentJobService) iVar2;
fCMIntentJobService.getClass();
Bundle extras = intent.getExtras();
if (extras != null) {
y.y(fCMIntentJobService);
AbstractC0027c.u(fCMIntentJobService, extras, new H6(20));
}
jobIntentService$GenericWorkItem.complete();
}
}
@Override
public void onCancelled(Void r1) {
i.this.c();
}
@Override
public void onPostExecute(Void r1) {
i.this.c();
}
};
JobIntentService$WorkEnqueuer jobIntentService$WorkEnqueuer = this.d;
if (jobIntentService$WorkEnqueuer != null && z) {
jobIntentService$WorkEnqueuer.serviceProcessingStarted();
}
executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
}
}
public final void c() {
ArrayList arrayList = this.g;
if (arrayList != null) {
synchronized (arrayList) {
try {
this.e = null;
ArrayList arrayList2 = this.g;
if (arrayList2 != null && arrayList2.size() > 0) {
a(false);
} else if (!this.f) {
this.d.serviceProcessingFinished();
}
} finally {
}
}
}
}
@Override
public final IBinder onBind(Intent intent) {
JobIntentService$JobServiceEngineImpl jobIntentService$JobServiceEngineImpl = this.c;
if (jobIntentService$JobServiceEngineImpl != null) {
return jobIntentService$JobServiceEngineImpl.compatGetBinder();
}
return null;
}
@Override
public final void onCreate() {
super.onCreate();
if (Build.VERSION.SDK_INT >= 26) {
this.c = new JobIntentService$JobServiceEngineImpl(this);
this.d = null;
}
this.d = b(this, new ComponentName(this, getClass()), false, 0, true);
}
@Override
public final void onDestroy() {
super.onDestroy();
JobIntentService$CommandProcessor jobIntentService$CommandProcessor = this.e;
if (jobIntentService$CommandProcessor != null) {
jobIntentService$CommandProcessor.cancel(false);
}
synchronized (this.g) {
this.f = true;
this.d.serviceProcessingFinished();
}
}
@Override
public final int onStartCommand(final Intent intent, int i2, final int i3) {
this.d.serviceStartReceived();
synchronized (this.g) {
ArrayList arrayList = this.g;
if (intent == null) {
intent = new Intent();
}
arrayList.add(new JobIntentService$GenericWorkItem(intent, i3) {
final Intent mIntent;
final int mStartId;
{
this.mIntent = intent;
this.mStartId = i3;
}
@Override
public void complete() {
i.this.stopSelf(this.mStartId);
}
@Override
public Intent getIntent() {
return this.mIntent;
}
});
a(true);
}
return 3;
}
}