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

应用版本信息
应用名称:Blinx
版本号:1.6.4
包名称:com.blinx.app

MD5 校验值:d38c125a348a8ed33e26dd4564e124be

反编译源代码说明

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


package n1;

import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ProviderInfo;
import android.content.pm.ResolveInfo;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.TreeSet;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;

public final class d0 {

    public static final d0 f15572a;

    private static final String f15573b;

    private static final List<e> f15574c;

    private static final List<e> f15575d;

    private static final Map<String, List<e>> f15576e;

    private static final AtomicBoolean f15577f;

    private static final Integer[] f15578g;

    public static final class a extends e {
        @Override
        public String c() {
            return (String) g();
        }

        @Override
        public String d() {
            return "com.facebook.arstudio.player";
        }

        public Void g() {
            return null;
        }
    }

    private static final class b extends e {
        @Override
        public String c() {
            return "com.instagram.platform.AppAuthorizeActivity";
        }

        @Override
        public String d() {
            return "com.instagram.android";
        }

        @Override
        public String e() {
            return "token,signed_request,graph_domain,granted_scopes";
        }
    }

    public static final class c extends e {
        private final boolean g() {
            x0.a0 a0Var = x0.a0.f21253a;
            return x0.a0.l().getApplicationInfo().targetSdkVersion >= 30;
        }

        @Override
        public String c() {
            return "com.facebook.katana.ProxyAuth";
        }

        @Override
        public String d() {
            return "com.facebook.katana";
        }

        @Override
        public void f() {
            if (g()) {
                Log.w(d0.c(), "Apps that target Android API 30+ (Android 11+) cannot call Facebook native apps unless the package visibility needs are declared. Please follow https://developers.facebook.com/docs/android/troubleshooting/#faq_267321845055988 to make the declaration.");
            }
        }
    }

    public static final class d extends e {
        @Override
        public String c() {
            return (String) g();
        }

        @Override
        public String d() {
            return "com.facebook.orca";
        }

        public Void g() {
            return null;
        }
    }

    public static abstract class e {

        private TreeSet<Integer> f15579a;

        public final synchronized void a(boolean z10) {
            boolean z11;
            if (!z10) {
                TreeSet<Integer> treeSet = this.f15579a;
                if (treeSet != null) {
                }
            }
            this.f15579a = d0.b(d0.f15572a, this);
            TreeSet<Integer> treeSet2 = this.f15579a;
            if (treeSet2 != null && !treeSet2.isEmpty()) {
                z11 = false;
                if (z11) {
                    f();
                }
            }
            z11 = true;
            if (z11) {
            }
        }

        public final TreeSet<Integer> b() {
            TreeSet<Integer> treeSet = this.f15579a;
            if (treeSet != null) {
            }
            a(false);
            return this.f15579a;
        }

        public abstract String c();

        public abstract String d();

        public String e() {
            return "id_token,token,signed_request,graph_domain";
        }

        public void f() {
        }
    }

    public static final class f {

        public static final a f15580c = new a(null);

        private e f15581a;

        private int f15582b;

        public static final class a {
            private a() {
            }

            public a(kotlin.jvm.internal.g gVar) {
                this();
            }

            public final f a(e eVar, int i10) {
                f fVar = new f(null);
                fVar.f15581a = eVar;
                fVar.f15582b = i10;
                return fVar;
            }

            public final f b() {
                f fVar = new f(null);
                fVar.f15582b = -1;
                return fVar;
            }
        }

        private f() {
        }

        public f(kotlin.jvm.internal.g gVar) {
            this();
        }

        public final int c() {
            return this.f15582b;
        }
    }

    public static final class g extends e {
        @Override
        public String c() {
            return "com.facebook.katana.ProxyAuth";
        }

        @Override
        public String d() {
            return "com.facebook.wakizashi";
        }
    }

    static {
        d0 d0Var = new d0();
        f15572a = d0Var;
        String name = d0.class.getName();
        kotlin.jvm.internal.m.d(name, "NativeProtocol::class.java.name");
        f15573b = name;
        f15574c = d0Var.f();
        f15575d = d0Var.e();
        f15576e = d0Var.d();
        f15577f = new AtomicBoolean(false);
        f15578g = new Integer[]{20210906, 20171115, 20170417, 20170411, 20170213, 20161017, 20160327, 20150702, 20150401, 20141218, 20141107, 20141028, 20141001, 20140701, 20140324, 20140313, 20140204, 20131107, 20131024, 20130618, 20130502, 20121101};
    }

