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

应用版本信息
应用名称:IntelliInvest
版本号:3.0.40
包名称:com.intelli.intelliinvest

MD5 校验值:8d01bad3385dcb060a6dcda2da0f8dbf

反编译源代码说明

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


package ae;

import ae.e;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import com.android.billingclient.api.g;
import com.android.billingclient.api.i;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import r3.r;

public class g0 implements Application.ActivityLifecycleCallbacks, e.b {

    private com.android.billingclient.api.d f885a;

    private final ae.a f886b;

    private Activity f887c;

    private final Context f888d;

    final e.d f889e;

    private final HashMap<String, com.android.billingclient.api.i> f890f = new HashMap<>();

    class a implements r3.g {

        private boolean f891a = false;

        final e.a0 f892b;

        final Long f893c;

        class C0012a implements e.b0 {
            C0012a() {
            }

            @Override
            public void a(Throwable th) {
                ad.b.b("IN_APP_PURCHASE", "onBillingServiceDisconnected handler error: " + th);
            }

            @Override
            public void b() {
            }
        }

        a(e.a0 a0Var, Long l10) {
            this.f892b = a0Var;
            this.f893c = l10;
        }

        @Override
        public void a(com.android.billingclient.api.h hVar) {
            if (this.f891a) {
                Log.d("InAppPurchasePlugin", "Tried to call onBillingSetupFinished multiple times.");
            } else {
                this.f891a = true;
                this.f892b.success(i0.c(hVar));
            }
        }

        @Override
        public void b() {
            g0.this.f889e.h(this.f893c, new C0012a());
        }
    }

    public g0(Activity activity, Context context, e.d dVar, ae.a aVar) {
        this.f886b = aVar;
        this.f888d = context;
        this.f887c = activity;
        this.f889e = dVar;
    }

    public static void A(e.a0 a0Var, com.android.billingclient.api.h hVar, String str) {
        a0Var.success(i0.c(hVar));
    }

    public static void B(e.a0 a0Var, com.android.billingclient.api.h hVar, com.android.billingclient.api.b bVar) {
        a0Var.success(i0.a(hVar, bVar));
    }

    public static void C(e.a0 a0Var, com.android.billingclient.api.h hVar, com.android.billingclient.api.f fVar) {
        a0Var.success(i0.b(hVar, fVar));
    }

    public static void D(e.a0 a0Var, com.android.billingclient.api.h hVar) {
        a0Var.success(i0.c(hVar));
    }

    public void E(e.a0 a0Var, com.android.billingclient.api.h hVar, List list) {
        L(list);
        a0Var.success(new e.o.a().b(i0.c(hVar)).c(i0.h(list)).a());
    }

    public static void F(e.a0 a0Var, com.android.billingclient.api.h hVar, List list) {
        a0Var.success(new e.s.a().b(i0.c(hVar)).c(i0.k(list)).a());
    }

    public static void G(e.a0 a0Var, com.android.billingclient.api.h hVar, List list) {
        a0Var.success(new e.u.a().b(i0.c(hVar)).c(i0.l(list)).a());
    }

    public static void H(e.a0 a0Var, com.android.billingclient.api.h hVar) {
        a0Var.success(i0.c(hVar));
    }

    private void K(g.c.a aVar, int i10) {
        aVar.e(i10);
    }

    private void x() {
        com.android.billingclient.api.d dVar = this.f885a;
        if (dVar != null) {
            dVar.d();
            this.f885a = null;
        }
    }

    private e.a y() {
        return new e.a("UNAVAILABLE", "BillingClient is unset. Try reconnecting.", null);
    }

    public static void z(e.a0 a0Var, com.android.billingclient.api.h hVar) {
        a0Var.success(i0.c(hVar));
    }

    public void I() {
        x();
    }

    public void J(Activity activity) {
        this.f887c = activity;
    }

    protected void L(List<com.android.billingclient.api.i> list) {
        if (list == null) {
            return;
        }
        for (com.android.billingclient.api.i iVar : list) {
            this.f890f.put(iVar.d(), iVar);
        }
    }

    @Override
    public Boolean b() {
        com.android.billingclient.api.d dVar = this.f885a;
        if (dVar != null) {
            return Boolean.valueOf(dVar.h());
        }
        throw y();
    }

    @Override
    public void c(List<e.v> list, final e.a0<e.o> a0Var) {
        if (this.f885a == null) {
            a0Var.a(y());
            return;
        }
        try {
            this.f885a.k(com.android.billingclient.api.j.a().b(i0.v(list)).a(), new r3.m() {
                @Override
                public final void a(com.android.billingclient.api.h hVar, List list2) {
                    g0.this.E(a0Var, hVar, list2);
                }
            });
        } catch (RuntimeException e10) {
            a0Var.a(new e.a("error", e10.getMessage(), Log.getStackTraceString(e10)));
        }
    }

