正在查看: 星辰VPN v1.2.3 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 星辰VPN v1.2.3 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package k3;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Binder;
import android.os.Build;
import android.os.IBinder;
import android.os.IInterface;
import android.os.RemoteException;
import c3.f;
import c3.n;
import c3.r;
import com.liulishuo.filedownloader.event.DownloadServiceConnectChangedEvent;
import h3.b;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
public abstract class a<CALLBACK extends Binder, INTERFACE extends IInterface> implements r, ServiceConnection {
public final CALLBACK d;
public volatile INTERFACE e;
public final Class<?> f;
public boolean g = false;
public final List<Context> h;
public final ArrayList<Runnable> i;
public a(Class<?> cls) {
new HashMap();
this.h = new ArrayList();
this.i = new ArrayList<>();
this.f = cls;
this.d = new n.a();
}
@Override
public final void d(Context context) {
if (m3.e.k(context)) {
throw new IllegalStateException("Fatal-Exception: You can't bind the FileDownloadService in :filedownloader process.\n It's the invalid operation and is likely to cause unexpected problems.\n Maybe you want to use non-separate process mode for FileDownloader, More detail about non-separate mode, please move to wiki manually: https://github.com/lingochamp/FileDownloader/wiki/filedownloader.properties");
}
Intent intent = new Intent(context, this.f);
if (!this.h.contains(context)) {
this.h.add(context);
}
boolean o = m3.e.o(context);
this.g = o;
intent.putExtra("is_foreground", o);
context.bindService(intent, this, 1);
if (!this.g) {
context.startService(intent);
} else if (Build.VERSION.SDK_INT >= 26) {
context.startForegroundService(intent);
}
}
@Override
public final boolean f() {
return this.g;
}
@Override
public final boolean isConnected() {
return this.e != null;
}
@Override
public final void onServiceConnected(ComponentName componentName, IBinder iBinder) {
INTERFACE c0022a;
int i = b.a.d;
if (iBinder == null) {
c0022a = null;
} else {
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.liulishuo.filedownloader.i.IFileDownloadIPCService");
c0022a = (queryLocalInterface == null || !(queryLocalInterface instanceof h3.b)) ? new b.a.C0022a(iBinder) : (h3.b) queryLocalInterface;
}
this.e = c0022a;
try {
this.e.q(this.d);
} catch (RemoteException e) {
e.printStackTrace();
}
List list = (List) this.i.clone();
this.i.clear();
Iterator it = list.iterator();
while (it.hasNext()) {
((Runnable) it.next()).run();
}
f.a.a.a(new DownloadServiceConnectChangedEvent(DownloadServiceConnectChangedEvent.ConnectStatus.connected));
}
@Override
public final void onServiceDisconnected(ComponentName componentName) {
this.e = null;
f.a.a.a(new DownloadServiceConnectChangedEvent(DownloadServiceConnectChangedEvent.ConnectStatus.lost));
}
}