Magisk Manager v7.5.1版本的 MD5 值为:0bfc5a310d7f363f9c9c3d5f4836d1d9

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


package a;

import a.bv1;
import a.dp0;
import android.content.pm.PackageManager;
import com.topjohnwu.magisk.R;
import java.util.Collection;
import java.util.Iterator;
import kotlin.jvm.internal.DefaultConstructorMarker;

public final class b31 extends cp0 {
    public final s61<String> A;
    public final s61<h31> B;
    public final s61<h31> C;
    public final j01<dp0.a> D;
    public final s61<Boolean> E;
    public boolean F;
    public final ar0 G;
    public final boolean k;
    public final s61<Boolean> l;
    public final s61<Boolean> m;
    public final s61<Boolean> n;
    public final s61<Boolean> o;
    public final s61<g31> p;
    public final j01<String> q;
    public final s61<String> r;
    public final s61<String> s;
    public final j01<String> t;
    public final s61<g31> u;
    public final j01<g31> v;
    public final j01<String> w;
    public final s61<String> x;
    public final s61<String> y;
    public final j01<String> z;

    public static final class a {
        public a(DefaultConstructorMarker defaultConstructorMarker) {
        }
    }

    static {
        new a(null);
    }

    public b31(ar0 ar0Var) {
        super(dp0.a.LOADED);
        Object bVar;
        this.G = ar0Var;
        try {
            bv1.a aVar = bv1.e;
            ((PackageManager) v3.c().b.a(mx1.a(PackageManager.class), (xk2) null, (sw1<wk2>) null)).getPackageInfo("com.google.android.gms", 0);
            bVar = true;
        } catch (Throwable th) {
            bv1.a aVar2 = bv1.e;
            bVar = new bv1.b(th);
        }
        this.k = ((Boolean) (bv1.b(bVar) != null ? false : bVar)).booleanValue();
        this.l = new s61<>(false);
        this.m = new s61<>(Boolean.valueOf(mo0.k.c()));
        this.n = new s61<>(Boolean.valueOf(mo0.k.d()));
        this.o = new s61<>(Boolean.valueOf(mo0.k.e()));
        this.p = new s61<>(g31.LOADING);
        this.q = new j01<>(new pk[]{this.p}, new f1(1, this));
        this.r = new s61<>("");
        this.s = new s61<>("");
        this.t = new j01<>(new pk[]{this.p}, q0.e);
        this.u = new s61<>(g31.LOADING);
        this.v = new j01<>(new pk[]{this.u, i()}, new d31(this));
        this.w = new j01<>(new pk[]{this.v}, new f1(2, this));
        this.x = new s61<>("");
        this.y = new s61<>("");
        this.z = new j01<>(new pk[]{this.v}, q0.f);
        this.A = new s61<>(cw0.a(R.string.f25570_resource_name_obfuscated_res_0x7f1500c5, new Object[0]));
        this.B = new s61<>(h31.IDLE);
        this.C = new s61<>(h31.IDLE);
        this.D = new j01<>(new pk[]{this.B, this.C}, new e31(this));
        this.E = new s61<>(false);
        v3.a((rk) this.m, false, (tw1) s0.e, 1);
        v3.a((rk) this.n, false, (tw1) s0.f, 1);
        v3.a((rk) this.o, false, (tw1) s0.g, 1);
        v3.a((rk) i(), false, (tw1) new c1(7, this), 1);
        a(false);
    }

    public final void a(f31 f31Var) {
        Object iz0Var;
        int i = c31.d[f31Var.ordinal()];
        if (i == 1) {
            iz0Var = new iz0();
        } else {
            if (i != 2) {
                throw new zu1();
            }
            iz0Var = new gz0();
        }
        a((b31) iz0Var);
    }

    public final void a(boolean z) {
        if (z) {
            mo0.k.b().a();
        }
        this.E.b((s61<Boolean>) Boolean.valueOf(mo0.k.a().d()));
        pj1 a2 = pj1.b(k.c).a((rj1) (i().b().booleanValue() ? this.G.c().c() : gu1.a(sm1.d)));
        ex1.a((Object) a2, "Completable.fromAction {…   }.andThen(fetchUpdate)");
        pj1 a3 = a(a2, (dp0) this, true);
        ex1.a((Object) a3, "Completable.fromAction {…    .applyViewModel(this)");
        pj1 b = a3.b(new ov0(new p0(4, this)));
        ex1.a((Object) b, "Completable.fromAction {…heck_text.res()\n        }");
        v3.a(b, (tw1) null, new p0(5, this), 1);
    }

    public final void b(f31 f31Var) {
        Object jz0Var;
        int i = c31.c[f31Var.ordinal()];
        if (i == 1) {
            jz0Var = new jz0();
        } else {
            if (i != 2) {
                throw new zu1();
            }
            jz0Var = new hz0();
        }
        a((b31) jz0Var);
    }

    public final void c(int i) {
        s61<h31> s61Var;
        h31 h31Var;
        if ((i & 15) == 0) {
            i71.Companion.b();
            boolean z = (i & 32) != 0;
            i71.Companion.a();
            boolean z2 = (i & 16) != 0;
            this.A.b((s61<String>) cw0.a(R.string.f25560_resource_name_obfuscated_res_0x7f1500c4, new Object[0]));
            this.B.b((s61<h31>) (z ? h31.PASS : h31.FAILED));
            s61Var = this.C;
            h31Var = z2 ? h31.PASS : h31.FAILED;
        } else {
            if (i != -2) {
                this.B.b((s61<h31>) h31.IDLE);
                this.C.b((s61<h31>) h31.IDLE);
                s61<String> s61Var2 = this.A;
                i71.Companion.c();
                s61Var2.b((s61<String>) (i == 1 ? cw0.a(R.string.f25580_resource_name_obfuscated_res_0x7f1500c6, new Object[0]) : cw0.a(R.string.f25550_resource_name_obfuscated_res_0x7f1500c3, new Object[0])));
                return;
            }
            this.B.b((s61<h31>) h31.IDLE);
            s61Var = this.C;
            h31Var = h31.IDLE;
        }
        s61Var.b((s61<h31>) h31Var);
    }

    public final void j() {
        boolean z;
        g31[] g31VarArr = {g31.NOT_INSTALLED, g31.LOADING};
        Collection b = g31VarArr.length > 0 ? gu1.b(g31VarArr) : ov1.d;
        if (!(b instanceof Collection) || !b.isEmpty()) {
            Iterator it = b.iterator();
            while (it.hasNext()) {
                if (((g31) it.next()) == this.p.b()) {
                    z = true;
                    break;
                }
            }
        }
        z = false;
        if (z || this.F) {
            return;
        }
        x81 a2 = ja1.d("env_check").a();
        ex1.a((Object) a2, "Shell.su(\"env_check\").exec()");
        if (a2.b()) {
            return;
        }
        this.F = true;
        a((b31) new bz0());
    }

    public final j01<g31> k() {
        return this.v;
    }

    public final s61<String> l() {
        return this.A;
    }

    public final void m() {
        a((b31) new mz0("https://github.com/topjohnwu/Magisk"));
    }

    public final void n() {
        a((b31) new mz0("https://www.patreon.com/topjohnwu"));
    }

    public final void o() {
        a((b31) new mz0("https://www.paypal.me/topjohnwu"));
    }

    public final void p() {
        a((b31) new mz0("https://twitter.com/topjohnwu"));
    }

    public final void q() {
        a((b31) new mz0("http://forum.xda-developers.com/showthread.php?t=3432382"));
    }
}