CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f

以下内容为反编译后的 a.java 源代码,内容仅作参考


package e.c0;

import android.animation.ObjectAnimator;
import android.animation.TypeConverter;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.content.ClipData;
import android.content.ComponentName;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Shader;
import android.graphics.Typeface;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Trace;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Base64;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.Property;
import android.util.TypedValue;
import android.view.Display;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.view.animation.DecelerateInterpolator;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.interpolator.view.animation.FastOutLinearInInterpolator;
import androidx.interpolator.view.animation.LinearOutSlowInInterpolator;
import androidx.recyclerview.widget.RecyclerView;
import carbon.R$dimen;
import com.google.android.flexbox.FlexItem;
import e.i.b.c.e;
import e.i.b.c.h;
import e.o.a.d;
import f.d.x0;
import f.d.z0;
import i.c.a.c.b0;
import i.c.a.c.f;
import i.c.a.c.h;
import i.c.a.c.i;
import i.c.a.c.l;
import i.c.a.c.m;
import i.c.a.c.m0;
import i.c.a.c.o;
import i.c.a.c.p;
import i.c.a.c.w;
import i.c.a.c.y;
import i.j.c.j;
import i.j.c.k;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import n.i.b.h;
import org.godfootsteps.arch.R$style;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.xmlpull.v1.XmlPullParserException;
public final class a {
    public static long a;
    public static Method b;
    public static Method c;
    public static Method f8017d;
    public static boolean f8018e;

    public static String A(String str) {
        if (m0.f(str)) {
            return "";
        }
        Intent intent = new Intent("android.intent.action.MAIN", (Uri) null);
        intent.addCategory("android.intent.category.LAUNCHER");
        intent.setPackage(str);
        List<ResolveInfo> queryIntentActivities = y.J().getPackageManager().queryIntentActivities(intent, 0);
        return (queryIntentActivities == null || queryIntentActivities.size() == 0) ? "" : queryIntentActivities.get(0).activityInfo.name;
    }

    public static int B() {
        WindowManager windowManager = (WindowManager) w.c().getSystemService("window");
        if (Build.VERSION.SDK_INT >= 30) {
            return windowManager.getCurrentWindowMetrics().getWindowInsets().getInsets(WindowInsets.Type.navigationBars()).bottom;
        }
        Resources system = Resources.getSystem();
        int identifier = system.getIdentifier("navigation_bar_height", "dimen", "android");
        if (identifier != 0) {
            return system.getDimensionPixelSize(identifier);
        }
        return 0;
    }

