导航菜单

页面标题

页面副标题

OLX India v19.42.007 - Utility.java 源代码

正在查看: OLX India v19.42.007 应用的 Utility.java JAVA 源代码文件

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


package com.jio.jioads.util;

import android.app.ActivityManager;
import android.app.UiModeManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Rect;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.CookieManager;
import androidx.browser.customtabs.CustomTabsIntent;
import com.google.common.net.HttpHeaders;
import com.jio.jioads.adinterfaces.JioAdError;
import com.jio.jioads.adinterfaces.JioAds;
import com.jio.jioads.adinterfaces.h0;
import com.jio.jioads.adinterfaces.q1;
import com.jio.jioads.adinterfaces.y1;
import com.jio.jioads.utils.Constants;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Base64;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.TimeZone;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
import java.util.zip.CRC32;
import java.util.zip.GZIPOutputStream;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.ArraysKt;
import kotlin.collections.MapsKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.math.MathKt;
import kotlin.text.Charsets;
import kotlin.text.Regex;
import kotlin.text.StringsKt;
import org.json.JSONArray;
import org.json.JSONObject;

@Metadata
@SourceDebugExtension
public final class Utility {
    public static final String DEFAULT_PARAMS_ENCODING = "UTF-8";
    public static Context a;
    public static String b;
    public static boolean c;
    public static boolean d;
    public static String g;
    public static final Utility INSTANCE = new Utility();
    public static final String[] e = {"JHSC200", "JHSD200", "JHSB200", "JHSB210", "JHSH200", "JHSJ100", "JTVN200", "JHZD200", "JHSL400", "JHSA400", "RMX3085", "JMSC200"};
    public static final String[] f = {"4KOTTSTB", "JESJ100", "UHD"};

    public static boolean a(Context context) {
        PackageManager packageManager = context.getPackageManager();
        if (packageManager != null) {
            try {
                packageManager.getPackageInfo("com.jio.web", 1);
                return true;
            } catch (Exception unused) {
            }
        }
        return false;
    }

    public static final void access$saveUserAgentIntoPref(Utility utility, Context context, String str) {
        utility.getClass();
        p.e(context, "common_prefs", 0, str, "userAgent");
    }

    @JvmStatic
    public static final int convertPixelsToDp(int i) {
        return MathKt.d(i / Resources.getSystem().getDisplayMetrics().density);
    }

    @JvmStatic
    public static final int convertTimeToSec(String str) {
        try {
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
            return (int) ((simpleDateFormat.parse(str).getTime() - simpleDateFormat.parse("00:00:00").getTime()) / 1000);
        } catch (Exception unused) {
            return 0;
        }
    }

    @JvmStatic
    public static final String convertToSHA1(String str) {
        StringBuilder sb = new StringBuilder();
        if (str != null) {
            try {
                for (byte b2 : MessageDigest.getInstance("SHA-1").digest(str.getBytes(StandardCharsets.UTF_8))) {
                    String hexString = Integer.toHexString(b2 & 255);
                    if (hexString.length() == 1) {
                        sb.append('0');
                    }
                    sb.append(hexString);
                }
                return sb.toString();
            } catch (Exception unused) {
            }
        }
        return null;
    }

    @JvmStatic
    public static final String convertToSHA2(String str) {
        StringBuilder sb = new StringBuilder();
        if (str != null) {
            try {
                for (byte b2 : MessageDigest.getInstance("SHA-256").digest(str.getBytes(StandardCharsets.UTF_8))) {
                    String hexString = Integer.toHexString(b2 & 255);
                    if (hexString.length() == 1) {
                        sb.append('0');
                    }
                    sb.append(hexString);
                }
                return sb.toString();
            } catch (Exception unused) {
            }
        }
        return null;
    }

    public static String encodeParameters$default(Utility utility, Map map, String str, int i, Object obj) {
        if ((i & 2) != 0) {
            str = DEFAULT_PARAMS_ENCODING;
        }
        return utility.encodeParameters(map, str);
    }

    public static String getCcbValue$default(Utility utility, String str, int i, Object obj) {
        if ((i & 1) != 0) {
            str = null;
        }
        return utility.getCcbValue(str);
    }

    public static com.jio.jioads.common.b getContextBasedMockIJioAdView$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease$default(Utility utility, Context context, String str, List list, int i, Object obj) {
        if ((i & 4) != 0) {
            list = null;
        }
        return utility.getContextBasedMockIJioAdView$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(context, str, list);
    }

    @JvmStatic
    public static final String getSimSerialNumber(Context context) {
        try {
            Utility utility = INSTANCE;
            if (utility.isPermissionGranted(context, "android.permission.READ_PHONE_STATE") && utility.getCurrentUIModeType(context) == 4 && Build.VERSION.SDK_INT < 26) {
                return Build.SERIAL;
            }
            return null;
        } catch (Exception unused) {
            return null;
        }
    }

