package ῲ.ᨨ.㳳;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.Keyframe;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.TypeConverter;
import android.animation.ValueAnimator;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.database.Cursor;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.icu.text.DecimalFormatSymbols;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcel;
import android.support.v4.media.MediaBrowserCompat;
import android.text.Editable;
import android.text.PrecomputedText;
import android.text.Spannable;
import android.text.TextDirectionHeuristic;
import android.text.TextDirectionHeuristics;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.method.PasswordTransformationMethod;
import android.util.AttributeSet;
import android.util.Property;
import android.util.TypedValue;
import android.util.Xml;
import android.view.ActionMode;
import android.view.DisplayCutout;
import android.view.InflateException;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowInsets;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
import android.widget.TextView;
import android.widget.Toast;
import androidx.recyclerview.widget.RecyclerView;
import com.adjust.sdk.Adjust;
import com.adjust.sdk.AdjustEvent;
import com.appsflyer.share.Constants;
import com.bumptech.glide.load.ImageHeaderParser;
import com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream;
import com.facebook.AccessToken;
import com.facebook.LegacyTokenHelper;
import com.facebook.applinks.AppLinkData;
import com.indiaholacash.holacash.R;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import ඓ.ඓ.K.䁗.C0722;
import ඓ.ඓ.K.䁗.C0734;
import ඓ.ඓ.K.䁗.ServiceConnectionC0712;
import ඓ.ῲ.K.ᕣ.ᨨ.ゎ.AbstractC0967;
import ඓ.ⁱ.K.ඓ.C1252;
import ඓ.K.K.K.C1293;
import ῲ.ᨨ.ʬ.C1708;
import ῲ.ᨨ.ⁱ.C1810;
import ῲ.㴪.K.K.C2257;
import ῲ.㴪.K.K.C2271;
import ῲ.㴪.K.K.C2273;
import ῲ.䀟.K.AbstractC2303;
import K.K.K.ʬ.C2369;

/* renamed from: ῲ.ᨨ.㳳.㸾  reason: contains not printable characters */
/* compiled from: TextViewCompat */
public final class C1841 {

    /* renamed from: ῲ  reason: contains not printable characters */
    public static Context f6258;

    /* renamed from: K  reason: contains not printable characters */
    public static SharedPreferences f6259;

    /* renamed from: ῲ.ᨨ.㳳.㸾$K  reason: contains not printable characters */
    /* compiled from: TextViewCompat */
    public static class ActionMode$CallbackC1842 implements ActionMode.Callback {

        /* renamed from: ʬ  reason: contains not printable characters */
        public Class<?> f6260;

        /* renamed from: ඓ  reason: contains not printable characters */
        public boolean f6261;

        /* renamed from: ῲ  reason: contains not printable characters */
        public final TextView f6262;

        /* renamed from: K  reason: contains not printable characters */
        public final ActionMode.Callback f6263;

        /* renamed from: 㴹  reason: contains not printable characters */
        public boolean f6264 = false;

        /* renamed from: 㸾  reason: contains not printable characters */
        public Method f6265;

        public ActionMode$CallbackC1842(ActionMode.Callback callback, TextView textView) {
            this.f6263 = callback;
            this.f6262 = textView;
        }

        public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {
            return this.f6263.onActionItemClicked(actionMode, menuItem);
        }

        public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
            return this.f6263.onCreateActionMode(actionMode, menu);
        }

        public void onDestroyActionMode(ActionMode actionMode) {
            this.f6263.onDestroyActionMode(actionMode);
        }

