导航菜单

页面标题

页面副标题

BetterTogether v3.0.0 - c.java 源代码

正在查看: BetterTogether v3.0.0 应用的 c.java JAVA 源代码文件

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


package df;

import android.content.Intent;
import android.content.res.AssetFileDescriptor;
import android.graphics.Bitmap;
import android.media.MediaMetadataRetriever;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.ParcelFileDescriptor;
import android.os.Parcelable;
import android.util.Log;
import android.util.Pair;
import androidx.health.platform.client.proto.z;
import cf.f;
import com.facebook.AccessToken;
import com.facebook.AuthenticationToken;
import com.facebook.AuthenticationTokenManager$CurrentAuthenticationTokenChangedBroadcastReceiver;
import com.facebook.GraphRequest;
import com.facebook.Profile;
import h.w0;
import ih.a0;
import ih.d0;
import ih.g0;
import ih.i;
import ih.j;
import ih.k0;
import ih.o;
import ih.t;
import ih.v;
import ih.x;
import ih.y;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.nio.ByteBuffer;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import k6.l;
import kotlin.jvm.internal.Intrinsics;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import pq.OYV.zQugKAAxaKyBz;
import rg.b;
import sg.e;
import sg.j0;
import sg.k;
import sg.w;
import vg.b0;
import vg.f0;
import xh.c0;
import xh.l0;
import yg.a;
import zg.d;

public final class c implements b, w, k, f0, a, d, gh.a {

    public final int f249d;

    public c(int i) {
        this.f249d = i;
    }

