导航菜单

页面标题

页面副标题

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

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

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


package com.jio.jioads.jioreel.ssai;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.webkit.URLUtil;
import androidx.browser.customtabs.CustomTabsIntent;
import com.jio.jioads.adinterfaces.JioAds;
import com.jio.jioads.adinterfaces.h0;
import com.jio.jioads.util.Utility;
import com.jio.jioads.webviewhandler.InAppWebView;
import kotlin.jvm.internal.Intrinsics;

public final class b {
    public final Context a;
    public String b;
    public String c;
    public String d;
    public final String e;
    public final a f;
    public final String g;
    public final int h;

    public b(Context context, String str, String str2, String str3, String str4, a aVar, String str5, int i) {
        String str6;
        String str7;
        String str8;
        this.a = context;
        this.b = str;
        this.c = str2;
        this.d = str3;
        this.e = str4;
        this.f = aVar;
        this.g = str5;
        this.h = i;
        String str9 = null;
        if (str != null) {
            int length = str.length() - 1;
            int i2 = 0;
            boolean z = false;
            while (i2 <= length) {
                boolean z2 = Intrinsics.e(str.charAt(!z ? i2 : length), 32) <= 0;
                if (z) {
                    if (!z2) {
                        break;
                    } else {
                        length--;
                    }
                } else if (z2) {
                    i2++;
                } else {
                    z = true;
                }
            }
            str6 = str.subSequence(i2, length + 1).toString();
        } else {
            str6 = null;
        }
        this.b = str6;
        String str10 = this.c;
        if (str10 != null) {
            int length2 = str10.length() - 1;
            int i3 = 0;
            boolean z3 = false;
            while (i3 <= length2) {
                boolean z4 = Intrinsics.e(str10.charAt(!z3 ? i3 : length2), 32) <= 0;
                if (z3) {
                    if (!z4) {
                        break;
                    } else {
                        length2--;
                    }
                } else if (z4) {
                    i3++;
                } else {
                    z3 = true;
                }
            }
            str7 = str10.subSequence(i3, length2 + 1).toString();
        } else {
            str7 = null;
        }
        this.c = str7;
        String str11 = this.d;
        if (str11 != null) {
            int length3 = str11.length() - 1;
            int i4 = 0;
            boolean z5 = false;
            while (i4 <= length3) {
                boolean z6 = Intrinsics.e(str11.charAt(!z5 ? i4 : length3), 32) <= 0;
                if (z5) {
                    if (!z6) {
                        break;
                    } else {
                        length3--;
                    }
                } else if (z6) {
                    i4++;
                } else {
                    z5 = true;
                }
            }
            str8 = str11.subSequence(i4, length3 + 1).toString();
        } else {
            str8 = null;
        }
        this.d = str8;
        String str12 = this.e;
        if (str12 != null) {
            int length4 = str12.length() - 1;
            int i5 = 0;
            boolean z7 = false;
            while (i5 <= length4) {
                boolean z8 = Intrinsics.e(str12.charAt(!z7 ? i5 : length4), 32) <= 0;
                if (z7) {
                    if (!z8) {
                        break;
                    } else {
                        length4--;
                    }
                } else if (z8) {
                    i5++;
                } else {
                    z7 = true;
                }
            }
            str9 = str12.subSequence(i5, length4 + 1).toString();
        }
        this.e = str9;
        com.jio.jioads.util.l.a("brandUrl = " + this.b);
        com.jio.jioads.util.l.a("clickThroughUrl = " + this.c);
        com.jio.jioads.util.l.a("fallbackUrl = " + this.d);
        com.jio.jioads.util.l.a("isInApp = " + this.h);
    }