        public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {
            Method method;
            String str;
            Context context = this.f6262.getContext();
            PackageManager packageManager = context.getPackageManager();
            if (!this.f6264) {
                this.f6264 = true;
                try {
                    this.f6260 = Class.forName("com.android.internal.view.menu.MenuBuilder");
                    this.f6265 = this.f6260.getDeclaredMethod("removeItemAt", Integer.TYPE);
                    this.f6261 = true;
                } catch (ClassNotFoundException | NoSuchMethodException unused) {
                    this.f6260 = null;
                    this.f6265 = null;
                    this.f6261 = false;
                }
            }
            try {
                if (!this.f6261 || !this.f6260.isInstance(menu)) {
                    method = menu.getClass().getDeclaredMethod("removeItemAt", Integer.TYPE);
                } else {
                    method = this.f6265;
                }
                for (int size = menu.size() - 1; size >= 0; size--) {
                    MenuItem item = menu.getItem(size);
                    if (item.getIntent() != null && "android.intent.action.PROCESS_TEXT".equals(item.getIntent().getAction())) {
                        method.invoke(menu, Integer.valueOf(size));
                    }
                }
                ArrayList arrayList = new ArrayList();
                if (context instanceof Activity) {
                    for (ResolveInfo resolveInfo : packageManager.queryIntentActivities(m4814(), 0)) {
                        if (context.getPackageName().equals(resolveInfo.activityInfo.packageName) || (resolveInfo.activityInfo.exported && ((str = resolveInfo.activityInfo.permission) == null || context.checkSelfPermission(str) == 0))) {
                            arrayList.add(resolveInfo);
                        }
                    }
                }
                for (int i = 0; i < arrayList.size(); i++) {
                    ResolveInfo resolveInfo2 = (ResolveInfo) arrayList.get(i);
                    MenuItem add = menu.add(0, 0, i + 100, resolveInfo2.loadLabel(packageManager));
                    TextView textView = this.f6262;
                    add.setIntent(m4814().putExtra("android.intent.extra.PROCESS_TEXT_READONLY", !((textView instanceof Editable) && textView.onCheckIsTextEditor() && textView.isEnabled())).setClassName(resolveInfo2.activityInfo.packageName, resolveInfo2.activityInfo.name)).setShowAsAction(1);
                }
            } catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException unused2) {
            }
            return this.f6263.onPrepareActionMode(actionMode, menu);
        }

        /* renamed from: K  reason: contains not printable characters */
        public final Intent m4814() {
            return new Intent().setAction("android.intent.action.PROCESS_TEXT").setType("text/plain");
        }
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public static void m4741() {
        AdjustEvent adjustEvent = new AdjustEvent("bufnea");
        adjustEvent.addCallbackParameter("member_token", m4788(AccessToken.TOKEN_KEY, ""));
        adjustEvent.addCallbackParameter("gps_adid", m4748());
        Adjust.trackEvent(adjustEvent);
    }

    /* renamed from: Ԕ  reason: contains not printable characters */
    public static boolean m4746() {
        return !TextUtils.isEmpty(m4756("ro.miui.ui.version.name", ""));
    }

    /* renamed from: ؿ  reason: contains not printable characters */
    public static boolean m4747() {
        Context r0 = C1252.m3337();
        if (r0 == null) {
            return true;
        }
        try {
            NetworkInfo activeNetworkInfo = ((ConnectivityManager) r0.getSystemService("connectivity")).getActiveNetworkInfo();
            if (activeNetworkInfo == null || !activeNetworkInfo.isConnected()) {
                return false;
            }
            return true;
        } catch (Exception unused) {
            return true;
        }
    }

    /* renamed from: ඓ  reason: contains not printable characters */
    public static String m4748() {
        f6259 = m4812();
        return f6259.getString("GoogleID_", "");
    }

    /* renamed from: ᓣ  reason: contains not printable characters */
    public static void m4749() {
        AdjustEvent adjustEvent = new AdjustEvent("xc9o0j");
        adjustEvent.addCallbackParameter("member_token", m4788(AccessToken.TOKEN_KEY, ""));
        adjustEvent.addCallbackParameter("gps_adid", m4748());
        Adjust.trackEvent(adjustEvent);
    }

    /* renamed from: ᕣ  reason: contains not printable characters */
    public static boolean m4750() {
        return !TextUtils.isEmpty(m4756("ro.build.version.emui", ""));
    }

    /* renamed from: ᨨ  reason: contains not printable characters */
    public static String m4751() {
        f6259 = m4812();
        return f6259.getString("OrderID_", "");
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static void m4758() {
        AdjustEvent adjustEvent = new AdjustEvent("dlsjry");
        adjustEvent.addCallbackParameter("member_token", m4788(AccessToken.TOKEN_KEY, ""));
        adjustEvent.addCallbackParameter("gps_adid", m4748());
        Adjust.trackEvent(adjustEvent);
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static boolean m4760(int i, int i2) {
        return i != Integer.MIN_VALUE && i2 != Integer.MIN_VALUE && i <= 512 && i2 <= 384;
    }

    /* renamed from: ⁱ  reason: contains not printable characters */
    public static boolean m4767() {
        f6259 = m4812();
        return f6259.getBoolean("isLogin", false);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static int m4768(int i, int i2) {
        return (i2 * i2) + (i * 13 * i);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static void m4795(Runnable runnable) {
        new Handler(Looper.getMainLooper()).post(runnable);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static boolean m4797(int i) {
        return i >= 28 && i <= 31;
    }

    /* renamed from: 㑃  reason: contains not printable characters */
    public static boolean m4805() {
        if (!m4809().contains("EmotionUI_3.0")) {
            String r0 = m4809();
            if ("EmotionUI 3".equals(r0) || r0.contains("EmotionUI_3.1")) {
                return true;
            }
            return false;
        }
        return true;
    }

    /* renamed from: 㗗  reason: contains not printable characters */
    public static boolean m4806() {
        String str = "";
        if (m4746()) {
            str = m4756("ro.miui.ui.version.name", str);
        }
        if (!str.isEmpty()) {
            try {
                if (Integer.valueOf(str.substring(1)).intValue() >= 6) {
                    return true;
                }
                return false;
            } catch (NumberFormatException unused) {
            }
        }
        return false;
    }

    /* renamed from: 㳳  reason: contains not printable characters */
    public static boolean m4807() {
        return m4771("authority", -1) == 1;
    }

    /* renamed from: 㴹  reason: contains not printable characters */
    public static boolean m4808() {
        f6259 = m4812();
        return f6259.getBoolean("isFirstInstall", false);
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public static String m4809() {
        return m4750() ? m4756("ro.build.version.emui", "") : "";
    }

    /* renamed from: 㿎  reason: contains not printable characters */
    public static SharedPreferences m4812() {
        SharedPreferences sharedPreferences = f6259;
        if (sharedPreferences == null) {
            Context context = f6258;
            f6258 = context;
            if (sharedPreferences == null) {
                f6259 = context.getSharedPreferences("daikuan1", 0);
            }
        }
        return f6259;
    }

    /* renamed from: 䁗  reason: contains not printable characters */
    public static boolean m4813() {
        int i;
        String str = "";
        if (m4756("ro.build.display.id", str).toLowerCase().contains("flyme")) {
            str = m4756("ro.build.display.id", str);
        }
        if (str.isEmpty()) {
            return false;
        }
        try {
            if (str.toLowerCase().contains("os")) {
                i = Integer.valueOf(str.substring(9, 10)).intValue();
            } else {
                i = Integer.valueOf(str.substring(6, 7)).intValue();
            }
            if (i >= 4) {
                return true;
            }
            return false;
        } catch (NumberFormatException unused) {
            return false;
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:7:0x0042 A[ORIG_RETURN, RETURN, SYNTHETIC] */
    /* JADX WARNING: Removed duplicated region for block: B:8:? A[RETURN, SYNTHETIC] */
    /* renamed from: 㸾  reason: contains not printable characters */
    public static boolean m4811(Context context) {
        int i;
        if ("Xiaomi".equals(Build.MANUFACTURER)) {
            try {
                Class<?> loadClass = context.getClassLoader().loadClass("android.os.SystemProperties");
                i = ((Integer) loadClass.getMethod("getInt", String.class, Integer.TYPE).invoke(loadClass, "ro.miui.notch", 0)).intValue();
            } catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InvocationTargetException unused) {
            }
            if (i != 1) {
                return true;
            }
            return false;
        }
        i = 0;
        if (i != 1) {
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static void m4792(Context context, String str) {
        Toast toast = new Toast(context);
        View inflate = LayoutInflater.from(context).inflate(R.layout.india_toast, (ViewGroup) null);
        TextView textView = (TextView) inflate.findViewById(R.id.txtMsg);
        if (str == null) {
            str = "错误";
        }
        textView.setText(str);
        toast.setGravity(17, 0, 0);
        toast.setDuration(0);
        toast.setView(inflate);
        toast.show();
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public static boolean m4744(String str, String str2) {
        SharedPreferences.Editor edit = m4812().edit();
        edit.putString(str, str2);
        return edit.commit();
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static boolean m4762(Uri uri) {
        return uri.getPathSegments().contains("video");
    }

    /* JADX INFO: finally extract failed */
    /* renamed from: ῲ  reason: contains not printable characters */
    public static ImageHeaderParser.ImageType m4755(List<ImageHeaderParser> list, InputStream inputStream, AbstractC0967 r5) throws IOException {
        if (inputStream == null) {
            return ImageHeaderParser.ImageType.UNKNOWN;
        }
        if (!inputStream.markSupported()) {
            inputStream = new RecyclableBufferedInputStream(inputStream, r5);
        }
        inputStream.mark(5242880);
        int size = list.size();
        for (int i = 0; i < size; i++) {
            try {
                ImageHeaderParser.ImageType r1 = list.get(i).m1267(inputStream);
                inputStream.reset();
                if (r1 != ImageHeaderParser.ImageType.UNKNOWN) {
                    return r1;
                }
            } catch (Throwable th) {
                inputStream.reset();
                throw th;
            }
        }
        return ImageHeaderParser.ImageType.UNKNOWN;
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public static void m4810(TextView textView, int i) {
        if (Build.VERSION.SDK_INT >= 23) {
            textView.setTextAppearance(i);
        } else {
            textView.setTextAppearance(textView.getContext(), i);
        }
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public static byte[] m4745(String str) {
        return str.getBytes(C0734.f3754);
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public static boolean m4743(Context context) {
        try {
            Class<?> loadClass = context.getClassLoader().loadClass("android.util.FtFeature");
            return ((Boolean) loadClass.getMethod("isFeatureSupport", Integer.TYPE).invoke(loadClass, 32)).booleanValue();
        } catch (ClassNotFoundException | Exception | NoSuchMethodException unused) {
            return false;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static void m4791(Activity activity, int i) {
        int i2 = Build.VERSION.SDK_INT;
        Window window = activity.getWindow();
        window.addFlags(Integer.MIN_VALUE);
        window.clearFlags(67108864);
        window.clearFlags(134217728);
        window.getDecorView().setSystemUiVisibility(256);
        window.setStatusBarColor(activity.getColor(i));
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public static int m4739(int i, Rect rect, Rect rect2) {
        if (i != 17) {
            if (i != 33) {
                if (i != 66) {
                    if (i != 130) {
                        throw new IllegalArgumentException("direction must be one of {FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT}.");
                    }
                }
            }
            return Math.abs(((rect.width() / 2) + rect.left) - ((rect2.width() / 2) + rect2.left));
        }
        return Math.abs(((rect.height() / 2) + rect.top) - ((rect2.height() / 2) + rect2.top));
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static boolean m4765(String str, long j) {
        SharedPreferences.Editor edit = m4812().edit();
        edit.putLong(str, j);
        return edit.commit();
    }

    /* renamed from: K  reason: contains not printable characters */
    public static void m4796(boolean z, String str) {
        if (!z) {
            throw new IllegalArgumentException(str);
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static boolean m4801(Uri uri) {
        return uri != null && "content".equals(uri.getScheme()) && "media".equals(uri.getAuthority());
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public static void m4742(TextView textView, int i) {
        C2369.m6292(i);
        int fontMetricsInt = textView.getPaint().getFontMetricsInt(null);
        if (i != fontMetricsInt) {
            textView.setLineSpacing((float) (i - fontMetricsInt), 1.0f);
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static boolean m4764(String str, int i) {
        SharedPreferences.Editor edit = m4812().edit();
        edit.putInt(str, i);
        return edit.commit();
    }

    /* JADX INFO: finally extract failed */
    /* renamed from: K  reason: contains not printable characters */
    public static String m4784(Context context) throws Exception {
        if (Looper.getMainLooper() == Looper.myLooper()) {
            return "Cannot call in the main thread, You must call in the other thread";
        }
        context.getPackageManager().getPackageInfo("com.android.vending", 0);
        ServiceConnectionC0712 r0 = new ServiceConnectionC0712(null);
        Intent intent = new Intent("com.google.android.gms.ads.identifier.service.START");
        intent.setPackage("com.google.android.gms");
        if (!context.bindService(intent, r0, 1)) {
            return "";
        }
        try {
            if (!r0.f3727) {
                r0.f3727 = true;
                C0722 r2 = new C0722(r0.f3726.take());
                Parcel obtain = Parcel.obtain();
                Parcel obtain2 = Parcel.obtain();
                try {
                    obtain.writeInterfaceToken("com.google.android.gms.ads.identifier.internal.IAdvertisingIdService");
                    r2.f3741.transact(1, obtain, obtain2, 0);
                    obtain2.readException();
                    String readString = obtain2.readString();
                    obtain2.recycle();
                    obtain.recycle();
                    return readString;
                } catch (Throwable th) {
                    obtain2.recycle();
                    obtain.recycle();
                    throw th;
                }
            } else {
                throw new IllegalStateException();
            }
        } finally {
            context.unbindService(r0);
        }
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public static C1810.C1811 m4740(TextView textView) {
        int i;
        int i2;
        TextDirectionHeuristic textDirectionHeuristic;
        if (Build.VERSION.SDK_INT >= 28) {
            return new C1810.C1811(textView.getTextMetricsParams());
        }
        TextPaint textPaint = new TextPaint(textView.getPaint());
        boolean z = false;
        if (Build.VERSION.SDK_INT >= 23) {
            i2 = 1;
            i = 1;
        } else {
            i2 = 0;
            i = 0;
        }
        int i3 = Build.VERSION.SDK_INT;
        TextDirectionHeuristic textDirectionHeuristic2 = TextDirectionHeuristics.FIRSTSTRONG_LTR;
        if (Build.VERSION.SDK_INT >= 23) {
            i2 = textView.getBreakStrategy();
            i = textView.getHyphenationFrequency();
        }
        int i4 = Build.VERSION.SDK_INT;
        if (textView.getTransformationMethod() instanceof PasswordTransformationMethod) {
            textDirectionHeuristic = TextDirectionHeuristics.LTR;
        } else if (Build.VERSION.SDK_INT < 28 || (textView.getInputType() & 15) != 3) {
            if (textView.getLayoutDirection() == 1) {
                z = true;
            }
            switch (textView.getTextDirection()) {
                case 2:
                    textDirectionHeuristic = TextDirectionHeuristics.ANYRTL_LTR;
                    break;
                case 3:
                    textDirectionHeuristic = TextDirectionHeuristics.LTR;
                    break;
                case 4:
                    textDirectionHeuristic = TextDirectionHeuristics.RTL;
                    break;
                case 5:
                    textDirectionHeuristic = TextDirectionHeuristics.LOCALE;
                    break;
                case 6:
                    textDirectionHeuristic = TextDirectionHeuristics.FIRSTSTRONG_LTR;
                    break;
                case 7:
                    textDirectionHeuristic = TextDirectionHeuristics.FIRSTSTRONG_RTL;
                    break;
                default:
                    if (!z) {
                        textDirectionHeuristic = TextDirectionHeuristics.FIRSTSTRONG_LTR;
                        break;
                    } else {
                        textDirectionHeuristic = TextDirectionHeuristics.FIRSTSTRONG_RTL;
                        break;
                    }
            }
        } else {
            byte directionality = Character.getDirectionality(DecimalFormatSymbols.getInstance(textView.getTextLocale()).getDigitStrings()[0].codePointAt(0));
            if (directionality == 1 || directionality == 2) {
                textDirectionHeuristic = TextDirectionHeuristics.RTL;
            } else {
                textDirectionHeuristic = TextDirectionHeuristics.LTR;
            }
        }
        return new C1810.C1811(textPaint, textDirectionHeuristic, i2, i);
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static boolean m4766(boolean z) {
        SharedPreferences.Editor edit = m4812().edit();
        edit.putBoolean("isLogin", z);
        return edit.commit();
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static int m4754(RecyclerView.C0248 r1, AbstractC2303 r2, View view, View view2, RecyclerView.AbstractC0254 r5, boolean z) {
        if (r5.getChildCount() == 0 || r1.m823() == 0 || view == null || view2 == null) {
            return 0;
        }
        if (!z) {
            return r1.m823();
        }
        return (int) ((((float) (r2.m6022(view2) - r2.m6027(view))) / ((float) (Math.abs(r5.getPosition(view) - r5.getPosition(view2)) + 1))) * ((float) r1.m823()));
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static boolean m4763(String str) {
        SharedPreferences.Editor edit = m4812().edit();
        edit.putString("OrderID_", str);
        return edit.commit();
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static boolean m4761(Context context) {
        try {
            Class<?> loadClass = context.getClassLoader().loadClass("com.huawei.android.util.HwNotchSizeUtil");
            return ((Boolean) loadClass.getMethod("hasNotchInScreen", new Class[0]).invoke(loadClass, new Object[0])).booleanValue();
        } catch (ClassNotFoundException | Exception | NoSuchMethodException unused) {
            return false;
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static String m4756(String str, String str2) {
        try {
            Class<?> cls = Class.forName("android.os.SystemProperties");
            return (String) cls.getMethod("get", String.class, String.class).invoke(cls, str, str2);
        } catch (Exception e) {
            e.printStackTrace();
            return str2;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static String m4785(Context context, Uri uri) {
        Cursor query;
        int columnIndex;
        String str = null;
        if (uri == null) {
            return null;
        }
        String scheme = uri.getScheme();
        if (scheme == null) {
            str = uri.getPath();
        } else if ("file".equals(scheme)) {
            str = uri.getPath();
        } else if ("content".equals(scheme) && (query = context.getContentResolver().query(uri, new String[]{"_data"}, null, null, null)) != null) {
            if (query.moveToFirst() && (columnIndex = query.getColumnIndex("_data")) > -1) {
                str = query.getString(columnIndex);
            }
            query.close();
        }
        if (!TextUtils.isEmpty(str)) {
            return str;
        }
        String uri2 = uri.toString();
        String substring = uri2.substring(uri2.lastIndexOf(Constants.URL_PATH_DELIMITER));
        File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), substring);
        if (file.exists()) {
            return file.getAbsolutePath();
        }
        return new File(context.getExternalFilesDir(Environment.DIRECTORY_PICTURES), substring).getAbsolutePath();
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static int m4753(TextView textView) {
        int i = Build.VERSION.SDK_INT;
        return textView.getMaxLines();
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static int m4752(int i, Rect rect, Rect rect2) {
        int i2;
        int i3;
        if (i == 17) {
            i3 = rect.left;
            i2 = rect2.right;
        } else if (i == 33) {
            i3 = rect.top;
            i2 = rect2.bottom;
        } else if (i == 66) {
            i3 = rect2.left;
            i2 = rect.right;
        } else if (i == 130) {
            i3 = rect2.top;
            i2 = rect.bottom;
        } else {
            throw new IllegalArgumentException("direction must be one of {FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT}.");
        }
        return Math.max(0, i3 - i2);
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static void m4759(TextView textView, int i) {
        int i2;
        C2369.m6292(i);
        Paint.FontMetricsInt fontMetricsInt = textView.getPaint().getFontMetricsInt();
        int i3 = Build.VERSION.SDK_INT;
        if (textView.getIncludeFontPadding()) {
            i2 = fontMetricsInt.bottom;
        } else {
            i2 = fontMetricsInt.descent;
        }
        if (i > Math.abs(i2)) {
            textView.setPadding(textView.getPaddingLeft(), textView.getPaddingTop(), textView.getPaddingRight(), i - i2);
        }
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static <T> ArrayList<T> m4757(ArrayList<T> arrayList, T t) {
        if (arrayList == null) {
            return arrayList;
        }
        arrayList.remove(t);
        if (arrayList.isEmpty()) {
            return null;
        }
        return arrayList;
    }

    /* renamed from: K  reason: contains not printable characters */
    public static <T> ObjectAnimator m4775(T t, Property<T, PointF> property, Path path) {
        int i = Build.VERSION.SDK_INT;
        return ObjectAnimator.ofObject(t, property, (TypeConverter) null, path);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static <T> T m4783(T t, String str) {
        if (t != null) {
            return t;
        }
        throw new NullPointerException(str);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static int m4770(RecyclerView.C0248 r4, AbstractC2303 r5, View view, View view2, RecyclerView.AbstractC0254 r8, boolean z, boolean z2) {
        int i;
        if (r8.getChildCount() == 0 || r4.m823() == 0 || view == null || view2 == null) {
            return 0;
        }
        int min = Math.min(r8.getPosition(view), r8.getPosition(view2));
        int max = Math.max(r8.getPosition(view), r8.getPosition(view2));
        if (z2) {
            i = Math.max(0, (r4.m823() - max) - 1);
        } else {
            i = Math.max(0, min);
        }
        if (!z) {
            return i;
        }
        return Math.round((((float) i) * (((float) Math.abs(r5.m6022(view2) - r5.m6027(view))) / ((float) (Math.abs(r8.getPosition(view) - r8.getPosition(view2)) + 1)))) + ((float) (r5.m6024() - r5.m6027(view))));
    }

    /* renamed from: K  reason: contains not printable characters */
    public static boolean m4802(Bundle bundle, Bundle bundle2) {
        if (bundle == bundle2) {
            return true;
        }
        if (bundle == null) {
            if (bundle2.getInt(MediaBrowserCompat.EXTRA_PAGE, -1) == -1 && bundle2.getInt(MediaBrowserCompat.EXTRA_PAGE_SIZE, -1) == -1) {
                return true;
            }
            return false;
        } else if (bundle2 == null) {
            if (bundle.getInt(MediaBrowserCompat.EXTRA_PAGE, -1) == -1 && bundle.getInt(MediaBrowserCompat.EXTRA_PAGE_SIZE, -1) == -1) {
                return true;
            }
            return false;
        } else if (bundle.getInt(MediaBrowserCompat.EXTRA_PAGE, -1) == bundle2.getInt(MediaBrowserCompat.EXTRA_PAGE, -1) && bundle.getInt(MediaBrowserCompat.EXTRA_PAGE_SIZE, -1) == bundle2.getInt(MediaBrowserCompat.EXTRA_PAGE_SIZE, -1)) {
            return true;
        } else {
            return false;
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static String m4787(String str) {
        if (!TextUtils.isEmpty(str)) {
            return str;
        }
        throw new IllegalArgumentException("Must not be null or empty");
    }

    /* renamed from: K  reason: contains not printable characters */
    public static Bundle m4778(Intent intent) {
        Bundle bundleExtra = intent.getBundleExtra(AppLinkData.BUNDLE_AL_APPLINK_DATA_KEY);
        if (bundleExtra == null) {
            return null;
        }
        return bundleExtra.getBundle(AppLinkData.ARGUMENTS_EXTRAS_KEY);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static Long m4782(String str, long j) {
        f6259 = m4812();
        return Long.valueOf(f6259.getLong(str, j));
    }

    /* renamed from: K  reason: contains not printable characters */
    public static String m4788(String str, String str2) {
        f6259 = m4812();
        return f6259.getString(str, str2);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static void m4790() {
        AdjustEvent adjustEvent = new AdjustEvent("xw0zfe");
        adjustEvent.addCallbackParameter("member_token", m4788(AccessToken.TOKEN_KEY, ""));
        adjustEvent.addCallbackParameter("gps_adid", m4748());
        Adjust.trackEvent(adjustEvent);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static int m4769(RecyclerView.C0248 r1, AbstractC2303 r2, View view, View view2, RecyclerView.AbstractC0254 r5, boolean z) {
        if (r5.getChildCount() == 0 || r1.m823() == 0 || view == null || view2 == null) {
            return 0;
        }
        if (!z) {
            return Math.abs(r5.getPosition(view) - r5.getPosition(view2)) + 1;
        }
        return Math.min(r2.m6020(), r2.m6022(view2) - r2.m6027(view));
    }

    /* renamed from: K  reason: contains not printable characters */
    public static int m4771(String str, int i) {
        f6259 = m4812();
        return f6259.getInt(str, i);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static Interpolator m4781(Context context, int i) throws Resources.NotFoundException {
        int i2 = Build.VERSION.SDK_INT;
        return AnimationUtils.loadInterpolator(context, i);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static String m4786(Uri uri, Activity activity) {
        Cursor managedQuery = activity.managedQuery(uri, new String[]{"_data"}, null, null, null);
        int columnIndexOrThrow = managedQuery.getColumnIndexOrThrow("_data");
        managedQuery.moveToFirst();
        return managedQuery.getString(columnIndexOrThrow);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static DisplayCutout m4780(Activity activity) {
        Window window;
        WindowInsets rootWindowInsets;
        if (Build.VERSION.SDK_INT < 28 || activity == null || (window = activity.getWindow()) == null || (rootWindowInsets = window.getDecorView().getRootWindowInsets()) == null) {
            return null;
        }
        return rootWindowInsets.getDisplayCutout();
    }

    /* renamed from: K  reason: contains not printable characters */
    public static int m4772(List<ImageHeaderParser> list, InputStream inputStream, AbstractC0967 r6) throws IOException {
        if (inputStream == null) {
            return -1;
        }
        if (!inputStream.markSupported()) {
            inputStream = new RecyclableBufferedInputStream(inputStream, r6);
        }
        inputStream.mark(5242880);
        int size = list.size();
        for (int i = 0; i < size; i++) {
            try {
                int r3 = list.get(i).m1266(inputStream, r6);
                if (r3 != -1) {
                    return r3;
                }
            } finally {
                inputStream.reset();
            }
        }
        return -1;
    }

    /* renamed from: K  reason: contains not printable characters */
    public static boolean m4803(boolean z) {
        SharedPreferences.Editor edit = m4812().edit();
        edit.putBoolean("isFirstInstall", z);
        return edit.commit();
    }

    /* renamed from: K  reason: contains not printable characters */
    public static PropertyValuesHolder m4776(TypedArray typedArray, int i, int i2, int i3, String str) {
        PropertyValuesHolder propertyValuesHolder;
        int i4;
        int i5;
        int i6;
        float f;
        float f2;
        float f3;
        PropertyValuesHolder propertyValuesHolder2;
        TypedValue peekValue = typedArray.peekValue(i2);
        boolean z = peekValue != null;
        int i7 = z ? peekValue.type : 0;
        TypedValue peekValue2 = typedArray.peekValue(i3);
        boolean z2 = peekValue2 != null;
        int i8 = z2 ? peekValue2.type : 0;
        if (i == 4) {
            i = ((!z || !m4797(i7)) && (!z2 || !m4797(i8))) ? 0 : 3;
        }
        boolean z3 = i == 0;
        PropertyValuesHolder propertyValuesHolder3 = null;
        if (i == 2) {
            String string = typedArray.getString(i2);
            String string2 = typedArray.getString(i3);
            C1708[] r13 = C2369.m6288(string);
            C1708[] r14 = C2369.m6288(string2);
            if (r13 == null && r14 == null) {
                return null;
            }
            if (r13 != null) {
                C2273 r0 = new C2273();
                if (r14 == null) {
                    propertyValuesHolder2 = PropertyValuesHolder.ofObject(str, r0, r13);
                } else if (C2369.m6347(r13, r14)) {
                    propertyValuesHolder2 = PropertyValuesHolder.ofObject(str, r0, r13, r14);
                } else {
                    throw new InflateException(" Can't morph from " + string + " to " + string2);
                }
                return propertyValuesHolder2;
            } else if (r14 == null) {
                return null;
            } else {
                return PropertyValuesHolder.ofObject(str, new C2273(), r14);
            }
        } else {
            C2257 r12 = i == 3 ? C2257.f7771 : null;
            if (z3) {
                if (z) {
                    if (i7 == 5) {
                        f2 = typedArray.getDimension(i2, 0.0f);
                    } else {
                        f2 = typedArray.getFloat(i2, 0.0f);
                    }
                    if (z2) {
                        if (i8 == 5) {
                            f3 = typedArray.getDimension(i3, 0.0f);
                        } else {
                            f3 = typedArray.getFloat(i3, 0.0f);
                        }
                        propertyValuesHolder = PropertyValuesHolder.ofFloat(str, f2, f3);
                    } else {
                        propertyValuesHolder = PropertyValuesHolder.ofFloat(str, f2);
                    }
                } else {
                    if (i8 == 5) {
                        f = typedArray.getDimension(i3, 0.0f);
                    } else {
                        f = typedArray.getFloat(i3, 0.0f);
                    }
                    propertyValuesHolder = PropertyValuesHolder.ofFloat(str, f);
                }
            } else if (z) {
                if (i7 == 5) {
                    i5 = (int) typedArray.getDimension(i2, 0.0f);
                } else if (m4797(i7)) {
                    i5 = typedArray.getColor(i2, 0);
                } else {
                    i5 = typedArray.getInt(i2, 0);
                }
                if (z2) {
                    if (i8 == 5) {
                        i6 = (int) typedArray.getDimension(i3, 0.0f);
                    } else if (m4797(i8)) {
                        i6 = typedArray.getColor(i3, 0);
                    } else {
                        i6 = typedArray.getInt(i3, 0);
                    }
                    propertyValuesHolder = PropertyValuesHolder.ofInt(str, i5, i6);
                } else {
                    propertyValuesHolder = PropertyValuesHolder.ofInt(str, i5);
                }
            } else {
                if (z2) {
                    if (i8 == 5) {
                        i4 = (int) typedArray.getDimension(i3, 0.0f);
                    } else if (m4797(i8)) {
                        i4 = typedArray.getColor(i3, 0);
                    } else {
                        i4 = typedArray.getInt(i3, 0);
                    }
                    propertyValuesHolder = PropertyValuesHolder.ofInt(str, i4);
                }
                if (propertyValuesHolder3 == null && r12 != null) {
                    propertyValuesHolder3.setEvaluator(r12);
                    return propertyValuesHolder3;
                }
            }
            propertyValuesHolder3 = propertyValuesHolder;
            return propertyValuesHolder3 == null ? propertyValuesHolder3 : propertyValuesHolder3;
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:11:0x002a, code lost:
        r7 = false;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:15:0x0036, code lost:
        if (r10.right <= r12.left) goto L_0x0028;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:17:0x003d, code lost:
        if (r10.top >= r12.bottom) goto L_0x0028;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:19:0x0044, code lost:
        if (r10.left >= r12.right) goto L_0x0028;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:9:0x0026, code lost:
        if (r10.bottom <= r12.top) goto L_0x0028;
     */
    /* renamed from: K  reason: contains not printable characters */
    public static boolean m4799(int i, Rect rect, Rect rect2, Rect rect3) {
        int i2;
        int i3;
        boolean r0 = m4798(i, rect, rect2);
        if (m4798(i, rect, rect3) || !r0) {
            return false;
        }
        if (i != 17) {
            if (i != 33) {
                if (i != 66) {
                    if (i != 130) {
                        throw new IllegalArgumentException("direction must be one of {FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT}.");
                    }
                }
            }
        }
        boolean z = true;
        if (!z || i == 17 || i == 66) {
            return true;
        }
        int r11 = m4752(i, rect, rect2);
        if (i == 17) {
            i3 = rect.left;
            i2 = rect3.left;
        } else if (i == 33) {
            i3 = rect.top;
            i2 = rect3.top;
        } else if (i == 66) {
            i3 = rect3.right;
            i2 = rect.right;
        } else if (i == 130) {
            i3 = rect3.bottom;
            i2 = rect.bottom;
        } else {
            throw new IllegalArgumentException("direction must be one of {FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT}.");
        }
        if (r11 < Math.max(1, i3 - i2)) {
            return true;
        }
        return false;
    }

    /* renamed from: K  reason: contains not printable characters */
    public static Drawable[] m4804(TextView textView) {
        int i = Build.VERSION.SDK_INT;
        return textView.getCompoundDrawablesRelative();
    }

    /* renamed from: K  reason: contains not printable characters */
    public static boolean m4800(Rect rect, Rect rect2, int i) {
        if (i == 17) {
            int i2 = rect.right;
            int i3 = rect2.right;
            if ((i2 > i3 || rect.left >= i3) && rect.left > rect2.left) {
                return true;
            }
            return false;
        } else if (i == 33) {
            int i4 = rect.bottom;
            int i5 = rect2.bottom;
            if ((i4 > i5 || rect.top >= i5) && rect.top > rect2.top) {
                return true;
            }
            return false;
        } else if (i == 66) {
            int i6 = rect.left;
            int i7 = rect2.left;
            if ((i6 < i7 || rect.right <= i7) && rect.right < rect2.right) {
                return true;
            }
            return false;
        } else if (i == 130) {
            int i8 = rect.top;
            int i9 = rect2.top;
            return (i8 < i9 || rect.bottom <= i9) && rect.bottom < rect2.bottom;
        } else {
            throw new IllegalArgumentException("direction must be one of {FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT}.");
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static boolean m4798(int i, Rect rect, Rect rect2) {
        if (i != 17) {
            if (i != 33) {
                if (i != 66) {
                    if (i != 130) {
                        throw new IllegalArgumentException("direction must be one of {FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT}.");
                    }
                }
            }
            if (rect2.right < rect.left || rect2.left > rect.right) {
                return false;
            }
            return true;
        }
        if (rect2.bottom < rect.top || rect2.top > rect.bottom) {
            return false;
        }
        return true;
    }

    /* JADX DEBUG: Multi-variable search result rejected for r15v13, resolved type: android.animation.AnimatorSet */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARNING: Removed duplicated region for block: B:147:0x02f3  */
    /* JADX WARNING: Removed duplicated region for block: B:77:0x0187  */
    /* JADX WARNING: Removed duplicated region for block: B:80:0x0193  */
    /* renamed from: K  reason: contains not printable characters */
    public static Animator m4773(Context context, Resources resources, Resources.Theme theme, XmlPullParser xmlPullParser, AttributeSet attributeSet, AnimatorSet animatorSet, int i, float f) throws XmlPullParserException, IOException {
        int i2;
        int i3;
        ValueAnimator valueAnimator;
        PropertyValuesHolder[] propertyValuesHolderArr;
        int i4;
        String str;
        AttributeSet attributeSet2;
        PropertyValuesHolder propertyValuesHolder;
        int size;
        int i5;
        Keyframe keyframe;
        int r5;
        Keyframe keyframe2;
        Resources resources2 = resources;
        Resources.Theme theme2 = theme;
        int depth = xmlPullParser.getDepth();
        ValueAnimator valueAnimator2 = null;
        ArrayList arrayList = null;
        while (true) {
            int next = xmlPullParser.next();
            int i6 = 3;
            i2 = 0;
            if (next == 3 && xmlPullParser.getDepth() <= depth) {
                break;
            }
            int i7 = 1;
            if (next == 1) {
                break;
            }
            int i8 = 2;
            if (next == 2) {
                String name = xmlPullParser.getName();
                if (name.equals("objectAnimator")) {
                    valueAnimator = new ObjectAnimator();
                    m4777(context, resources, theme, attributeSet, valueAnimator, f, xmlPullParser);
                } else if (name.equals("animator")) {
                    valueAnimator = m4777(context, resources, theme, attributeSet, (ValueAnimator) null, f, xmlPullParser);
                } else {
                    if (name.equals("set")) {
                        AnimatorSet animatorSet2 = new AnimatorSet();
                        TypedArray r6 = C2369.m6305(resources2, theme2, attributeSet, C2271.f7852);
                        m4773(context, resources, theme, xmlPullParser, attributeSet, animatorSet2, C2369.m6277(r6, xmlPullParser, "ordering", 0, 0), f);
                        r6.recycle();
                        i3 = depth;
                        valueAnimator2 = animatorSet2;
                    } else {
                        String str2 = "propertyValuesHolder";
                        if (name.equals(str2)) {
                            AttributeSet asAttributeSet = Xml.asAttributeSet(xmlPullParser);
                            ArrayList arrayList2 = null;
                            while (true) {
                                int eventType = xmlPullParser.getEventType();
                                if (eventType == i6 || eventType == i7) {
                                    i3 = depth;
                                } else if (eventType != i8) {
                                    xmlPullParser.next();
                                } else {
                                    if (xmlPullParser.getName().equals(str2)) {
                                        TypedArray r3 = C2369.m6305(resources2, theme2, asAttributeSet, C2271.f7844);
                                        String r7 = C2369.m6315(r3, xmlPullParser, "propertyName", i6);
                                        int r4 = C2369.m6277(r3, xmlPullParser, LegacyTokenHelper.JSON_VALUE_TYPE, i8, 4);
                                        ArrayList arrayList3 = null;
                                        attributeSet2 = asAttributeSet;
                                        int i9 = r4;
                                        while (true) {
                                            int next2 = xmlPullParser.next();
                                            if (next2 == i6 || next2 == 1) {
                                                str = str2;
                                                i4 = depth;
                                            } else if (xmlPullParser.getName().equals("keyframe")) {
                                                if (i9 == 4) {
                                                    TypedArray r2 = C2369.m6305(resources2, theme2, Xml.asAttributeSet(xmlPullParser), C2271.f7849);
                                                    TypedValue r15 = C2369.m6281(r2, xmlPullParser, "value", 0);
                                                    i9 = (!(r15 != null) || !m4797(r15.type)) ? 0 : 3;
                                                    r2.recycle();
                                                }
                                                TypedArray r22 = C2369.m6305(resources2, theme2, Xml.asAttributeSet(xmlPullParser), C2271.f7849);
                                                float r52 = C2369.m6290(r22, xmlPullParser, "fraction", 3, -1.0f);
                                                TypedValue r8 = C2369.m6281(r22, xmlPullParser, "value", 0);
                                                boolean z = r8 != null;
                                                int i10 = i9 == 4 ? (!z || !m4797(r8.type)) ? 0 : 3 : i9;
                                                if (z) {
                                                    if (i10 == 0) {
                                                        i5 = 0;
                                                        keyframe = Keyframe.ofFloat(r52, C2369.m6290(r22, xmlPullParser, "value", 0, 0.0f));
                                                    } else if (i10 == 1 || i10 == 3) {
                                                        i5 = 0;
                                                        keyframe = Keyframe.ofInt(r52, C2369.m6277(r22, xmlPullParser, "value", 0, 0));
                                                    } else {
                                                        keyframe = null;
                                                    }
                                                    r5 = C2369.m6266(r22, xmlPullParser, "interpolator", 1, i5);
                                                    if (r5 > 0) {
                                                        keyframe.setInterpolator(m4781(context, r5));
                                                    }
                                                    r22.recycle();
                                                    if (keyframe != null) {
                                                        if (arrayList3 == null) {
                                                            arrayList3 = new ArrayList();
                                                        }
                                                        arrayList3.add(keyframe);
                                                    }
                                                    xmlPullParser.next();
                                                    i6 = 3;
                                                    resources2 = resources;
                                                    theme2 = theme;
                                                    str2 = str2;
                                                    depth = depth;
                                                } else {
                                                    if (i10 == 0) {
                                                        keyframe2 = Keyframe.ofFloat(r52);
                                                    } else {
                                                        keyframe2 = Keyframe.ofInt(r52);
                                                    }
                                                    keyframe = keyframe2;
                                                }
                                                i5 = 0;
                                                r5 = C2369.m6266(r22, xmlPullParser, "interpolator", 1, i5);
                                                if (r5 > 0) {
                                                }
                                                r22.recycle();
                                                if (keyframe != null) {
                                                }
                                                xmlPullParser.next();
                                                i6 = 3;
                                                resources2 = resources;
                                                theme2 = theme;
                                                str2 = str2;
                                                depth = depth;
                                            } else {
                                                resources2 = resources;
                                                theme2 = theme;
                                                i6 = i6;
                                            }
                                        }
                                        str = str2;
                                        i4 = depth;
                                        if (arrayList3 == null || (size = arrayList3.size()) <= 0) {
                                            i6 = 3;
                                            propertyValuesHolder = null;
                                        } else {
                                            Keyframe keyframe3 = (Keyframe) arrayList3.get(0);
                                            Keyframe keyframe4 = (Keyframe) arrayList3.get(size - 1);
                                            float fraction = keyframe4.getFraction();
                                            if (fraction < 1.0f) {
                                                if (fraction < 0.0f) {
                                                    keyframe4.setFraction(1.0f);
                                                } else {
                                                    arrayList3.add(arrayList3.size(), m4774(keyframe4, 1.0f));
                                                    size++;
                                                }
                                            }
                                            float fraction2 = keyframe3.getFraction();
                                            if (fraction2 != 0.0f) {
                                                if (fraction2 < 0.0f) {
                                                    keyframe3.setFraction(0.0f);
                                                } else {
                                                    arrayList3.add(0, m4774(keyframe3, 0.0f));
                                                    size++;
                                                }
                                            }
                                            Keyframe[] keyframeArr = new Keyframe[size];
                                            arrayList3.toArray(keyframeArr);
                                            int i11 = 0;
                                            while (i11 < size) {
                                                Keyframe keyframe5 = keyframeArr[i11];
                                                if (keyframe5.getFraction() < 0.0f) {
                                                    if (i11 == 0) {
                                                        keyframe5.setFraction(0.0f);
                                                    } else {
                                                        int i12 = size - 1;
                                                        if (i11 == i12) {
                                                            keyframe5.setFraction(1.0f);
                                                        } else {
                                                            int i13 = i11 + 1;
                                                            int i14 = i11;
                                                            while (i13 < i12 && keyframeArr[i13].getFraction() < 0.0f) {
                                                                i14 = i13;
                                                                i13++;
                                                            }
                                                            float fraction3 = (keyframeArr[i14 + 1].getFraction() - keyframeArr[i11 - 1].getFraction()) / ((float) ((i14 - i11) + 2));
                                                            int i15 = i11;
                                                            while (i15 <= i14) {
                                                                keyframeArr[i15].setFraction(keyframeArr[i15 - 1].getFraction() + fraction3);
                                                                i15++;
                                                                size = size;
                                                            }
                                                        }
                                                    }
                                                }
                                                i11++;
                                                size = size;
                                            }
                                            propertyValuesHolder = PropertyValuesHolder.ofKeyframe(r7, keyframeArr);
                                            i6 = 3;
                                            if (i9 == 3) {
                                                propertyValuesHolder.setEvaluator(C2257.m5877());
                                            }
                                        }
                                        if (propertyValuesHolder == null) {
                                            propertyValuesHolder = m4776(r3, r4, 0, 1, r7);
                                        }
                                        if (propertyValuesHolder != null) {
                                            if (arrayList2 == null) {
                                                arrayList2 = new ArrayList();
                                            }
                                            arrayList2.add(propertyValuesHolder);
                                        }
                                        r3.recycle();
                                        i2 = 0;
                                    } else {
                                        attributeSet2 = asAttributeSet;
                                        str = str2;
                                        i4 = depth;
                                    }
                                    xmlPullParser.next();
                                    i7 = 1;
                                    i8 = 2;
                                    resources2 = resources;
                                    theme2 = theme;
                                    asAttributeSet = attributeSet2;
                                    str2 = str;
                                    depth = i4;
                                }
                            }
                            i3 = depth;
                            if (arrayList2 != null) {
                                int size2 = arrayList2.size();
                                propertyValuesHolderArr = new PropertyValuesHolder[size2];
                                while (i2 < size2) {
                                    propertyValuesHolderArr[i2] = (PropertyValuesHolder) arrayList2.get(i2);
                                    i2++;
                                }
                            } else {
                                propertyValuesHolderArr = null;
                            }
                            if (propertyValuesHolderArr != null && (valueAnimator2 instanceof ValueAnimator)) {
                                valueAnimator2.setValues(propertyValuesHolderArr);
                            }
                            i2 = 1;
                        } else {
                            StringBuilder r1 = C1293.m3416("Unknown animator name: ");
                            r1.append(xmlPullParser.getName());
                            throw new RuntimeException(r1.toString());
                        }
                    }
                    if (animatorSet != null && i2 == 0) {
                        if (arrayList == null) {
                            arrayList = new ArrayList();
                        }
                        arrayList.add(valueAnimator2);
                    }
                    resources2 = resources;
                    theme2 = theme;
                    depth = i3;
                }
                valueAnimator2 = valueAnimator;
                i3 = depth;
                if (arrayList == null) {
                }
                arrayList.add(valueAnimator2);
                resources2 = resources;
                theme2 = theme;
                depth = i3;
            }
        }
        if (!(animatorSet == null || arrayList == null)) {
            Animator[] animatorArr = new Animator[arrayList.size()];
            Iterator it2 = arrayList.iterator();
            while (it2.hasNext()) {
                animatorArr[i2] = (Animator) it2.next();
                i2++;
            }
            if (i == 0) {
                animatorSet.playTogether(animatorArr);
            } else {
                animatorSet.playSequentially(animatorArr);
            }
        }
        return valueAnimator2;
    }

    /* renamed from: K  reason: contains not printable characters */
    public static ActionMode.Callback m4779(TextView textView, ActionMode.Callback callback) {
        int i = Build.VERSION.SDK_INT;
        return (i < 26 || i > 27 || (callback instanceof ActionMode$CallbackC1842)) ? callback : new ActionMode$CallbackC1842(callback, textView);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static void m4793(TextView textView, int i) {
        int i2;
        C2369.m6292(i);
        if (Build.VERSION.SDK_INT >= 28) {
            textView.setFirstBaselineToTopHeight(i);
            return;
        }
        Paint.FontMetricsInt fontMetricsInt = textView.getPaint().getFontMetricsInt();
        int i3 = Build.VERSION.SDK_INT;
        if (textView.getIncludeFontPadding()) {
            i2 = fontMetricsInt.top;
        } else {
            i2 = fontMetricsInt.ascent;
        }
        if (i > Math.abs(i2)) {
            textView.setPadding(textView.getPaddingLeft(), i + i2, textView.getPaddingRight(), textView.getPaddingBottom());
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static Keyframe m4774(Keyframe keyframe, float f) {
        if (keyframe.getType() == Float.TYPE) {
            return Keyframe.ofFloat(f);
        }
        if (keyframe.getType() == Integer.TYPE) {
            return Keyframe.ofInt(f);
        }
        return Keyframe.ofObject(f);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static void m4794(TextView textView, C1810 r3) {
        if (Build.VERSION.SDK_INT >= 29) {
            Spannable spannable = r3.f6172;
            textView.setText(spannable instanceof PrecomputedText ? (PrecomputedText) spannable : null);
        } else if (m4740(textView).m4696(r3.f6171)) {
            textView.setText(r3);
        } else {
            throw new IllegalArgumentException("Given text can not be applied to TextView.");
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public static ValueAnimator m4777(Context context, Resources resources, Resources.Theme theme, AttributeSet attributeSet, ValueAnimator valueAnimator, float f, XmlPullParser xmlPullParser) throws Resources.NotFoundException {
        ValueAnimator valueAnimator2;
        int i;
        ValueAnimator valueAnimator3;
        PropertyValuesHolder propertyValuesHolder;
        TypedArray r4 = C2369.m6305(resources, theme, attributeSet, C2271.f7846);
        TypedArray r0 = C2369.m6305(resources, theme, attributeSet, C2271.f7843);
        ValueAnimator valueAnimator4 = valueAnimator == null ? new ValueAnimator() : valueAnimator;
        long r6 = (long) C2369.m6277(r4, xmlPullParser, "duration", 1, 300);
        int i2 = 0;
        long r9 = (long) C2369.m6277(r4, xmlPullParser, "startOffset", 2, 0);
        int r12 = C2369.m6277(r4, xmlPullParser, LegacyTokenHelper.JSON_VALUE_TYPE, 7, 4);
        if (C2369.m6346(xmlPullParser, "valueFrom") && C2369.m6346(xmlPullParser, "valueTo")) {
            if (r12 == 4) {
                TypedValue peekValue = r4.peekValue(5);
                boolean z = peekValue != null;
                int i3 = z ? peekValue.type : 0;
                TypedValue peekValue2 = r4.peekValue(6);
                boolean z2 = peekValue2 != null;
                r12 = ((!z || !m4797(i3)) && (!z2 || !m4797(z2 ? peekValue2.type : 0))) ? 0 : 3;
            }
            PropertyValuesHolder r2 = m4776(r4, r12, 5, 6, "");
            if (r2 != null) {
                valueAnimator4.setValues(r2);
            }
        }
        valueAnimator4.setDuration(r6);
        valueAnimator4.setStartDelay(r9);
        valueAnimator4.setRepeatCount(C2369.m6277(r4, xmlPullParser, "repeatCount", 3, 0));
        valueAnimator4.setRepeatMode(C2369.m6277(r4, xmlPullParser, "repeatMode", 4, 1));
        if (r0 != null) {
            ObjectAnimator objectAnimator = (ObjectAnimator) valueAnimator4;
            String r62 = C2369.m6315(r0, xmlPullParser, "pathData", 1);
            if (r62 != null) {
                String r7 = C2369.m6315(r0, xmlPullParser, "propertyXName", 2);
                String r92 = C2369.m6315(r0, xmlPullParser, "propertyYName", 3);
                if (r7 == null && r92 == null) {
                    throw new InflateException(r0.getPositionDescription() + " propertyXName or propertyYName is needed for PathData");
                }
                Path r63 = C2369.m6267(r62);
                float f2 = 0.5f * f;
                PathMeasure pathMeasure = new PathMeasure(r63, false);
                ArrayList arrayList = new ArrayList();
                arrayList.add(Float.valueOf(0.0f));
                float f3 = 0.0f;
                while (true) {
                    f3 += pathMeasure.getLength();
                    arrayList.add(Float.valueOf(f3));
                    if (!pathMeasure.nextContour()) {
                        break;
                    }
                }
                PathMeasure pathMeasure2 = new PathMeasure(r63, false);
                int min = Math.min(100, ((int) (f3 / f2)) + 1);
                float[] fArr = new float[min];
                float[] fArr2 = new float[min];
                float[] fArr3 = new float[2];
                float f4 = f3 / ((float) (min - 1));
                valueAnimator2 = valueAnimator4;
                int i4 = 0;
                float f5 = 0.0f;
                while (true) {
                    propertyValuesHolder = null;
                    if (i4 >= min) {
                        break;
                    }
                    pathMeasure2.getPosTan(f5 - ((Float) arrayList.get(i2)).floatValue(), fArr3, null);
                    fArr[i4] = fArr3[0];
                    fArr2[i4] = fArr3[1];
                    f5 += f4;
                    int i5 = i2 + 1;
                    if (i5 < arrayList.size() && f5 > ((Float) arrayList.get(i5)).floatValue()) {
                        pathMeasure2.nextContour();
                        i2 = i5;
                    }
                    i4++;
                    min = min;
                }
                PropertyValuesHolder ofFloat = r7 != null ? PropertyValuesHolder.ofFloat(r7, fArr) : null;
                if (r92 != null) {
                    propertyValuesHolder = PropertyValuesHolder.ofFloat(r92, fArr2);
                }
                if (ofFloat == null) {
                    i = 0;
                    objectAnimator.setValues(propertyValuesHolder);
                } else {
                    i = 0;
                    if (propertyValuesHolder == null) {
                        objectAnimator.setValues(ofFloat);
                    } else {
                        objectAnimator.setValues(ofFloat, propertyValuesHolder);
                    }
                }
            } else {
                valueAnimator2 = valueAnimator4;
                i = 0;
                objectAnimator.setPropertyName(C2369.m6315(r0, xmlPullParser, "propertyName", 0));
            }
        } else {
            valueAnimator2 = valueAnimator4;
            i = 0;
        }
        int r1 = C2369.m6266(r4, xmlPullParser, "interpolator", i, i);
        if (r1 > 0) {
            valueAnimator3 = valueAnimator2;
            valueAnimator3.setInterpolator(m4781(context, r1));
        } else {
            valueAnimator3 = valueAnimator2;
        }
        r4.recycle();
        if (r0 != null) {
            r0.recycle();
        }
        return valueAnimator3;
    }

    /* renamed from: K  reason: contains not printable characters */
    public static <T> ArrayList<T> m4789(ArrayList<T> arrayList, T t) {
        if (arrayList == null) {
            arrayList = new ArrayList<>();
        }
        if (!arrayList.contains(t)) {
            arrayList.add(t);
        }
        return arrayList;
    }
}