    public static ValueAnimator C() {
        final z0 z0Var = new z0();
        z0Var.setInterpolator(new LinearOutSlowInInterpolator());
        z0Var.setOnSetupValuesListener(new x0() {
            @Override
            public final void a() {
                z0 z0Var2 = z0.this;
                View view = z0Var2.f9155i;
                z0Var2.setFloatValues(view.getTranslationY(), 0.0f);
                int measuredHeight = view.getMeasuredHeight();
                ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
                if (layoutParams != null && (layoutParams instanceof ViewGroup.MarginLayoutParams)) {
                    measuredHeight += ((ViewGroup.MarginLayoutParams) layoutParams).bottomMargin;
                }
                z0Var2.setDuration(Math.abs(view.getTranslationY() / measuredHeight) * 150.0f);
            }
        });
        z0Var.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                z0.this.f9155i.setTranslationY(((Float) valueAnimator.getAnimatedValue()).floatValue());
            }
        });
        return z0Var;
    }

    public static ValueAnimator D(final int i2) {
        final z0 z0Var = new z0();
        z0Var.setInterpolator(new FastOutLinearInInterpolator());
        z0Var.setOnSetupValuesListener(new x0() {
            @Override
            public final void a() {
                z0 z0Var2 = z0.this;
                int i3 = i2;
                View view = z0Var2.f9155i;
                int measuredHeight = view.getMeasuredHeight();
                ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
                boolean z = (i3 & 80) == 80;
                if (layoutParams != null && (layoutParams instanceof ViewGroup.MarginLayoutParams)) {
                    ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams;
                    measuredHeight += z ? marginLayoutParams.bottomMargin : marginLayoutParams.topMargin;
                }
                float[] fArr = new float[2];
                fArr[0] = view.getTranslationY();
                fArr[1] = z ? measuredHeight : -measuredHeight;
                z0Var2.setFloatValues(fArr);
                z0Var2.setDuration((1.0f - Math.abs(view.getTranslationY() / measuredHeight)) * 150.0f);
            }
        });
        z0Var.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                z0.this.f9155i.setTranslationY(((Float) valueAnimator.getAnimatedValue()).floatValue());
            }
        });
        return z0Var;
    }

    public static int E() {
        Resources resources = w.c().getResources();
        return resources.getDimensionPixelSize(resources.getIdentifier("status_bar_height", "dimen", "android"));
    }

    public static Fragment F(FragmentManager fragmentManager, Fragment fragment, boolean z) {
        List<Fragment> y = y(fragmentManager);
        for (int size = y.size() - 1; size >= 0; size--) {
            Fragment fragment2 = y.get(size);
            if (fragment2 != null && fragment2.isResumed() && fragment2.isVisible() && fragment2.getUserVisibleHint()) {
                if (z) {
                    Bundle arguments = fragment2.getArguments();
                    if (arguments != null && arguments.getBoolean("args_is_add_stack")) {
                        return F(fragment2.getChildFragmentManager(), fragment2, true);
                    }
                } else {
                    return F(fragment2.getChildFragmentManager(), fragment2, false);
                }
            }
        }
        return fragment;
    }

    public static boolean G(byte[] bArr) {
        return bArr != null && bArr.length >= 14 && bArr[0] == 95 && bArr[1] == 36 && bArr[12] == 36 && bArr[13] == 95;
    }

    public static void H(Fragment fragment) {
        Bundle arguments = fragment.getArguments();
        if (arguments == null) {
            arguments = new Bundle();
            fragment.setArguments(arguments);
        }
        arguments.putBoolean("args_is_hide", true);
        Y(fragment.getFragmentManager(), 4, null, fragment);
    }

    public static final String I(Context context, String str) {
        String a1;
        h.e(context, "<this>");
        if (TextUtils.isEmpty(str)) {
            return "";
        }
        if (!M(context)) {
            h.c(str);
            return str;
        }
        p pVar = p.a;
        if (p.a() == (p.c.a(str) < 0.5d)) {
            h.c(str);
            return str;
        }
        if (p.a()) {
            a1 = y.T0("[{ \"from\": \"\u200b\", \"to\": \"\" }, { \"from\": \"(ွ|ႇ)\", \"to\": \"ှ\" }, { \"from\": \"ြ\", \"to\": \"ွ\" }, { \"from\": \"(ျ|ၾ|ၿ|ႀ|ႁ|ႂ|ႃ|ႄ)\", \"to\": \"ြ\" }, { \"from\": \"(်|ၽ)\", \"to\": \"ျ\" }, { \"from\": \"္\", \"to\": \"်\" }, { \"from\": \"(ၦ|ၧ)\", \"to\": \"္ဆ\" }, { \"from\": \"ၪ\", \"to\": \"ဉ\" }, { \"from\": \"ၫ\", \"to\": \"ည\" }, { \"from\": \"ၬ\", \"to\": \"္ဋ\" }, { \"from\": \"ၭ\", \"to\": \"္ဌ\" }, { \"from\": \"ၮ\", \"to\": \"ဍ္ဍ\" }, { \"from\": \"ၯ\", \"to\": \"ဍ္ဎ\" }, { \"from\": \"ၰ\", \"to\": \"္ဏ\" }, { \"from\": \"(ၱ|ၲ)\", \"to\": \"္တ\" }, { \"from\": \"ၠ\", \"to\": \"္က\" }, { \"from\": \"ၡ\", \"to\": \"္ခ\" }, { \"from\": \"ၢ\", \"to\": \"္ဂ\" }, { \"from\": \"ၣ\", \"to\": \"္ဃ\" }, { \"from\": \"ၥ\", \"to\": \"္စ\" }, { \"from\": \"ၨ\", \"to\": \"္ဇ\" }, { \"from\": \"ၩ\", \"to\": \"္ဈ\" }, { \"from\": \"(ၳ|ၴ)\", \"to\": \"္ထ\" }, { \"from\": \"ၵ\", \"to\": \"္ဒ\" }, { \"from\": \"ၶ\", \"to\": \"္ဓ\" }, { \"from\": \"ၷ\", \"to\": \"္န\" }, { \"from\": \"ၸ\", \"to\": \"္ပ\" }, { \"from\": \"ၹ\", \"to\": \"္ဖ\" }, { \"from\": \"ၺ\", \"to\": \"္ဗ\" }, { \"from\": \"ၼ\", \"to\": \"္မ\" }, { \"from\": \"ႅ\", \"to\": \"္လ\" }, { \"from\": \"ဳ\", \"to\": \"ု\" }, { \"from\": \"ဴ\", \"to\": \"ူ\" }, { \"from\": \"ဿ\", \"to\": \"ူ\" }, { \"from\": \"ႆ\", \"to\": \"ဿ\" }, { \"from\": \"ံႈ\", \"to\": \"ႈံ\" }, { \"from\": \"ႈ\", \"to\": \"ှု\" }, { \"from\": \"ႉ\", \"to\": \"ှူ\" }, { \"from\": \"ႊ\", \"to\": \"ွှ\" }, { \"from\": \"ျၤ\", \"to\": \"ၤျ\" }, { \"from\": \"(ေ)?([က-အ])ၤ\", \"to\": \"င်္$1$2\" }, { \"from\": \"(ေ)?([က-အ])ႋ\", \"to\": \"င်္$1$2ိ\" }, { \"from\": \"(ေ)?([က-အ])ႌ\", \"to\": \"င်္$1$2ီ\" }, { \"from\": \"(ေ)?([က-အ])ႍ\", \"to\": \"င်္$1$2ံ\" }, { \"from\": \"ႎ\", \"to\": \"ိံ\" }, { \"from\": \"ႏ\", \"to\": \"န\" }, { \"from\": \"႐\", \"to\": \"ရ\" }, { \"from\": \"႑\", \"to\": \"ဏ္ဍ\" }, { \"from\": \"မာ(ၻ|႓)\", \"to\": \"မ္ဘာ\" }, { \"from\": \"(ၻ|႓)\", \"to\": \"္ဘ\" }, { \"from\": \"(႔|႕)\", \"to\": \"့\" }, { \"from\": \"([က-အ])့ဲ\", \"to\": \"$1ဲ့\" }, { \"from\": \"႖\", \"to\": \"္တွ\" }, { \"from\": \"႗\", \"to\": \"ဋ္ဋ\" }, { \"from\": \"ြ([က-အ])([က-အ])?\", \"to\": \"$1ြ$2\" }, { \"from\": \"([က-အ])ြ်\", \"to\": \"ြ$1်\" }, { \"from\": \"၇(?=[ာ-ူဲံ-းွး])\", \"to\": \"ရ\" }, { \"from\": \"ေ၇\", \"to\": \"ေရ\" }, { \"from\": \"၀(ီ|ု|ို|ူ|ံ|ွ|ှ)\", \"to\": \"ဝ$1\" }, { \"from\": \"([^၀၁၂၃၄၅၆၇၈၉])၀ါ\", \"to\": \"$1ဝါ\" }, { \"from\": \"([၀၁၂၃၄၅၆၇၈၉])၀ါ(?!း)\", \"to\": \"$1ဝါ\" }, { \"from\": \"^၀(?=ါ)\", \"to\": \"ဝ\" }, { \"from\": \"၀ိ(?! ?/)\", \"to\": \"ဝိ\" }, { \"from\": \"([^၀-၉])၀([^၀-၉ ]|[၊။])\", \"to\": \"$1ဝ$2\" }, { \"from\": \"([^၀-၉])၀(?=[\\f\\n\\r])\", \"to\": \"$1ဝ\" }, { \"from\": \"([^၀-၉])၀$\", \"to\": \"$1ဝ\" }, { \"from\": \"ေ([က-အ])(ှ)?(ျ)?\", \"to\": \"$1$2$3ေ\" }, { \"from\": \"([က-အ])ေ([ျြွှ]+)\", \"to\": \"$1$2ေ\" }, { \"from\": \"ဲွ\", \"to\": \"ွဲ\" }, { \"from\": \"([ိီ])ျ\", \"to\": \"ျ$1\" }, { \"from\": \"ွျ\", \"to\": \"ျွ\" }, { \"from\": \"့်\", \"to\": \"့်\" }, { \"from\": \"ု(ိ|ီ|ံ|့)ု\", \"to\": \"ု$1\" }, { \"from\": \"(ု|ူ)(ိ|ီ)\", \"to\": \"$2$1\" }, { \"from\": \"(ှ)(ျ|ြ)\", \"to\": \"$2$1\" }, { \"from\": \"ဥ(?=[့]?[်ာ])\", \"to\": \"ဉ\" }, { \"from\": \"ဦ\", \"to\": \"ဦ\" }, { \"from\": \"စျ\", \"to\": \"ဈ\" }, { \"from\": \"ံ(ု|ူ)\", \"to\": \"$1ံ\" }, { \"from\": \"ေ့ှ\", \"to\": \"ှေ့\" }, { \"from\": \"ေှာ\", \"to\": \"ှော\" }, { \"from\": \"ၚ\", \"to\": \"ါ်\" }, { \"from\": \"ေျှ\", \"to\": \"ျှေ\" }, { \"from\": \"(ိ|ီ)(ွ|ှ)\", \"to\": \"$2$1\" }, { \"from\": \"ာ္([က-အ])\", \"to\": \"္$1ာ\" }, { \"from\": \"ြင်္([က-အ])\", \"to\": \"င်္$1ြ\" }, { \"from\": \"္ြ်္([က-အ])\", \"to\": \"်္$1ြ\" }, { \"from\": \"ြ္([က-အ])\", \"to\": \"္$1ြ\" }, { \"from\": \"ံ္([က-အ])\", \"to\": \"္$1ံ\" }, { \"from\": \"႒\", \"to\": \"ဋ္ဌ\" }, { \"from\": \"၎\", \"to\": \"၎င်း\" }, { \"from\": \"၀(ါ|ာ|ံ)\", \"to\": \"ဝ$1\" }, { \"from\": \"ဥ္\", \"to\": \"ဉ္\" }, { \"from\": \"([က-အ])ြေွ\", \"to\": \"$1ြွေ\" }, { \"from\": \"([က-အ])ျေွ(ှ)?\", \"to\": \"$1ျွ$2ေ\" }, { \"from\": \"([က-အ])ွေျ\", \"to\": \"$1ျွေ\" }, { \"from\": \"([က-အ])ေ(္[က-အ])\", \"to\": \"$1$2ေ\" }, { \"from\": \"း်\", \"to\": \"်း\" }, { \"from\": \"ိ်|်ိ\", \"to\": \"ိ\" }, { \"from\": \"ို်\", \"to\": \"ို\" }, { \"from\": \" ့\", \"to\": \"့\" }, { \"from\": \"့ံ\", \"to\": \"ံ့\" }, { \"from\": \" ့\", \"to\": \"့\" }, { \"from\": \"[ိ]+\", \"to\": \"ိ\" }, { \"from\": \"[်]+\", \"to\": \"်\" }, { \"from\": \"[ွ]+\", \"to\": \"ွ\" }, { \"from\": \"[့]+\", \"to\": \"့\" }, { \"from\": \"[ီ]+\", \"to\": \"ီ\" }, { \"from\": \"ိီ|ီိ\", \"to\": \"ီ\" }, { \"from\": \"ုိ\", \"to\": \"ို\" }, { \"from\": \"့့\", \"to\": \"့\" }, { \"from\": \"ဲဲ\", \"to\": \"ဲ\" }, { \"from\": \"၄င်း\", \"to\": \"၎င်း\" }, { \"from\": \"([ိီ])္([က-အ])\", \"to\": \"္$2$1\" }, { \"from\": \"ံွ\", \"to\": \"ွံ\" }]", str);
        } else {
            a1 = y.a1(str);
        }
        String str2 = a1;
        h.d(str2, "{\n        if (MyanmarUti…abbit.uni2zg(input)\n    }");
        return str2;
    }

    public static final String J(Context context, String str) {
        h.e(context, "<this>");
        if (TextUtils.isEmpty(str)) {
            return "";
        }
        if (!M(context)) {
            h.c(str);
            return str;
        }
        p pVar = p.a;
        if (p.c.a(str) < 0.5d) {
            h.c(str);
            return str;
        }
        String T0 = y.T0("[{ \"from\": \"\u200b\", \"to\": \"\" }, { \"from\": \"(ွ|ႇ)\", \"to\": \"ှ\" }, { \"from\": \"ြ\", \"to\": \"ွ\" }, { \"from\": \"(ျ|ၾ|ၿ|ႀ|ႁ|ႂ|ႃ|ႄ)\", \"to\": \"ြ\" }, { \"from\": \"(်|ၽ)\", \"to\": \"ျ\" }, { \"from\": \"္\", \"to\": \"်\" }, { \"from\": \"(ၦ|ၧ)\", \"to\": \"္ဆ\" }, { \"from\": \"ၪ\", \"to\": \"ဉ\" }, { \"from\": \"ၫ\", \"to\": \"ည\" }, { \"from\": \"ၬ\", \"to\": \"္ဋ\" }, { \"from\": \"ၭ\", \"to\": \"္ဌ\" }, { \"from\": \"ၮ\", \"to\": \"ဍ္ဍ\" }, { \"from\": \"ၯ\", \"to\": \"ဍ္ဎ\" }, { \"from\": \"ၰ\", \"to\": \"္ဏ\" }, { \"from\": \"(ၱ|ၲ)\", \"to\": \"္တ\" }, { \"from\": \"ၠ\", \"to\": \"္က\" }, { \"from\": \"ၡ\", \"to\": \"္ခ\" }, { \"from\": \"ၢ\", \"to\": \"္ဂ\" }, { \"from\": \"ၣ\", \"to\": \"္ဃ\" }, { \"from\": \"ၥ\", \"to\": \"္စ\" }, { \"from\": \"ၨ\", \"to\": \"္ဇ\" }, { \"from\": \"ၩ\", \"to\": \"္ဈ\" }, { \"from\": \"(ၳ|ၴ)\", \"to\": \"္ထ\" }, { \"from\": \"ၵ\", \"to\": \"္ဒ\" }, { \"from\": \"ၶ\", \"to\": \"္ဓ\" }, { \"from\": \"ၷ\", \"to\": \"္န\" }, { \"from\": \"ၸ\", \"to\": \"္ပ\" }, { \"from\": \"ၹ\", \"to\": \"္ဖ\" }, { \"from\": \"ၺ\", \"to\": \"္ဗ\" }, { \"from\": \"ၼ\", \"to\": \"္မ\" }, { \"from\": \"ႅ\", \"to\": \"္လ\" }, { \"from\": \"ဳ\", \"to\": \"ု\" }, { \"from\": \"ဴ\", \"to\": \"ူ\" }, { \"from\": \"ဿ\", \"to\": \"ူ\" }, { \"from\": \"ႆ\", \"to\": \"ဿ\" }, { \"from\": \"ံႈ\", \"to\": \"ႈံ\" }, { \"from\": \"ႈ\", \"to\": \"ှု\" }, { \"from\": \"ႉ\", \"to\": \"ှူ\" }, { \"from\": \"ႊ\", \"to\": \"ွှ\" }, { \"from\": \"ျၤ\", \"to\": \"ၤျ\" }, { \"from\": \"(ေ)?([က-အ])ၤ\", \"to\": \"င်္$1$2\" }, { \"from\": \"(ေ)?([က-အ])ႋ\", \"to\": \"င်္$1$2ိ\" }, { \"from\": \"(ေ)?([က-အ])ႌ\", \"to\": \"င်္$1$2ီ\" }, { \"from\": \"(ေ)?([က-အ])ႍ\", \"to\": \"င်္$1$2ံ\" }, { \"from\": \"ႎ\", \"to\": \"ိံ\" }, { \"from\": \"ႏ\", \"to\": \"န\" }, { \"from\": \"႐\", \"to\": \"ရ\" }, { \"from\": \"႑\", \"to\": \"ဏ္ဍ\" }, { \"from\": \"မာ(ၻ|႓)\", \"to\": \"မ္ဘာ\" }, { \"from\": \"(ၻ|႓)\", \"to\": \"္ဘ\" }, { \"from\": \"(႔|႕)\", \"to\": \"့\" }, { \"from\": \"([က-အ])့ဲ\", \"to\": \"$1ဲ့\" }, { \"from\": \"႖\", \"to\": \"္တွ\" }, { \"from\": \"႗\", \"to\": \"ဋ္ဋ\" }, { \"from\": \"ြ([က-အ])([က-အ])?\", \"to\": \"$1ြ$2\" }, { \"from\": \"([က-အ])ြ်\", \"to\": \"ြ$1်\" }, { \"from\": \"၇(?=[ာ-ူဲံ-းွး])\", \"to\": \"ရ\" }, { \"from\": \"ေ၇\", \"to\": \"ေရ\" }, { \"from\": \"၀(ီ|ု|ို|ူ|ံ|ွ|ှ)\", \"to\": \"ဝ$1\" }, { \"from\": \"([^၀၁၂၃၄၅၆၇၈၉])၀ါ\", \"to\": \"$1ဝါ\" }, { \"from\": \"([၀၁၂၃၄၅၆၇၈၉])၀ါ(?!း)\", \"to\": \"$1ဝါ\" }, { \"from\": \"^၀(?=ါ)\", \"to\": \"ဝ\" }, { \"from\": \"၀ိ(?! ?/)\", \"to\": \"ဝိ\" }, { \"from\": \"([^၀-၉])၀([^၀-၉ ]|[၊။])\", \"to\": \"$1ဝ$2\" }, { \"from\": \"([^၀-၉])၀(?=[\\f\\n\\r])\", \"to\": \"$1ဝ\" }, { \"from\": \"([^၀-၉])၀$\", \"to\": \"$1ဝ\" }, { \"from\": \"ေ([က-အ])(ှ)?(ျ)?\", \"to\": \"$1$2$3ေ\" }, { \"from\": \"([က-အ])ေ([ျြွှ]+)\", \"to\": \"$1$2ေ\" }, { \"from\": \"ဲွ\", \"to\": \"ွဲ\" }, { \"from\": \"([ိီ])ျ\", \"to\": \"ျ$1\" }, { \"from\": \"ွျ\", \"to\": \"ျွ\" }, { \"from\": \"့်\", \"to\": \"့်\" }, { \"from\": \"ု(ိ|ီ|ံ|့)ု\", \"to\": \"ု$1\" }, { \"from\": \"(ု|ူ)(ိ|ီ)\", \"to\": \"$2$1\" }, { \"from\": \"(ှ)(ျ|ြ)\", \"to\": \"$2$1\" }, { \"from\": \"ဥ(?=[့]?[်ာ])\", \"to\": \"ဉ\" }, { \"from\": \"ဦ\", \"to\": \"ဦ\" }, { \"from\": \"စျ\", \"to\": \"ဈ\" }, { \"from\": \"ံ(ု|ူ)\", \"to\": \"$1ံ\" }, { \"from\": \"ေ့ှ\", \"to\": \"ှေ့\" }, { \"from\": \"ေှာ\", \"to\": \"ှော\" }, { \"from\": \"ၚ\", \"to\": \"ါ်\" }, { \"from\": \"ေျှ\", \"to\": \"ျှေ\" }, { \"from\": \"(ိ|ီ)(ွ|ှ)\", \"to\": \"$2$1\" }, { \"from\": \"ာ္([က-အ])\", \"to\": \"္$1ာ\" }, { \"from\": \"ြင်္([က-အ])\", \"to\": \"င်္$1ြ\" }, { \"from\": \"္ြ်္([က-အ])\", \"to\": \"်္$1ြ\" }, { \"from\": \"ြ္([က-အ])\", \"to\": \"္$1ြ\" }, { \"from\": \"ံ္([က-အ])\", \"to\": \"္$1ံ\" }, { \"from\": \"႒\", \"to\": \"ဋ္ဌ\" }, { \"from\": \"၎\", \"to\": \"၎င်း\" }, { \"from\": \"၀(ါ|ာ|ံ)\", \"to\": \"ဝ$1\" }, { \"from\": \"ဥ္\", \"to\": \"ဉ္\" }, { \"from\": \"([က-အ])ြေွ\", \"to\": \"$1ြွေ\" }, { \"from\": \"([က-အ])ျေွ(ှ)?\", \"to\": \"$1ျွ$2ေ\" }, { \"from\": \"([က-အ])ွေျ\", \"to\": \"$1ျွေ\" }, { \"from\": \"([က-အ])ေ(္[က-အ])\", \"to\": \"$1$2ေ\" }, { \"from\": \"း်\", \"to\": \"်း\" }, { \"from\": \"ိ်|်ိ\", \"to\": \"ိ\" }, { \"from\": \"ို်\", \"to\": \"ို\" }, { \"from\": \" ့\", \"to\": \"့\" }, { \"from\": \"့ံ\", \"to\": \"ံ့\" }, { \"from\": \" ့\", \"to\": \"့\" }, { \"from\": \"[ိ]+\", \"to\": \"ိ\" }, { \"from\": \"[်]+\", \"to\": \"်\" }, { \"from\": \"[ွ]+\", \"to\": \"ွ\" }, { \"from\": \"[့]+\", \"to\": \"့\" }, { \"from\": \"[ီ]+\", \"to\": \"ီ\" }, { \"from\": \"ိီ|ီိ\", \"to\": \"ီ\" }, { \"from\": \"ုိ\", \"to\": \"ို\" }, { \"from\": \"့့\", \"to\": \"့\" }, { \"from\": \"ဲဲ\", \"to\": \"ဲ\" }, { \"from\": \"၄င်း\", \"to\": \"၎င်း\" }, { \"from\": \"([ိီ])္([က-အ])\", \"to\": \"္$2$1\" }, { \"from\": \"ံွ\", \"to\": \"ွံ\" }]", str);
        h.d(T0, "zg2uni(input)");
        return T0;
    }

    public static String K(Intent intent) {
        boolean z;
        StringBuilder sb = new StringBuilder(128);
        sb.append("Intent { ");
        String action = intent.getAction();
        boolean z2 = true;
        boolean z3 = false;
        if (action != null) {
            sb.append("act=");
            sb.append(action);
            z = false;
        } else {
            z = true;
        }
        Set<String> categories = intent.getCategories();
        if (categories != null) {
            if (!z) {
                sb.append(' ');
            }
            sb.append("cat=[");
            for (String str : categories) {
                if (!z2) {
                    sb.append(',');
                }
                sb.append(str);
                z2 = false;
            }
            sb.append("]");
            z = false;
        }
        Uri data = intent.getData();
        if (data != null) {
            if (!z) {
                sb.append(' ');
            }
            sb.append("dat=");
            sb.append(data);
            z = false;
        }
        String type = intent.getType();
        if (type != null) {
            if (!z) {
                sb.append(' ');
            }
            sb.append("typ=");
            sb.append(type);
            z = false;
        }
        int flags = intent.getFlags();
        if (flags != 0) {
            if (!z) {
                sb.append(' ');
            }
            sb.append("flg=0x");
            sb.append(Integer.toHexString(flags));
            z = false;
        }
        String str2 = intent.getPackage();
        if (str2 != null) {
            if (!z) {
                sb.append(' ');
            }
            sb.append("pkg=");
            sb.append(str2);
            z = false;
        }
        ComponentName component = intent.getComponent();
        if (component != null) {
            if (!z) {
                sb.append(' ');
            }
            sb.append("cmp=");
            sb.append(component.flattenToShortString());
            z = false;
        }
        Rect sourceBounds = intent.getSourceBounds();
        if (sourceBounds != null) {
            if (!z) {
                sb.append(' ');
            }
            sb.append("bnds=");
            sb.append(sourceBounds.toShortString());
            z = false;
        }
        ClipData clipData = intent.getClipData();
        if (clipData != null) {
            if (!z) {
                sb.append(' ');
            }
            ClipData.Item itemAt = clipData.getItemAt(0);
            if (itemAt == null) {
                sb.append("ClipData.Item {}");
            } else {
                sb.append("ClipData.Item { ");
                String htmlText = itemAt.getHtmlText();
                if (htmlText != null) {
                    i.a.b.a.a.n0(sb, "H:", htmlText, "}");
                } else {
                    CharSequence text = itemAt.getText();
                    if (text != null) {
                        sb.append("T:");
                        sb.append(text);
                        sb.append("}");
                    } else {
                        Uri uri = itemAt.getUri();
                        if (uri != null) {
                            sb.append("U:");
                            sb.append(uri);
                            sb.append("}");
                        } else {
                            Intent intent2 = itemAt.getIntent();
                            if (intent2 != null) {
                                sb.append("I:");
                                sb.append(K(intent2));
                                sb.append("}");
                            } else {
                                sb.append("NULL");
                                sb.append("}");
                            }
                        }
                    }
                }
            }
            z = false;
        }
        Bundle extras = intent.getExtras();
        if (extras != null) {
            if (!z) {
                sb.append(' ');
            }
            sb.append("extras={");
            sb.append(g(extras));
            sb.append('}');
        } else {
            z3 = z;
        }
        Intent selector = intent.getSelector();
        if (selector != null) {
            if (!z3) {
                sb.append(' ');
            }
            sb.append("sel={");
            sb.append(selector == intent ? "(this Intent)" : K(selector));
            sb.append("}");
        }
        sb.append(" }");
        return sb.toString();
    }

    public static boolean L(Activity activity) {
        return (activity == null || activity.isFinishing() || activity.isDestroyed()) ? false : true;
    }

    public static final boolean M(Context context) {
        int i2 = Build.VERSION.SDK_INT;
        Configuration configuration = context.getResources().getConfiguration();
        return h.a((i2 >= 24 ? configuration.getLocales().get(0) : configuration.locale).getLanguage(), "my");
    }

    public static boolean N(Long l2) {
        return l2.longValue() != -1 && System.currentTimeMillis() > l2.longValue();
    }

    public static boolean O(Bitmap bitmap) {
        return bitmap == null || bitmap.getWidth() == 0 || bitmap.getHeight() == 0;
    }

    @SuppressLint({"NewApi"})
    public static boolean P() {
        try {
            if (b == null) {
                return Trace.isEnabled();
            }
        } catch (NoClassDefFoundError | NoSuchMethodError unused) {
        }
        try {
            if (b == null) {
                a = Trace.class.getField("TRACE_TAG_APP").getLong(null);
                b = Trace.class.getMethod("isTagEnabled", Long.TYPE);
            }
            return ((Boolean) b.invoke(null, Long.valueOf(a))).booleanValue();
        } catch (Exception e2) {
            if (e2 instanceof InvocationTargetException) {
                Throwable cause = e2.getCause();
                if (cause instanceof RuntimeException) {
                    throw ((RuntimeException) cause);
                }
                throw new RuntimeException(cause);
            }
            Log.v("Trace", "Unable to call isTagEnabled via reflection", e2);
            return false;
        }
    }

    public static boolean Q(Intent intent) {
        return y.J().getPackageManager().queryIntentActivities(intent, 65536).size() > 0;
    }

    public static final boolean R() {
        return PreferenceManager.getDefaultSharedPreferences(y.J()).getBoolean("isNight", false);
    }

    public static boolean S() {
        WindowManager windowManager = (WindowManager) y.J().getSystemService("window");
        if (windowManager == null) {
            return false;
        }
        Display defaultDisplay = windowManager.getDefaultDisplay();
        Point point = new Point();
        Point point2 = new Point();
        defaultDisplay.getSize(point);
        defaultDisplay.getRealSize(point2);
        return (point2.y == point.y && point2.x == point.x) ? false : true;
    }

    public static final boolean T(Activity activity) {
        h.e(activity, "<this>");
        TypedValue typedValue = new TypedValue();
        return activity.getTheme().resolveAttribute(16842840, typedValue, true) && typedValue.data != 0;
    }

    public static void U(String str, String str2) {
        if (Log.isLoggable(str, 2)) {
            Log.v(str, str2);
        }
    }

    public static void V(String str, String str2) {
        if (Log.isLoggable(str, 5)) {
            Log.w(str, str2);
        }
    }

    public static String W(Object obj, int i2) {
        List<String> list;
        if (obj.getClass().isArray()) {
            if (obj instanceof Object[]) {
                return Arrays.deepToString((Object[]) obj);
            }
            if (obj instanceof boolean[]) {
                return Arrays.toString((boolean[]) obj);
            }
            if (obj instanceof byte[]) {
                return Arrays.toString((byte[]) obj);
            }
            if (obj instanceof char[]) {
                return Arrays.toString((char[]) obj);
            }
            if (obj instanceof double[]) {
                return Arrays.toString((double[]) obj);
            }
            if (obj instanceof float[]) {
                return Arrays.toString((float[]) obj);
            }
            if (obj instanceof int[]) {
                return Arrays.toString((int[]) obj);
            }
            if (obj instanceof long[]) {
                return Arrays.toString((long[]) obj);
            }
            if (obj instanceof short[]) {
                return Arrays.toString((short[]) obj);
            }
            StringBuilder J = i.a.b.a.a.J("Array has incompatible type: ");
            J.append(obj.getClass());
            throw new IllegalArgumentException(J.toString());
        } else if (obj instanceof Throwable) {
            String str = b0.a;
            ArrayList arrayList = new ArrayList();
            for (Throwable th = (Throwable) obj; th != null && !arrayList.contains(th); th = th.getCause()) {
                arrayList.add(th);
            }
            int size = arrayList.size();
            ArrayList arrayList2 = new ArrayList();
            int i3 = size - 1;
            List<String> a2 = b0.a((Throwable) arrayList.get(i3));
            while (true) {
                size--;
                if (size < 0) {
                    break;
                }
                if (size != 0) {
                    list = b0.a((Throwable) arrayList.get(size - 1));
                    int size2 = a2.size() - 1;
                    ArrayList arrayList3 = (ArrayList) list;
                    int size3 = arrayList3.size();
                    while (true) {
                        size3--;
                        if (size2 < 0 || size3 < 0) {
                            break;
                        }
                        if (a2.get(size2).equals((String) arrayList3.get(size3))) {
                            a2.remove(size2);
                        }
                        size2--;
                    }
                } else {
                    list = a2;
                }
                if (size == i3) {
                    arrayList2.add(((Throwable) arrayList.get(size)).toString());
                } else {
                    StringBuilder J2 = i.a.b.a.a.J(" Caused by: ");
                    J2.append(((Throwable) arrayList.get(size)).toString());
                    arrayList2.add(J2.toString());
                }
                arrayList2.addAll(a2);
                a2 = list;
            }
            StringBuilder sb = new StringBuilder();
            Iterator it = arrayList2.iterator();
            while (it.hasNext()) {
                sb.append((String) it.next());
                sb.append(b0.a);
            }
            return sb.toString();
        } else if (obj instanceof Bundle) {
            return g((Bundle) obj);
        } else {
            if (obj instanceof Intent) {
                return K((Intent) obj);
            }
            if (i2 == 32) {
                if (obj instanceof CharSequence) {
                    String obj2 = obj.toString();
                    try {
                        int length = obj2.length();
                        for (int i4 = 0; i4 < length; i4++) {
                            char charAt = obj2.charAt(i4);
                            if (charAt == '{') {
                                obj2 = new JSONObject(obj2).toString(4);
                                break;
                            } else if (charAt == '[') {
                                obj2 = new JSONArray(obj2).toString(4);
                                break;
                            } else if (Character.isWhitespace(charAt)) {
                            }
                        }
                        return obj2;
                    } catch (JSONException e2) {
                        e2.printStackTrace();
                        return obj2;
                    }
                } else {
                    try {
                        Map<String, j> map = m.a;
                        j jVar = map.get("logUtilsGson");
                        if (jVar == null) {
                            k kVar = new k();
                            kVar.f12997k = true;
                            kVar.f12993g = true;
                            jVar = kVar.a();
                            map.put("logUtilsGson", jVar);
                        }
                        return jVar.g(obj);
                    } catch (Throwable unused) {
                        return obj.toString();
                    }
                }
            }
            if (i2 == 48) {
                String obj3 = obj.toString();
                try {
                    StreamSource streamSource = new StreamSource(new StringReader(obj3));
                    StreamResult streamResult = new StreamResult(new StringWriter());
                    Transformer newTransformer = TransformerFactory.newInstance().newTransformer();
                    newTransformer.setOutputProperty("indent", "yes");
                    newTransformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
                    newTransformer.transform(streamSource, streamResult);
                    return streamResult.getWriter().toString().replaceFirst(">", ">" + o.c);
                } catch (Exception e3) {
                    e3.printStackTrace();
                    return obj3;
                }
            }
            return obj.toString();
        }
    }

    public static <T> ObjectAnimator X(T t2, Property<T, PointF> property, Path path) {
        return ObjectAnimator.ofObject(t2, property, (TypeConverter) null, path);
    }

    public static void Y(FragmentManager fragmentManager, int i2, Fragment fragment, Fragment... fragmentArr) {
        if (fragmentManager == null) {
            return;
        }
        d dVar = new d(fragmentManager);
        int i3 = 0;
        if (i2 == 1) {
            int length = fragmentArr.length;
            while (i3 < length) {
                Fragment fragment2 = fragmentArr[i3];
                Bundle arguments = fragment2.getArguments();
                if (arguments == null) {
                    return;
                }
                String string = arguments.getString("args_tag", fragment2.getClass().getName());
                Fragment F = fragmentManager.F(string);
                if (F != null && F.isAdded()) {
                    dVar.p(F);
                }
                dVar.g(arguments.getInt("args_id"), fragment2, string, 1);
                if (arguments.getBoolean("args_is_hide")) {
                    dVar.n(fragment2);
                }
                if (arguments.getBoolean("args_is_add_stack")) {
                    dVar.c(string);
                }
                i3++;
            }
        } else if (i2 == 2) {
            int length2 = fragmentArr.length;
            while (i3 < length2) {
                dVar.r(fragmentArr[i3]);
                i3++;
            }
        } else if (i2 == 4) {
            int length3 = fragmentArr.length;
            while (i3 < length3) {
                dVar.n(fragmentArr[i3]);
                i3++;
            }
        } else if (i2 == 8) {
            throw null;
        } else {
            if (i2 == 16) {
                Bundle arguments2 = fragmentArr[0].getArguments();
                if (arguments2 == null) {
                    return;
                }
                String string2 = arguments2.getString("args_tag", fragmentArr[0].getClass().getName());
                dVar.h(arguments2.getInt("args_id"), fragmentArr[0], string2);
                if (arguments2.getBoolean("args_is_add_stack")) {
                    dVar.c(string2);
                }
            } else if (i2 == 32) {
                int length4 = fragmentArr.length;
                while (i3 < length4) {
                    Fragment fragment3 = fragmentArr[i3];
                    if (fragment3 != null) {
                        dVar.p(fragment3);
                    }
                    i3++;
                }
            } else if (i2 == 64) {
                for (int length5 = fragmentArr.length - 1; length5 >= 0; length5--) {
                    Fragment fragment4 = fragmentArr[length5];
                    if (fragment4 == fragmentArr[0]) {
                        break;
                    }
                    dVar.p(fragment4);
                }
            }
        }
        dVar.j();
    }

    public static boolean Z(Bitmap bitmap, File file, Bitmap.CompressFormat compressFormat, boolean z) {
        boolean z2;
        BufferedOutputStream bufferedOutputStream;
        boolean z3 = false;
        if (!O(bitmap)) {
            int i2 = l.a;
            if (file != null && ((!file.exists() || file.delete()) && l.d(file.getParentFile()))) {
                try {
                    z2 = file.createNewFile();
                } catch (IOException e2) {
                    e2.printStackTrace();
                }
                if (z2) {
                    BufferedOutputStream bufferedOutputStream2 = null;
                    try {
                        try {
                            try {
                                bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(file));
                            } catch (IOException e3) {
                                e3.printStackTrace();
                            }
                        } catch (IOException e4) {
                            e = e4;
                        }
                    } catch (Throwable th) {
                        th = th;
                    }
                    try {
                        z3 = bitmap.compress(compressFormat, 100, bufferedOutputStream);
                        if (z && !bitmap.isRecycled()) {
                            bitmap.recycle();
                        }
                        bufferedOutputStream.close();
                    } catch (IOException e5) {
                        e = e5;
                        bufferedOutputStream2 = bufferedOutputStream;
                        e.printStackTrace();
                        if (bufferedOutputStream2 != null) {
                            bufferedOutputStream2.close();
                        }
                        return z3;
                    } catch (Throwable th2) {
                        th = th2;
                        bufferedOutputStream2 = bufferedOutputStream;
                        if (bufferedOutputStream2 != null) {
                            try {
                                bufferedOutputStream2.close();
                            } catch (IOException e6) {
                                e6.printStackTrace();
                            }
                        }
                        throw th;
                    }
                    return z3;
                }
            }
            z2 = false;
            if (z2) {
            }
        }
        Log.e("ImageUtils", "create or delete file <" + file + "> failed.");
        return false;
    }

    public static void a(View[] viewArr, boolean z, long j2, View.OnClickListener onClickListener) {
        if (viewArr == null || viewArr.length == 0 || onClickListener == null) {
            return;
        }
        for (View view : viewArr) {
            if (view != null) {
                view.setOnClickListener(new f(z, j2, onClickListener));
            }
        }
    }

    public static int a0(int i2, float f2) {
        return (i2 & FlexItem.MAX_SIZE) | (((int) ((f2 * 255.0f) + 0.5f)) << 24);
    }

    public static void b(View view, long j2, View.OnClickListener onClickListener) {
        a(new View[]{view}, true, j2, onClickListener);
    }

    public static void b0(Window window, int i2) {
        window.addFlags(Integer.MIN_VALUE);
        window.setNavigationBarColor(i2);
    }

    public static void c(View view, float f2) {
        if (view == null) {
            return;
        }
        view.setTag(-1, Float.valueOf(f2));
        view.setClickable(true);
        view.setOnTouchListener(h.a.a);
    }

    public static void c0(Window window, boolean z) {
        if (Build.VERSION.SDK_INT >= 26) {
            View decorView = window.getDecorView();
            int systemUiVisibility = decorView.getSystemUiVisibility();
            decorView.setSystemUiVisibility(z ? systemUiVisibility | 16 : systemUiVisibility & (-17));
        }
    }

    public static void d(View view, long j2, View.OnClickListener onClickListener) {
        a(new View[]{view}, false, j2, onClickListener);
    }

    public static void d0(Activity activity, boolean z) {
        e0(activity.getWindow(), z);
    }

    public static byte[] e(byte[] bArr) {
        return (bArr == null || bArr.length == 0) ? new byte[0] : Base64.encode(bArr, 2);
    }

    public static void e0(Window window, boolean z) {
        if (Build.VERSION.SDK_INT >= 23) {
            View decorView = window.getDecorView();
            int systemUiVisibility = decorView.getSystemUiVisibility();
            decorView.setSystemUiVisibility(z ? systemUiVisibility | RecyclerView.b0.FLAG_BOUNCED_FROM_HIDDEN_LIST : systemUiVisibility & (-8193));
        }
    }

    public static byte[] f(Bitmap bitmap) {
        Bitmap.CompressFormat compressFormat = Bitmap.CompressFormat.PNG;
        if (bitmap == null) {
            return null;
        }
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        bitmap.compress(compressFormat, 100, byteArrayOutputStream);
        return byteArrayOutputStream.toByteArray();
    }

    public static void f0(Window window, int i2) {
        WindowManager.LayoutParams attributes = window.getAttributes();
        attributes.screenBrightness = i2 / 255.0f;
        window.setAttributes(attributes);
    }

    public static String g(Bundle bundle) {
        Iterator<String> it = bundle.keySet().iterator();
        if (!it.hasNext()) {
            return "Bundle {}";
        }
        StringBuilder sb = new StringBuilder(128);
        sb.append("Bundle { ");
        while (true) {
            String next = it.next();
            Object obj = bundle.get(next);
            sb.append(next);
            sb.append('=');
            if (obj instanceof Bundle) {
                sb.append(obj == bundle ? "(this Bundle)" : g((Bundle) obj));
            } else {
                sb.append(o.b(obj));
            }
            if (!it.hasNext()) {
                sb.append(" }");
                return sb.toString();
            }
            sb.append(',');
            sb.append(' ');
        }
    }

    public static final void g0(Activity activity) {
        n.i.b.h.e(activity, "<this>");
        n.i.b.h.e(activity, "<this>");
        TypedValue typedValue = new TypedValue();
        boolean z = true;
        if ((!activity.getTheme().resolveAttribute(16843277, typedValue, true) || typedValue.data == 0) ? false : false) {
            return;
        }
        if (T(activity)) {
            activity.setTheme(R$style.TransparentTheme);
        } else {
            activity.setTheme(R$style.AppTheme);
        }
    }

    public static Bitmap h(byte[] bArr) {
        if (bArr == null || bArr.length == 0) {
            return null;
        }
        return BitmapFactory.decodeByteArray(bArr, 0, bArr.length);
    }

    public static void h0(Fragment fragment) {
        Bundle arguments = fragment.getArguments();
        if (arguments == null) {
            arguments = new Bundle();
            fragment.setArguments(arguments);
        }
        arguments.putBoolean("args_is_hide", false);
        Y(fragment.getFragmentManager(), 2, null, fragment);
    }

    public static byte[] i(byte[] bArr, int i2, int i3) {
        int i4 = i3 - i2;
        if (i4 >= 0) {
            byte[] bArr2 = new byte[i4];
            System.arraycopy(bArr, i2, bArr2, 0, Math.min(bArr.length - i2, i4));
            return bArr2;
        }
        throw new IllegalArgumentException(i2 + " > " + i3);
    }

    public static void i0(Context context, Bundle bundle, String str, String str2, Bundle bundle2) {
        Intent intent = new Intent();
        if (bundle != null) {
            intent.putExtras(bundle);
        }
        intent.setComponent(new ComponentName(str, str2));
        m0(intent, context, null);
    }

    public static <T> T j(T t2, Type type) {
        try {
            return (T) m.b(m.e(t2), type);
        } catch (Exception e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public static void j0(Bundle bundle, Class<? extends Activity> cls) {
        Context d2 = m0.d();
        i0(d2, bundle, d2.getPackageName(), cls.getName(), null);
    }

    public static final int k(int i2) {
        return (int) ((i2 * Resources.getSystem().getDisplayMetrics().density) + 0.5f);
    }

    public static void k0(Class<? extends Activity> cls) {
        Context d2 = m0.d();
        i0(d2, null, d2.getPackageName(), cls.getName(), null);
    }

    public static Bitmap l(Drawable drawable) {
        Bitmap.Config config;
        Bitmap createBitmap;
        Bitmap.Config config2;
        if (drawable instanceof BitmapDrawable) {
            BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
            if (bitmapDrawable.getBitmap() != null) {
                return bitmapDrawable.getBitmap();
            }
        }
        if (drawable.getIntrinsicWidth() > 0 && drawable.getIntrinsicHeight() > 0) {
            int intrinsicWidth = drawable.getIntrinsicWidth();
            int intrinsicHeight = drawable.getIntrinsicHeight();
            if (drawable.getOpacity() != -1) {
                config2 = Bitmap.Config.ARGB_8888;
            } else {
                config2 = Bitmap.Config.RGB_565;
            }
            createBitmap = Bitmap.createBitmap(intrinsicWidth, intrinsicHeight, config2);
        } else {
            if (drawable.getOpacity() != -1) {
                config = Bitmap.Config.ARGB_8888;
            } else {
                config = Bitmap.Config.RGB_565;
            }
            createBitmap = Bitmap.createBitmap(1, 1, config);
        }
        Canvas canvas = new Canvas(createBitmap);
        drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
        drawable.draw(canvas);
        return createBitmap;
    }

    public static boolean l0(Intent intent) {
        return m0(intent, m0.d(), null);
    }

    @SuppressLint({"SoonBlockedPrivateApi"})
    public static void m(Canvas canvas, boolean z) {
        Method method;
        int i2 = Build.VERSION.SDK_INT;
        if (i2 >= 29) {
            if (z) {
                canvas.enableZ();
            } else {
                canvas.disableZ();
            }
        } else if (i2 != 28) {
            if (!f8018e) {
                try {
                    Method declaredMethod = Canvas.class.getDeclaredMethod("insertReorderBarrier", new Class[0]);
                    c = declaredMethod;
                    declaredMethod.setAccessible(true);
                    Method declaredMethod2 = Canvas.class.getDeclaredMethod("insertInorderBarrier", new Class[0]);
                    f8017d = declaredMethod2;
                    declaredMethod2.setAccessible(true);
                } catch (NoSuchMethodException unused) {
                }
                f8018e = true;
            }
            if (z) {
                try {
                    Method method2 = c;
                    if (method2 != null) {
                        method2.invoke(canvas, new Object[0]);
                    }
                } catch (IllegalAccessException unused2) {
                    return;
                } catch (InvocationTargetException e2) {
                    throw new RuntimeException(e2.getCause());
                }
            }
            if (z || (method = f8017d) == null) {
                return;
            }
            method.invoke(canvas, new Object[0]);
        } else {
            throw new IllegalStateException("This method doesn't work on Pie!");
        }
    }

    public static boolean m0(Intent intent, Context context, Bundle bundle) {
        if (!Q(intent)) {
            Log.e("ActivityUtils", "intent is unavailable");
            return false;
        }
        if (!(context instanceof Activity)) {
            intent.addFlags(268435456);
        }
        if (bundle != null) {
            context.startActivity(intent, bundle);
            return true;
        }
        context.startActivity(intent);
        return true;
    }

    public static String n(String str) {
        int length;
        if (str == null || str.length() == 0) {
            return "";
        }
        byte[] bytes = str.getBytes();
        byte[] bArr = null;
        if (bytes != null && bytes.length > 0) {
            try {
                MessageDigest messageDigest = MessageDigest.getInstance("MD5");
                messageDigest.update(bytes);
                bArr = messageDigest.digest();
            } catch (NoSuchAlgorithmException e2) {
                e2.printStackTrace();
            }
        }
        if (bArr != null && (length = bArr.length) > 0) {
            char[] cArr = new char[length << 1];
            int i2 = 0;
            for (int i3 = 0; i3 < length; i3++) {
                int i4 = i2 + 1;
                char[] cArr2 = i.a;
                cArr[i2] = cArr2[(bArr[i3] >> 4) & 15];
                i2 = i4 + 1;
                cArr[i4] = cArr2[bArr[i3] & 15];
            }
            return new String(cArr);
        }
        return "";
    }

    public static byte[] n0(byte[] bArr, byte[] bArr2, String str, String str2, byte[] bArr3, boolean z) {
        SecretKey secretKeySpec;
        if (bArr == null || bArr.length == 0 || bArr2 == null || bArr2.length == 0) {
            return null;
        }
        try {
            if ("DES".equals(str)) {
                secretKeySpec = SecretKeyFactory.getInstance(str).generateSecret(new DESKeySpec(bArr2));
            } else {
                secretKeySpec = new SecretKeySpec(bArr2, str);
            }
            Cipher cipher = Cipher.getInstance(str2);
            int i2 = 1;
            if (bArr3 != null && bArr3.length != 0) {
                IvParameterSpec ivParameterSpec = new IvParameterSpec(bArr3);
                if (!z) {
                    i2 = 2;
                }
                cipher.init(i2, secretKeySpec, ivParameterSpec);
                return cipher.doFinal(bArr);
            }
            i2 = 2;
            cipher.init(i2, secretKeySpec);
            return cipher.doFinal(bArr);
        } catch (Throwable th) {
            th.printStackTrace();
            return null;
        }
    }

    public static boolean o(Class<? extends Activity> cls, boolean z) {
        for (Activity activity : m0.b()) {
            if (activity.getClass().equals(cls)) {
                if (z) {
                    activity.finish();
                    activity.overridePendingTransition(0, 0);
                }
                return true;
            }
            activity.finish();
            activity.overridePendingTransition(0, 0);
        }
        return false;
    }

    public static final String o0(int i2, int i3, Context context, Locale locale) {
        n.i.b.h.e(context, "context");
        n.i.b.h.e(locale, "locale");
        return i.a.b.a.a.G(new Object[]{Integer.valueOf(i3)}, 1, locale, context.getResources().getQuantityText(i2, i3).toString(), "java.lang.String.format(locale, format, *args)");
    }

    public static Activity p(Context context) {
        Activity activity;
        if (!(context instanceof Activity)) {
            if (context != null && context.getClass().getName().equals("com.android.internal.policy.DecorContext")) {
                try {
                    Field declaredField = context.getClass().getDeclaredField("mActivityContext");
                    declaredField.setAccessible(true);
                    activity = (Activity) ((WeakReference) declaredField.get(context)).get();
                } catch (Exception e2) {
                    e2.printStackTrace();
                }
            }
            while (true) {
                if (!(context instanceof ContextWrapper)) {
                    activity = null;
                    break;
                } else if (context instanceof Activity) {
                    activity = (Activity) context;
                    break;
                } else {
                    context = ((ContextWrapper) context).getBaseContext();
                }
            }
        } else {
            activity = (Activity) context;
        }
        if (L(activity)) {
            return activity;
        }
        return null;
    }

    public static final Drawable p0(Drawable drawable, int i2) {
        n.i.b.h.e(drawable, "<this>");
        drawable.setColorFilter(i2, PorterDuff.Mode.SRC_IN);
        return drawable;
    }

    public static int q() {
        try {
            return Settings.System.getInt(y.J().getContentResolver(), "screen_brightness");
        } catch (Settings.SettingNotFoundException e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    public static final void q0(TextView textView, int i2) {
        n.i.b.h.e(textView, "<this>");
        textView.setTextColor(i2);
        Drawable[] compoundDrawablesRelative = textView.getCompoundDrawablesRelative();
        n.i.b.h.d(compoundDrawablesRelative, "compoundDrawablesRelative");
        Drawable drawable = compoundDrawablesRelative[0];
        Drawable drawable2 = null;
        if (drawable == null) {
            drawable = null;
        } else {
            p0(drawable, i2);
        }
        Drawable drawable3 = compoundDrawablesRelative[1];
        if (drawable3 == null) {
            drawable3 = null;
        } else {
            p0(drawable3, i2);
        }
        Drawable drawable4 = compoundDrawablesRelative[2];
        if (drawable4 == null) {
            drawable4 = null;
        } else {
            p0(drawable4, i2);
        }
        Drawable drawable5 = compoundDrawablesRelative[3];
        if (drawable5 != null) {
            p0(drawable5, i2);
            drawable2 = drawable5;
        }
        textView.setCompoundDrawablesRelative(drawable, drawable3, drawable4, drawable2);
    }

    public static final int r(Resources.Theme theme, int i2) {
        n.i.b.h.e(theme, "<this>");
        TypedValue typedValue = new TypedValue();
        theme.resolveAttribute(i2, typedValue, true);
        return typedValue.data;
    }

    public static Bitmap r0(Bitmap bitmap, float f2, int i2, int i3, boolean z) {
        if (O(bitmap)) {
            return null;
        }
        int width = bitmap.getWidth();
        int height = bitmap.getHeight();
        Paint paint = new Paint(1);
        Bitmap createBitmap = Bitmap.createBitmap(width, height, bitmap.getConfig());
        Shader.TileMode tileMode = Shader.TileMode.CLAMP;
        paint.setShader(new BitmapShader(bitmap, tileMode, tileMode));
        Canvas canvas = new Canvas(createBitmap);
        RectF rectF = new RectF(0.0f, 0.0f, width, height);
        float f3 = i2;
        float f4 = f3 / 2.0f;
        rectF.inset(f4, f4);
        canvas.drawRoundRect(rectF, f2, f2, paint);
        if (i2 > 0) {
            paint.setShader(null);
            paint.setColor(i3);
            paint.setStyle(Paint.Style.STROKE);
            paint.setStrokeWidth(f3);
            paint.setStrokeCap(Paint.Cap.ROUND);
            canvas.drawRoundRect(rectF, f2, f2, paint);
        }
        if (z && !bitmap.isRecycled() && createBitmap != bitmap) {
            bitmap.recycle();
        }
        return createBitmap;
    }

    public static Intent s(String str) {
        return z(new Intent("android.intent.action.DIAL", Uri.parse("tel:" + str)), true);
    }

    public static void s0(Activity activity) {
        Window window = activity.getWindow();
        window.clearFlags(67108864);
        window.addFlags(Integer.MIN_VALUE);
        window.getDecorView().setSystemUiVisibility(window.getDecorView().getSystemUiVisibility() | 1280);
        window.setStatusBarColor(0);
    }

    public static long t(byte[] bArr) {
        if (G(bArr)) {
            try {
                return Long.parseLong(new String(i(bArr, 2, 12))) * 1000;
            } catch (NumberFormatException unused) {
            }
        }
        return -1L;
    }

    public static final String t0(Context context, String str) {
        n.i.b.h.e(context, "<this>");
        if (TextUtils.isEmpty(str)) {
            return "";
        }
        if (!M(context)) {
            n.i.b.h.c(str);
            return str;
        }
        p pVar = p.a;
        if (p.a()) {
            n.i.b.h.c(str);
            return str;
        }
        String a1 = y.a1(str);
        n.i.b.h.d(a1, "uni2zg(unicode)");
        return a1;
    }

    public static ValueAnimator u() {
        final z0 z0Var = new z0();
        z0Var.setInterpolator(new DecelerateInterpolator());
        z0Var.setOnSetupValuesListener(new x0() {
            @Override
            public final void a() {
                z0 z0Var2 = z0.this;
                View view = z0Var2.f9155i;
                if (view.getVisibility() != 0) {
                    view.setAlpha(0.0f);
                }
                float alpha = view.getAlpha();
                z0Var2.setFloatValues(alpha, 1.0f);
                z0Var2.setDuration((1.0f - alpha) * 150.0f);
            }
        });
        z0Var.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                z0.this.f9155i.setAlpha(((Float) valueAnimator.getAnimatedValue()).floatValue());
            }
        });
        return z0Var;
    }

    public static void u0(Context context, Locale locale) {
        Resources resources = context.getResources();
        Configuration configuration = resources.getConfiguration();
        Locale locale2 = configuration.locale;
        if (m0.a(locale.getLanguage(), locale2.getLanguage()) && m0.a(locale.getCountry(), locale2.getCountry())) {
            return;
        }
        DisplayMetrics displayMetrics = resources.getDisplayMetrics();
        configuration.setLocale(locale);
        if (context instanceof Application) {
            Context createConfigurationContext = context.createConfigurationContext(configuration);
            try {
                Field declaredField = ContextWrapper.class.getDeclaredField("mBase");
                declaredField.setAccessible(true);
                declaredField.set(context, createConfigurationContext);
            } catch (Exception unused) {
            }
        }
        resources.updateConfiguration(configuration, displayMetrics);
    }

    public static ValueAnimator v() {
        final z0 z0Var = new z0();
        z0Var.setInterpolator(new DecelerateInterpolator());
        z0Var.setOnSetupValuesListener(new x0() {
            @Override
            public final void a() {
                z0 z0Var2 = z0.this;
                float alpha = z0Var2.f9155i.getAlpha();
                z0Var2.setFloatValues(alpha, 0.0f);
                z0Var2.setDuration(alpha * 150.0f);
            }
        });
        z0Var.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                z0.this.f9155i.setAlpha(((Float) valueAnimator.getAnimatedValue()).floatValue());
            }
        });
        return z0Var;
    }

    public static ValueAnimator w() {
        final z0 z0Var = new z0();
        z0Var.setInterpolator(new LinearOutSlowInInterpolator());
        z0Var.setOnSetupValuesListener(new x0() {
            @Override
            public final void a() {
                z0 z0Var2 = z0.this;
                View view = z0Var2.f9155i;
                if (view.getVisibility() != 0) {
                    view.setAlpha(0.0f);
                }
                float alpha = view.getAlpha();
                z0Var2.setFloatValues(alpha, 1.0f);
                z0Var2.setDuration((1.0f - alpha) * 150.0f);
            }
        });
        z0Var.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
            @Override
            public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                View view = z0.this.f9155i;
                view.setAlpha(((Float) valueAnimator.getAnimatedValue()).floatValue());
                view.setTranslationY((1.0f - ((Float) valueAnimator.getAnimatedValue()).floatValue()) * Math.min(view.getHeight() / 2, view.getResources().getDimension(R$dimen.carbon_1dip) * 50.0f));
            }
        });
        return z0Var;
    }

    public static Typeface x(Context context, int i2, TypedValue typedValue, int i3, int i4, h.c cVar) throws Resources.NotFoundException {
        if (context.isRestricted()) {
            return null;
        }
        Resources resources = context.getResources();
        resources.getValue(i2, typedValue, true);
        CharSequence charSequence = typedValue.string;
        if (charSequence != null) {
            String charSequence2 = charSequence.toString();
            if (!charSequence2.startsWith("res/")) {
                cVar.a(-3, null);
                return null;
            }
            int i5 = i3 & 2;
            Typeface typeface = f.j.f.b.get(f.j.f.c(resources, i2, i5 != 0, i4));
            if (typeface != null) {
                cVar.b(typeface, null);
                return typeface;
            }
            try {
                if (charSequence2.toLowerCase().endsWith(".xml")) {
                    e u0 = ComponentActivity.c.u0(resources.getXml(i2), resources);
                    if (u0 == null) {
                        Log.e("ResourcesCompat", "Failed to find font-family tag");
                        cVar.a(-3, null);
                        return null;
                    }
                    return f.j.f.a(context, u0, resources, i2, i3, i4, cVar, null, true);
                }
                Typeface b2 = f.j.f.b(context, resources, i2, charSequence2, i5 != 0, i4);
                if (b2 != null) {
                    cVar.b(b2, null);
                } else {
                    cVar.a(-3, null);
                }
                return b2;
            } catch (IOException e2) {
                Log.e("ResourcesCompat", "Failed to read xml resource " + charSequence2, e2);
                cVar.a(-3, null);
                return null;
            } catch (XmlPullParserException e3) {
                Log.e("ResourcesCompat", "Failed to parse xml resource " + charSequence2, e3);
                cVar.a(-3, null);
                return null;
            }
        }
        StringBuilder J = i.a.b.a.a.J("Resource \"");
        J.append(resources.getResourceName(i2));
        J.append("\" (");
        J.append(Integer.toHexString(i2));
        J.append(") is not a Font: ");
        J.append(typedValue);
        throw new Resources.NotFoundException(J.toString());
    }

    public static List<Fragment> y(FragmentManager fragmentManager) {
        List<Fragment> K = fragmentManager.K();
        return (K == null || K.isEmpty()) ? Collections.emptyList() : K;
    }

    public static Intent z(Intent intent, boolean z) {
        return z ? intent.addFlags(268435456) : intent;
    }
}