恐 怖 老 奶 奶1破 解 版 中 文 版 无 敌 版 v4.15.00版本的 MD5 值为:2c4218ea002b12a6cce81f33a9f0144d
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.kwai.filedownloader.services;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.RemoteException;
import com.kwai.filedownloader.event.DownloadServiceConnectChangedEvent;
import com.kwai.filedownloader.u;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public abstract class a<CALLBACK extends Binder, INTERFACE extends IInterface> implements ServiceConnection, u {
public final Class<?> aGO;
public volatile INTERFACE aHt;
public final HashMap<String, Object> aHu = new HashMap<>();
public final List<Context> aHv = new ArrayList();
public final ArrayList<Runnable> aEC = new ArrayList<>();
public final CALLBACK aHs = Ha();
public a(Class<?> cls) {
this.aGO = cls;
}
private void a(Context context, Runnable runnable) {
if (com.kwai.filedownloader.e.f.dz(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");
}
if (com.kwai.filedownloader.e.d.aHT) {
com.kwai.filedownloader.e.d.g(this, "bindStartByContext %s", context.getClass().getSimpleName());
}
Intent intent = new Intent(context, this.aGO);
if (!this.aHv.contains(context)) {
this.aHv.add(context);
}
context.bindService(intent, this, 1);
context.startService(intent);
}
private void bP(boolean z) {
if (com.kwai.filedownloader.e.d.aHT) {
com.kwai.filedownloader.e.d.g(this, "release connect resources %s", this.aHt);
}
this.aHt = null;
com.kwai.filedownloader.f.GI().c(new DownloadServiceConnectChangedEvent(DownloadServiceConnectChangedEvent.ConnectStatus.lost, this.aGO));
}
public abstract CALLBACK Ha();
public final INTERFACE It() {
return this.aHt;
}
public abstract void a(INTERFACE r1, CALLBACK callback);
public abstract INTERFACE b(IBinder iBinder);
@Override
public final void dw(Context context) {
a(context, (Runnable) null);
}
@Override
public final boolean isConnected() {
return It() != null;
}
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
this.aHt = b(iBinder);
if (com.kwai.filedownloader.e.d.aHT) {
com.kwai.filedownloader.e.d.g(this, "onServiceConnected %s %s", componentName, this.aHt);
}
try {
a((a<CALLBACK, INTERFACE>) this.aHt, (INTERFACE) this.aHs);
} catch (RemoteException e2) {
e2.printStackTrace();
}
this.aEC.clear();
for (Runnable runnable : (List) this.aEC.clone()) {
runnable.run();
}
com.kwai.filedownloader.f.GI().c(new DownloadServiceConnectChangedEvent(DownloadServiceConnectChangedEvent.ConnectStatus.connected, this.aGO));
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
if (com.kwai.filedownloader.e.d.aHT) {
com.kwai.filedownloader.e.d.g(this, "onServiceDisconnected %s %s", componentName, this.aHt);
}
bP(true);
}
}