导航菜单

页面标题

页面副标题

Bhakti v5.4.0 - w.java 源代码

正在查看: Bhakti v5.4.0 应用的 w.java JAVA 源代码文件

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


package A8;

import Ai.o;
import Ai.p;
import Am.G;
import B0.S;
import F.v;
import Fc.D;
import Hp.j;
import Je.t;
import Kj.z;
import Lj.i;
import N.E;
import Nl.uHX.kNTM;
import Q8.a;
import Vj.b9;
import Vj.pf;
import android.app.AlarmManager;
import android.app.Notification;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.graphics.Point;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.v4.media.MediaBrowserCompat;
import android.support.v4.media.MediaDescriptionCompat;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.activity.ComponentActivity;
import androidx.appcompat.widget.h1;
import androidx.appcompat.widget.j1;
import androidx.fragment.app.j0;
import com.moengage.pushbase.activities.PushTracker;
import com.moengage.pushbase.internal.MoEPushReceiver;
import com.moengage.sdk.debugger.MoEDebuggerActivity;
import com.vlv.aravali.common.models.Show;
import com.vlv.aravali.downloadsV2.data.DownloadShowEntity;
import com.vlv.aravali.payments.common.data.UpiAppData;
import com.vlv.aravali.payments.common.ui.W;
import com.vlv.aravali.premium.ui.XnxP.NkpP;
import e0.A2;
import e0.N0;
import e0.h2;
import e3.C;
import g.B;
import gc.r;
import h0.V;
import h0.a1;
import h0.l;
import h0.r0;
import j.e;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.TimeZone;
import java.util.concurrent.CopyOnWriteArrayList;
import kotlin.Unit;
import kotlin.collections.H;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Regex;
import kotlin.text.StringsKt;
import kotlin.text.s;
import kotlin.text.y;
import mf.h;
import nf.F;
import org.json.JSONArray;
import org.json.JSONObject;
import p0.d;
import qg.e0;
import uh.u;
import v0.f;
import x2.m;
import yd.c;

public abstract class w {

    public static final int f28a = 0;

    public static final Class A(String str) {
        if (a.b(w.class)) {
            return null;
        }
        try {
            Intrinsics.checkNotNullParameter(str, "className");
            try {
                return Class.forName(str);
            } catch (ClassNotFoundException unused) {
                return null;
            }
        } catch (Throwable th) {
            a.a(w.class, th);
            return null;
        }
    }

    public static final String B(Xh.a aVar) {
        Intrinsics.checkNotNullParameter(aVar, "debuggerInfo");
        return s.c("\n        Status: " + aVar.b + "\n        Log Level: " + aVar.c + "\n        Start Time: " + aVar.d + "\n        End Time: " + aVar.e + "\n        Time Zone: " + aVar.j + "\n        Workspace Id: " + aVar.f + "\n        SDK Environment: " + aVar.g + "\n        Device Id: " + aVar.h + "\n        Unique Id: " + aVar.i + "\n    ");
    }

    public static final F D(Bundle bundle) {
        String string;
        String str;
        if (bundle == null || (string = bundle.getString("appId")) == null) {
            c cVar = h.c;
            p.P(0, (Throwable) null, (e0) null, Wh.c.h, 7);
            return null;
        }
        if (y.g(string, "_DEBUG", false)) {
            str = string.substring(0, StringsKt.G(string, "_DEBUG", 0, false, 6));
            Intrinsics.checkNotNullExpressionValue(str, "substring(...)");
        } else {
            str = string;
        }
        F c = t.c(str);
        if (c == null) {
            c cVar2 = h.c;
            p.P(0, (Throwable) null, (e0) null, Wh.c.g, 7);
            return null;
        }
        boolean g = y.g(string, "_DEBUG", false);
        boolean z = c.a.b;
        if (g && !z) {
            throw new UnsupportedOperationException("Live Environment Integration cannot be verified in Debug Build");
        }
        if (y.g(string, "_DEBUG", false) || !z) {
            return c;
        }
        throw new UnsupportedOperationException("Test Environment Integration cannot be verified in Release Build");
    }

