MT Manager v2.15.3版本的 MD5 值为:27f0d62ac7123fbbaefff319fdab9f13

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


package l;

import android.app.Service;
import android.net.Uri;
import com.alipay.sdk.m.l.a;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.net.ServerSocket;

public final class C3851 extends Thread {

    public ServerSocket f12530;

    public final WeakReference f12531;

    public C13114 f12532;

    public final boolean m10349() {
        return this.f12530 != null;
    }

    public final synchronized void m10350() {
        final ServerSocket serverSocket = this.f12530;
        if (serverSocket != null) {
            this.f12530 = null;
            C12357.f36475.execute(new Runnable() {
                @Override
                public final void run() {
                    try {
                        serverSocket.close();
                    } catch (IOException e) {
                        throw new RuntimeException(e);
                    }
                }
            });
        }
    }

    @Override
    public final void run() {
        Service service;
        WeakReference weakReference = this.f12531;
        try {
            this.f12530 = new ServerSocket(0);
            while (!isInterrupted()) {
                new RunnableC6751(this.f12530.accept(), this.f12532);
            }
            C10393.m23217(this.f12532);
            try {
                ServerSocket serverSocket = this.f12530;
                if (serverSocket != null) {
                    serverSocket.close();
                    this.f12530 = null;
                }
            } catch (IOException unused) {
            }
            service = (Service) weakReference.get();
            if (service == null) {
                return;
            }
        } catch (Exception unused2) {
            C10393.m23217(this.f12532);
            try {
                ServerSocket serverSocket2 = this.f12530;
                if (serverSocket2 != null) {
                    serverSocket2.close();
                    this.f12530 = null;
                }
            } catch (IOException unused3) {
            }
            service = (Service) weakReference.get();
            if (service == null) {
                return;
            }
        } catch (Throwable th) {
            C10393.m23217(this.f12532);
            try {
                ServerSocket serverSocket3 = this.f12530;
                if (serverSocket3 != null) {
                    serverSocket3.close();
                    this.f12530 = null;
                }
            } catch (IOException unused4) {
            }
            Service service2 = (Service) weakReference.get();
            if (service2 != null) {
                service2.stopSelf();
                throw th;
            }
            throw th;
        }
        service.stopSelf();
    }

    public final Uri m10348(C13114 c13114) {
        C13114 c131142 = this.f12532;
        String str = c13114.f39401;
        if (c131142 == null || !c131142.f39401.equals(str)) {
            final C13114 c131143 = this.f12532;
            if (c131143 != null) {
                C12357.f36475.execute(new Runnable() {
                    @Override
                    public final void run() {
                        C10393.m23217(C13114.this);
                    }
                });
            }
            this.f12532 = c13114;
        }
        return new Uri.Builder().scheme(a.r).encodedAuthority("127.0.0.1:" + this.f12530.getLocalPort()).path(str + "/" + c13114.f39405).build();
    }

    public C3851(Service service) {
        this.f12531 = new WeakReference(service);
        setDaemon(true);
        start();
    }
}