    @Override
    public Boolean d(String str) {
        com.android.billingclient.api.d dVar = this.f885a;
        if (dVar != null) {
            return Boolean.valueOf(dVar.g(str).b() == 0);
        }
        throw y();
    }

    @Override
    public void e(final e.a0<e.i> a0Var) {
        com.android.billingclient.api.d dVar = this.f885a;
        if (dVar == null) {
            a0Var.a(y());
            return;
        }
        try {
            dVar.e(r3.k.a().a(), new r3.h() {
                @Override
                public final void a(com.android.billingclient.api.h hVar, com.android.billingclient.api.f fVar) {
                    g0.C(e.a0.this, hVar, fVar);
                }
            });
        } catch (RuntimeException e10) {
            a0Var.a(new e.a("error", e10.getMessage(), Log.getStackTraceString(e10)));
        }
    }

    @Override
    public void f(Long l10, e.h hVar, e.a0<e.k> a0Var) {
        if (this.f885a == null) {
            this.f885a = this.f886b.a(this.f888d, this.f889e, hVar);
        }
        try {
            this.f885a.o(new a(a0Var, l10));
        } catch (RuntimeException e10) {
            a0Var.a(new e.a("error", e10.getMessage(), Log.getStackTraceString(e10)));
        }
    }

    @Override
    public void g(String str, final e.a0<e.k> a0Var) {
        if (this.f885a == null) {
            a0Var.a(y());
            return;
        }
        try {
            r3.j jVar = new r3.j() {
                @Override
                public final void a(com.android.billingclient.api.h hVar, String str2) {
                    g0.A(e.a0.this, hVar, str2);
                }
            };
            this.f885a.b(r3.i.b().b(str).a(), jVar);
        } catch (RuntimeException e10) {
            a0Var.a(new e.a("error", e10.getMessage(), Log.getStackTraceString(e10)));
        }
    }

    @Override
    public void h(e.p pVar, final e.a0<e.s> a0Var) {
        com.android.billingclient.api.d dVar = this.f885a;
        if (dVar == null) {
            a0Var.a(y());
            return;
        }
        try {
            dVar.l(r3.q.a().b(i0.w(pVar)).a(), new r3.n() {
                @Override
                public final void a(com.android.billingclient.api.h hVar, List list) {
                    g0.F(e.a0.this, hVar, list);
                }
            });
        } catch (RuntimeException e10) {
            a0Var.a(new e.a("error", e10.getMessage(), Log.getStackTraceString(e10)));
        }
    }

    @Override
    public void i(final e.a0<e.k> a0Var) {
        e.a aVar;
        com.android.billingclient.api.d dVar = this.f885a;
        if (dVar == null) {
            aVar = y();
        } else {
            Activity activity = this.f887c;
            if (activity != null) {
                try {
                    dVar.n(activity, new r3.e() {
                        @Override
                        public final void a(com.android.billingclient.api.h hVar) {
                            g0.H(e.a0.this, hVar);
                        }
                    });
                    return;
                } catch (RuntimeException e10) {
                    a0Var.a(new e.a("error", e10.getMessage(), Log.getStackTraceString(e10)));
                    return;
                }
            }
            aVar = new e.a("ACTIVITY_UNAVAILABLE", "Not attempting to show dialog", null);
        }
        a0Var.a(aVar);
    }

    @Override
    public void j(e.p pVar, final e.a0<e.u> a0Var) {
        if (this.f885a == null) {
            a0Var.a(y());
            return;
        }
        try {
            r.a a10 = r3.r.a();
            a10.b(i0.w(pVar));
            this.f885a.m(a10.a(), new r3.o() {
                @Override
                public final void a(com.android.billingclient.api.h hVar, List list) {
                    g0.G(e.a0.this, hVar, list);
                }
            });
        } catch (RuntimeException e10) {
            a0Var.a(new e.a("error", e10.getMessage(), Log.getStackTraceString(e10)));
        }
    }