    public static final Method E(Class cls, String str, Class... clsArr) {
        if (a.b(w.class)) {
            return null;
        }
        try {
            Intrinsics.checkNotNullParameter(cls, "clazz");
            Intrinsics.checkNotNullParameter(str, "methodName");
            Intrinsics.checkNotNullParameter(clsArr, "args");
            try {
                return cls.getMethod(str, (Class[]) Arrays.copyOf(clsArr, clsArr.length));
            } catch (NoSuchMethodException unused) {
                return null;
            }
        } catch (Throwable th) {
            a.a(w.class, th);
            return null;
        }
    }

    public static final String F(Bundle bundle) {
        Intrinsics.checkNotNullParameter(bundle, "bundle");
        JSONObject jSONObject = new JSONObject(bundle.getString("moeFeatures", ""));
        String string = jSONObject.has("nId") ? jSONObject.getString("nId") : bundle.getString("gcm_campaign_id", "");
        Intrinsics.e(string);
        return G(string);
    }

    public static final String G(String str) {
        Intrinsics.checkNotNullParameter(str, "campaignId");
        String replace = new Regex("[^A-Za-z0-9]").replace(str, "");
        c cVar = h.c;
        p.P(0, (Throwable) null, (e0) null, new Qg.c(str, replace, 1), 7);
        return replace;
    }

    public static final String H(TimeZone timeZone, long j) {
        Intrinsics.checkNotNullParameter(timeZone, "timeZone");
        return o.r(new StringBuilder("UTC "), timeZone.getOffset(j) >= 0 ? "+" : "-", e.h(new Object[]{Double.valueOf(Math.abs(r4 / 3600000)), Double.valueOf(Math.abs((r4 / 60000) % 60))}, 2, Locale.ENGLISH, "%02.0f:%02.0f", "format(...)"));
    }