    public static final String f(Object obj) {
        String str = a0.j;
        if (obj instanceof String) {
            return (String) obj;
        }
        if ((obj instanceof Boolean) || (obj instanceof Number)) {
            return obj.toString();
        }
        if (!(obj instanceof Date)) {
            throw new IllegalArgumentException("Unsupported parameter type.");
        }
        String format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US).format((Date) obj);
        Intrinsics.checkNotNullExpressionValue(format, "iso8601DateFormat.format(value)");
        return format;
    }

    public static HttpURLConnection h(URL url) {
        URLConnection openConnection = url.openConnection();
        if (openConnection == null) {
            throw new NullPointerException("null cannot be cast to non-null type java.net.HttpURLConnection");
        }
        HttpURLConnection httpURLConnection = (HttpURLConnection) openConnection;
        if (a0.m == null) {
            a0.m = g0.b.o(new Object[]{"FBAndroidSDK", "16.1.3"}, 2, "%s.%s", "java.lang.String.format(format, *args)");
            if (!l0.G(null)) {
                String format = String.format(Locale.ROOT, "%s/%s", Arrays.copyOf(new Object[]{a0.m, null}, 2));
                Intrinsics.checkNotNullExpressionValue(format, "java.lang.String.format(locale, format, *args)");
                a0.m = format;
            }
        }
        httpURLConnection.setRequestProperty("User-Agent", a0.m);
        httpURLConnection.setRequestProperty("Accept-Language", Locale.getDefault().toString());
        httpURLConnection.setChunkedStreamingMode(0);
        return httpURLConnection;
    }

    public static java.util.ArrayList j(ih.d0 r11) {
        throw new UnsupportedOperationException("Method not decompiled: df.c.j(ih.d0):java.util.ArrayList");
    }

    public static void k() {
        Date date = AccessToken.Q;
        AccessToken d2 = f.d();
        if (d2 == null) {
            return;
        }
        if (f.j()) {
            l0.s(new kh.a(), d2.w);
        } else {
            k0.d.t().a((Profile) null, true);
        }
    }

    public static boolean l(Object obj) {
        return (obj instanceof Bitmap) || (obj instanceof byte[]) || (obj instanceof Uri) || (obj instanceof ParcelFileDescriptor) || (obj instanceof GraphRequest.ParcelableResourceWithMimeType);
    }

    public static boolean m(Object obj) {
        return (obj instanceof String) || (obj instanceof Boolean) || (obj instanceof Number) || (obj instanceof Date);
    }

    public static a0 o(AccessToken accessToken, String str, ih.w wVar) {
        return new a0(accessToken, str, (Bundle) null, (ih.f0) null, wVar);
    }

    public static a0 p(AccessToken accessToken, String str, JSONObject jSONObject, ih.w wVar) {
        a0 a0Var = new a0(accessToken, str, (Bundle) null, ih.f0.e, wVar);
        a0Var.c = jSONObject;
        return a0Var;
    }

    public static a0 q(String str, Bundle bundle, com.facebook.login.a aVar) {
        return new a0((AccessToken) null, str, bundle, ih.f0.e, aVar);
    }

    public static void r(org.json.JSONObject r7, java.lang.String r8, ih.x r9) {
        throw new UnsupportedOperationException("Method not decompiled: df.c.r(org.json.JSONObject, java.lang.String, ih.x):void");
    }

    public static void s(String str, Object obj, x xVar, boolean z) {
        Class<?> cls = obj.getClass();
        if (JSONObject.class.isAssignableFrom(cls)) {
            JSONObject jSONObject = (JSONObject) obj;
            if (z) {
                Iterator<String> keys = jSONObject.keys();
                while (keys.hasNext()) {
                    String next = keys.next();
                    String o = g0.b.o(new Object[]{str, next}, 2, "%s[%s]", "java.lang.String.format(format, *args)");
                    Object opt = jSONObject.opt(next);
                    Intrinsics.checkNotNullExpressionValue(opt, "jsonObject.opt(propertyName)");
                    s(o, opt, xVar, z);
                }
                return;
            }
            if (jSONObject.has("id")) {
                String optString = jSONObject.optString("id");
                Intrinsics.checkNotNullExpressionValue(optString, zQugKAAxaKyBz.PreEXn);
                s(str, optString, xVar, z);
                return;
            } else if (jSONObject.has("url")) {
                String optString2 = jSONObject.optString("url");
                Intrinsics.checkNotNullExpressionValue(optString2, "jsonObject.optString(\"url\")");
                s(str, optString2, xVar, z);
                return;
            } else {
                if (jSONObject.has("fbsdk:create_object")) {
                    String jSONObject2 = jSONObject.toString();
                    Intrinsics.checkNotNullExpressionValue(jSONObject2, "jsonObject.toString()");
                    s(str, jSONObject2, xVar, z);
                    return;
                }
                return;
            }
        }
        if (!JSONArray.class.isAssignableFrom(cls)) {
            if (String.class.isAssignableFrom(cls) || Number.class.isAssignableFrom(cls) || Boolean.class.isAssignableFrom(cls)) {
                xVar.a(str, obj.toString());
                return;
            }
            if (!Date.class.isAssignableFrom(cls)) {
                String str2 = a0.j;
                t tVar = t.a;
                return;
            } else {
                String format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US).format((Date) obj);
                Intrinsics.checkNotNullExpressionValue(format, "iso8601DateFormat.format(date)");
                xVar.a(str, format);
                return;
            }
        }
        JSONArray jSONArray = (JSONArray) obj;
        int length = jSONArray.length();
        if (length <= 0) {
            return;
        }
        int i = 0;
        while (true) {
            int i2 = i + 1;
            String format2 = String.format(Locale.ROOT, "%s[%d]", Arrays.copyOf(new Object[]{str, Integer.valueOf(i)}, 2));
            Intrinsics.checkNotNullExpressionValue(format2, "java.lang.String.format(locale, format, *args)");
            Object opt2 = jSONArray.opt(i);
            Intrinsics.checkNotNullExpressionValue(opt2, "jsonArray.opt(i)");
            s(format2, opt2, xVar, z);
            if (i2 >= length) {
                return;
            } else {
                i = i2;
            }
        }
    }

    public static void t(d0 d0Var, ArrayList arrayList) {
        Intrinsics.checkNotNullParameter(d0Var, "requests");
        Intrinsics.checkNotNullParameter(arrayList, "responses");
        int size = d0Var.size();
        ArrayList arrayList2 = new ArrayList();
        if (size > 0) {
            int i = 0;
            while (true) {
                int i2 = i + 1;
                a0 a0Var = (a0) d0Var.i.get(i);
                if (a0Var.g != null) {
                    arrayList2.add(new Pair(a0Var.g, arrayList.get(i)));
                }
                if (i2 >= size) {
                    break;
                } else {
                    i = i2;
                }
            }
        }
        if (arrayList2.size() > 0) {
            Runnable bVar = new ih.b(2, arrayList2, d0Var);
            Handler handler = d0Var.d;
            if ((handler == null ? null : Boolean.valueOf(handler.post(bVar))) == null) {
                bVar.run();
            }
        }
    }

    public static void u(HashMap hashMap, y yVar) {
        for (Map.Entry entry : hashMap.entrySet()) {
            String str = a0.j;
            if (l(((v) entry.getValue()).b)) {
                yVar.g((String) entry.getKey(), ((v) entry.getValue()).b, ((v) entry.getValue()).a);
            }
        }
    }

    public static void v(ih.d0 r21, java.net.HttpURLConnection r22) {
        throw new UnsupportedOperationException("Method not decompiled: df.c.v(ih.d0, java.net.HttpURLConnection):void");
    }

    public static void w(AuthenticationToken authenticationToken) {
        cf.d dVar = j.d;
        j jVar = j.e;
        if (jVar == null) {
            synchronized (dVar) {
                jVar = j.e;
                if (jVar == null) {
                    j5.b a = j5.b.a(t.a());
                    Intrinsics.checkNotNullExpressionValue(a, "getInstance(applicationContext)");
                    j jVar2 = new j(a, new i());
                    j.e = jVar2;
                    jVar = jVar2;
                }
            }
        }
        Parcelable parcelable = jVar.c;
        jVar.c = authenticationToken;
        i iVar = jVar.b;
        if (authenticationToken != null) {
            iVar.getClass();
            Intrinsics.checkNotNullParameter(authenticationToken, "authenticationToken");
            try {
                iVar.a.edit().putString("com.facebook.AuthenticationManager.CachedAuthenticationToken", authenticationToken.a().toString()).apply();
            } catch (JSONException unused) {
            }
        } else {
            iVar.a.edit().remove("com.facebook.AuthenticationManager.CachedAuthenticationToken").apply();
            l0.d(t.a());
        }
        if (l0.a(parcelable, authenticationToken)) {
            return;
        }
        Intent intent = new Intent(t.a(), (Class<?>) AuthenticationTokenManager$CurrentAuthenticationTokenChangedBroadcastReceiver.class);
        intent.setAction("com.facebook.sdk.ACTION_CURRENT_AUTHENTICATION_TOKEN_CHANGED");
        intent.putExtra("com.facebook.sdk.EXTRA_OLD_AUTHENTICATION_TOKEN", parcelable);
        intent.putExtra("com.facebook.sdk.EXTRA_NEW_AUTHENTICATION_TOKEN", (Parcelable) authenticationToken);
        jVar.a.c(intent);
    }

    public static HttpURLConnection x(d0 d0Var) {
        URL url;
        Intrinsics.checkNotNullParameter(d0Var, "requests");
        Intrinsics.checkNotNullParameter(d0Var, "requests");
        Iterator it = d0Var.iterator();
        while (it.hasNext()) {
            a0 a0Var = (a0) it.next();
            if (ih.f0.d == a0Var.h && l0.G(a0Var.d.getString("fields"))) {
                jh.a aVar = c0.f1006d;
                g0 g0Var = g0.w;
                StringBuilder sb2 = new StringBuilder("GET requests for /");
                String str = a0Var.b;
                if (str == null) {
                    str = "";
                }
                sb2.append(str);
                sb2.append(" should contain an explicit \"fields\" parameter.");
                jh.a.r(g0Var, "Request", sb2.toString());
            }
        }
        try {
            if (d0Var.size() == 1) {
                url = new URL(((a0) d0Var.i.get(0)).g());
            } else {
                String format = String.format("https://graph.%s", Arrays.copyOf(new Object[]{t.e()}, 1));
                Intrinsics.checkNotNullExpressionValue(format, "java.lang.String.format(format, *args)");
                url = new URL(format);
            }
            HttpURLConnection httpURLConnection = null;
            try {
                httpURLConnection = h(url);
                v(d0Var, httpURLConnection);
                return httpURLConnection;
            } catch (IOException e3) {
                l0.l(httpURLConnection);
                throw new o("could not construct request body", e3);
            } catch (JSONException e4) {
                l0.l(httpURLConnection);
                throw new o("could not construct request body", e4);
            }
        } catch (MalformedURLException e5) {
            throw new o("could not construct URL for request", e5);
        }
    }

    public final Class a() {
        return ParcelFileDescriptor.class;
    }

    public final void b(Object obj) {
        ((ParcelFileDescriptor) obj).close();
    }

    public final void c() {
    }

    public final Object create() {
        return new ArrayList();
    }

    public final Object d(File file) {
        return ParcelFileDescriptor.open(file, 268435456);
    }

    public final void e(MediaMetadataRetriever mediaMetadataRetriever, Object obj) {
        switch (this.f249d) {
            case z.SERIES_VALUES_FIELD_NUMBER:
                AssetFileDescriptor assetFileDescriptor = (AssetFileDescriptor) obj;
                mediaMetadataRetriever.setDataSource(assetFileDescriptor.getFileDescriptor(), assetFileDescriptor.getStartOffset(), assetFileDescriptor.getLength());
                break;
            default:
                mediaMetadataRetriever.setDataSource(((ParcelFileDescriptor) obj).getFileDescriptor());
                break;
        }
    }

    public final og.f0 g(og.f0 f0Var, mg.k kVar) {
        byte[] bArr;
        ByteBuffer asReadOnlyBuffer = ((xg.c) f0Var.get()).d.a.a.d.asReadOnlyBuffer();
        AtomicReference atomicReference = fh.b.a;
        l lVar = (asReadOnlyBuffer.isReadOnly() || !asReadOnlyBuffer.hasArray()) ? null : new l(asReadOnlyBuffer.array(), asReadOnlyBuffer.arrayOffset(), asReadOnlyBuffer.limit());
        if (lVar != null && lVar.a == 0 && lVar.b == lVar.c.length) {
            bArr = asReadOnlyBuffer.array();
        } else {
            ByteBuffer asReadOnlyBuffer2 = asReadOnlyBuffer.asReadOnlyBuffer();
            byte[] bArr2 = new byte[asReadOnlyBuffer2.limit()];
            asReadOnlyBuffer2.position(0);
            asReadOnlyBuffer2.get(bArr2);
            bArr = bArr2;
        }
        return new b0(bArr);
    }

    public final void i(Throwable th2) {
        if (Log.isLoggable("GlideExecutor", 6)) {
            Log.e("GlideExecutor", "Request threw uncaught throwable", th2);
        }
    }

    public final sg.v n(sg.b0 b0Var) {
        switch (this.f249d) {
            case z.CLIENT_ID_FIELD_NUMBER:
                return new e(new w0(this, 28), 0);
            case z.CLIENT_VERSION_FIELD_NUMBER:
            default:
                return new j0(b0Var.b(sg.l.class, InputStream.class));
            case z.DEVICE_FIELD_NUMBER:
                return new sg.f0(b0Var.b(Uri.class, AssetFileDescriptor.class), 0);
        }
    }

    public c(int i, int i2) {
        this(0);
        this.f249d = i;
        switch (i) {
            case 1:
                this(1);
                break;
            case z.VALUES_FIELD_NUMBER:
                this(2);
                break;
            case 3:
                this(3);
                break;
            case z.ORIGIN_SERIES_UID_FIELD_NUMBER:
                this(4);
                break;
            case z.DATA_ORIGIN_FIELD_NUMBER:
                this(5);
                break;
            case z.ZONE_OFFSET_SECONDS_FIELD_NUMBER:
                this(6);
                break;
            case z.UPDATE_TIME_MILLIS_FIELD_NUMBER:
                this(7);
                break;
            default:
                switch (i) {
                    case 21:
                        this(21);
                        break;
                    case z.SUB_TYPE_DATA_LISTS_FIELD_NUMBER:
                        this(22);
                        break;
                    case z.RECORDING_METHOD_FIELD_NUMBER:
                        this(23);
                        break;
                    case 24:
                        this(24);
                        break;
                    case 25:
                        this(25);
                        break;
                    case 26:
                        this(26);
                        break;
                    case 27:
                        this(27);
                        break;
                    case 28:
                        this(28);
                        break;
                    case 29:
                        this(29);
                        break;
                    default:
                        break;
                }
        }
    }

    public c() {
        this(15);
        this.f249d = 15;
    }
}