    private d0() {
    }

    public static final Intent A(Context context, Intent intent, e eVar) {
        ResolveInfo resolveService;
        if (s1.a.d(d0.class)) {
            return null;
        }
        try {
            kotlin.jvm.internal.m.e(context, "context");
            if (intent == null || (resolveService = context.getPackageManager().resolveService(intent, 0)) == null) {
                return null;
            }
            k kVar = k.f15623a;
            String str = resolveService.serviceInfo.packageName;
            kotlin.jvm.internal.m.d(str, "resolveInfo.serviceInfo.packageName");
            if (k.a(context, str)) {
                return intent;
            }
            return null;
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }

    public static final TreeSet b(d0 d0Var, e eVar) {
        if (s1.a.d(d0.class)) {
            return null;
        }
        try {
            return d0Var.o(eVar);
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }

    public static final String c() {
        if (s1.a.d(d0.class)) {
            return null;
        }
        try {
            return f15573b;
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }

    private final Map<String, List<e>> d() {
        if (s1.a.d(this)) {
            return null;
        }
        try {
            HashMap hashMap = new HashMap();
            ArrayList arrayList = new ArrayList();
            arrayList.add(new d());
            List<e> list = f15574c;
            hashMap.put("com.facebook.platform.action.request.OGACTIONPUBLISH_DIALOG", list);
            hashMap.put("com.facebook.platform.action.request.FEED_DIALOG", list);
            hashMap.put("com.facebook.platform.action.request.LIKE_DIALOG", list);
            hashMap.put("com.facebook.platform.action.request.APPINVITES_DIALOG", list);
            hashMap.put("com.facebook.platform.action.request.MESSAGE_DIALOG", arrayList);
            hashMap.put("com.facebook.platform.action.request.OGMESSAGEPUBLISH_DIALOG", arrayList);
            hashMap.put("com.facebook.platform.action.request.CAMERA_EFFECT", f15575d);
            hashMap.put("com.facebook.platform.action.request.SHARE_STORY", list);
            return hashMap;
        } catch (Throwable th) {
            s1.a.b(th, this);
            return null;
        }
    }

    private final List<e> e() {
        ArrayList c10;
        if (s1.a.d(this)) {
            return null;
        }
        try {
            c10 = db.n.c(new a());
            c10.addAll(f());
            return c10;
        } catch (Throwable th) {
            s1.a.b(th, this);
            return null;
        }
    }

    private final List<e> f() {
        ArrayList c10;
        if (s1.a.d(this)) {
            return null;
        }
        try {
            c10 = db.n.c(new c(), new g());
            return c10;
        } catch (Throwable th) {
            s1.a.b(th, this);
            return null;
        }
    }

    private final Uri g(e eVar) {
        if (s1.a.d(this)) {
            return null;
        }
        try {
            Uri parse = Uri.parse("content://" + eVar.d() + ".provider.PlatformProvider/versions");
            kotlin.jvm.internal.m.d(parse, "parse(CONTENT_SCHEME + appInfo.getPackage() + PLATFORM_PROVIDER_VERSIONS)");
            return parse;
        } catch (Throwable th) {
            s1.a.b(th, this);
            return null;
        }
    }

    public static final int h(TreeSet<Integer> treeSet, int i10, int[] versionSpec) {
        if (s1.a.d(d0.class)) {
            return 0;
        }
        try {
            kotlin.jvm.internal.m.e(versionSpec, "versionSpec");
            if (treeSet == null) {
                return -1;
            }
            int length = versionSpec.length - 1;
            Iterator<Integer> descendingIterator = treeSet.descendingIterator();
            int i11 = -1;
            while (descendingIterator.hasNext()) {
                Integer fbAppVersion = descendingIterator.next();
                kotlin.jvm.internal.m.d(fbAppVersion, "fbAppVersion");
                i11 = Math.max(i11, fbAppVersion.intValue());
                while (length >= 0 && versionSpec[length] > fbAppVersion.intValue()) {
                    length--;
                }
                if (length < 0) {
                    return -1;
                }
                if (versionSpec[length] == fbAppVersion.intValue()) {
                    if (length % 2 == 0) {
                        return Math.min(i11, i10);
                    }
                    return -1;
                }
            }
            return -1;
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return 0;
        }
    }

    public static final Bundle i(x0.n nVar) {
        if (s1.a.d(d0.class) || nVar == null) {
            return null;
        }
        try {
            Bundle bundle = new Bundle();
            bundle.putString("error_description", nVar.toString());
            if (nVar instanceof x0.p) {
                bundle.putString("error_type", "UserCanceled");
            }
            return bundle;
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }

    public static final Intent j(Context context, String applicationId, Collection<String> permissions, String e2e, boolean z10, boolean z11, x1.e defaultAudience, String clientState, String authType, String str, boolean z12, boolean z13, boolean z14) {
        if (s1.a.d(d0.class)) {
            return null;
        }
        try {
            kotlin.jvm.internal.m.e(context, "context");
            kotlin.jvm.internal.m.e(applicationId, "applicationId");
            kotlin.jvm.internal.m.e(permissions, "permissions");
            kotlin.jvm.internal.m.e(e2e, "e2e");
            kotlin.jvm.internal.m.e(defaultAudience, "defaultAudience");
            kotlin.jvm.internal.m.e(clientState, "clientState");
            kotlin.jvm.internal.m.e(authType, "authType");
            b bVar = new b();
            return z(context, f15572a.k(bVar, applicationId, permissions, e2e, z11, defaultAudience, clientState, authType, false, str, z12, x1.a0.INSTAGRAM, z13, z14, "", null, null), bVar);
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }

    private final Intent k(e eVar, String str, Collection<String> collection, String str2, boolean z10, x1.e eVar2, String str3, String str4, boolean z11, String str5, boolean z12, x1.a0 a0Var, boolean z13, boolean z14, String str6, String str7, String str8) {
        if (s1.a.d(this)) {
            return null;
        }
        try {
            String c10 = eVar.c();
            if (c10 == null) {
                return null;
            }
            Intent putExtra = new Intent().setClassName(eVar.d(), c10).putExtra("client_id", str);
            kotlin.jvm.internal.m.d(putExtra, "Intent()\n            .setClassName(appInfo.getPackage(), activityName)\n            .putExtra(FACEBOOK_PROXY_AUTH_APP_ID_KEY, applicationId)");
            x0.a0 a0Var2 = x0.a0.f21253a;
            putExtra.putExtra("facebook_sdk_version", x0.a0.A());
            k0 k0Var = k0.f15625a;
            if (!k0.Y(collection)) {
                putExtra.putExtra("scope", TextUtils.join(",", collection));
            }
            if (!k0.X(str2)) {
                putExtra.putExtra("e2e", str2);
            }
            putExtra.putExtra("state", str3);
            putExtra.putExtra("response_type", eVar.e());
            putExtra.putExtra("nonce", str6);
            putExtra.putExtra("return_scopes", "true");
            if (z10) {
                putExtra.putExtra("default_audience", eVar2.j());
            }
            putExtra.putExtra("legacy_override", x0.a0.v());
            putExtra.putExtra("auth_type", str4);
            if (z11) {
                putExtra.putExtra("fail_on_logged_out", true);
            }
            putExtra.putExtra("messenger_page_id", str5);
            putExtra.putExtra("reset_messenger_state", z12);
            if (z13) {
                putExtra.putExtra("fx_app", a0Var.toString());
            }
            if (z14) {
                putExtra.putExtra("skip_dedupe", true);
            }
            return putExtra;
        } catch (Throwable th) {
            s1.a.b(th, this);
            return null;
        }
    }

    public static final Intent l(Context context) {
        if (s1.a.d(d0.class)) {
            return null;
        }
        try {
            kotlin.jvm.internal.m.e(context, "context");
            for (e eVar : f15574c) {
                Intent A = A(context, new Intent("com.facebook.platform.PLATFORM_SERVICE").setPackage(eVar.d()).addCategory("android.intent.category.DEFAULT"), eVar);
                if (A != null) {
                    return A;
                }
            }
            return null;
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }

    public static final Intent m(Intent requestIntent, Bundle bundle, x0.n nVar) {
        if (s1.a.d(d0.class)) {
            return null;
        }
        try {
            kotlin.jvm.internal.m.e(requestIntent, "requestIntent");
            UUID p10 = p(requestIntent);
            if (p10 == null) {
                return null;
            }
            Intent intent = new Intent();
            intent.putExtra("com.facebook.platform.protocol.PROTOCOL_VERSION", v(requestIntent));
            Bundle bundle2 = new Bundle();
            bundle2.putString("action_id", p10.toString());
            if (nVar != null) {
                bundle2.putBundle("error", i(nVar));
            }
            intent.putExtra("com.facebook.platform.protocol.BRIDGE_ARGS", bundle2);
            if (bundle != null) {
                intent.putExtra("com.facebook.platform.protocol.RESULT_ARGS", bundle);
            }
            return intent;
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }

    public static final List<Intent> n(Context context, String applicationId, Collection<String> permissions, String e2e, boolean z10, boolean z11, x1.e defaultAudience, String clientState, String authType, boolean z12, String str, boolean z13, boolean z14, boolean z15, String str2, String str3, String str4) {
        if (s1.a.d(d0.class)) {
            return null;
        }
        try {
            kotlin.jvm.internal.m.e(applicationId, "applicationId");
            kotlin.jvm.internal.m.e(permissions, "permissions");
            kotlin.jvm.internal.m.e(e2e, "e2e");
            kotlin.jvm.internal.m.e(defaultAudience, "defaultAudience");
            kotlin.jvm.internal.m.e(clientState, "clientState");
            kotlin.jvm.internal.m.e(authType, "authType");
            List<e> list = f15574c;
            ArrayList arrayList = new ArrayList();
            Iterator<T> it = list.iterator();
            while (it.hasNext()) {
                ArrayList arrayList2 = arrayList;
                Intent k10 = f15572a.k((e) it.next(), applicationId, permissions, e2e, z11, defaultAudience, clientState, authType, z12, str, z13, x1.a0.FACEBOOK, z14, z15, str2, str3, str4);
                if (k10 != null) {
                    arrayList2.add(k10);
                }
                arrayList = arrayList2;
            }
            return arrayList;
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }

    private final TreeSet<Integer> o(e eVar) {
        Cursor cursor;
        ProviderInfo providerInfo;
        Cursor cursor2;
        if (s1.a.d(this)) {
            return null;
        }
        try {
            TreeSet<Integer> treeSet = new TreeSet<>();
            x0.a0 a0Var = x0.a0.f21253a;
            ContentResolver contentResolver = x0.a0.l().getContentResolver();
            String[] strArr = {"version"};
            Uri g10 = g(eVar);
            try {
                try {
                    providerInfo = x0.a0.l().getPackageManager().resolveContentProvider(kotlin.jvm.internal.m.k(eVar.d(), ".provider.PlatformProvider"), 0);
                } catch (RuntimeException e10) {
                    Log.e(f15573b, "Failed to query content resolver.", e10);
                    providerInfo = null;
                }
                if (providerInfo != null) {
                    try {
                        try {
                            cursor2 = contentResolver.query(g10, strArr, null, null, null);
                        } catch (NullPointerException unused) {
                            Log.e(f15573b, "Failed to query content resolver.");
                            cursor2 = null;
                            if (cursor2 != null) {
                            }
                            if (cursor2 != null) {
                            }
                            return treeSet;
                        }
                    } catch (IllegalArgumentException unused2) {
                        Log.e(f15573b, "Failed to query content resolver.");
                        cursor2 = null;
                        if (cursor2 != null) {
                        }
                        if (cursor2 != null) {
                        }
                        return treeSet;
                    } catch (SecurityException unused3) {
                        Log.e(f15573b, "Failed to query content resolver.");
                        cursor2 = null;
                        if (cursor2 != null) {
                        }
                        if (cursor2 != null) {
                        }
                        return treeSet;
                    }
                    if (cursor2 != null) {
                        while (cursor2.moveToNext()) {
                            try {
                                treeSet.add(Integer.valueOf(cursor2.getInt(cursor2.getColumnIndex("version"))));
                            } catch (Throwable th) {
                                cursor = cursor2;
                                th = th;
                                if (cursor != null) {
                                    cursor.close();
                                }
                                throw th;
                            }
                        }
                    }
                } else {
                    cursor2 = null;
                }
                if (cursor2 != null) {
                    cursor2.close();
                }
                return treeSet;
            } catch (Throwable th2) {
                th = th2;
                cursor = null;
            }
        } catch (Throwable th3) {
            s1.a.b(th3, this);
            return null;
        }
    }

    public static final UUID p(Intent intent) {
        String stringExtra;
        if (s1.a.d(d0.class) || intent == null) {
            return null;
        }
        try {
            if (w(v(intent))) {
                Bundle bundleExtra = intent.getBundleExtra("com.facebook.platform.protocol.BRIDGE_ARGS");
                stringExtra = bundleExtra != null ? bundleExtra.getString("action_id") : null;
            } else {
                stringExtra = intent.getStringExtra("com.facebook.platform.protocol.CALL_ID");
            }
            if (stringExtra == null) {
                return null;
            }
            try {
                return UUID.fromString(stringExtra);
            } catch (IllegalArgumentException unused) {
                return null;
            }
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }

    public static final x0.n q(Bundle bundle) {
        boolean n10;
        if (s1.a.d(d0.class) || bundle == null) {
            return null;
        }
        try {
            String string = bundle.getString("error_type");
            if (string == null) {
                string = bundle.getString("com.facebook.platform.status.ERROR_TYPE");
            }
            String string2 = bundle.getString("error_description");
            if (string2 == null) {
                string2 = bundle.getString("com.facebook.platform.status.ERROR_DESCRIPTION");
            }
            if (string != null) {
                n10 = ub.u.n(string, "UserCanceled", true);
                if (n10) {
                    return new x0.p(string2);
                }
            }
            return new x0.n(string2);
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }

    private final f r(List<? extends e> list, int[] iArr) {
        if (s1.a.d(this)) {
            return null;
        }
        try {
            x();
            if (list == null) {
                return f.f15580c.b();
            }
            for (e eVar : list) {
                int h10 = h(eVar.b(), t(), iArr);
                if (h10 != -1) {
                    return f.f15580c.a(eVar, h10);
                }
            }
            return f.f15580c.b();
        } catch (Throwable th) {
            s1.a.b(th, this);
            return null;
        }
    }

    public static final int s(int i10) {
        if (s1.a.d(d0.class)) {
            return 0;
        }
        try {
            return f15572a.r(f15574c, new int[]{i10}).c();
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return 0;
        }
    }

    public static final int t() {
        if (s1.a.d(d0.class)) {
            return 0;
        }
        try {
            return f15578g[0].intValue();
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return 0;
        }
    }

    public static final Bundle u(Intent intent) {
        if (s1.a.d(d0.class)) {
            return null;
        }
        try {
            kotlin.jvm.internal.m.e(intent, "intent");
            if (!w(v(intent))) {
                return intent.getExtras();
            }
            return intent.getBundleExtra("com.facebook.platform.protocol.METHOD_ARGS");
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }

    public static final int v(Intent intent) {
        if (s1.a.d(d0.class)) {
            return 0;
        }
        try {
            kotlin.jvm.internal.m.e(intent, "intent");
            return intent.getIntExtra("com.facebook.platform.protocol.PROTOCOL_VERSION", 0);
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return 0;
        }
    }

    public static final boolean w(int i10) {
        boolean h10;
        if (s1.a.d(d0.class)) {
            return false;
        }
        try {
            h10 = db.j.h(f15578g, Integer.valueOf(i10));
            return h10 && i10 >= 20140701;
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return false;
        }
    }

    public static final void x() {
        if (s1.a.d(d0.class)) {
            return;
        }
        try {
            if (f15577f.compareAndSet(false, true)) {
                x0.a0 a0Var = x0.a0.f21253a;
                x0.a0.t().execute(new Runnable() {
                    @Override
                    public final void run() {
                        d0.y();
                    }
                });
            }
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
        }
    }

    public static final void y() {
        if (s1.a.d(d0.class)) {
            return;
        }
        try {
            try {
                Iterator<e> it = f15574c.iterator();
                while (it.hasNext()) {
                    it.next().a(true);
                }
            } finally {
                f15577f.set(false);
            }
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
        }
    }

    public static final Intent z(Context context, Intent intent, e eVar) {
        ResolveInfo resolveActivity;
        if (s1.a.d(d0.class)) {
            return null;
        }
        try {
            kotlin.jvm.internal.m.e(context, "context");
            if (intent == null || (resolveActivity = context.getPackageManager().resolveActivity(intent, 0)) == null) {
                return null;
            }
            k kVar = k.f15623a;
            String str = resolveActivity.activityInfo.packageName;
            kotlin.jvm.internal.m.d(str, "resolveInfo.activityInfo.packageName");
            if (k.a(context, str)) {
                return intent;
            }
            return null;
        } catch (Throwable th) {
            s1.a.b(th, d0.class);
            return null;
        }
    }
}