正在查看: MedEd v5.3.6 应用的 FileDownloadService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MedEd v5.3.6 应用的 FileDownloadService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.penpencil.network.services;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Build;
import android.os.IBinder;
import com.tonyodev.fetch2.Download;
import defpackage.C0154Uh;
import defpackage.InterfaceC0165Xc1;
import defpackage.fV1;
import defpackage.le1;
import defpackage.rt0;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata
public final class FileDownloadService extends Service implements fV1.a {
public static final int f = 0;
public final InterfaceC0165Xc1 a = le1.b(new KT0(this, 10));
public final InterfaceC0165Xc1 b = le1.b(new yt(this, 9));
public final InterfaceC0165Xc1 c = le1.b(new kH2(8));
public final InterfaceC0165Xc1 d = le1.b(new ns3(this, 18));
public final int e = 20015;
@Override
public final void a() {
InterfaceC0165Xc1 interfaceC0165Xc1 = this.a;
rm2.c("FILE_DOWNLOAD - FileDownloadService onNetworkChanged, networkInfoProvider.isNetworkAvailable " + ((fV1) interfaceC0165Xc1.getValue()).a());
fV1 fv1 = (fV1) interfaceC0165Xc1.getValue();
if (fv1 != null) {
fv1.a();
}
boolean a = ((fV1) interfaceC0165Xc1.getValue()).a();
InterfaceC0165Xc1 interfaceC0165Xc12 = this.c;
if (a) {
((rt0) interfaceC0165Xc12.getValue()).p();
return;
}
if (C0154Uh.a) {
return;
}
if (Build.VERSION.SDK_INT >= 26) {
stopForeground(1);
}
rt0 rt0Var = (rt0) interfaceC0165Xc12.getValue();
rt0 rt0Var2 = rt0.y;
Context context = rt0Var.a;
if (rt0.a.d(context)) {
FileDownloadService fileDownloadService = rt0Var.u;
if (fileDownloadService != null) {
rL2.a(fileDownloadService);
}
try {
context.unbindService(rt0Var.v);
} catch (Exception e) {
rm2.c("FILE_DOWNLOAD Error unbinding service: " + e.getMessage());
}
context.stopService((Intent) rt0Var.g.getValue());
rt0Var.u = null;
rt0.a.d(context);
}
}
public final void b(Download download, PendingIntent pendingIntent) {
Intrinsics.checkNotNullParameter(download, "download");
((Ht0) this.b.getValue()).d(download, pendingIntent);
}
@Override
public final boolean bindService(Intent service, ServiceConnection conn, int i) {
Intrinsics.checkNotNullParameter(service, "service");
Intrinsics.checkNotNullParameter(conn, "conn");
return super.bindService(service, conn, i);
}
@Override
public final IBinder onBind(Intent intent) {
Intrinsics.checkNotNullParameter(intent, "intent");
return (a) this.d.getValue();
}
@Override
public final void onCreate() {
super.onCreate();
fV1 fv1 = (fV1) this.a.getValue();
fv1.getClass();
Intrinsics.checkNotNullParameter(this, "networkChangeListener");
synchronized (fv1.c) {
fv1.d.add(this);
}
}
@Override
public final void onDestroy() {
fV1 fv1 = (fV1) this.a.getValue();
fv1.getClass();
Intrinsics.checkNotNullParameter(this, "networkChangeListener");
synchronized (fv1.c) {
fv1.d.remove(this);
}
if (Build.VERSION.SDK_INT >= 26) {
stopForeground(1);
}
super.onDestroy();
}
@Override
public final int onStartCommand(Intent intent, int i, int i2) {
if (Build.VERSION.SDK_INT < 26 || !C0154Uh.a) {
return 1;
}
Ht0 ht0 = (Ht0) this.b.getValue();
int i3 = this.e;
startForeground(i3, ht0.c(i3));
return 1;
}
@Override
public final void onTimeout(int i) {
stopSelf();
super.onTimeout(i);
}
public final void onTimeout(int i, int i2) {
stopSelf();
super.onTimeout(i, i2);
}
}