导航菜单

页面标题

页面副标题

050 IP Phone v2.3.0 - y.java 源代码

正在查看: 050 IP Phone v2.3.0 应用的 y.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package m5;

import android.R;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class y implements Cloneable {
    private static b K0;
    private static p7.a L0 = s5.d.a(y.class);
    private static final String[] M0 = {"Undefined", "UAC", "UAS", "Proxy"};
    private n5.j A0;
    private w B0;
    private q5.d C0;
    private q5.d D0;
    private q5.d E0;
    private o F0;
    private r G0;
    private Map<String, Object> H0;
    private boolean I0;
    private boolean J0;
    private int X;
    private int Y;
    private boolean Z;
    private int s0;
    private q5.f t0;
    private b u0;
    private long v0;
    private long w0;
    private z x;
    private b x0;
    private boolean y;
    private long y0;

    private q5.d f269z0;

    static {
        try {
            K0 = new b("<sip:127.0.0.1>;_dummy_");
        } catch (o5.b e) {
            L0.h("Failed to create Address", e);
        }
    }

    public y(q5.f fVar, String str, b bVar, b bVar2, o oVar) {
        this(fVar, str, bVar, 1L, bVar2, -1L, oVar);
    }

    private static String J(int i) {
        return i == 0 ? "Initial" : 1 == i ? "Early" : 2 == i ? "Confirmed" : 3 == i ? "Terminated" : "Unknown";
    }

    private boolean O(w wVar) {
        boolean z = this.x.e() != null && (r() == 2 || r() == 8);
        if (L0.g()) {
            L0.k("checking if the request within the dialog or not,method=[" + t.b(wVar.G()) + "],dialog=[" + z + "]");
        }
        return z;
    }

    private boolean Q(w wVar) {
        b0 g = H().g();
        if (g == null || wVar.G() == 1) {
            return false;
        }
        n5.z r = g.r();
        return r == null || r.h(wVar.G());
    }

    private void b() {
        if (R()) {
            return;
        }
        throw new IllegalStateException("SIP session is already invalidated,sessionId=[" + n() + "]");
    }

    private synchronized void f0(n5.j jVar) {
        this.A0 = jVar;
    }

    private q5.d j() {
        b0 g = H().g();
        return g == null ? z() : (G() == null || 2 != g.G()) ? z() : G();
    }

    private void k0(w wVar) {
        if (wVar.W() || wVar.d0() || wVar.Z()) {
            n5.e eVar = (n5.e) wVar.f0(235274253);
            if (eVar != null) {
                e0((q5.d) eVar.b().l().clone());
            } else {
                e0((q5.d) wVar.N().l().clone());
            }
            if (L0.c()) {
                L0.a("[" + u() + "]: updating remote target,sessionId=[" + n() + "],remoteTarget=[" + this.f269z0 + "]");
            }
        }
    }

    private void l0(x xVar) {
        if (xVar.W() || xVar.d0() || xVar.Z()) {
            int I = I();
            int P0 = xVar.P0();
            if (I == 0 || 1 == I) {
                if (P0 >= 300) {
                    e0(null);
                    return;
                }
                n5.e eVar = (n5.e) xVar.f0(235274253);
                if (eVar != null) {
                    e0((q5.d) eVar.b().l().clone());
                    if (L0.c()) {
                        L0.a("[" + u() + "]: updating remote target,sessionId=[" + n() + "],remoteTarget=[" + this.f269z0 + "]");
                    }
                }
            }
        }
    }

    private synchronized void m0(w wVar) {
        if (wVar.W() || wVar.d0() || wVar.Z()) {
            n5.j I = wVar.I();
            if (I != null && I.d() > 0) {
                if (L0.g()) {
                    L0.k("[" + u() + "]: updating route set,sessionId=[" + n() + "]");
                }
                f0((n5.j) I.clone());
            }
        }
    }

    private synchronized void n0(x xVar) {
        if (xVar.W() || xVar.d0() || xVar.Z()) {
            int I = I();
            if (I == 0 || 1 == I) {
                if (xVar.P0() < 300) {
                    n5.j I2 = xVar.I();
                    if (I2 != null && I2.d() > 0) {
                        if (L0.g()) {
                            L0.k("[" + u() + "]: updating route set,sessionId=[" + n() + "]");
                        }
                        n5.j jVar = (n5.j) I2.clone();
                        jVar.m();
                        f0(jVar);
                    }
                } else {
                    f0(null);
                }
            }
        }
    }

    private void o0(int i) {
        int I = I();
        if (I == 0) {
            if (i < 200) {
                i0(1);
                return;
            } else {
                if (i < 300) {
                    i0(2);
                    return;
                }
                return;
            }
        }
        if (I != 1) {
            if (I != 2) {
                i0(3);
            }
        } else if (200 <= i && i < 300) {
            i0(2);
        } else if (300 <= i) {
            i0(0);
        }
    }

    private static String w(int i) {
        try {
            return M0[i];
        } catch (Exception unused) {
            return "Unknown";
        }
    }

    boolean A() {
        return this.I0;
    }

    public b C() {
        return this.x0;
    }

    public String D() {
        return this.x.e();
    }

    public q5.f E() {
        return this.t0;
    }

    protected long F() {
        return this.v0;
    }

    public q5.d G() {
        return this.D0;
    }

    protected o H() {
        return this.F0;
    }

    public int I() {
        return this.X;
    }

    boolean K() {
        return this.J0;
    }

    protected String L() {
        return "";
    }

    public synchronized void M() {
        if (this.Z) {
            this.Z = false;
            H().l(this);
            Y(null);
        }
    }

    public synchronized boolean N() {
        return this.y;
    }

    synchronized boolean P() {
        return this.Y == 3;
    }

    public synchronized boolean R() {
        return this.Z;
    }

    protected void S(w wVar) {
        if (L0.g()) {
            L0.k("[" + u() + "]: processing incoming request,sessionId=[" + n() + "]");
        }
        if (wVar.T()) {
            o0(487);
        }
    }

    protected synchronized void T(x xVar) {
        try {
            if (L0.g()) {
                L0.k("[" + u() + "]: processing incoming response,sessionId=[" + n() + "]");
            }
            if (!P()) {
                n0(xVar);
                l0(xVar);
            }
            if (!xVar.Y()) {
                o0(xVar.P0());
            }
        } catch (Throwable th) {
            throw th;
        }
    }

    synchronized void U(x xVar) {
        try {
            if (L0.g()) {
                L0.k("[" + u() + "]: processing outgoing response,sessionId=[" + n() + "]");
            }
            if (xVar.N0().V() || (xVar.W() && xVar.P0() < 300 && (I() == 0 || 1 == I()))) {
                m0(xVar.N0());
                k0(xVar.N0());
                o0(xVar.P0());
            }
        } catch (Throwable th) {
            throw th;
        }
    }

    protected synchronized void V(q5.d dVar) {
        n5.j jVar = this.A0;
        if (jVar != null && jVar.d() > 0) {
            ((n5.e) this.A0.h(0)).b().z((q5.d) dVar.clone());
        }
    }

    void W(w wVar) {
        this.B0 = wVar;
    }

    public synchronized void X(String str, Object obj) {
        this.H0.put(str, obj);
    }

    public void Y(r rVar) {
        this.G0 = rVar;
    }

    protected void Z(long j) {
        this.w0 = j;
    }

    void a0(int i) {
        this.s0 = i;
    }

    public synchronized void b0(int i) {
        if (this.Y != 0) {
            throw new IllegalStateException("this session already has a mode : " + u());
        }
        this.Y = i;
    }

    void c() {
        synchronized (this.H0) {
            this.H0.clear();
        }
    }

    public void c0(q5.d dVar) {
        this.C0 = dVar;
    }

    public Object clone() {
        try {
            y yVar = (y) super.clone();
            yVar.x = (z) this.x.clone();
            synchronized (yVar) {
                yVar.Z = true;
                yVar.y = true;
            }
            yVar.X = 0;
            q5.f fVar = this.t0;
            if (fVar != null) {
                yVar.t0 = (q5.f) fVar.clone();
            }
            b bVar = this.u0;
            if (bVar != null) {
                yVar.u0 = (b) bVar.clone();
            }
            b bVar2 = this.x0;
            if (bVar2 != null) {
                yVar.x0 = (b) bVar2.clone();
            }
            q5.d dVar = this.f269z0;
            if (dVar != null) {
                yVar.f269z0 = (q5.d) dVar.clone();
            }
            synchronized (this) {
                synchronized (yVar) {
                    try {
                        n5.j jVar = this.A0;
                        if (jVar != null) {
                            yVar.A0 = (n5.j) jVar.clone();
                        }
                        this.Y = yVar.Y;
                    } catch (Throwable th) {
                        throw th;
                    }
                }
            }
            return yVar;
        } catch (CloneNotSupportedException unused) {
            return null;
        }
    }

    protected w d(w wVar) {
        y L = wVar.L();
        if (L == null) {
            throw new IllegalArgumentException("req has no SIP session");
        }
        if (this != L) {
            throw new IllegalArgumentException("req has illegal SIP session");
        }
        w wVar2 = new w(wVar, 4, (b) wVar.w().clone(), (b) wVar.N().clone());
        wVar2.v0(this.F0);
        return wVar2;
    }

    public void d0(String str) {
        if (str == null) {
            this.x0.o("tag");
            this.x.g("");
        } else {
            this.x0.t("tag", str);
            this.x.g(str);
        }
    }

    public w e(int i) {
        long j = this.w0;
        this.w0 = 1 + j;
        return f(i, j);
    }

    protected void e0(q5.d dVar) {
        this.f269z0 = dVar;
    }

    protected w f(int i, long j) {
        b();
        w wVar = new w(this, i, (q5.f) E().clone(), (b) o().clone(), (b) C().clone());
        wVar.v0(H());
        wVar.s0(50462731, new n5.p(i()));
        wVar.s0(R.attr.multiprocess, new n5.i(j, i));
        wVar.s0(R.drawable.ic_lock_idle_low_battery, new n5.k(70L));
        q5.d l = l();
        if (l == null || l.y()) {
            q5.d dVar = this.f269z0;
            if (dVar != null) {
                wVar.U0((q5.f) dVar.clone());
            }
        } else {
            wVar.U0(l);
        }
        j0(wVar);
        wVar.P0(k(wVar));
        n5.w wVar2 = new n5.w("SIP/2.0", 1, "127.0.0.1", -1);
        wVar2.z(n5.t.b(wVar, false));
        wVar2.k("_dummy_", "");
        wVar.s0(100728920, wVar2);
        if (wVar.a0() || wVar.W() || wVar.e0() || wVar.d0() || wVar.Z()) {
            wVar.s0(235274253, new n5.e((b) K0.clone()));
        }
        return wVar;
    }

    w g() {
        return this.B0;
    }

    protected void g0(long j) {
        this.v0 = j;
    }

    public synchronized Object h(String str) {
        return this.H0.get(str);
    }

    public void h0(q5.d dVar) {
        this.D0 = dVar;
    }

    public String i() {
        return this.x.c();
    }

    void i0(int i) {
        if (L0.c()) {
            L0.a("[" + u() + "]: change state: [" + J(this.X) + "]->[" + J(i) + "]");
        }
        this.X = i;
    }

    protected void j0(w wVar) {
        n5.j jVar;
        q5.d j;
        if (wVar.G() == 4) {
            return;
        }
        synchronized (this) {
            try {
                jVar = this.A0 != null ? new n5.j(201785414, (n5.j) this.A0.clone()) : null;
            } catch (Throwable th) {
                throw th;
            }
        }
        if (!O(wVar)) {
            List<b> h = H().h();
            if (!Q(wVar) || h == null || h.size() <= 0) {
                b0 g = H().g();
                if (g != null && !g.x() && ((wVar.G() == 2 || wVar.G() == 11) && (j = j()) != null)) {
                    if (jVar == null) {
                        jVar = new n5.j(201785414);
                    }
                    jVar.b(0, new n5.e(new b((q5.f) j.clone())));
                }
            } else {
                jVar = new n5.j(201785414);
                Iterator<b> it = h.iterator();
                while (it.hasNext()) {
                    jVar.c(new n5.e(it.next()));
                }
            }
        }
        if (jVar != null) {
            q5.d l = l();
            if (l != null && !l.y()) {
                b bVar = new b((q5.f) this.f269z0.clone());
                jVar.l(0);
                jVar.c(new n5.e(bVar));
            }
            wVar.r0(jVar);
        }
    }

    public q5.d k(w wVar) {
        q5.d j;
        if (L0.g()) {
            L0.k("getting destination,service-route=[" + this.F0.h() + "]");
        }
        if ((I() == 0 || !(this.x.e() != null || wVar.W() || wVar.d0() || wVar.Z())) && (j = j()) != null) {
            return j;
        }
        q5.d l = l();
        if (l != null) {
            return l;
        }
        q5.d dVar = this.f269z0;
        if (dVar != null) {
            return dVar;
        }
        if (this.x0.l().h()) {
            return (q5.d) this.x0.l();
        }
        return null;
    }

    synchronized q5.d l() {
        n5.j jVar = this.A0;
        if (jVar == null || jVar.d() <= 0) {
            return null;
        }
        q5.f l = ((n5.e) this.A0.h(0)).b().l();
        if (!l.h()) {
            return null;
        }
        return (q5.d) l.clone();
    }

    public r m() {
        return this.G0;
    }

    public z n() {
        return this.x;
    }

    public b o() {
        return this.u0;
    }

    public long p() {
        return this.w0;
    }

    public String q() {
        return this.x.d();
    }

    int r() {
        return this.s0;
    }

    public synchronized int t() {
        return this.Y;
    }

    public String toString() {
        return this.x.toString();
    }

    public String u() {
        return w(t());
    }

    public q5.d x() {
        return this.E0;
    }

    Set<q5.d> y() {
        return H().getContext().a();
    }

    public q5.d z() {
        return this.C0;
    }

    public y(q5.f fVar, String str, b bVar, long j, b bVar2, long j8, o oVar) {
        this.y = false;
        this.X = 0;
        this.Y = 0;
        this.Z = true;
        this.s0 = -1;
        this.u0 = null;
        this.v0 = 0L;
        this.x0 = null;
        this.f269z0 = null;
        this.A0 = null;
        this.C0 = null;
        this.D0 = null;
        this.E0 = null;
        this.F0 = null;
        this.G0 = null;
        this.H0 = new HashMap();
        this.I0 = true;
        this.J0 = true;
        this.t0 = fVar;
        this.u0 = bVar;
        this.w0 = j;
        this.x0 = bVar2;
        if (fVar == null) {
            this.t0 = bVar2.l();
        }
        this.y0 = j8;
        this.F0 = oVar;
        String i = this.u0.i("tag");
        this.x = new z(str, i == null ? p5.b.b(L()) : i, this.x0.i("tag"));
    }
}