    @JvmStatic
    public static final boolean ifOmSdkIsAvailable() {
        try {
            Class.forName("com.iab.omid.library.ril.Omid");
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.d("merc", "OM library is available");
            }
            return true;
        } catch (ClassNotFoundException unused) {
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.d("merc", "OM library is not added");
            }
            return false;
        }
    }

    @JvmStatic
    public static final boolean isNativeTargettingSupporting$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() {
        return true;
    }

    @JvmStatic
    public static final boolean isURLValid(String str) {
        try {
            new URL(str).toURI();
            return true;
        } catch (Exception unused) {
            return false;
        }
    }

    @JvmStatic
    public static final boolean removeCachedDirectory(File file) {
        if (file == null) {
            return false;
        }
        if (!file.exists()) {
            return true;
        }
        if (!file.isDirectory()) {
            return false;
        }
        String[] list = file.list();
        if (list != null) {
            for (String str : list) {
                File file2 = new File(file, str);
                if (file2.isDirectory()) {
                    if (!removeCachedDirectory(file2)) {
                        return false;
                    }
                } else if (!file2.delete()) {
                    return false;
                }
            }
        }
        return file.delete();
    }

    @kotlin.jvm.JvmStatic
    public static final java.lang.String replaceSSAIMacros(android.content.Context r23, java.lang.String r24, java.lang.String r25, java.lang.String r26, java.lang.String r27, java.lang.String r28, com.jio.jioads.adinterfaces.JioAdsMetadata r29, java.lang.String r30, com.jio.jioads.adinterfaces.JioAdView.AD_TYPE r31, java.lang.String r32, java.lang.Integer r33, boolean r34, java.lang.String r35, java.lang.String r36, com.jio.jioads.adinterfaces.JioAdView r37, boolean r38, java.lang.String r39, boolean r40, java.lang.String r41, java.lang.String r42, java.lang.String r43, java.lang.String r44) {
        throw new UnsupportedOperationException("Method not decompiled: com.jio.jioads.util.Utility.replaceSSAIMacros(android.content.Context, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.jio.jioads.adinterfaces.JioAdsMetadata, java.lang.String, com.jio.jioads.adinterfaces.JioAdView$AD_TYPE, java.lang.String, java.lang.Integer, boolean, java.lang.String, java.lang.String, com.jio.jioads.adinterfaces.JioAdView, boolean, java.lang.String, boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String):java.lang.String");
    }

    public final boolean canHandleIntent(Context context, Intent intent) {
        try {
            int i = Build.VERSION.SDK_INT;
            if (i >= 30) {
                String str = "Build version: " + i + " passing back true from canHandleIntent";
                if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                    Log.d("merc", str);
                }
            } else if (context.getPackageManager().queryIntentActivities(intent, 0).isEmpty()) {
                return false;
            }
            return true;
        } catch (Exception unused) {
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() == JioAds.LogLevel.NONE) {
                return false;
            }
            Log.i("merc", "No Application can handle this intent");
            return false;
        }
    }

    public final boolean checkVisibility(ViewGroup viewGroup, int i) {
        if (viewGroup.getParent() == null) {
            return false;
        }
        ViewGroup viewGroup2 = (ViewGroup) viewGroup.getParent();
        if (!a(viewGroup2, viewGroup, i) || !viewGroup.hasWindowFocus()) {
            return false;
        }
        int indexOfChild = viewGroup2.indexOfChild(viewGroup);
        Rect rect = new Rect(viewGroup.getLeft(), viewGroup.getTop(), viewGroup.getRight(), viewGroup.getBottom());
        int childCount = viewGroup2.getChildCount();
        boolean z = true;
        for (int i2 = 0; i2 < childCount; i2++) {
            View childAt = viewGroup2.getChildAt(i2);
            if (!StringsKt.B(childAt.getClass().getName(), viewGroup.getClass().getName(), true) && rect.intersect(new Rect(childAt.getLeft(), childAt.getTop(), childAt.getRight(), childAt.getBottom())) && childAt.getVisibility() == 0 && i2 > indexOfChild) {
                z = false;
            }
        }
        return z;
    }

    public final String compress(String str) {
        Base64.Encoder encoder;
        String encodeToString;
        if (str == null || str.length() == 0) {
            return str;
        }
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        try {
            GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(byteArrayOutputStream);
            gZIPOutputStream.write(str.getBytes(Charsets.b));
            gZIPOutputStream.close();
            if (Build.VERSION.SDK_INT < 26) {
                return android.util.Base64.encodeToString(byteArrayOutputStream.toByteArray(), 0);
            }
            encoder = Base64.getEncoder();
            encodeToString = encoder.encodeToString(byteArrayOutputStream.toByteArray());
            return encodeToString;
        } catch (IOException e2) {
            e2.printStackTrace();
            return "";
        }
    }

    public final int convertDpToPixel(float f2) {
        return f2 <= 0.0f ? (int) f2 : MathKt.d(TypedValue.applyDimension(1, f2, Resources.getSystem().getDisplayMetrics()));
    }

    public final JSONArray convertHashMapToJSONArray(HashMap<String, String> hashMap) {
        JSONArray jSONArray = new JSONArray();
        try {
            for (Map.Entry<String, String> entry : hashMap.entrySet()) {
                String key = entry.getKey();
                String value = entry.getValue();
                JSONObject jSONObject = new JSONObject();
                jSONObject.put(key, value);
                jSONArray.put(jSONObject);
            }
        } catch (Exception e2) {
            String a2 = q1.a(e2, new StringBuilder("Exception while converting hashMap to jsonarray: "), "message");
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.d("merc", a2);
            }
        }
        return jSONArray;
    }

    public final long convertMinToMillis(Long l) {
        return TimeUnit.MINUTES.toMillis(l.longValue());
    }

    public final String convertTimeFormat(String str) {
        try {
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm:ss.SSS", Locale.getDefault());
            SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
            Date parse = simpleDateFormat.parse(str);
            String format = parse != null ? simpleDateFormat2.format(parse) : null;
            return format == null ? "" : format;
        } catch (Exception unused) {
            return "";
        }
    }

    public final String convertTimestamp(String str, boolean z) {
        Locale locale = Locale.US;
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", locale);
        SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", locale);
        try {
            Date parse = simpleDateFormat.parse(str);
            Calendar calendar = Calendar.getInstance();
            calendar.setTime(parse);
            calendar.add(13, 0);
            return simpleDateFormat2.format(parse);
        } catch (Exception e2) {
            e2.printStackTrace();
            return "";
        }
    }

    public final int convertToSeconds(String str) {
        try {
            List H0 = StringsKt.H0(convertTimeFormat(str), new String[]{":"}, false, 0, 6, (Object) null);
            if (H0.size() != 3) {
                throw new IllegalArgumentException("Invalid time format. Use HH:mm:ss.SSS");
            }
            return (Integer.parseInt((String) H0.get(1)) * 60) + (Integer.parseInt((String) H0.get(0)) * 3600) + Integer.parseInt((String) H0.get(2));
        } catch (Exception e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    public final String encodeAdRequestParameters(Map<String, String> map, String str) {
        StringBuilder sb = new StringBuilder();
        try {
            for (Map.Entry<String, String> entry : map.entrySet()) {
                String key = entry.getKey();
                String value = entry.getValue();
                if (value.length() > 0) {
                    sb.append(URLEncoder.encode(key, str));
                    sb.append('=');
                    if ((map.containsKey("eads") && Intrinsics.d(key, "eads")) || ((map.containsKey("sbz") && Intrinsics.d(key, "sbz")) || (map.containsKey("iaf") && Intrinsics.d(key, "iaf")))) {
                        sb.append(value);
                    } else {
                        sb.append(URLEncoder.encode(value, str));
                    }
                    sb.append('&');
                }
            }
            sb.deleteCharAt(sb.length() - 1);
            return sb.toString();
        } catch (Exception unused) {
            return "Encoding not supported.";
        }
    }

    public final String encodeParameters(Map<String, String> map, String str) {
        StringBuilder sb = new StringBuilder();
        try {
            for (Map.Entry<String, String> entry : map.entrySet()) {
                String key = entry.getKey();
                String value = entry.getValue();
                if (!TextUtils.isEmpty(value)) {
                    sb.append(URLEncoder.encode(key, str));
                    sb.append('=');
                    sb.append(URLEncoder.encode(value, str));
                    sb.append('&');
                }
            }
            sb.deleteCharAt(sb.length() - 1);
            return sb.toString();
        } catch (Exception unused) {
            return "Encoding not supported.";
        }
    }

    public final String ensureMilliseconds(String str) {
        if (StringsKt.S(str, '.', false, 2, (Object) null)) {
            return str;
        }
        return str + ".000";
    }

    public final long generateTransactionId() {
        return ThreadLocalRandom.current().nextLong(10000000000L, 100000000000L);
    }

    public final String getAdvidFromPreferences(Context context) {
        if (context == null) {
            return null;
        }
        try {
            return (String) p.a(context, "common_prefs", 0, "", "advid");
        } catch (Exception unused) {
            return null;
        }
    }

    public final String getAndroidVersion() {
        return Build.VERSION.RELEASE;
    }

    public final String getBundleName(Context context) {
        return context.getPackageName();
    }

    public final String getCCBString$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() {
        String str = g;
        if (str != null) {
            return str;
        }
        return null;
    }

    public final String getCbValue(Context context, String str) {
        String str2;
        try {
            try {
                str2 = a();
            } catch (Exception unused) {
                return "";
            }
        } catch (Exception unused2) {
            Random random = new Random();
            String packageName = context.getPackageName();
            String str3 = random.nextLong() + "";
            str2 = packageName.substring(0, 2) + ':' + str3.substring(0, str3.length() / 2) + str.substring(0, 2);
        }
        return str2;
    }

    public final String getCcbStr() {
        return g;
    }

    public final String getCcbValue(String str) {
        try {
            try {
                Random random = new Random();
                byte[] bytes = (System.currentTimeMillis() + ':' + JioAds.Companion.getInstance().getAppPackage$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() + ':' + random.nextLong() + ':' + random.nextLong() + str).getBytes(Charsets.b);
                CRC32 crc32 = new CRC32();
                crc32.update(bytes, 0, bytes.length);
                return Long.toHexString(crc32.getValue());
            } catch (Exception unused) {
                return "";
            }
        } catch (Exception unused2) {
            String appPackage$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease = JioAds.Companion.getInstance().getAppPackage$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease();
            Random random2 = new Random();
            long nextLong = random2.nextLong();
            while (true) {
                long j = nextLong >>> 1;
                Unit unit = Unit.a;
                if ((8888 + j) - (j % 8889) >= 0) {
                    break;
                }
                nextLong = random2.nextLong();
            }
            StringBuilder sb = new StringBuilder();
            sb.append(appPackage$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease != null ? appPackage$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease.substring(0, 2) : null);
            sb.append(':');
            sb.append(10000L);
            sb.append(str != null ? str.substring(0, 2) : null);
            return sb.toString();
        }
    }

    public final Context getContext$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() {
        return a;
    }

    public final com.jio.jioads.common.b getContextBasedMockIJioAdView$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(Context context, String str, List<? extends Constants.DynamicDisplaySize> list) {
        return new s(context, str, list);
    }

    public final String getCountry() {
        return Locale.getDefault().getCountry();
    }

    public final long getCurrentTime() {
        return System.currentTimeMillis();
    }

    public final int getCurrentUIModeType(Context context) {
        int currentModeType = ((UiModeManager) context.getSystemService("uimode")).getCurrentModeType();
        if (currentModeType == 12 || currentModeType == 14) {
            return 1;
        }
        return currentModeType;
    }

    public final Map<String, String> getErrorMap(com.jio.jioads.cdnlogging.e eVar) {
        HashMap hashMap = new HashMap();
        try {
            if (!TextUtils.isEmpty(eVar.a)) {
                hashMap.put("title", eVar.a);
            }
            if (!TextUtils.isEmpty(eVar.g)) {
                hashMap.put("des", eVar.g);
            }
            if (!TextUtils.isEmpty(eVar.f)) {
                hashMap.put("adspot", eVar.f);
            }
            if (!TextUtils.isEmpty(eVar.i)) {
                hashMap.put("mth", eVar.i);
            }
            if (!TextUtils.isEmpty(eVar.b)) {
                hashMap.put("ts", eVar.b);
            }
            if (!TextUtils.isEmpty(eVar.c)) {
                hashMap.put("advid", eVar.c);
            }
            if (!TextUtils.isEmpty(eVar.d)) {
                hashMap.put("uid", eVar.d);
            }
            if (!TextUtils.isEmpty(eVar.e)) {
                hashMap.put("pt", eVar.e);
            }
            if (!TextUtils.isEmpty(eVar.j)) {
                hashMap.put("package", eVar.j);
            }
            if (!TextUtils.isEmpty(eVar.k)) {
                hashMap.put("code", eVar.k);
            }
            if (!TextUtils.isEmpty(eVar.l)) {
                hashMap.put("dvm", eVar.l);
            }
            if (!TextUtils.isEmpty(eVar.o)) {
                hashMap.put("dvb", eVar.o);
            }
            if (!TextUtils.isEmpty(eVar.m)) {
                hashMap.put("vr", eVar.m);
            }
            if (!TextUtils.isEmpty(eVar.n)) {
                hashMap.put("av", eVar.n);
            }
            if (!TextUtils.isEmpty("osv")) {
                hashMap.put("osv", Build.VERSION.RELEASE + "");
            }
            if (!TextUtils.isEmpty(eVar.p)) {
                hashMap.put("viewUrl", eVar.p);
            }
        } catch (Exception e2) {
            String a2 = q1.a(e2, new StringBuilder("Error while converting error data: "), "message");
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.e("merc", a2);
            }
        }
        return hashMap;
    }

    public final String getHTML() {
        return "<html lang=\"en\">\n           <head>\n               <title></title>\n               <meta name=\"viewport\" content=\"width=device-width,height=device-height,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no\">\n           </head>\n           <body><div class=\"ads-custom-DA\">\n               <div id=\"MAX_Element\" style=\"position: fixed; top: 0px; bottom: 0px; right: 0px; left: 0px;cursor: pointer;\"><script src=\"https://mercury.akamaized.net/delivery/js/aa292f2aa620cd815bef2503fda49342.v1.0.js\"></script><img id=\"port\" data-click = '[\"https://mercury-ck.jio.com/delivery/ck.php?oaparams=2__asi=11214__source=__cb=8dont8o459__dle=2__at=1__ob=1__cd=6__aud=-1__c=24982__rl=0__li=__bi=__mi=__ro=__ag=__tm=0__rr=0.0000__rt=1__rc=1__rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0__dt=1__osv=11__br=google__os=1__ifa=86fbb284-fe83-4840-a061-d7a985cbc670__av=1.0.3__mn=sdk_gphone_x86__vr=AN-2.0.2__a=3075__cn=India__pn=__ct=__st=__ma=1__cid=3075_11214_24982_98188_0_8dont8o459_[ccb]__b=98188__trq=[trq]__bz=[bz]__ccb=[ccb]__[cmd]__trackonly=1__oadest=\"]\n   ' data-deeplink = 'https://www.ajio.com' onClick=\"clik_tracker(this);return false;\"><img id=\"land\" data-click = '[\"https://mercury-ck.jio.com/delivery/ck.php?oaparams=2__asi=11214__source=__cb=8dont8o459__dle=2__at=1__ob=1__cd=6__aud=-1__c=24982__rl=0__li=__bi=__mi=__ro=__ag=__tm=0__rr=0.0000__rt=1__rc=1__rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0__dt=1__osv=11__br=google__os=1__ifa=86fbb284-fe83-4840-a061-d7a985cbc670__av=1.0.3__mn=sdk_gphone_x86__vr=AN-2.0.2__a=3075__cn=India__pn=__ct=__st=__ma=1__cid=3075_11214_24982_98188_0_8dont8o459_[ccb]__b=98188__trq=[trq]__bz=[bz]__ccb=[ccb]__[cmd]__trackonly=1__oadest=\"]\n   ' data-deeplink = 'https://www.ajio.com' onClick=\"clik_tracker(this);return false;\"><script type=\"text/javascript\">var paramsArray = {\"closeButton\":\"f\",\"dt\":\"1\",\"height\":\"1977\",\"width\":\"1080\"}\n   ;var v, d, t;var output = {\"l\":{\"url\":\"https://mercury.akamaized.net/i/5cbd003c6376ae5470dfb466127e1cd8_98188_0.jpg\",\"resolution\":\"320x50\",\"url_min\":\"\",\"url_max\":\"\",\"dt\":1},\"p\":{\"url\":\"https://mercury.akamaized.net/i/1fa5debc48b352e1e54aeefe6bd523b9_98188_0.jpg\",\"resolution\":\"320x480\",\"url_min\":\"\",\"url_max\":\"\",\"dt\":1}}; var tracker =[\"https://mercury.akamaized.net/cm/i.gif?asi=11214&source=&cb=8dont8o459&dle=2&at=1&ob=1&cd=6&aud=-1&c=24982&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&dt=1&osv=11&br=google&os=1&ifa=86fbb284-fe83-4840-a061-d7a985cbc670&av=1.0.3&mn=sdk_gphone_x86&vr=AN-2.0.2&a=3075&cn=India&pn=&ct=&st=&ma=1&cid=3075_11214_24982_98188_0_8dont8o459_[ccb]&b=98188&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]\"]\n   ; var viewableImpTracker = [\"https://mercury.akamaized.net/cm/vi.gif?asi=11214&source=&cb=8dont8o459&dle=2&at=1&ob=1&cd=6&aud=-1&c=24982&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&dt=1&osv=11&br=google&os=1&ifa=86fbb284-fe83-4840-a061-d7a985cbc670&av=1.0.3&mn=sdk_gphone_x86&vr=AN-2.0.2&a=3075&cn=India&pn=&ct=&st=&ma=1&cid=3075_11214_24982_98188_0_8dont8o459_[ccb]&b=98188&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]\"]\n   ; var flag =0;MAX_simplepop(output, paramsArray, v, d, t, flag);</script></div>\n               </div>\n           </body>\n       </html> ";
    }

    public final String getLanguage() {
        return Locale.getDefault().getLanguage();
    }

    public final String getManufacturer() {
        return Build.MANUFACTURER;
    }

    public final String getModel() {
        return Build.MODEL;
    }

    public final String getNetworkConnectionType(Context context) {
        Object systemService;
        if (context != null) {
            try {
                systemService = context.getSystemService("connectivity");
            } catch (Exception e2) {
                String printStacktrace = printStacktrace(e2);
                if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                    Log.e("merc", printStacktrace);
                }
            }
        } else {
            systemService = null;
        }
        ConnectivityManager connectivityManager = (ConnectivityManager) systemService;
        NetworkInfo activeNetworkInfo = connectivityManager != null ? connectivityManager.getActiveNetworkInfo() : null;
        if (activeNetworkInfo != null && activeNetworkInfo.isConnected()) {
            if (activeNetworkInfo.getType() == 1) {
                return "1";
            }
            if (activeNetworkInfo.getType() != 0) {
                if (activeNetworkInfo.getType() == 9) {
                    return "7";
                }
                return null;
            }
            int subtype = activeNetworkInfo.getSubtype();
            if (subtype == 20) {
                return "6";
            }
            switch (subtype) {
                case 1:
                case 2:
                case 4:
                case 7:
                case 11:
                    return "3";
                case 3:
                case 5:
                case 6:
                case 8:
                case 9:
                case 10:
                case 12:
                case 14:
                case 15:
                    return "4";
                case 13:
                    return "5";
                default:
                    return "2";
            }
        }
        return null;
    }

    public final HashMap<String, String> getPredefinedParams$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(Context context, boolean z) {
        HashMap<String, String> hashMap = new HashMap<>();
        if (context != null) {
            String networkConnectionType = getNetworkConnectionType(context);
            if (networkConnectionType != null) {
                hashMap.put("md_nt", networkConnectionType);
            }
            String simSerialNumber = getSimSerialNumber(context);
            if (simSerialNumber != null) {
                hashMap.put("md_srid", simSerialNumber);
            }
            if (z) {
                String networkConnectionType2 = getNetworkConnectionType(context);
                if (networkConnectionType2 != null) {
                    hashMap.put("ap", networkConnectionType2);
                }
                String simSerialNumber2 = getSimSerialNumber(context);
                if (simSerialNumber2 != null) {
                    hashMap.put("sn", simSerialNumber2);
                }
            }
        }
        if (z) {
            hashMap.put("tz", TimeZone.getDefault().getDisplayName());
        }
        hashMap.put("md_hr", String.valueOf(Calendar.getInstance().get(11)));
        hashMap.put("md_min", String.valueOf(Calendar.getInstance().get(12)));
        String encode = URLEncoder.encode(StringsKt.K(Build.MODEL, " ", "", false, 4, (Object) null), DEFAULT_PARAMS_ENCODING);
        if (encode != null && !TextUtils.isEmpty(encode)) {
            if (z) {
                hashMap.put("mn", encode);
            }
            hashMap.put("md_dvm", encode);
        }
        String str = Build.BRAND;
        if (str != null && !TextUtils.isEmpty(str)) {
            if (z) {
                hashMap.put("br", str);
            }
            hashMap.put("md_dvb", str);
        }
        if (z) {
            hashMap.put("os", "1");
            hashMap.put("osv", Build.VERSION.RELEASE + "");
        }
        hashMap.put("md_osv", Build.VERSION.RELEASE + "");
        return hashMap;
    }

    public final String[] getScreenHeightAndWidth(Context context) {
        Resources resources;
        Configuration configuration;
        String[] strArr = new String[2];
        DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics();
        int i = displayMetrics.widthPixels;
        int i2 = displayMetrics.heightPixels;
        String str = "actual device width : " + i;
        JioAds.Companion companion = JioAds.Companion;
        JioAds.LogLevel logLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease = companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease();
        JioAds.LogLevel logLevel = JioAds.LogLevel.NONE;
        if (logLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease != logLevel) {
            Log.i("merc", str);
        }
        String str2 = "actual device height: " + i2;
        if (companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != logLevel) {
            Log.i("merc", str2);
        }
        Integer valueOf = (context == null || (resources = context.getResources()) == null || (configuration = resources.getConfiguration()) == null) ? null : Integer.valueOf(configuration.orientation);
        if (valueOf != null && valueOf.intValue() == 2) {
            strArr[0] = i + "";
            strArr[1] = i2 + "";
        } else if (valueOf != null && valueOf.intValue() == 1) {
            strArr[0] = i2 + "";
            strArr[1] = i + "";
        } else {
            strArr[0] = i2 + "";
            strArr[1] = i + "";
        }
        return strArr;
    }

    public final String getSimOperator(Context context) {
        Object systemService;
        if (context != null) {
            try {
                systemService = context.getSystemService("phone");
            } catch (Exception unused) {
                return null;
            }
        } else {
            systemService = null;
        }
        return ((TelephonyManager) systemService).getSimOperator();
    }

    public final String getStaticDataForTestingVast() {
        return "<VAST version=\"3.0\">\n    <Ad id=\"138184\" sequence=\"1\">\n        <InLine>\n            <AdSystem>\n                <![CDATA[ JioAds ]]>\n            </AdSystem>\n            <AdTitle>\n                <![CDATA[ Reliance Foundation_30 secs ]]>\n            </AdTitle>\n            <Description>\n                <![CDATA[ Inline Video Ad ]]>\n            </Description>\n            <Error>\n                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&ec=[ERRORCODE]&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd] ]]>\n            </Error>\n            <Impression id=\"primaryAdServer\">\n                <![CDATA[ https://mercury.akamaized.net/cm/i.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&seq=[seq] ]]>\n            </Impression>\n            <ViewableImpression id=\"primaryAdServer\">\n                <Viewable>\n                    <![CDATA[ https://mercury.akamaized.net/cm/vi.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&seq=[seq] ]]>\n                </Viewable>\n            </ViewableImpression>\n            <Creatives>\n                <Creative sequence=\"1\" id=\"138184\">\n                    <Linear skipoffset=\"00:00:00\">\n                        <AdID>\n                            <![CDATA[ 138184 ]]>\n                        </AdID>\n                        <Duration>00:00:30</Duration>\n                        <TrackingEvents>\n                            <Tracking event=\"start\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=start ]]>\n                            </Tracking>\n                            <Tracking event=\"midpoint\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=midpoint ]]>\n                            </Tracking>\n                            <Tracking event=\"firstQuartile\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=firstquartile ]]>\n                            </Tracking>\n                            <Tracking event=\"thirdQuartile\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=thirdquartile ]]>\n                            </Tracking>\n                            <Tracking event=\"complete\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=complete ]]>\n                            </Tracking>\n                            <Tracking event=\"mute\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=mute ]]>\n                            </Tracking>\n                            <Tracking event=\"pause\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=pause ]]>\n                            </Tracking>\n                            <Tracking event=\"unmute\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=unmute ]]>\n                            </Tracking>\n                            <Tracking event=\"resume\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=resume ]]>\n                            </Tracking>\n                            <Tracking event=\"replay\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=replay ]]>\n                            </Tracking>\n                            <Tracking event=\"fullscreen\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=fullscreen ]]>\n                            </Tracking>\n                            <Tracking event=\"stop\">\n                                <![CDATA[ https://mercury.akamaized.net/cm/e.gif?asi=15048&source=&cb=ttv0tey0ag&dle=2&at=5&ob=5&cd=6&aud=-1&c=36313&rl=0&li=&bi=&mi=&ro=&ag=&tm=0&rr=0.0000&rt=1&rc=1&rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0&os=1&av=1.0.0&vr=AN-1.15.84&mn=motorolaedge30&br=motorola&osv=13&dt=1&a=3075&cn=India&pn=363641&ct=Morvi&st=Gujarat&cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]&b=138184&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&event=stop ]]>\n                            </Tracking>\n                        </TrackingEvents>\n                        <VideoClicks>\n                            <ClickTracking id=\"JioAds\">\n                                <![CDATA[ https://mercury-ck.jio.com/delivery/ck.php?oaparams=2__asi=15048__source=__cb=ttv0tey0ag__dle=2__at=5__ob=5__cd=6__aud=-1__c=36313__rl=0__li=__bi=__mi=__ro=__ag=__tm=0__rr=0.0000__rt=1__rc=1__rcs=da4b9237bacccdf19c0760cab7aec4a8359010b0__os=1__av=1.0.0__vr=AN-1.15.84__mn=motorolaedge30__br=motorola__osv=13__dt=1__a=3075__cn=India__pn=363641__ct=Morvi__st=Gujarat__cid=3075_15048_36313_138184_0_ttv0tey0ag_[ccb]__b=138184__trq=[trq]__bz=[bz]__ccb=[ccb]__[cmd] ]]>\n                            </ClickTracking>\n                        </VideoClicks>\n                        <MediaFiles>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"1920\" height=\"1080\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"14\">\n                                <![CDATA[ https://mercury.akamaized.net/v/92de67ea356c078ec5e0b26a7bd7c0b7_36313_0.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"176\" height=\"144\" type=\"video/3gpp\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"56\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209123604_mvpfid_1.3gp ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"320\" height=\"180\" type=\"video/3gpp\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"192\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209123613_mvpfid_2.3gp ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"480\" height=\"270\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"394\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209123623_mvpfid_3.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"640\" height=\"360\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"299\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209123642_mvpfid_4.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"640\" height=\"360\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"394\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209123657_mvpfid_5.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"640\" height=\"480\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"485\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209123715_mvpfid_6.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"720\" height=\"406\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"485\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209123736_mvpfid_7.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"854\" height=\"480\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"706\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209123757_mvpfid_8.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"960\" height=\"540\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"1222\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209123832_mvpfid_9.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"1024\" height=\"576\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"706\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209123909_mvpfid_10.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"1024\" height=\"576\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"1222\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209123939_mvpfid_11.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"1280\" height=\"720\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"706\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209124022_mvpfid_12.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"1280\" height=\"720\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"1222\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209124056_mvpfid_13.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"1280\" height=\"720\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"1958\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209124143_mvpfid_14.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"1920\" height=\"1080\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"2598\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209124240_mvpfid_15.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"progressive\" width=\"1920\" height=\"1080\" type=\"video/mp4\" scalable=\"true\" maintainAspectRatio=\"true\" bitrate=\"3981\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/20230209124347_mvpfid_16.mp4 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"streaming\" width=\"640\" height=\"360\" type=\"application/x-mpegURL\" scalable=\"true\" maintainAspectRatio=\"true\" minBitrate=\"120\" maxBitrate=\"120\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/mvpfid_17/20230209124521_mvpfid_17.m3u8 ]]>\n                            </MediaFile>\n                            <MediaFile id=\"RJAP\" delivery=\"streaming\" width=\"1920\" height=\"1080\" type=\"application/x-mpegURL\" scalable=\"true\" maintainAspectRatio=\"true\" minBitrate=\"120\" maxBitrate=\"120\">\n                                <![CDATA[ https://mercury.akamaized.net/v/138184/mvpfid_19/20230209124558_mvpfid_19.m3u8 ]]>\n                            </MediaFile>\n                        </MediaFiles>\n                        <AdParameters>\n                            <jtitle>\n                                <![CDATA[ Reliance Foundation ]]>\n                            </jtitle>\n                            <jdesc>\n                                <![CDATA[ reliancefoundation.org/ ]]>\n                            </jdesc>\n                            <jctatext>\n                                <![CDATA[ Know More ]]>\n                            </jctatext>\n                            <jicon>\n                                <![CDATA[ https://mercury.akamaized.net/i/eeab25fd4483cb428f6072738ed2e538_0_138184.jpg ]]>\n                            </jicon>\n                        </AdParameters>\n                    </Linear>\n                </Creative>\n            </Creatives>\n        </InLine>\n    </Ad>\n</VAST> ";
    }

    public final String[] getStbModels$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() {
        return e;
    }

    public final String getTime(long j) {
        long j2 = 60;
        long j3 = (j / 1000) % j2;
        long j4 = (j / 60000) % j2;
        long j5 = (j / 3600000) % 24;
        StringBuilder sb = new StringBuilder();
        if (j5 > 0) {
            sb.append(j5);
            sb.append(" Hours ");
        }
        if (j5 > 0 || j4 > 0) {
            sb.append(j4);
            sb.append(" Mins ");
        }
        sb.append(j3);
        sb.append(" Seconds");
        return sb.toString();
    }

    public final String getTimeStamp(Date date) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.getDefault());
        simpleDateFormat.format(date);
        return simpleDateFormat.format(date);
    }

    public final String getUidFromPreferences(Context context) {
        String str = null;
        if (context == null) {
            return null;
        }
        try {
            SharedPreferences d2 = p.d(context, "common_prefs");
            String string = d2.getString("dev_subscriberId_key", null);
            str = TextUtils.isEmpty(string) ? d2.getString("subscriberId_key", null) : string;
        } catch (Exception unused) {
        }
        String a2 = h0.a("getting uid from sharedPRef: ", str, "message");
        if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
            Log.d("merc", a2);
        }
        return str;
    }

    public final String getUserAgent(Context context) {
        r rVar;
        if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
            Log.d("merc", "inside getUserAgent");
        }
        try {
            if (b == null && context != null) {
                Object a2 = p.a(context, "common_prefs", 0, "", "userAgent");
                String str = a2 instanceof String ? (String) a2 : null;
                try {
                    JSONObject jSONObject = new JSONObject(str != null ? str : "");
                    rVar = new r(jSONObject.optString("user_agent"), jSONObject.optLong("saveTime"));
                } catch (Exception unused) {
                    rVar = null;
                }
                String str2 = rVar != null ? rVar.a : null;
                b = true ^ (str2 == null || str2.length() == 0) ? str2 : null;
                if (rVar != null && !rVar.a() && rVar.a.length() != 0) {
                    b = rVar.a;
                }
                y.d(new t(context));
            }
        } catch (Exception unused2) {
        }
        if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
            Log.d("merc", "returning useragent");
        }
        return b;
    }

    public final Map<String, String> getUserAgentHeader(Context context) {
        HashMap hashMap = new HashMap();
        try {
            hashMap.put(HttpHeaders.USER_AGENT, getUserAgent(context));
        } catch (Exception unused) {
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.d("merc", "Reqhead");
            }
        }
        return hashMap;
    }

    public final long getViewableTime(int i, boolean z) {
        if (i == 0 ? !z : i != 1) {
            return 1000L;
        }
        return Constants.VIEWABLE_TIME_VIDEO_AD;
    }

    public final boolean isAppForeground() {
        ActivityManager.RunningAppProcessInfo runningAppProcessInfo = new ActivityManager.RunningAppProcessInfo();
        ActivityManager.getMyMemoryState(runningAppProcessInfo);
        int i = runningAppProcessInfo.importance;
        return i == 100 || i == 200;
    }

    public final boolean isApplicationError(String str) {
        if (Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_MANDATORY_PARAM_MISSING.getErrorTitle()) || Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_MISMATCH_AD_TYPE.getErrorTitle())) {
            return true;
        }
        return Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_INVALID_AD_REQUEST_PARAMETERS.getErrorTitle());
    }

    public final boolean isConfigEnvUpdated() {
        return d;
    }

    public final boolean isConfigInit() {
        return c;
    }

    public final Object isCustomChromeTabAvailable(Context context, String str, int i) {
        boolean z;
        try {
            try {
                Class.forName("android.support.customtabs.CustomTabsIntent");
                if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                    Log.d("merc", "Custom chromeTab available: true");
                }
            } catch (Exception unused) {
                if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                    Log.d("merc", "Chrome Tab Available: true");
                }
            }
            z = true;
        } catch (Exception unused2) {
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.e("merc", "Chrome Tab Available: false");
            }
            z = false;
        }
        try {
            if (i != 1) {
                return new Intent("android.intent.action.VIEW");
            }
            if (getCurrentUIModeType(context) == 4) {
                if (!z || !a(context)) {
                    return new Intent("android.intent.action.VIEW");
                }
                if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                    Log.d("merc", "OpenInApp is enabled and jio pages is available so returning JioPages customTab intent");
                }
                CustomTabsIntent a2 = new CustomTabsIntent.e().n(true).a();
                a2.intent.setPackage("com.jio.web");
                a2.intent.putExtra("ENABLE_CURSOR", true);
                return a2;
            }
            if (z) {
                new Intent("android.support.customtabs.action.CustomTabsService").setPackage("com.android.chrome");
                if (!context.getPackageManager().queryIntentServices(r10, 0).isEmpty()) {
                    if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                        Log.d("merc", "OpenInApp is enabled and Chrome Custom Tab is available so returning Chrome customTab intent");
                    }
                    CustomTabsIntent a3 = new CustomTabsIntent.e().a();
                    a3.intent.setPackage("com.android.chrome");
                    a3.intent.setData(Uri.parse(str));
                    return canHandleIntent(context, a3.intent) ? a3 : new Intent("android.intent.action.VIEW");
                }
            }
            return new Intent("android.intent.action.VIEW");
        } catch (Exception e2) {
            String a4 = y1.a(this, e2, new StringBuilder("Exception in isCustomChromeTabAvailable "), "message");
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() == JioAds.LogLevel.NONE) {
                return null;
            }
            Log.e("merc", a4);
            return null;
        }
    }

    public final boolean isDeliveryError(String str) {
        if (Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_NETWORK_ERROR.getErrorTitle()) || Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_REQUEST_BLOCKED.getErrorTitle()) || Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_ADSPOT_NOT_LINKED.getErrorTitle()) || Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_AD_SPOT_DOES_NOT_EXIST.getErrorTitle()) || Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_DAILY_IMPRESSION_LIMIT_REACHED.getErrorTitle())) {
            return true;
        }
        return Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_NOFILL.getErrorTitle());
    }

    public final boolean isDeviceJioSTB() {
        return ArraysKt.O(e, Build.MODEL);
    }

    public final boolean isDeviceTypeTablet(Context context) {
        return (context.getResources().getConfiguration().screenLayout & 15) >= 3;
    }

    public final boolean isFireTvJCApp(Context context) {
        return Intrinsics.d("Amazon", Build.MANUFACTURER) && isPackage(context, "com.jio.media.stb.ondemand", 4);
    }

    public final boolean isIntentActivityPresent(Context context, String str) {
        Intent intent = new Intent("android.intent.action.VIEW");
        intent.setData(Uri.parse(str));
        return canHandleIntent(context, intent);
    }

    public final boolean isInternetAvailable(Context context) {
        NetworkInfo activeNetworkInfo;
        Network a2;
        NetworkCapabilities networkCapabilities;
        ConnectivityManager connectivityManager = (ConnectivityManager) (context != null ? context.getSystemService("connectivity") : null);
        if (Build.VERSION.SDK_INT < 23) {
            if (connectivityManager == null || (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) == null) {
                return false;
            }
            return activeNetworkInfo.isConnected();
        }
        if (connectivityManager == null || (a2 = androidx.work.impl.utils.l.a(connectivityManager)) == null || (networkCapabilities = connectivityManager.getNetworkCapabilities(a2)) == null) {
            return false;
        }
        return networkCapabilities.hasTransport(1) || networkCapabilities.hasTransport(0) || networkCapabilities.hasTransport(3) || networkCapabilities.hasTransport(2);
    }

    public final boolean isJioStbOttModel() {
        return ArraysKt.O(f, Build.PRODUCT);
    }

    public final boolean isPackage(Context context, String str, Integer num) {
        if (context == null) {
            return false;
        }
        try {
            PackageManager packageManager = context.getPackageManager();
            PackageInfo packageInfo = packageManager != null ? packageManager.getPackageInfo(context.getPackageName(), 0) : null;
            if (!Intrinsics.d(str, packageInfo != null ? packageInfo.packageName : null)) {
                return false;
            }
            if (num != null) {
                if (getCurrentUIModeType(context) != num.intValue()) {
                    return false;
                }
            }
            return true;
        } catch (Exception unused) {
            return false;
        }
    }

    public final boolean isPermissionGranted(Context context, String str) {
        try {
            return context.checkCallingOrSelfPermission(str) == 0;
        } catch (Exception unused) {
            String a2 = h0.a("Exception while checking for permission ", str, "message");
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.e("merc", a2);
            }
            return false;
        }
    }

    public final boolean isSDKError(String str) {
        if (Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_TIMEOUT.getErrorTitle()) || Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_AD_DOWNLOADING.getErrorTitle()) || Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_ADPOD_TIMEOUT.getErrorTitle()) || Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_IN_LOAD_AD.getErrorTitle()) || Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_PLAYER_PREPARATION_FAILED.getErrorTitle()) || Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_RENDITION_ERROR.getErrorTitle())) {
            return true;
        }
        return Intrinsics.d(str, JioAdError.JioAdErrorType.ERROR_PARSING.getErrorTitle());
    }

    public final boolean isSystemApp$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(Context context) {
        return (context.getPackageManager().getApplicationInfo(context.getPackageName(), 0).flags & 129) == 1;
    }

    public final boolean isWebViewEnabled() {
        try {
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.d("merc", "web view enabled");
            }
            CookieManager.getInstance();
            return true;
        } catch (Exception unused) {
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.e("merc", "web view disabled");
            }
            return false;
        }
    }

    public final String loadJSONFromAsset(Context context, String str) {
        try {
            InputStream open = context.getAssets().open(str);
            byte[] bArr = new byte[open.available()];
            open.read(bArr);
            open.close();
            return new String(bArr, Charsets.b);
        } catch (IOException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public final void logError(android.content.Context r14, java.lang.String r15, com.jio.jioads.cdnlogging.d r16, java.lang.String r17, java.lang.String r18, com.jio.jioads.cdnlogging.a r19, java.lang.String r20, java.lang.Boolean r21, java.lang.String r22, java.lang.String r23, boolean r24) {
        throw new UnsupportedOperationException("Method not decompiled: com.jio.jioads.util.Utility.logError(android.content.Context, java.lang.String, com.jio.jioads.cdnlogging.d, java.lang.String, java.lang.String, com.jio.jioads.cdnlogging.a, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, boolean):void");
    }

    public final Map<String, String> parseQueryString(String str) {
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        Iterator it = StringsKt.H0(str, new String[]{"&"}, false, 0, 6, (Object) null).iterator();
        while (it.hasNext()) {
            List H0 = StringsKt.H0((String) it.next(), new String[]{"="}, false, 0, 6, (Object) null);
            linkedHashMap.put((String) H0.get(0), (String) H0.get(1));
        }
        return linkedHashMap;
    }

    public final String printStacktrace(Exception exc) {
        StringWriter stringWriter = new StringWriter();
        exc.printStackTrace(new PrintWriter(stringWriter));
        return stringWriter.toString();
    }

    public final String readJsonFile(Context context) {
        try {
            InputStream open = context.getAssets().open("response.json");
            byte[] bArr = new byte[open.available()];
            open.read(bArr);
            open.close();
            return new String(bArr, Charsets.b);
        } catch (Exception e2) {
            e2.printStackTrace();
            return "";
        }
    }

    public final String replaceKey$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(String str, String str2, String str3, boolean z) {
        try {
            if (!TextUtils.isEmpty(str) && !TextUtils.isEmpty(str3)) {
                if (z && !TextUtils.isEmpty(str3)) {
                    str3 = URLEncoder.encode(str3, DEFAULT_PARAMS_ENCODING);
                }
                if (str != null) {
                    str = new Regex("\\[" + str2 + "?\\]").g(str, str3);
                } else {
                    str = null;
                }
                if (str != null) {
                    if (StringsKt.T(str, "%5B" + str2 + "%5D", false, 2, (Object) null)) {
                        if (str != null) {
                            str = new Regex("%5B" + str2 + "%5D").g(str, String.valueOf(str3));
                        } else {
                            str = null;
                        }
                    }
                }
            }
        } catch (Exception e2) {
            String a2 = y1.a(this, e2, new StringBuilder("Error while replacing string-->"), "message");
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.e("merc", a2);
            }
        }
        return String.valueOf(str);
    }

    public final java.lang.String replaceMacros(com.jio.jioads.util.n r29) {
        throw new UnsupportedOperationException("Method not decompiled: com.jio.jioads.util.Utility.replaceMacros(com.jio.jioads.util.n):java.lang.String");
    }

    public final java.lang.String replaceMacros$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(com.jio.jioads.common.b r34, java.lang.String r35, java.lang.String r36, java.lang.String r37, java.lang.String r38, java.lang.Integer r39, boolean r40, boolean r41, java.lang.String r42, boolean r43, java.lang.String r44, boolean r45, java.lang.String r46, java.lang.String r47, java.lang.String r48, java.lang.String r49, java.lang.String r50, java.lang.String r51) {
        throw new UnsupportedOperationException("Method not decompiled: com.jio.jioads.util.Utility.replaceMacros$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(com.jio.jioads.common.b, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Integer, boolean, boolean, java.lang.String, boolean, java.lang.String, boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String):java.lang.String");
    }

    public final String replaceVastMacros(com.jio.jioads.instreamads.vastparser.model.j jVar, String str) {
        com.jio.jioads.instreamads.vastparser.model.e eVar;
        List list;
        List list2;
        com.jio.jioads.instreamads.vastparser.model.q qVar;
        List list3;
        com.jio.jioads.instreamads.vastparser.model.c cVar;
        List list4;
        com.jio.jioads.instreamads.vastparser.model.c cVar2;
        com.jio.jioads.instreamads.vastparser.model.e eVar2;
        com.jio.jioads.instreamads.vastparser.model.e eVar3;
        String str2 = null;
        if (!TextUtils.isEmpty((jVar == null || (eVar3 = jVar.n) == null) ? null : eVar3.e)) {
            str = replaceKey$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(str, "ADSERVINGID", (jVar == null || (eVar2 = jVar.n) == null) ? null : eVar2.e, true);
        }
        if (jVar == null || (eVar = jVar.n) == null || (list = eVar.g) == null || !(!list.isEmpty())) {
            return str;
        }
        com.jio.jioads.instreamads.vastparser.model.e eVar4 = jVar.n;
        String str3 = (eVar4 == null || (list4 = eVar4.g) == null || (cVar2 = (com.jio.jioads.instreamads.vastparser.model.c) list4.get(0)) == null) ? null : cVar2.e;
        if (TextUtils.isEmpty(str3)) {
            com.jio.jioads.instreamads.vastparser.model.q qVar2 = jVar.m;
            if (qVar2 != null && (list2 = qVar2.i) != null && (!list2.isEmpty()) && (qVar = jVar.m) != null && (list3 = qVar.i) != null && (cVar = (com.jio.jioads.instreamads.vastparser.model.c) list3.get(0)) != null) {
                str2 = cVar.e;
            }
        } else {
            str2 = str3;
        }
        return !TextUtils.isEmpty(str2) ? replaceKey$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(str, "UNIVERSALADID", str2, true) : str;
    }

    public final void setCCBString$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(String str) {
        g = str;
    }

    public final void setCcbStr(String str) {
        g = str;
    }

    public final void setConfigEnvUpdated(boolean z) {
        d = z;
    }

    public final void setConfigInit(boolean z) {
        c = z;
    }

    public final void setContext$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(Context context) {
        a = context != null ? context.getApplicationContext() : null;
    }

    public final long toMillis(String str) {
        try {
            return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS+").parse(str).getTime();
        } catch (ParseException e2) {
            e2.printStackTrace();
            return 0L;
        }
    }

    public static String a() {
        Random random = new Random(System.currentTimeMillis());
        String[] strArr = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
        String str = "";
        for (int i = 0; i < 10; i++) {
            str = str + strArr[random.nextInt(36)];
        }
        System.out.println((Object) str);
        return str;
    }

    public static String a(String str, String str2, String str3) {
        String str4;
        try {
            str4 = new Regex("\\{" + str2 + "?\\}").g(new Regex("\\[" + str2 + "?\\]").g(str, str3), str3);
        } catch (Exception unused) {
            str4 = str;
        }
        try {
            if (StringsKt.T(str, "%5B" + str2 + "%5D", false, 2, (Object) null)) {
                str4 = new Regex("%5B" + str2 + "%5D").g(str4, str3);
            }
            if (!StringsKt.T(str, "%7B" + str2 + "%7D", false, 2, (Object) null)) {
                return str4;
            }
            return new Regex("%7B" + str2 + "%7D").g(str4, str3);
        } catch (Exception unused2) {
            StringBuilder sb = new StringBuilder("Error while replacing string--> ");
            sb.append(str);
            sb.append(' ');
            sb.append(str2);
            sb.append(' ');
            String a2 = com.jio.jioads.adinterfaces.t.a(sb, str3, "message");
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() == JioAds.LogLevel.NONE) {
                return str4;
            }
            Log.e("merc", a2);
            return str4;
        }
    }

    public final String a(String str, String str2) {
        if (TextUtils.isEmpty(str)) {
            return str;
        }
        try {
            if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
                return str;
            }
            String g2 = new Regex("__\\[cmd?\\]").g(str, "__" + str2);
            String g3 = new Regex("__\\{cmd?\\}").g(g2, "__" + str2);
            if (!StringsKt.T(g3, "__%5Bcmd%5D", false, 2, (Object) null)) {
                return g3;
            }
            return new Regex("__%5Bcmd%5D").g(g3, "__" + str2);
        } catch (Exception e2) {
            String a2 = y1.a(this, e2, new StringBuilder("Error while replacing string for click tracker-->"), "message");
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() == JioAds.LogLevel.NONE) {
                return str;
            }
            Log.e("merc", a2);
            return str;
        }
    }

    public static String a(HashMap hashMap, boolean z) {
        StringBuilder sb = new StringBuilder();
        for (Map.Entry entry : hashMap.entrySet()) {
            String str = (String) entry.getKey();
            String str2 = (String) entry.getValue();
            if (!TextUtils.isEmpty(str2)) {
                sb.append(URLEncoder.encode(str, DEFAULT_PARAMS_ENCODING));
                sb.append('=');
                sb.append(URLEncoder.encode(str2, DEFAULT_PARAMS_ENCODING));
                if (z) {
                    sb.append("__");
                } else {
                    sb.append('&');
                }
            }
        }
        sb.deleteCharAt(sb.length() - 1);
        if (z) {
            sb.deleteCharAt(sb.length() - 1);
        }
        return sb.toString();
    }

    public final List<com.jio.jioads.instreamads.vastparser.model.i> replaceVastMacros(com.jio.jioads.instreamads.vastparser.model.j jVar, List<com.jio.jioads.instreamads.vastparser.model.i> list) {
        ArrayList arrayList = new ArrayList();
        for (com.jio.jioads.instreamads.vastparser.model.i iVar : list) {
            if (!TextUtils.isEmpty(iVar.b)) {
                arrayList.add(new com.jio.jioads.instreamads.vastparser.model.i(iVar.a, replaceVastMacros(jVar, iVar.b)));
            } else {
                arrayList.add(iVar);
            }
        }
        return arrayList;
    }

    public final String a(String str, HashMap hashMap) {
        Map w = MapsKt.w(hashMap);
        try {
            if (!TextUtils.isEmpty(str) && StringsKt.T(str, "md_", false, 2, (Object) null) && (!w.isEmpty())) {
                for (String str2 : w.keySet()) {
                    if (StringsKt.T(str, String.valueOf(str2), false, 2, (Object) null)) {
                        str = replaceKey$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease(str, "md_" + str2, (String) w.get(str2), true);
                    }
                }
            }
        } catch (Exception e2) {
            String str3 = "Exception while replacing MetaData->" + e2;
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.e("merc", str3);
            }
        }
        return str;
    }

    public static boolean a(ViewGroup viewGroup, View view, int i) {
        if (view != null && view.getVisibility() == 0 && view.getParent() != null && viewGroup != null && viewGroup.getVisibility() == 0) {
            if (viewGroup.getGlobalVisibleRect(new Rect())) {
                long height = viewGroup.getHeight() * viewGroup.getWidth();
                long height2 = r6.height() * r6.width() * 100;
                long j = height2 / height;
                if (height > 0 && height2 >= i * height) {
                    return true;
                }
            }
        }
        return false;
    }
}