恐 怖 老 奶 奶1破 解 版 中 文 版 无 敌 版 v4.15.00版本的 MD5 值为:2c4218ea002b12a6cce81f33a9f0144d

以下内容为反编译后的 a.java 源代码,内容仅作参考


package b.f.a.j0;

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 b.f.a.t;
import com.liulishuo.filedownloader.event.DownloadServiceConnectChangedEvent;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public abstract class a<CALLBACK extends Binder, INTERFACE extends IInterface> implements t, ServiceConnection {
    public final CALLBACK s;
    public volatile INTERFACE t;
    public final Class<?> u;
    public boolean v = false;
    public final List<Context> w;
    public final ArrayList<Runnable> x;

    public a(Class<?> cls) {
        new HashMap();
        this.w = new ArrayList();
        this.x = new ArrayList<>();
        this.u = cls;
        this.s = h();
    }

    @Override
    public void d(Context context) {
        g(context, null);
    }

    public abstract INTERFACE e(IBinder iBinder);

    @Override
    public boolean f() {
        return this.v;
    }

    public void g(Context context, Runnable runnable) {
        if (!b.f.a.l0.f.J(context)) {
            if (b.f.a.l0.d.f932a) {
                b.f.a.l0.d.a(this, "bindStartByContext %s", context.getClass().getSimpleName());
            }
            Intent intent = new Intent(context, this.u);
            if (runnable != null && !this.x.contains(runnable)) {
                this.x.add(runnable);
            }
            if (!this.w.contains(context)) {
                this.w.add(context);
            }
            boolean P = b.f.a.l0.f.P(context);
            this.v = P;
            intent.putExtra("is_foreground", P);
            context.bindService(intent, this, 1);
            if (this.v) {
                if (b.f.a.l0.d.f932a) {
                    b.f.a.l0.d.a(this, "start foreground service", new Object[0]);
                }
                if (Build.VERSION.SDK_INT >= 26) {
                    context.startForegroundService(intent);
                    return;
                }
                return;
            }
            context.startService(intent);
            return;
        }
        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");
    }

    public abstract CALLBACK h();

    public INTERFACE i() {
        return this.t;
    }

    @Override
    public boolean isConnected() {
        return i() != null;
    }

    public abstract void j(INTERFACE r1, CALLBACK callback) throws RemoteException;

    public final void k(boolean z) {
        if (!z && this.t != null) {
            try {
                l(this.t, this.s);
            } catch (RemoteException e2) {
                e2.printStackTrace();
            }
        }
        if (b.f.a.l0.d.f932a) {
            b.f.a.l0.d.a(this, "release connect resources %s", this.t);
        }
        this.t = null;
        b.f.a.f.e().b(new DownloadServiceConnectChangedEvent(z ? DownloadServiceConnectChangedEvent.ConnectStatus.lost : DownloadServiceConnectChangedEvent.ConnectStatus.disconnected, this.u));
    }

    public abstract void l(INTERFACE r1, CALLBACK callback) throws RemoteException;

    @Override
    public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
        this.t = e(iBinder);
        if (b.f.a.l0.d.f932a) {
            b.f.a.l0.d.a(this, "onServiceConnected %s %s", componentName, this.t);
        }
        try {
            j(this.t, this.s);
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
        this.x.clear();
        for (Runnable runnable : (List) this.x.clone()) {
            runnable.run();
        }
        b.f.a.f.e().b(new DownloadServiceConnectChangedEvent(DownloadServiceConnectChangedEvent.ConnectStatus.connected, this.u));
    }

    @Override
    public void onServiceDisconnected(ComponentName componentName) {
        if (b.f.a.l0.d.f932a) {
            b.f.a.l0.d.a(this, "onServiceDisconnected %s %s", componentName, this.t);
        }
        k(true);
    }
}