APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Music Player
版本号:1.0
包名称:music.downloader.mp3player.downloadmusic

MD5 校验值:61e58c10a11e4adec8760ee3854e996a

反编译源代码说明

l.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package c4;

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 com.liulishuo.filedownloader.services.FileDownloadService$SeparateProcessService;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import n4.AbstractC2098a;
import n4.AbstractC2102e;

public final class l implements p, ServiceConnection {

    public final k f5691b;
    public volatile i4.e e;

    public final Class f5692f;

    public boolean f5693j = false;

    public final ArrayList f5694k;

    public final ArrayList f5695l;

    public l() {
        new HashMap();
        this.f5694k = new ArrayList();
        this.f5695l = new ArrayList();
        this.f5692f = FileDownloadService$SeparateProcessService.class;
        ?? binder = new Binder();
        binder.attachInterface(binder, "com.liulishuo.filedownloader.i.IFileDownloadIPCCallback");
        this.f5691b = binder;
    }

    @Override
    public final byte M(int i5) {
        if (!a()) {
            AbstractC2098a.p("request get the status for the task[%d] in the download service", Integer.valueOf(i5));
            return (byte) 0;
        }
        try {
            return this.e.M(i5);
        } catch (RemoteException e) {
            e.printStackTrace();
            return (byte) 0;
        }
    }

    @Override
    public final boolean X(int i5) {
        if (!a()) {
            AbstractC2098a.p("request pause the task[%d] in the download service", Integer.valueOf(i5));
            return false;
        }
        try {
            return this.e.X(i5);
        } catch (RemoteException e) {
            e.printStackTrace();
            return false;
        }
    }

    @Override
    public final boolean a() {
        if (this.e != null) {
            return true;
        }
        return false;
    }

    @Override
    public final void c0() {
        if (!a()) {
            AbstractC2098a.p("request clear all tasks data in the database", new Object[0]);
            return;
        }
        try {
            this.e.c0();
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }

    @Override
    public final void onServiceConnected(ComponentName componentName, IBinder iBinder) {
        i4.e eVar;
        int i5 = i4.d.f15940b;
        if (iBinder == null) {
            eVar = null;
        } else {
            IInterface queryLocalInterface = iBinder.queryLocalInterface("com.liulishuo.filedownloader.i.IFileDownloadIPCService");
            if (queryLocalInterface != null && (queryLocalInterface instanceof i4.e)) {
                eVar = (i4.e) queryLocalInterface;
            } else {
                ?? obj = new Object();
                obj.f15939b = iBinder;
                eVar = obj;
            }
        }
        this.e = eVar;
        try {
            this.e.l3(this.f5691b);
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        List list = (List) this.f5695l.clone();
        this.f5695l.clear();
        Iterator it = list.iterator();
        while (it.hasNext()) {
            ((Runnable) it.next()).run();
        }
        d.f5677a.b(new B0.n(1, 16));
    }

    @Override
    public final void onServiceDisconnected(ComponentName componentName) {
        this.e = null;
        d.f5677a.b(new B0.n(3, 16));
    }

    @Override
    public final void r0() {
        if (!a()) {
            AbstractC2098a.p("request pause all tasks in the download service", new Object[0]);
            return;
        }
        try {
            this.e.r0();
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }

    @Override
    public final void s0() {
        if (!a()) {
            AbstractC2098a.p("request cancel the foreground status[%B] for the download service", Boolean.TRUE);
            return;
        }
        try {
            try {
                this.e.k1(true);
            } catch (RemoteException e) {
                e.printStackTrace();
            }
        } finally {
            this.f5693j = false;
        }
    }

    @Override
    public final boolean t0(int i5, int i6, String str, String str2, boolean z6) {
        if (!a()) {
            AbstractC2098a.p("request start the task([%s], [%s], [%B]) in the download service", str, str2, Boolean.valueOf(z6));
            return false;
        }
        try {
            this.e.B0(str, str2, z6, i5, i6, 0, false, null, false);
            return true;
        } catch (RemoteException e) {
            e.printStackTrace();
            return false;
        }
    }

    @Override
    public final boolean u0() {
        return this.f5693j;
    }

    @Override
    public final void v0(Context context) {
        if (!AbstractC2102e.h(context)) {
            Intent intent = new Intent(context, (Class<?>) this.f5692f);
            ArrayList arrayList = this.f5694k;
            if (!arrayList.contains(context)) {
                arrayList.add(context);
            }
            boolean l6 = AbstractC2102e.l(context);
            this.f5693j = l6;
            intent.putExtra("is_foreground", l6);
            context.bindService(intent, this, 1);
            if (this.f5693j) {
                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");
    }
}