    @Override
    public e.k k(e.j jVar) {
        if (this.f885a == null) {
            throw y();
        }
        com.android.billingclient.api.i iVar = this.f890f.get(jVar.f());
        if (iVar == null) {
            throw new e.a("NOT_FOUND", "Details for product " + jVar.f() + " are not available. It might because products were not fetched prior to the call. Please fetch the products first. An example of how to fetch the products could be found here: https://github.com/flutter/packages/blob/main/packages/in_app_purchase/in_app_purchase/README.md#loading-products-for-sale", null);
        }
        List<i.d> f10 = iVar.f();
        if (f10 != null) {
            boolean z10 = false;
            Iterator<i.d> it = f10.iterator();
            while (true) {
                if (!it.hasNext()) {
                    break;
                }
                i.d next = it.next();
                if (jVar.d() != null && jVar.d().equals(next.d())) {
                    z10 = true;
                    break;
                }
            }
            if (!z10) {
                throw new e.a("INVALID_OFFER_TOKEN", "Offer token " + jVar.d() + " for product " + jVar.f() + " is not valid. Make sure to only pass offer tokens that belong to the product. To obtain offer tokens for a product, fetch the products. An example of how to fetch the products could be found here: https://github.com/flutter/packages/blob/main/packages/in_app_purchase/in_app_purchase/README.md#loading-products-for-sale", null);
            }
        }
        if (jVar.g().longValue() != 0 && jVar.i().longValue() != 0) {
            throw new e.a("IN_APP_PURCHASE_CONFLICT_PRORATION_MODE_REPLACEMENT_MODE", "launchBillingFlow failed because you provided both prorationMode and replacementMode. You can only provide one of them.", null);
        }
        if (jVar.e() == null && (jVar.g().longValue() != 0 || jVar.i().longValue() != 0)) {
            throw new e.a("IN_APP_PURCHASE_REQUIRE_OLD_PRODUCT", "launchBillingFlow failed because oldProduct is null. You must provide a valid oldProduct in order to use a proration mode.", null);
        }
        if (jVar.e() != null && !this.f890f.containsKey(jVar.e())) {
            throw new e.a("IN_APP_PURCHASE_INVALID_OLD_PRODUCT", "Details for product " + jVar.e() + " are not available. It might because products were not fetched prior to the call. Please fetch the products first. An example of how to fetch the products could be found here: https://github.com/flutter/packages/blob/main/packages/in_app_purchase/in_app_purchase/README.md#loading-products-for-sale", null);
        }
        if (this.f887c == null) {
            throw new e.a("ACTIVITY_UNAVAILABLE", "Details for product " + jVar.f() + " are not available. This method must be run with the app in foreground.", null);
        }
        g.b.a a10 = g.b.a();
        a10.c(iVar);
        if (jVar.d() != null) {
            a10.b(jVar.d());
        }
        ArrayList arrayList = new ArrayList();
        arrayList.add(a10.a());
        g.a d10 = com.android.billingclient.api.g.a().d(arrayList);
        if (jVar.b() != null && !jVar.b().isEmpty()) {
            d10.b(jVar.b());
        }
        if (jVar.c() != null && !jVar.c().isEmpty()) {
            d10.c(jVar.c());
        }
        g.c.a a11 = g.c.a();
        if (jVar.e() != null && !jVar.e().isEmpty() && jVar.h() != null) {
            a11.b(jVar.h());
            if (jVar.g().longValue() != 0) {
                K(a11, jVar.g().intValue());
            }
            if (jVar.i().longValue() != 0) {
                a11.g(jVar.i().intValue());
            }
            d10.e(a11.a());
        }
        return i0.c(this.f885a.i(this.f887c, d10.a()));
    }

    @Override
    public void l(String str, final e.a0<e.k> a0Var) {
        if (this.f885a == null) {
            a0Var.a(y());
            return;
        }
        try {
            this.f885a.a(r3.a.b().b(str).a(), new r3.b() {
                @Override
                public final void a(com.android.billingclient.api.h hVar) {
                    g0.z(e.a0.this, hVar);
                }
            });
        } catch (RuntimeException e10) {
            a0Var.a(new e.a("error", e10.getMessage(), Log.getStackTraceString(e10)));
        }
    }

    @Override
    public void m(final e.a0<e.g> a0Var) {
        com.android.billingclient.api.d dVar = this.f885a;
        if (dVar == null) {
            a0Var.a(y());
            return;
        }
        try {
            dVar.c(new r3.f() {
                @Override
                public final void a(com.android.billingclient.api.h hVar, com.android.billingclient.api.b bVar) {
                    g0.B(e.a0.this, hVar, bVar);
                }
            });
        } catch (RuntimeException e10) {
            a0Var.a(new e.a("error", e10.getMessage(), Log.getStackTraceString(e10)));
        }
    }

    @Override
    public void n(final e.a0<e.k> a0Var) {
        com.android.billingclient.api.d dVar = this.f885a;
        if (dVar == null) {
            a0Var.a(y());
            return;
        }
        try {
            dVar.f(new r3.d() {
                @Override
                public final void a(com.android.billingclient.api.h hVar) {
                    g0.D(e.a0.this, hVar);
                }
            });
        } catch (RuntimeException e10) {
            a0Var.a(new e.a("error", e10.getMessage(), Log.getStackTraceString(e10)));
        }
    }

    @Override
    public void o() {
        x();
    }

    @Override
    public void onActivityCreated(Activity activity, Bundle bundle) {
    }

    @Override
    public void onActivityDestroyed(Activity activity) {
        Context context;
        if (this.f887c != activity || (context = this.f888d) == null) {
            return;
        }
        ((Application) context).unregisterActivityLifecycleCallbacks(this);
        x();
    }

    @Override
    public void onActivityPaused(Activity activity) {
    }

    @Override
    public void onActivityResumed(Activity activity) {
    }

    @Override
    public void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
    }

    @Override
    public void onActivityStarted(Activity activity) {
    }

    @Override
    public void onActivityStopped(Activity activity) {
    }
}