    public final void a() {
        String str;
        if (TextUtils.isEmpty(this.b) && TextUtils.isEmpty(this.c) && TextUtils.isEmpty(this.d) && TextUtils.isEmpty(this.e)) {
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.e("merc", "All click urls are empty so ignoring");
                return;
            }
            return;
        }
        if (!TextUtils.isEmpty(this.b)) {
            try {
                String str2 = this.b;
                String str3 = ": brandUrl: " + str2;
                if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                    Log.i("merc", str3);
                }
                Bundle bundle = new Bundle();
                bundle.putString("url", str2);
                r rVar = r.t;
                bundle.putString("ccb", rVar != null ? rVar.g(this.g) : null);
                try {
                    str = (String) com.jio.jioads.util.p.a(this.a, "common_prefs", 0, "", "advid");
                } catch (Exception unused) {
                    str = null;
                }
                bundle.putString("ifa", str);
                Utility utility = Utility.INSTANCE;
                bundle.putString("uid", utility.getUidFromPreferences(this.a));
                bundle.putString("Package_Name", this.a.getPackageName());
                bundle.putBoolean("isInterstitialVideo", false);
                bundle.putString("cid", "");
                Intent intent = new Intent(this.a, (Class<?>) InAppWebView.class);
                intent.putExtras(bundle);
                intent.setFlags(268435456);
                if (utility.canHandleIntent(this.a, intent)) {
                    this.a.startActivity(intent);
                    this.f.a();
                    return;
                } else {
                    this.b = null;
                    a();
                    return;
                }
            } catch (Exception e) {
                if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                    Log.e("merc", "Exception while opening brand url: ", e);
                }
                this.b = null;
                a();
                return;
            }
        }
        if (!TextUtils.isEmpty(this.c)) {
            try {
                String str4 = this.c;
                String str5 = ":Click Url: " + str4;
                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", str5);
                }
                boolean isIntentActivityPresent = Utility.INSTANCE.isIntentActivityPresent(this.a, str4);
                String str6 = ":isIntentAvailable= " + isIntentActivityPresent;
                if (companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != logLevel) {
                    Log.d("merc", str6);
                }
                int length = str4.length() - 1;
                int i = 0;
                boolean z = false;
                while (i <= length) {
                    boolean z2 = Intrinsics.e(str4.charAt(!z ? i : length), 32) <= 0;
                    if (z) {
                        if (!z2) {
                            break;
                        } else {
                            length--;
                        }
                    } else if (z2) {
                        i++;
                    } else {
                        z = true;
                    }
                }
                String scheme = Uri.parse(str4.subSequence(i, length + 1).toString()).getScheme();
                if (TextUtils.isEmpty(str4)) {
                    this.c = null;
                    a();
                    return;
                } else if (Intrinsics.d("intent", scheme)) {
                    b(str4);
                    return;
                } else if (isIntentActivityPresent) {
                    c(str4);
                    return;
                } else {
                    this.c = null;
                    a();
                    return;
                }
            } catch (Exception unused2) {
                if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                    Log.d("merc", "Error while opening click url so trying with other url");
                }
                this.c = null;
                a();
                return;
            }
        }
        if (TextUtils.isEmpty(this.d)) {
            if (TextUtils.isEmpty(this.e)) {
                if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                    Log.d("merc", ": No valid url available to perform click");
                    return;
                }
                return;
            }
            try {
                String str7 = this.e;
                String str8 = ":Fallback2 Url: " + str7;
                JioAds.Companion companion2 = JioAds.Companion;
                JioAds.LogLevel logLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease2 = companion2.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease();
                JioAds.LogLevel logLevel2 = JioAds.LogLevel.NONE;
                if (logLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease2 != logLevel2) {
                    Log.d("merc", str8);
                }
                boolean isIntentActivityPresent2 = Utility.INSTANCE.isIntentActivityPresent(this.a, str7);
                String str9 = ":isIntentAvailable= " + isIntentActivityPresent2;
                if (companion2.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != logLevel2) {
                    Log.d("merc", str9);
                }
                if (isIntentActivityPresent2 && !TextUtils.isEmpty(str7)) {
                    c(str7);
                    return;
                } else {
                    if (companion2.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != logLevel2) {
                        Log.d("merc", ": No valid url available to perform click");
                        return;
                    }
                    return;
                }
            } catch (Exception unused3) {
                if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                    Log.d("merc", "Error while opening fallbackUrl2 url so trying other available url");
                    return;
                }
                return;
            }
        }
        try {
            String str10 = this.d;
            String str11 = ":Fallback Url: " + str10;
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.d("merc", str11);
            }
            boolean isIntentActivityPresent3 = Utility.INSTANCE.isIntentActivityPresent(this.a, str10);
            int length2 = str10.length() - 1;
            int i2 = 0;
            boolean z3 = false;
            while (i2 <= length2) {
                boolean z4 = Intrinsics.e(str10.charAt(!z3 ? i2 : length2), 32) <= 0;
                if (z3) {
                    if (!z4) {
                        break;
                    } else {
                        length2--;
                    }
                } else if (z4) {
                    i2++;
                } else {
                    z3 = true;
                }
            }
            String scheme2 = Uri.parse(str10.subSequence(i2, length2 + 1).toString()).getScheme();
            if (TextUtils.isEmpty(str10)) {
                this.d = null;
                a();
            } else if (Intrinsics.d("intent", scheme2)) {
                b(str10);
            } else if (isIntentActivityPresent3) {
                c(str10);
            } else {
                this.d = null;
                a();
            }
        } catch (Exception unused4) {
            if (JioAds.Companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != JioAds.LogLevel.NONE) {
                Log.d("merc", "Error while opening fallback url so trying other available url");
            }
            this.d = null;
            a();
        }
    }

    public final void b(String str) {
        Intent parseUri = Intent.parseUri(str, 1);
        parseUri.setFlags(268435456);
        Utility utility = Utility.INSTANCE;
        boolean canHandleIntent = utility.canHandleIntent(this.a, parseUri);
        String str2 = ": Deeplink ifdeviceCanHandleIntent=" + canHandleIntent;
        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.d("merc", str2);
        }
        if (canHandleIntent) {
            this.a.startActivity(parseUri);
            this.f.a();
            return;
        }
        String stringExtra = parseUri.getStringExtra("browser_fallback_url");
        String a = h0.a(": checking if Deeplink fallbackUrl available: ", stringExtra, "message");
        if (companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != logLevel) {
            Log.d("merc", a);
        }
        if (stringExtra != null && stringExtra.length() != 0 && utility.isIntentActivityPresent(this.a, stringExtra)) {
            c(stringExtra);
        } else {
            this.c = null;
            a();
        }
    }

    public final void c(String str) {
        Object isCustomChromeTabAvailable = Utility.INSTANCE.isCustomChromeTabAvailable(this.a, str, this.h);
        boolean z = (isCustomChromeTabAvailable instanceof CustomTabsIntent) && (URLUtil.isHttpsUrl(str) || URLUtil.isHttpUrl(str));
        String str2 = ": isChrometab available: " + z + ". context= " + (this.a instanceof Activity);
        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", str2);
        }
        if (z && this.h == 1 && (this.a instanceof Activity)) {
            if (companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != logLevel) {
                Log.d("merc", "Opening in Custom tab");
            }
            CustomTabsIntent customTabsIntent = (CustomTabsIntent) isCustomChromeTabAvailable;
            if (customTabsIntent != null) {
                customTabsIntent.launchUrl(this.a, Uri.parse(str));
            }
            this.f.a();
            return;
        }
        String a = h0.a("opening click url in available app for: ", str, "message");
        if (companion.getInstance().getLogLevel$jio_ads_sdk_exo_2_18Location_21SsaiCommonVideoModuleCompanionNativeDynamicDisplayInstreamAudioInstreamVideoInterstitialMediationRetargetingCarouselRelease() != logLevel) {
            Log.d("merc", a);
        }
        Intent intent = isCustomChromeTabAvailable instanceof Intent ? (Intent) isCustomChromeTabAvailable : new Intent("android.intent.action.VIEW");
        intent.setData(Uri.parse(str));
        intent.setFlags(268435456);
        this.a.startActivity(intent);
        this.f.a();
    }
}