    public static final Intent I(Context context, Bundle bundle) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(bundle, "payloadBundle");
        Intent intent = new Intent(context, (Class<?>) PushTracker.class);
        intent.setAction("" + System.currentTimeMillis());
        intent.setFlags(268435456);
        intent.putExtras(bundle);
        return intent;
    }

    public static H J() {
        return H.a;
    }

    public static H K() {
        return H.a;
    }

    public static String L(String str, String str2) {
        return o.j("https://console.firebase.google.com/project/", str, "/performance/app/android:", str2);
    }

    public static final Point M(View view) {
        Intrinsics.checkNotNullParameter(view, "<this>");
        int[] iArr = {0, 0};
        view.getLocationOnScreen(iArr);
        return new Point(iArr[0], iArr[1]);
    }

    public static W N(ViewGroup viewGroup) {
        Intrinsics.checkNotNullParameter(viewGroup, "parent");
        b9 w = b9.w(LayoutInflater.from(viewGroup.getContext()), viewGroup);
        Intrinsics.checkNotNullExpressionValue(w, "inflate(...)");
        Intrinsics.checkNotNullParameter(w, "binding");
        View view = ((m) w).d;
        Intrinsics.checkNotNullExpressionValue(view, "getRoot(...)");
        return new W(view);
    }

    public static hk.e O(ViewGroup viewGroup) {
        Intrinsics.checkNotNullParameter(viewGroup, "parent");
        LayoutInflater from = LayoutInflater.from(viewGroup.getContext());
        int i = pf.M;
        pf b2 = x2.e.b(from, 2131558924, viewGroup, false);
        Intrinsics.checkNotNullExpressionValue(b2, "inflate(...)");
        return new hk.e(b2);
    }

    public static final Object P(Method method, Class cls, Object obj, Object... objArr) {
        if (a.b(w.class)) {
            return null;
        }
        try {
            Intrinsics.checkNotNullParameter(cls, "clazz");
            Intrinsics.checkNotNullParameter(method, "method");
            Intrinsics.checkNotNullParameter(objArr, "args");
            if (obj != null) {
                obj = cls.cast(obj);
            }
            try {
                return method.invoke(obj, Arrays.copyOf(objArr, objArr.length));
            } catch (IllegalAccessException | InvocationTargetException unused) {
                return null;
            }
        } catch (Throwable th) {
            a.a(w.class, th);
            return null;
        }
    }

    public static final boolean Q(Context context, String str) {
        Intrinsics.checkNotNullParameter(context, "context");
        if (Build.VERSION.SDK_INT < 26) {
            return true;
        }
        Object systemService = context.getSystemService("notification");
        Intrinsics.f(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
        return f.b((NotificationManager) systemService, str) != null;
    }

    public static final boolean R(Eh.c cVar, F f) {
        Intrinsics.checkNotNullParameter(cVar, "notificationPayload");
        Intrinsics.checkNotNullParameter(f, "sdkInstance");
        if (!f.c.l.a || Build.VERSION.SDK_INT > 30) {
            return cVar.h.e;
        }
        return false;
    }

    public static final boolean S(Eh.c cVar) {
        Intrinsics.checkNotNullParameter(cVar, "payload");
        return cVar.i.getBoolean("moe_re_notify", false);
    }

    public static final boolean T(Bundle bundle) {
        Intrinsics.checkNotNullParameter(bundle, "extras");
        return bundle.getBoolean("moe_re_notify", false);
    }

    public static Object U(Parcelable parcelable) {
        int i = C.f422a;
        if (i >= 21 && i < 23) {
            if (parcelable instanceof MediaBrowserCompat.MediaItem) {
                MediaBrowserCompat.MediaItem mediaItem = (MediaBrowserCompat.MediaItem) parcelable;
                MediaDescriptionCompat mediaDescriptionCompat = mediaItem.b;
                return new MediaBrowserCompat.MediaItem(new MediaDescriptionCompat(mediaDescriptionCompat.a, mediaDescriptionCompat.b, mediaDescriptionCompat.c, mediaDescriptionCompat.d, mediaDescriptionCompat.e, mediaDescriptionCompat.f, mediaDescriptionCompat.g, mediaDescriptionCompat.h), mediaItem.a);
            }
            if (parcelable instanceof MediaDescriptionCompat) {
                MediaDescriptionCompat mediaDescriptionCompat2 = (MediaDescriptionCompat) parcelable;
                return new MediaDescriptionCompat(mediaDescriptionCompat2.a, mediaDescriptionCompat2.b, mediaDescriptionCompat2.c, mediaDescriptionCompat2.d, mediaDescriptionCompat2.e, mediaDescriptionCompat2.f, mediaDescriptionCompat2.g, mediaDescriptionCompat2.h);
            }
        }
        return parcelable;
    }

    public static BigDecimal V(String str) {
        i(str);
        BigDecimal bigDecimal = new BigDecimal(str);
        if (Math.abs(bigDecimal.scale()) < 10000) {
            return bigDecimal;
        }
        throw new NumberFormatException("Number has unsupported scale: ".concat(str));
    }

    public static BigInteger W(String str) {
        i(str);
        return new BigInteger(str);
    }

    public static final void X(Context context, Notification notification, String str) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(notification, "notification");
        Intrinsics.checkNotNullParameter(str, "tag");
        c cVar = h.c;
        p.P(0, (Throwable) null, (e0) null, new Ah.c(str, 25), 7);
        Object systemService = context.getSystemService("notification");
        Intrinsics.f(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
        ((NotificationManager) systemService).notify(str, 17987, notification);
    }

    public static final void Y(Context context, String str) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(str, "notificationTag");
        Object systemService = context.getSystemService("notification");
        Intrinsics.f(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
        ((NotificationManager) systemService).cancel(str, 17987);
    }

    public static long Z(long j, long j2) {
        int numberOfLeadingZeros = Long.numberOfLeadingZeros(~j2) + Long.numberOfLeadingZeros(j2) + Long.numberOfLeadingZeros(~j) + Long.numberOfLeadingZeros(j);
        if (numberOfLeadingZeros > 65) {
            return j * j2;
        }
        long j3 = ((j ^ j2) >>> 63) + Long.MAX_VALUE;
        if ((numberOfLeadingZeros < 64) || ((j2 == Long.MIN_VALUE) & (j < 0))) {
            return j3;
        }
        long j4 = j * j2;
        return (j == 0 || j4 / j == j2) ? j4 : j3;
    }

    public static final void a(j0 j0Var, l lVar, int i) {
        int i2;
        Intrinsics.checkNotNullParameter(j0Var, "fragmentManager");
        h0.p pVar = (h0.p) lVar;
        pVar.a0(1017976803);
        if ((i & 6) == 0) {
            i2 = (pVar.i(j0Var) ? 4 : 2) | i;
        } else {
            i2 = i;
        }
        if ((i2 & 3) == 2 && pVar.C()) {
            pVar.S();
        } else {
            A2.a((u0.s) null, (S) null, 0L, 0L, 0.0f, 0.0f, (v) null, d.e(1649186152, new G(j0Var, 5), pVar), pVar, 12582912, 127);
        }
        r0 u = pVar.u();
        if (u != null) {
            u.d = new Ck.s(j0Var, i, 3);
        }
    }

    public static final void a0(View view, ComponentActivity componentActivity) {
        Intrinsics.checkNotNullParameter(view, "<this>");
        Intrinsics.checkNotNullParameter(componentActivity, "fullyDrawnReporterOwner");
        view.setTag(B.report_drawn, componentActivity);
    }

    public static long b(float f) {
        return (Float.floatToRawIntBits(f) << 32) | (Float.floatToRawIntBits(f) & 4294967295L);
    }

    public static void b0(View view, CharSequence charSequence) {
        if (Build.VERSION.SDK_INT >= 26) {
            h1.a(view, charSequence);
            return;
        }
        j1 j1Var = j1.k;
        if (j1Var != null && j1Var.a == view) {
            j1.b((j1) null);
        }
        if (!TextUtils.isEmpty(charSequence)) {
            new j1(view, charSequence);
            return;
        }
        j1 j1Var2 = j1.p;
        if (j1Var2 != null && j1Var2.a == view) {
            j1Var2.a();
        }
        view.setOnLongClickListener(null);
        view.setLongClickable(false);
        view.setOnHoverListener(null);
    }

    public static final void c(String str, E e, Function0 function0, l lVar, int i) {
        int i2;
        Intrinsics.checkNotNullParameter(str, "key");
        Intrinsics.checkNotNullParameter(e, "lazyListState");
        Intrinsics.checkNotNullParameter(function0, "onItemViewed");
        h0.p pVar = (h0.p) lVar;
        pVar.a0(-1750285552);
        if ((i & 6) == 0) {
            i2 = (pVar.i(str) ? 4 : 2) | i;
        } else {
            i2 = i;
        }
        if ((i & 48) == 0) {
            i2 |= pVar.g(e) ? 32 : 16;
        }
        if ((i & 384) == 0) {
            i2 |= pVar.i(function0) ? 256 : 128;
        }
        if ((i2 & 147) == 146 && pVar.C()) {
            pVar.S();
        } else {
            pVar.Y(1170655378);
            Object M = pVar.M();
            V v = h0.k.a;
            if (M == v) {
                M = h0.w.q(new Af.c(21, e, str));
                pVar.j0(M);
            }
            pVar.q(false);
            if (((Boolean) ((a1) M).getValue()).booleanValue()) {
                Unit unit = Unit.a;
                pVar.Y(1170662339);
                boolean z = (i2 & 896) == 256;
                Object M2 = pVar.M();
                if (z || M2 == v) {
                    M2 = new z(function0, (pp.c) null);
                    pVar.j0(M2);
                }
                pVar.q(false);
                h0.w.f(pVar, unit, (Function2) M2);
            }
        }
        r0 u = pVar.u();
        if (u != null) {
            u.d = new Bm.w(i, 4, str, e, function0);
        }
    }

    public static final void c0(MoEDebuggerActivity moEDebuggerActivity, Xh.a aVar) {
        Intrinsics.checkNotNullParameter(moEDebuggerActivity, "activity");
        Intrinsics.checkNotNullParameter(aVar, "debuggerInfo");
        try {
            Intent intent = new Intent("android.intent.action.SEND");
            intent.setType("text/plain");
            intent.putExtra("android.intent.extra.SUBJECT", aVar.a);
            intent.putExtra("android.intent.extra.TEXT", B(aVar));
            if (intent.resolveActivity(moEDebuggerActivity.getPackageManager()) != null) {
                moEDebuggerActivity.startActivity(intent);
            }
        } catch (Throwable th) {
            c cVar = h.c;
            p.P(1, th, (e0) null, Wh.c.i, 4);
        }
    }

    public static final void d(p0.c cVar, l lVar, int i) {
        int i2;
        Intrinsics.checkNotNullParameter(cVar, "content");
        h0.p pVar = (h0.p) lVar;
        pVar.a0(-1675180560);
        if ((i & 6) == 0) {
            i2 = (pVar.i(cVar) ? 4 : 2) | i;
        } else {
            i2 = i;
        }
        if ((i2 & 3) == 2 && pVar.C()) {
            pVar.S();
        } else {
            N0.a(Lj.a.R, (h2) null, Lj.l.a, cVar, pVar, ((i2 << 9) & 7168) | 390, 2);
        }
        r0 u = pVar.u();
        if (u != null) {
            u.d = new i(cVar, i, 1);
        }
    }

    public static final DownloadShowEntity d0(Show show, int i, Yj.a aVar) {
        Intrinsics.checkNotNullParameter(show, "<this>");
        Intrinsics.checkNotNullParameter(aVar, "downloadStatus");
        return new DownloadShowEntity(i, show, aVar, String.valueOf(System.currentTimeMillis()));
    }

    public static final void e(Context context, Eh.c cVar, F f) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(f, "sdkInstance");
        Intrinsics.checkNotNullParameter(cVar, "payload");
        try {
            if (cVar.h.b) {
                h.a(f.d, 0, (Throwable) null, (Function0) null, uh.c.y, 7);
            } else {
                u.c(context, f).b(cVar);
            }
        } catch (Throwable th) {
            h.a(f.d, 1, th, (Function0) null, uh.c.H, 4);
        }
    }

    public static final UpiAppData e0(com.razorpay.h hVar, boolean z) {
        Intrinsics.checkNotNullParameter(hVar, "<this>");
        String str = hVar.a;
        Intrinsics.checkNotNullExpressionValue(str, "getAppName(...)");
        String str2 = hVar.c;
        Intrinsics.checkNotNullExpressionValue(str2, "getPackageName(...)");
        return new UpiAppData(str, hVar.b, str2, z);
    }

    public static final void f(Uri.Builder builder, Bundle bundle) {
        Intrinsics.checkNotNullParameter(builder, "uriBuilder");
        Intrinsics.checkNotNullParameter(bundle, "extras");
        try {
            if (bundle.isEmpty()) {
                return;
            }
            for (String str : bundle.keySet()) {
                Object obj = bundle.get(str);
                if (obj != null) {
                    builder.appendQueryParameter(str, obj.toString());
                }
            }
        } catch (Throwable th) {
            c cVar = h.c;
            p.P(1, th, (e0) null, uh.c.L, 4);
        }
    }

    public static final int f0(Context context, int i) {
        Intrinsics.checkNotNullParameter(context, "context");
        return (int) TypedValue.applyDimension(1, i, context.getResources().getDisplayMetrics());
    }

    public static boolean g(E7.f fVar, int i) {
        Long jobNumberLimit = fVar.getJobNumberLimit();
        return jobNumberLimit == null || ((long) i) <= jobNumberLimit.longValue();
    }

    public static CopyOnWriteArrayList g0(CopyOnWriteArrayList copyOnWriteArrayList) {
        ArrayList arrayList = new ArrayList();
        if (copyOnWriteArrayList != null) {
            Iterator it = copyOnWriteArrayList.iterator();
            if (it.hasNext()) {
                throw e.a(it);
            }
        }
        return new CopyOnWriteArrayList(arrayList);
    }

    public static final void h(Context context, F f, Bundle bundle, int i) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(f, "sdkInstance");
        Intrinsics.checkNotNullParameter(bundle, "bundle");
        h.a(f.d, 0, (Throwable) null, (Function0) null, uh.c.M, 7);
        Intent intent = new Intent(context, (Class<?>) MoEPushReceiver.class);
        intent.putExtras(bundle);
        intent.setAction("MOE_ACTION_SHOW_NOTIFICATION");
        Object systemService = context.getSystemService("alarm");
        Intrinsics.f(systemService, "null cannot be cast to non-null type android.app.AlarmManager");
        h.a(f.d, 0, (Throwable) null, (Function0) null, new e0(intent, 19), 7);
        ((AlarmManager) systemService).cancel(Yf.e.v(context, i, intent));
    }

    public static long j(long j, long j2) {
        long j3 = j + j2;
        if (((j ^ j2) < 0) || ((j ^ j3) >= 0)) {
            return j3;
        }
        throw new ArithmeticException(o.e(j2, ")", e.i(j, "overflow: checkedAdd(", ", ")));
    }

    public static final void k(G.o oVar) {
        oVar.a.setValue(G.l.a);
    }

    public static Parcelable l(Parcelable parcelable, Parcelable.Creator creator) {
        if (parcelable == null) {
            return null;
        }
        Parcelable parcelable2 = (Parcelable) U(parcelable);
        Parcel obtain = Parcel.obtain();
        try {
            parcelable2.writeToParcel(obtain, 0);
            obtain.setDataPosition(0);
            return (Parcelable) U((Parcelable) creator.createFromParcel(obtain));
        } finally {
            obtain.recycle();
        }
    }

    public static final String m(Bundle bundle) {
        Intrinsics.checkNotNullParameter(bundle, "newBundle");
        Set<String> keySet = bundle.keySet();
        JSONObject jSONObject = new JSONObject();
        for (String str : keySet) {
            try {
                jSONObject.put(str, bundle.get(str));
            } catch (Throwable th) {
                c cVar = h.c;
                p.P(1, th, (e0) null, uh.c.i0, 4);
            }
        }
        String jSONObject2 = jSONObject.toString();
        Intrinsics.checkNotNullExpressionValue(jSONObject2, "toString(...)");
        return jSONObject2;
    }

    public static ArrayList n(List list, Parcelable.Creator creator) {
        if (list == null) {
            return null;
        }
        ArrayList arrayList = new ArrayList();
        for (int i = 0; i < list.size(); i++) {
            arrayList.add(l((Parcelable) list.get(i), creator));
        }
        return arrayList;
    }

    public static I2.t o(android.content.Context r8) {
        throw new UnsupportedOperationException("Method not decompiled: A8.w.o(android.content.Context):I2.t");
    }

    public static final void p(Context context, F f, Bundle bundle, boolean z) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(f, "sdkInstance");
        Intrinsics.checkNotNullParameter(bundle, "payload");
        try {
            f.f.e(new D(context, f, bundle, z, 7));
        } catch (Throwable th) {
            h.a(f.d, 1, th, (Function0) null, uh.c.m0, 4);
        }
    }

    public static r s() {
        return r.INSTANCE;
    }

    public static long t(long j, long j2, RoundingMode roundingMode) {
        roundingMode.getClass();
        long j3 = j / j2;
        long j4 = j - (j2 * j3);
        if (j4 == 0) {
            return j3;
        }
        int i = ((int) ((j ^ j2) >> 63)) | 1;
        switch (ec.e.a[roundingMode.ordinal()]) {
            case 1:
                C8.e.x(j4 == 0);
                return j3;
            case 2:
                return j3;
            case xd.r.DEVICE_RAM_SIZE_KB_FIELD_NUMBER:
                if (i >= 0) {
                    return j3;
                }
                break;
            case xd.r.MAX_APP_JAVA_HEAP_MEMORY_KB_FIELD_NUMBER:
                break;
            case xd.r.MAX_ENCOURAGED_APP_JAVA_HEAP_MEMORY_KB_FIELD_NUMBER:
                if (i <= 0) {
                    return j3;
                }
                break;
            case xd.r.CPU_PROCESSOR_COUNT_FIELD_NUMBER:
            case 7:
            case 8:
                long abs = Math.abs(j4);
                long abs2 = abs - (Math.abs(j2) - abs);
                if (abs2 == 0) {
                    if (roundingMode != RoundingMode.HALF_UP && (roundingMode != RoundingMode.HALF_EVEN || (1 & j3) == 0)) {
                        return j3;
                    }
                } else if (abs2 <= 0) {
                    return j3;
                }
                break;
            default:
                throw new AssertionError();
        }
        return j3 + i;
    }

    public static Object u(Class cls) {
        String str;
        String str2;
        Intrinsics.checkNotNullParameter(cls, "klass");
        Intrinsics.checkNotNullParameter("_Impl", "suffix");
        Package r0 = cls.getPackage();
        if (r0 == null || (str = r0.getName()) == null) {
            str = "";
        }
        String canonicalName = cls.getCanonicalName();
        Intrinsics.e(canonicalName);
        if (str.length() != 0) {
            canonicalName = canonicalName.substring(str.length() + 1);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "substring(...)");
        }
        String str3 = y.l(canonicalName, '.', '_') + "_Impl";
        try {
            if (str.length() == 0) {
                str2 = str3;
            } else {
                str2 = str + '.' + str3;
            }
            Class<?> cls2 = Class.forName(str2, true, cls.getClassLoader());
            Intrinsics.f(cls2, "null cannot be cast to non-null type java.lang.Class<T of androidx.room.util.KClassUtil.findAndInstantiateDatabaseImpl>");
            return cls2.getDeclaredConstructor(null).newInstance(null);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException("Cannot find implementation for " + cls.getCanonicalName() + ". " + str3 + " does not exist. Is Room annotation processor correctly configured?", e);
        } catch (IllegalAccessException e4) {
            throw new RuntimeException("Cannot access the constructor " + cls.getCanonicalName(), e4);
        } catch (InstantiationException e5) {
            throw new RuntimeException("Failed to create an instance of " + cls.getCanonicalName(), e5);
        }
    }

    public static long v(long j, long j2) {
        C8.e.w("a", j);
        C8.e.w("b", j2);
        if (j == 0) {
            return j2;
        }
        if (j2 == 0) {
            return j;
        }
        int numberOfTrailingZeros = Long.numberOfTrailingZeros(j);
        long j3 = j >> numberOfTrailingZeros;
        int numberOfTrailingZeros2 = Long.numberOfTrailingZeros(j2);
        long j4 = j2 >> numberOfTrailingZeros2;
        while (j3 != j4) {
            long j7 = j3 - j4;
            long j8 = (j7 >> 63) & j7;
            long j9 = (j7 - j8) - j8;
            j4 += j8;
            j3 = j9 >> Long.numberOfTrailingZeros(j9);
        }
        return j3 << Math.min(numberOfTrailingZeros, numberOfTrailingZeros2);
    }

    public static String w(String str, String str2, String str3) {
        return e.g(L(str, str2), "/troubleshooting/trace/DURATION_TRACE/", str3, "?utm_source=perf-android-sdk&utm_medium=android-ide");
    }

    public static String x(String str, String str2, String str3) {
        return e.g(L(str, str2), "/troubleshooting/trace/SCREEN_TRACE/", str3, "?utm_source=perf-android-sdk&utm_medium=android-ide");
    }

    public static final JSONArray y(Bundle bundle) {
        Intrinsics.checkNotNullParameter(bundle, "bundle");
        try {
            String string = bundle.getString("moe_action", null);
            if (string == null) {
                return new JSONArray();
            }
            JSONArray jSONArray = new JSONObject(string).getJSONArray("actions");
            Intrinsics.checkNotNullExpressionValue(jSONArray, "getJSONArray(...)");
            return jSONArray;
        } catch (Throwable th) {
            c cVar = h.c;
            p.P(1, th, (e0) null, uh.c.n0, 4);
            return new JSONArray();
        }
    }

    public static final j z(ViewGroup viewGroup) {
        Intrinsics.checkNotNullParameter(viewGroup, "<this>");
        return new j(viewGroup, 2);
    }

    public static final Method C(Class cls, String str, Class... clsArr) {
        if (a.b(w.class)) {
            return null;
        }
        try {
            Intrinsics.checkNotNullParameter(cls, "clazz");
            Intrinsics.checkNotNullParameter(str, NkpP.ANaEKKjxrTlJ);
            Intrinsics.checkNotNullParameter(clsArr, "args");
            try {
                return cls.getDeclaredMethod(str, (Class[]) Arrays.copyOf(clsArr, clsArr.length));
            } catch (NoSuchMethodException unused) {
                return null;
            }
        } catch (Throwable th) {
            a.a(w.class, th);
            return null;
        }
    }

    public static void i(String str) {
        if (str.length() <= 10000) {
            return;
        }
        throw new NumberFormatException(kNTM.OrcvqIR + str.substring(0, 30) + "...");
    }
}