package p138.p176.p177.p190.p239;

import android.app.UiModeManager;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Point;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcel;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
import android.view.Display;
import android.view.WindowManager;
import com.google.android.exoplayer2.ParserException;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.nio.charset.Charset;
import java.util.Arrays;
import java.util.Collections;
import java.util.Formatter;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.TimeZone;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
import org.checkerframework.checker.nullness.qual.EnsuresNonNull;
import p000.p001.p002.p003.p004.C0567;
import p138.p139.p143.p144.C2803;
import p138.p176.p177.p190.C3453;
import p138.p176.p177.p190.p238.InterfaceC4095;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ဢ.ޘ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C4150 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static final int f13259 = Build.VERSION.SDK_INT;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static final String f13260 = Build.DEVICE;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public static final String f13261 = Build.MANUFACTURER;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public static final String f13262 = Build.MODEL;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public static final String f13263 = f13260 + ", " + f13262 + ", " + f13261 + ", " + f13259;

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public static final byte[] f13264 = new byte[0];

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public static final Pattern f13265 = Pattern.compile("(\\d\\d\\d\\d)\\-(\\d\\d)\\-(\\d\\d)[Tt](\\d\\d):(\\d\\d):(\\d\\d)([\\.,](\\d+))?([Zz]|((\\+|\\-)(\\d?\\d):?(\\d\\d)))?");

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public static final Pattern f13266 = Pattern.compile("^(-)?P(([0-9]*)Y)?(([0-9]*)M)?(([0-9]*)D)?(T(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?)?$");

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public static HashMap<String, String> f13267;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public static final String[] f13268;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public static final String[] f13269;

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public static final int[] f13270;

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public static final int[] f13271;

    static {
        Pattern.compile("%([A-Fa-f0-9]{2})");
        f13268 = new String[]{"alb", "sq", "arm", "hy", "baq", "eu", "bur", "my", "tib", "bo", "chi", "zh", "cze", "cs", "dut", "nl", "ger", "de", "gre", "el", "fre", "fr", "geo", "ka", "ice", "is", "mac", "mk", "mao", "mi", "may", "ms", "per", "fa", "rum", "ro", "scc", "hbs-srp", "slo", "sk", "wel", "cy", "id", "ms-ind", "iw", "he", "heb", "he", "ji", "yi", "in", "ms-ind", "ind", "ms-ind", "nb", "no-nob", "nob", "no-nob", "nn", "no-nno", "nno", "no-nno", "tw", "ak-twi", "twi", "ak-twi", "bs", "hbs-bos", "bos", "hbs-bos", "hr", "hbs-hrv", "hrv", "hbs-hrv", "sr", "hbs-srp", "srp", "hbs-srp", "cmn", "zh-cmn", "hak", "zh-hak", "nan", "zh-nan", "hsn", "zh-hsn"};
        f13269 = new String[]{"i-lux", "lb", "i-hak", "zh-hak", "i-navajo", "nv", "no-bok", "no-nob", "no-nyn", "no-nno", "zh-guoyu", "zh-cmn", "zh-hakka", "zh-hak", "zh-min-nan", "zh-nan", "zh-xiang", "zh-hsn"};
        f13270 = new int[]{0, 79764919, 159529838, 222504665, 319059676, 398814059, 445009330, 507990021, 638119352, 583659535, 797628118, 726387553, 890018660, 835552979, 1015980042, 944750013, 1276238704, 1221641927, 1167319070, 1095957929, 1595256236, 1540665371, 1452775106, 1381403509, 1780037320, 1859660671, 1671105958, 1733955601, 2031960084, 2111593891, 1889500026, 1952343757, -1742489888, -1662866601, -1851683442, -1788833735, -1960329156, -1880695413, -2103051438, -2040207643, -1104454824, -1159051537, -1213636554, -1284997759, -1389417084, -1444007885, -1532160278, -1603531939, -734892656, -789352409, -575645954, -646886583, -952755380, -1007220997, -827056094, -898286187, -231047128, -151282273, -71779514, -8804623, -515967244, -436212925, -390279782, -327299027, 881225847, 809987520, 1023691545, 969234094, 662832811, 591600412, 771767749, 717299826, 311336399, 374308984, 453813921, 533576470, 25881363, 88864420, 134795389, 214552010, 2023205639, 2086057648, 1897238633, 1976864222, 1804852699, 1867694188, 1645340341, 1724971778, 1587496639, 1516133128, 1461550545, 1406951526, 1302016099, 1230646740, 1142491917, 1087903418, -1398421865, -1469785312, -1524105735, -1578704818, -1079922613, -1151291908, -1239184603, -1293773166, -1968362705, -1905510760, -2094067647, -2014441994, -1716953613, -1654112188, -1876203875, -1796572374, -525066777, -462094256, -382327159, -302564546, -206542021, -143559028, -97365931, -17609246, -960696225, -1031934488, -817968335, -872425850, -709327229, -780559564, -600130067, -654598054, 1762451694, 1842216281, 1619975040, 1682949687, 2047383090, 2127137669, 1938468188, 2001449195, 1325665622, 1271206113, 1183200824, 1111960463, 1543535498, 1489069629, 1434599652, 1363369299, 622672798, 568075817, 748617968, 677256519, 907627842, 853037301, 1067152940, 995781531, 51762726, 131386257, 177728840, 240578815, 269590778, 349224269, 429104020, 491947555, -248556018, -168932423, -122852000, -60002089, -500490030, -420856475, -341238852, -278395381, -685261898, -739858943, -559578920, -630940305, -1004286614, -1058877219, -845023740, -916395085, -1119974018, -1174433591, -1262701040, -1333941337, -1371866206, -1426332139, -1481064244, -1552294533, -1690935098, -1611170447, -1833673816, -1770699233, -2009983462, -1930228819, -2119160460, -2056179517, 1569362073, 1498123566, 1409854455, 1355396672, 1317987909, 1246755826, 1192025387, 1137557660, 2072149281, 2135122070, 1912620623, 1992383480, 1753615357, 1816598090, 1627664531, 1707420964, 295390185, 358241886, 404320391, 483945776, 43990325, 106832002, 186451547, 266083308, 932423249, 861060070, 1041341759, 986742920, 613929101, 542559546, 756411363, 701822548, -978770311, -1050133554, -869589737, -924188512, -693284699, -764654318, -550540341, -605129092, -475935807, -413084042, -366743377, -287118056, -257573603, -194731862, -114850189, -35218492, -1984365303, -1921392450, -2143631769, -2063868976, -1698919467, -1635936670, -1824608069, -1744851700, -1347415887, -1418654458, -1506661409, -1561119128, -1129027987, -1200260134, -1254728445, -1309196108};
        f13271 = new int[]{0, 7, 14, 9, 28, 27, 18, 21, 56, 63, 54, 49, 36, 35, 42, 45, 112, 119, 126, 121, 108, 107, 98, 101, 72, 79, 70, 65, 84, 83, 90, 93, 224, 231, 238, 233, 252, 251, 242, 245, 216, 223, 214, 209, 196, 195, 202, 205, 144, 151, 158, 153, 140, 139, 130, 133, 168, 175, 166, 161, 180, 179, 186, 189, 199, 192, 201, 206, 219, 220, 213, 210, 255, 248, 241, 246, 227, 228, 237, 234, 183, 176, 185, 190, 171, 172, 165, 162, 143, 136, 129, 134, 147, 148, 157, 154, 39, 32, 41, 46, 59, 60, 53, 50, 31, 24, 17, 22, 3, 4, 13, 10, 87, 80, 89, 94, 75, 76, 69, 66, 111, 104, 97, 102, 115, 116, 125, 122, 137, 142, 135, 128, 149, 146, 155, 156, 177, 182, 191, 184, 173, 170, 163, 164, 249, 254, 247, 240, 229, 226, 235, 236, 193, 198, 207, 200, 221, 218, 211, 212, 105, 110, 103, 96, 117, 114, 123, 124, 81, 86, 95, 88, 77, 74, 67, 68, 25, 30, 23, 16, 5, 2, 11, 12, 33, 38, 47, 40, 61, 58, 51, 52, 78, 73, 64, 71, 82, 85, 92, 91, 118, 113, 120, 127, 106, 109, 100, 99, 62, 57, 48, 55, 34, 37, 44, 43, 6, 1, 8, 15, 26, 29, 20, 19, 174, 169, 160, 167, 178, 181, 188, 187, 150, 145, 152, 159, 138, 141, 132, 131, 222, 217, 208, 215, 194, 197, 204, 203, 230, 225, 232, 239, 250, 253, 244, 243};
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static float m6740(float f, float f2, float f3) {
        return Math.max(f2, Math.min(f, f3));
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static int m6741(int i) {
        if (i == 8) {
            return 3;
        }
        if (i == 16) {
            return 2;
        }
        if (i != 24) {
            return i != 32 ? 0 : 805306368;
        }
        return 536870912;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static int m6742(int i, int i2) {
        return ((i + i2) - 1) / i2;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static int m6743(int i, int i2, int i3) {
        return Math.max(i2, Math.min(i, i3));
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static int m6744(Uri uri) {
        String path = uri.getPath();
        if (path == null) {
            return 3;
        }
        String strM6809 = m6809(path);
        if (strM6809.endsWith(".mpd")) {
            return 0;
        }
        if (strM6809.endsWith(".m3u8")) {
            return 2;
        }
        return strM6809.matches(".*\\.ism(l)?(/manifest(\\(.+\\))?)?") ? 1 : 3;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static <T extends Comparable<? super T>> int m6745(List<? extends Comparable<? super T>> list, T t, boolean z, boolean z2) {
        int i;
        int iBinarySearch = Collections.binarySearch(list, t);
        if (iBinarySearch < 0) {
            i = ~iBinarySearch;
        } else {
            int size = list.size();
            do {
                iBinarySearch++;
                if (iBinarySearch >= size) {
                    break;
                }
            } while (list.get(iBinarySearch).compareTo(t) == 0);
            i = z ? iBinarySearch - 1 : iBinarySearch;
        }
        return z2 ? Math.min(list.size() - 1, i) : i;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static int m6746(byte[] bArr, int i, int i2, int i3) {
        while (i < i2) {
            i3 = f13270[((i3 >>> 24) ^ (bArr[i] & 255)) & 255] ^ (i3 << 8);
            i++;
        }
        return i3;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static int m6747(int[] iArr, int i) {
        for (int i2 = 0; i2 < iArr.length; i2++) {
            if (iArr[i2] == i) {
                return i2;
            }
        }
        return -1;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static int m6748(long[] jArr, long j, boolean z, boolean z2) {
        int i;
        int iBinarySearch = Arrays.binarySearch(jArr, j);
        if (iBinarySearch < 0) {
            i = ~iBinarySearch;
        } else {
            do {
                iBinarySearch++;
                if (iBinarySearch >= jArr.length) {
                    break;
                }
            } while (jArr[iBinarySearch] == j);
            i = z ? iBinarySearch - 1 : iBinarySearch;
        }
        return z2 ? Math.min(jArr.length - 1, i) : i;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static long m6749(long j, float f) {
        return f == 1.0f ? j : Math.round(j * ((double) f));
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static long m6750(long j, long j2) {
        return ((j + j2) - 1) / j2;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static long m6751(long j, long j2, long j3) {
        long j4 = j + j2;
        return ((j ^ j4) & (j2 ^ j4)) < 0 ? j3 : j4;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static long m6752(long j, C3453 c3453, long j2, long j3) {
        if (C3453.f10181.equals(c3453)) {
            return j;
        }
        long j4 = c3453.f10183;
        long j5 = j - j4;
        long j6 = ((j4 ^ j) & (j ^ j5)) >= 0 ? j5 : Long.MIN_VALUE;
        long j7 = c3453.f10184;
        long j8 = j + j7;
        long j9 = ((j7 ^ j8) & (j ^ j8)) >= 0 ? j8 : Long.MAX_VALUE;
        boolean z = j6 <= j2 && j2 <= j9;
        boolean z2 = j6 <= j3 && j3 <= j9;
        return (z && z2) ? Math.abs(j2 - j) <= Math.abs(j3 - j) ? j2 : j3 : z ? j2 : z2 ? j3 : j6;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static Handler m6753(Handler.Callback callback) {
        Looper looperMyLooper = Looper.myLooper();
        if (looperMyLooper == null) {
            looperMyLooper = Looper.getMainLooper();
        }
        return new Handler(looperMyLooper, callback);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static Handler m6754(Looper looper, Handler.Callback callback) {
        return new Handler(looper, callback);
    }

    @EnsuresNonNull({"#1"})
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static <T> T m6755(T t) {
        return t;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static String m6756(Context context) {
        TelephonyManager telephonyManager;
        if (context != null && (telephonyManager = (TelephonyManager) context.getSystemService("phone")) != null) {
            String networkCountryIso = telephonyManager.getNetworkCountryIso();
            if (!TextUtils.isEmpty(networkCountryIso)) {
                return m6810(networkCountryIso);
            }
        }
        return m6810(Locale.getDefault().getCountry());
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static String m6757(String str, int i) {
        String[] strArrM6808 = m6808(str);
        if (strArrM6808.length == 0) {
            return null;
        }
        StringBuilder sb = new StringBuilder();
        for (String str2 : strArrM6808) {
            if (i == C4134.m6655(C4134.m6653(str2))) {
                if (sb.length() > 0) {
                    sb.append(",");
                }
                sb.append(str2);
            }
        }
        if (sb.length() > 0) {
            return sb.toString();
        }
        return null;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static String m6758(String str, Object... objArr) {
        return String.format(Locale.US, str, objArr);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static String m6759(StringBuilder sb, Formatter formatter, long j) {
        if (j == -9223372036854775807L) {
            j = 0;
        }
        long j2 = (j + 500) / 1000;
        long j3 = j2 % 60;
        long j4 = (j2 / 60) % 60;
        long j5 = j2 / 3600;
        sb.setLength(0);
        return j5 > 0 ? formatter.format("%d:%02d:%02d", Long.valueOf(j5), Long.valueOf(j4), Long.valueOf(j3)).toString() : formatter.format("%02d:%02d", Long.valueOf(j4), Long.valueOf(j3)).toString();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static String m6760(byte[] bArr) {
        return new String(bArr, Charset.forName("UTF-8"));
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static String m6761(byte[] bArr, int i, int i2) {
        return new String(bArr, i, i2, Charset.forName("UTF-8"));
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static /* synthetic */ Thread m6762(String str, Runnable runnable) {
        return new Thread(runnable, str);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static void m6763(Parcel parcel, boolean z) {
        parcel.writeInt(z ? 1 : 0);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static void m6764(Closeable closeable) {
        if (closeable != null) {
            try {
                closeable.close();
            } catch (IOException unused) {
            }
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static <T> void m6765(List<T> list, int i, int i2) {
        if (i < 0 || i2 > list.size() || i > i2) {
            throw new IllegalArgumentException();
        }
        if (i != i2) {
            list.subList(i, i2).clear();
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static void m6766(InterfaceC4095 interfaceC4095) {
        if (interfaceC4095 != null) {
            try {
                interfaceC4095.close();
            } catch (IOException unused) {
            }
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static void m6767(long[] jArr, long j, long j2) {
        int i = 0;
        if (j2 >= j && j2 % j == 0) {
            long j3 = j2 / j;
            while (i < jArr.length) {
                jArr[i] = jArr[i] / j3;
                i++;
            }
            return;
        }
        if (j2 >= j || j % j2 != 0) {
            double d = j / j2;
            while (i < jArr.length) {
                jArr[i] = (long) (jArr[i] * d);
                i++;
            }
            return;
        }
        long j4 = j / j2;
        while (i < jArr.length) {
            jArr[i] = jArr[i] * j4;
            i++;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static boolean m6768(Parcel parcel) {
        return parcel.readInt() != 0;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static boolean m6769(Object obj, Object obj2) {
        return obj == null ? obj2 == null : obj.equals(obj2);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static boolean m6770(C4140 c4140, C4140 c41402, Inflater inflater) {
        if (c4140.m6679() <= 0) {
            return false;
        }
        byte[] bArrCopyOf = c41402.f13227;
        if (bArrCopyOf.length < c4140.m6679()) {
            bArrCopyOf = new byte[c4140.m6679() * 2];
        }
        if (inflater == null) {
            inflater = new Inflater();
        }
        inflater.setInput(c4140.f13227, c4140.f13228, c4140.m6679());
        int iInflate = 0;
        while (true) {
            try {
                iInflate += inflater.inflate(bArrCopyOf, iInflate, bArrCopyOf.length - iInflate);
                if (!inflater.finished()) {
                    if (inflater.needsDictionary() || inflater.needsInput()) {
                        break;
                    }
                    if (iInflate == bArrCopyOf.length) {
                        bArrCopyOf = Arrays.copyOf(bArrCopyOf, bArrCopyOf.length * 2);
                    }
                } else {
                    c41402.f13227 = bArrCopyOf;
                    c41402.f13229 = iInflate;
                    c41402.f13228 = 0;
                    return true;
                }
            } catch (DataFormatException unused) {
                return false;
            } finally {
                inflater.reset();
            }
        }
        return false;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static boolean m6771(Object[] objArr, Object obj) {
        for (Object obj2 : objArr) {
            if (m6769(obj2, obj)) {
                return true;
            }
        }
        return false;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static byte[] m6772(InputStream inputStream) throws IOException {
        byte[] bArr = new byte[4096];
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        while (true) {
            int i = inputStream.read(bArr);
            if (i == -1) {
                return byteArrayOutputStream.toByteArray();
            }
            byteArrayOutputStream.write(bArr, 0, i);
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static byte[] m6773(String str) {
        int length = str.length() / 2;
        byte[] bArr = new byte[length];
        for (int i = 0; i < length; i++) {
            int i2 = i * 2;
            bArr[i] = (byte) (Character.digit(str.charAt(i2 + 1), 16) + (Character.digit(str.charAt(i2), 16) << 4));
        }
        return bArr;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static int[] m6774(List<Integer> list) {
        if (list == null) {
            return null;
        }
        int size = list.size();
        int[] iArr = new int[size];
        for (int i = 0; i < size; i++) {
            iArr[i] = list.get(i).intValue();
        }
        return iArr;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static long[] m6775(List<Long> list, long j, long j2) {
        int size = list.size();
        long[] jArr = new long[size];
        int i = 0;
        if (j2 >= j && j2 % j == 0) {
            long j3 = j2 / j;
            while (i < size) {
                jArr[i] = list.get(i).longValue() / j3;
                i++;
            }
        } else if (j2 >= j || j % j2 != 0) {
            double d = j / j2;
            while (i < size) {
                jArr[i] = (long) (list.get(i).longValue() * d);
                i++;
            }
        } else {
            long j4 = j / j2;
            while (i < size) {
                jArr[i] = list.get(i).longValue() * j4;
                i++;
            }
        }
        return jArr;
    }

    @EnsuresNonNull({"#1"})
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static <T> T[] m6776(T[] tArr) {
        return tArr;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static <T> T[] m6777(T[] tArr, int i) {
        C0567.m1896(i <= tArr.length);
        return (T[]) Arrays.copyOf(tArr, i);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static <T> T[] m6778(T[] tArr, int i, int i2) {
        C0567.m1896(i >= 0);
        C0567.m1896(i2 <= tArr.length);
        return (T[]) Arrays.copyOfRange(tArr, i, i2);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static <T> T[] m6779(T[] tArr, T[] tArr2) {
        T[] tArr3 = (T[]) Arrays.copyOf(tArr, tArr.length + tArr2.length);
        System.arraycopy(tArr2, 0, tArr3, tArr.length, tArr2.length);
        return tArr3;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static String[] m6780() {
        String[] strArrM6781;
        Configuration configuration = Resources.getSystem().getConfiguration();
        int i = f13259;
        if (i >= 24) {
            strArrM6781 = m6781(configuration.getLocales().toLanguageTags(), ",");
        } else {
            String[] strArr = new String[1];
            Locale locale = configuration.locale;
            strArr[0] = i >= 21 ? locale.toLanguageTag() : locale.toString();
            strArrM6781 = strArr;
        }
        for (int i2 = 0; i2 < strArrM6781.length; i2++) {
            strArrM6781[i2] = m6803(strArrM6781[i2]);
        }
        return strArrM6781;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static String[] m6781(String str, String str2) {
        return str.split(str2, -1);
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static int m6782(int i) {
        if (i == 13) {
            return 1;
        }
        switch (i) {
            case 2:
                return 0;
            case 3:
                return 8;
            case 4:
                return 4;
            case 5:
            case 7:
            case 8:
            case 9:
            case 10:
                return 5;
            case 6:
                return 2;
            default:
                return 3;
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static int m6783(int i, int i2) {
        if (i != 2) {
            if (i == 3) {
                return i2;
            }
            if (i != 4) {
                if (i != 268435456) {
                    if (i == 536870912) {
                        return i2 * 3;
                    }
                    if (i != 805306368) {
                        throw new IllegalArgumentException();
                    }
                }
            }
            return i2 * 4;
        }
        return i2 * 2;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static int m6784(long j, long j2) {
        if (j < j2) {
            return -1;
        }
        return j == j2 ? 0 : 1;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static <T extends Comparable<? super T>> int m6785(List<? extends Comparable<? super T>> list, T t, boolean z, boolean z2) {
        int i;
        int iBinarySearch = Collections.binarySearch(list, t);
        if (iBinarySearch < 0) {
            i = -(iBinarySearch + 2);
        } else {
            do {
                iBinarySearch--;
                if (iBinarySearch < 0) {
                    break;
                }
            } while (list.get(iBinarySearch).compareTo(t) == 0);
            i = z ? iBinarySearch + 1 : iBinarySearch;
        }
        return z2 ? Math.max(0, i) : i;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static int m6786(byte[] bArr, int i, int i2, int i3) {
        while (i < i2) {
            i3 = f13271[i3 ^ (bArr[i] & 255)];
            i++;
        }
        return i3;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static int m6787(long[] jArr, long j, boolean z, boolean z2) {
        int i;
        int iBinarySearch = Arrays.binarySearch(jArr, j);
        if (iBinarySearch < 0) {
            i = -(iBinarySearch + 2);
        } else {
            do {
                iBinarySearch--;
                if (iBinarySearch < 0) {
                    break;
                }
            } while (jArr[iBinarySearch] == j);
            i = z ? iBinarySearch + 1 : iBinarySearch;
        }
        return z2 ? Math.max(0, i) : i;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static long m6788(long j, float f) {
        return f == 1.0f ? j : Math.round(j / ((double) f));
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static long m6789(long j, long j2, long j3) {
        return Math.max(j2, Math.min(j, j3));
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static Point m6790(Context context) {
        Display defaultDisplay = ((WindowManager) context.getSystemService("window")).getDefaultDisplay();
        if (f13259 <= 29 && defaultDisplay.getDisplayId() == 0 && m6802(context)) {
            if ("Sony".equals(f13261) && f13262.startsWith("BRAVIA") && context.getPackageManager().hasSystemFeature("com.sony.dtv.hardware.panel.qfhd")) {
                return new Point(3840, 2160);
            }
            String strM6791 = f13259 < 28 ? m6791("sys.display-size") : m6791("vendor.display-size");
            if (!TextUtils.isEmpty(strM6791)) {
                try {
                    String[] strArrM6781 = m6781(strM6791.trim(), "x");
                    if (strArrM6781.length == 2) {
                        int i = Integer.parseInt(strArrM6781[0]);
                        int i2 = Integer.parseInt(strArrM6781[1]);
                        if (i > 0 && i2 > 0) {
                            return new Point(i, i2);
                        }
                    }
                } catch (NumberFormatException unused) {
                }
                Log.e("Util", "Invalid display size: " + strM6791);
            }
        }
        Point point = new Point();
        int i3 = f13259;
        if (i3 >= 23) {
            Display.Mode mode = defaultDisplay.getMode();
            point.x = mode.getPhysicalWidth();
            point.y = mode.getPhysicalHeight();
            return point;
        }
        if (i3 >= 17) {
            defaultDisplay.getRealSize(point);
            return point;
        }
        defaultDisplay.getSize(point);
        return point;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static String m6791(String str) {
        try {
            Class<?> cls = Class.forName("android.os.SystemProperties");
            return (String) cls.getMethod("get", String.class).invoke(cls, str);
        } catch (Exception e) {
            C4131.m6645("Util", "Failed to read system property " + str, e);
            return null;
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static String m6792(Object[] objArr) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < objArr.length; i++) {
            sb.append(objArr[i].getClass().getSimpleName());
            if (i < objArr.length - 1) {
                sb.append(", ");
            }
        }
        return sb.toString();
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static boolean m6793(Uri uri) {
        String scheme = uri.getScheme();
        return TextUtils.isEmpty(scheme) || "file".equals(scheme);
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static <T> T[] m6794(T[] tArr, T t) {
        T[] tArr2 = (T[]) Arrays.copyOf(tArr, tArr.length + 1);
        tArr2[tArr.length] = t;
        return tArr2;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static String[] m6795(String str, String str2) {
        return str.split(str2, 2);
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public static int m6796(Context context) {
        ConnectivityManager connectivityManager;
        int i = 0;
        if (context == null || (connectivityManager = (ConnectivityManager) context.getSystemService("connectivity")) == null) {
            return 0;
        }
        try {
            NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
            i = 1;
            if (activeNetworkInfo != null && activeNetworkInfo.isConnected()) {
                int type = activeNetworkInfo.getType();
                if (type != 0) {
                    if (type == 1) {
                        return 2;
                    }
                    if (type != 4 && type != 5) {
                        if (type != 6) {
                            return type != 9 ? 8 : 7;
                        }
                        return 5;
                    }
                }
                switch (activeNetworkInfo.getSubtype()) {
                }
                return 0;
            }
        } catch (SecurityException unused) {
        }
        return i;
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public static long m6797(long j, long j2, long j3) {
        if (j3 >= j2 && j3 % j2 == 0) {
            return j / (j3 / j2);
        }
        if (j3 < j2 && j2 % j3 == 0) {
            return (j2 / j3) * j;
        }
        return (long) (j * (j2 / j3));
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public static String m6798(int i) {
        switch (i) {
            case 0:
                return "default";
            case 1:
                return "audio";
            case 2:
                return "video";
            case 3:
                return "text";
            case 4:
                return "metadata";
            case 5:
                return "camera motion";
            case 6:
                return "none";
            default:
                return i >= 10000 ? C2803.m4872("custom (", i, ")") : "?";
        }
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public static byte[] m6799(String str) {
        return str.getBytes(Charset.forName("UTF-8"));
    }

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public static ExecutorService m6800(final String str) {
        return Executors.newSingleThreadExecutor(new ThreadFactory() { // from class: ދ.ހ.֏.ؠ.ဢ.ށ
            @Override // java.util.concurrent.ThreadFactory
            public final Thread newThread(Runnable runnable) {
                return C4150.m6762(str, runnable);
            }
        });
    }

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public static boolean m6801(int i) {
        return i == 536870912 || i == 805306368 || i == 4;
    }

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public static boolean m6802(Context context) {
        UiModeManager uiModeManager = (UiModeManager) context.getApplicationContext().getSystemService("uimode");
        return uiModeManager != null && uiModeManager.getCurrentModeType() == 4;
    }

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public static String m6803(String str) {
        if (str == null) {
            return null;
        }
        String strReplace = str.replace('_', '-');
        if (!strReplace.isEmpty() && !"und".equals(strReplace)) {
            str = strReplace;
        }
        String strM6809 = m6809(str);
        int i = 0;
        String str2 = m6795(strM6809, "-")[0];
        if (f13267 == null) {
            String[] iSOLanguages = Locale.getISOLanguages();
            HashMap<String, String> map = new HashMap<>(iSOLanguages.length + f13268.length);
            for (String str3 : iSOLanguages) {
                try {
                    String iSO3Language = new Locale(str3).getISO3Language();
                    if (!TextUtils.isEmpty(iSO3Language)) {
                        map.put(iSO3Language, str3);
                    }
                } catch (MissingResourceException unused) {
                }
            }
            int i2 = 0;
            while (true) {
                String[] strArr = f13268;
                if (i2 >= strArr.length) {
                    break;
                }
                map.put(strArr[i2], strArr[i2 + 1]);
                i2 += 2;
            }
            f13267 = map;
        }
        String str4 = f13267.get(str2);
        if (str4 != null) {
            StringBuilder sbM4889 = C2803.m4889(str4);
            sbM4889.append(strM6809.substring(str2.length()));
            strM6809 = sbM4889.toString();
            str2 = str4;
        }
        if (!"no".equals(str2) && !"i".equals(str2) && !"zh".equals(str2)) {
            return strM6809;
        }
        while (true) {
            String[] strArr2 = f13269;
            if (i >= strArr2.length) {
                return strM6809;
            }
            if (strM6809.startsWith(strArr2[i])) {
                return f13269[i + 1] + strM6809.substring(f13269[i].length());
            }
            i += 2;
        }
    }

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public static boolean m6804(int i) {
        return i == 3 || i == 2 || i == 268435456 || i == 536870912 || i == 805306368 || i == 4;
    }

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public static long m6805(String str) throws ParserException {
        Matcher matcher = f13265.matcher(str);
        if (!matcher.matches()) {
            throw new ParserException(C2803.m4879("Invalid date/time format: ", str));
        }
        int i = 0;
        if (matcher.group(9) != null && !matcher.group(9).equalsIgnoreCase("Z")) {
            i = Integer.parseInt(matcher.group(13)) + (Integer.parseInt(matcher.group(12)) * 60);
            if ("-".equals(matcher.group(11))) {
                i *= -1;
            }
        }
        GregorianCalendar gregorianCalendar = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
        gregorianCalendar.clear();
        gregorianCalendar.set(Integer.parseInt(matcher.group(1)), Integer.parseInt(matcher.group(2)) - 1, Integer.parseInt(matcher.group(3)), Integer.parseInt(matcher.group(4)), Integer.parseInt(matcher.group(5)), Integer.parseInt(matcher.group(6)));
        if (!TextUtils.isEmpty(matcher.group(8))) {
            StringBuilder sbM4889 = C2803.m4889("0.");
            sbM4889.append(matcher.group(8));
            gregorianCalendar.set(14, new BigDecimal(sbM4889.toString()).movePointRight(3).intValue());
        }
        long timeInMillis = gregorianCalendar.getTimeInMillis();
        return i != 0 ? timeInMillis - ((long) (i * 60000)) : timeInMillis;
    }

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public static boolean m6806(int i) {
        return i == 10 || i == 13;
    }

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public static long m6807(int i) {
        return ((long) i) & 4294967295L;
    }

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public static String[] m6808(String str) {
        return TextUtils.isEmpty(str) ? new String[0] : m6781(str.trim(), "(\\s*,\\s*)");
    }

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public static String m6809(String str) {
        return str == null ? str : str.toLowerCase(Locale.US);
    }

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public static String m6810(String str) {
        return str == null ? str : str.toUpperCase(Locale.US);
    }
}
