导航菜单

页面标题

页面副标题

Cantique de Louanges v12 - config.java 源代码

正在查看: Cantique de Louanges v12 应用的 config.java JAVA 源代码文件

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


package com.eugene.hymnesetlouanges;

import android.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Application;
import android.app.DownloadManager;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.ProgressDialog;
import android.content.ActivityNotFoundException;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.ColorStateList;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Shader;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.media.AudioAttributes;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
import android.text.Html;
import android.text.format.DateFormat;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.webkit.MimeTypeMap;
import android.webkit.URLUtil;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.HorizontalScrollView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.browser.customtabs.b;
import androidx.browser.customtabs.e;
import androidx.core.content.FileProvider;
import androidx.drawerlayout.widget.DrawerLayout;
import com.appnext.ads.fullscreen.RewardedVideo;
import com.appnext.ads.interstitial.Interstitial;
import com.appnext.core.AppnextAdCreativeType;
import com.appnext.core.callbacks.OnAdClosed;
import com.appnext.core.callbacks.OnAdError;
import com.appnext.core.callbacks.OnAdLoaded;
import com.appnext.core.callbacks.OnVideoEnded;
import com.appnext.nativeads.NativeAd;
import com.appnext.nativeads.NativeAdListener;
import com.eugene.hymnesetlouanges.config;
import com.eugene.hymnesetlouanges.t_chat;
import com.facebook.ads.Ad;
import com.facebook.ads.InterstitialAdListener;
import com.facebook.ads.RewardedVideoAd;
import com.facebook.ads.RewardedVideoAdListener;
import com.google.ads.mediation.facebook.FacebookMediationAdapter;
import com.google.android.gms.ads.AdError;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.FullScreenContentCallback;
import com.google.android.gms.ads.LoadAdError;
import com.google.android.gms.ads.interstitial.InterstitialAd;
import com.google.android.gms.ads.interstitial.InterstitialAdLoadCallback;
import com.google.android.gms.ads.rewarded.RewardedAdLoadCallback;
import com.google.android.gms.cast.Cast;
import com.google.android.gms.common.Scopes;
import com.google.android.gms.common.internal.ImagesContract;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.textfield.TextInputLayout;
import com.google.android.ump.ConsentForm;
import com.google.android.ump.FormError;
import com.google.android.ump.UserMessagingPlatform;
import com.inmobi.unification.sdk.model.Initialization.TimeoutConfigurations;
import com.ironsource.mediationsdk.ISBannerSize;
import com.ironsource.mediationsdk.IronSource;
import com.ironsource.mediationsdk.IronSourceBannerLayout;
import com.ironsource.mediationsdk.logger.IronSourceError;
import com.ironsource.mediationsdk.sdk.BannerListener;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.newinterstitial.out.MBNewInterstitialHandler;
import com.mbridge.msdk.newinterstitial.out.NewInterstitialListener;
import com.mbridge.msdk.out.MBridgeIds;
import com.mbridge.msdk.out.RewardInfo;
import com.startapp.sdk.ads.banner.Banner;
import com.startapp.sdk.ads.nativead.NativeAdDetails;
import com.startapp.sdk.adsbase.StartAppAd;
import com.startapp.sdk.adsbase.adlisteners.AdEventListener;
import com.unity3d.ads.IUnityAdsLoadListener;
import com.unity3d.ads.IUnityAdsShowListener;
import com.unity3d.ads.UnityAds;
import com.unity3d.ads.UnityAdsShowOptions;
import com.unity3d.services.banners.BannerErrorInfo;
import com.unity3d.services.banners.BannerView;
import com.unity3d.services.banners.UnityBannerSize;
import com.wortise.ads.banner.BannerAd;
import com.wortise.ads.interstitial.InterstitialAd;
import com.wortise.ads.rewarded.RewardedAd;
import com.wortise.ads.rewarded.models.Reward;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.text.Normalizer;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.TimeZone;

public class config extends Application implements SharedPreferences.OnSharedPreferenceChangeListener {
    static String A6;
    static String B6;
    static String C6;
    static String D6;
    static String E6;
    static String F6;
    static String G6;
    static String H6;
    static String I6;
    static String J6;
    static String K6;
    static String L6;
    static Boolean M6;
    static Boolean N6;
    static InterstitialAd O6;
    static Interstitial P6;
    static com.facebook.ads.InterstitialAd Q6;
    static StartAppAd R6;
    static com.wortise.ads.interstitial.InterstitialAd S6;
    static com.vungle.ads.z0 T6;
    static MBNewInterstitialHandler U6;
    static int V6;
    static int W6;
    static int X6;
    static int Y6;
    static boolean Z6;

    static boolean f10a7;

    static Typeface f11b7;

    static Typeface f12c7;

    static Typeface f14d7;

    public static final String f20j6;

    public static String f21k6;

    public static String f22l6;

    public static final String f23m6;

    static int f24n6;

    static boolean f25o6;

    static int f26p6;

    static Map f27q6;

    static ArrayList f28r6;

    static x0[] f29s6;

    static int f30t6;

    static String f31u6;

    static String f32v6;

    static boolean f33w6;

    static String f34x6;

    static String f35y6;

    static String f36z6;
    boolean A0;
    String A1;
    boolean A2;
    Context A4;
    boolean A5;
    boolean B0;
    String B1;
    boolean B2;
    View B4;
    boolean B5;
    boolean C0;
    String C1;
    int C2;
    int C4;
    boolean C5;
    boolean D0;
    String D1;
    int D2;
    int D4;
    String D5;
    boolean E0;
    String E1;
    int E2;
    int E4;
    String E5;
    boolean F0;
    String F1;
    int F2;
    int F4;
    int F5;
    boolean G0;
    String G1;
    int G2;
    int G4;
    boolean G5;
    String H1;
    boolean H5;
    String I1;
    boolean I5;
    String J1;
    int J3;
    String J4;
    boolean J5;
    String K1;
    int K3;
    boolean K5;
    String L1;
    int L3;
    String L4;
    int L5;
    String M1;
    String M2;
    int M3;
    String M4;
    String M5;
    String N1;
    int N2;
    int N3;
    String N4;
    boolean N5;
    String O1;
    int O2;
    AdSize O3;
    String O4;
    boolean O5;
    String P1;
    int P2;
    String P3;
    String P4;
    boolean P5;
    String Q;
    String Q1;
    int Q2;
    String Q3;
    String Q4;
    boolean Q5;
    boolean R;
    String R1;
    boolean R2;
    int R3;
    boolean R4;
    int R5;
    int S;
    String S1;
    boolean S2;
    int S3;
    IronSourceBannerLayout S4;
    int S5;
    int T;
    String T1;
    boolean T2;
    String T3;
    int T4;
    boolean T5;
    String U;
    boolean U0;
    String U1;
    String U2;
    String U3;
    int U4;
    int U5;
    boolean V;
    String V0;
    int V1;
    String V2;
    String V3;
    int V4;
    int V5;
    int W;
    String W0;
    boolean W1;
    String W2;
    String W3;
    int W4;
    boolean W5;
    int X;
    String X0;
    boolean X1;
    String X2;
    String X3;
    int X4;
    String X5;
    String Y;
    String Y0;
    boolean Y1;
    String Y2;
    String Y3;
    int Y4;
    String Y5;
    boolean Z;
    String Z0;
    com.eugene.hymnesetlouanges.m[] Z1;
    String Z2;
    String Z3;
    boolean Z4;
    String Z5;
    View a;
    int a0;
    String a1;
    com.eugene.hymnesetlouanges.j[] a2;
    String a3;
    String a4;

    boolean f37a5;
    int b0;
    String b1;
    int[] b2;
    String b3;
    String b4;

    boolean f39b5;

    ArrayList f40b6;
    String c0;
    boolean c1;
    int[] c2;
    String c3;
    String c4;

    boolean f41c5;

    ArrayList f42c6;
    boolean d;
    boolean d0;
    boolean d1;
    ListView d2;
    String d3;
    String d4;

    boolean f43d5;
    int e0;
    boolean e1;
    ArrayList e2;
    String e3;
    String e4;

    boolean f44e5;
    int f;
    int f0;
    boolean f1;
    q0 f2;
    String f3;
    String f4;

    boolean f45f5;
    int g;
    String g0;
    boolean g1;
    boolean g2;
    String g4;

    int f46g5;
    int h;
    boolean h0;
    boolean h1;
    boolean h2;
    int h3;
    String h4;

    boolean f47h5;
    int i;
    int i0;
    boolean i1;
    boolean i2;
    int i3;
    String i4;

    boolean f48i5;
    int j;
    int j0;
    String j1;
    boolean j2;
    String j3;
    String j4;

    boolean f49j5;
    int k;
    String k0;
    String k1;
    boolean k2;
    String k3;
    String k4;

    String f50k5;
    int l;
    boolean l0;
    String l1;
    boolean l2;
    int l3;
    String l4;

    String f51l5;
    int m;
    int m0;
    String m1;
    boolean m2;
    String m3;

    String f52m4;

    String f53m5;
    int n;
    int n0;
    String n1;
    boolean n2;
    int n3;

    String f54n4;

    String f55n5;
    int o;
    String o0;
    String o1;
    boolean o2;
    int o3;

    String f56o4;

    String f57o5;
    int p;
    boolean p0;
    String p1;
    boolean p2;
    String p3;

    String f58p4;

    String f59p5;
    int q;
    int q0;
    String q1;
    boolean q2;
    int q3;

    String f60q4;

    String f61q5;
    int r;
    int r0;
    String r1;
    int r2;
    int r3;

    String f62r4;

    boolean f63r5;
    int s;
    int s0;
    String s1;
    int s2;
    String s3;

    String f64s4;

    boolean f65s5;
    int t;
    String t0;
    String t1;
    int t2;
    String t3;

    String f66t4;

    String f67t5;
    boolean u0;
    String u1;
    int u2;
    String u3;

    String f68u4;

    String f69u5;
    int v0;
    String v1;
    String v2;
    String v3;

    String f70v4;

    String f71v5;
    int w;
    int w0;
    String w1;
    boolean w2;
    String w3;

    String f72w4;

    String f73w5;
    int x;
    String x0;
    String x1;
    boolean x2;
    String x3;

    String f74x4;

    int f75x5;
    int y;
    boolean y0;
    String y1;
    boolean y2;

    String f76y4;

    int f77y5;
    int z;
    boolean z0;
    String z1;
    boolean z2;

    String f78z4;

    int f79z5;

    public static final int f13d6 = Color.parseColor("#212121");

    public static final int f15e6 = Color.parseColor("#727272");

    public static final int f16f6 = Color.parseColor("#FFFFFF");

    public static final int f17g6 = Color.parseColor("#FAFAFA");

    public static final int f18h6 = Color.parseColor("#9E9E9E");

    public static final int f19i6 = Color.parseColor("#757575");
    int b = -1;
    int c = -1;
    boolean e = false;
    int u = -1;
    int v = -1;
    boolean A = true;
    boolean B = false;
    int C = 1;
    int D = 2;
    int E = 0;
    int F = 0;
    int G = 0;
    int H = 0;
    int I = 0;
    int J = 0;
    int K = 0;
    int L = 0;
    int M = 0;
    int N = 2;
    int O = 0;
    int P = 0;
    int H2 = 0;
    int I2 = 1;
    int J2 = 1;
    int K2 = 1;
    int L2 = 1;
    String g3 = "";
    String y3 = "";
    String z3 = "";
    String A3 = "";
    String B3 = "";
    String C3 = "";
    String D3 = "";
    String E3 = "";
    String F3 = "";
    String G3 = "";
    String H3 = "";
    String I3 = "";
    String H4 = "";
    String I4 = "";
    Boolean K4 = Boolean.FALSE;

    boolean f38a6 = false;

    class a implements View.OnClickListener {
        a() {
        }

        @Override
        public void onClick(View view) {
            try {
                config.this.X(((Activity) view.getContext()).findViewById(2131362584));
            } catch (Exception unused) {
            }
            ((Activity) view.getContext()).findViewById(2131362236).H(8388611);
        }
    }

    class a0 implements DialogInterface.OnShowListener {
        final AlertDialog a;
        final String b;

        a0(AlertDialog alertDialog, String str) {
            this.a = alertDialog;
            this.b = str;
        }

        @Override
        public void onShow(DialogInterface dialogInterface) {
            this.a.getButton(-1).setTextColor(Color.parseColor("#" + this.b));
        }
    }

    class b implements AdapterView.OnItemClickListener {
        b() {
        }

        @Override
        public void onItemClick(AdapterView adapterView, View view, int i, long j) {
            if (view.getTag(2131361809) != null) {
                Context context = view.getContext();
                config configVar = config.this;
                String str = configVar.w1;
                new t0(context, str, config.h(configVar.l1, str)).execute(new String[0]);
                return;
            }
            config configVar2 = config.this;
            if (configVar2.y > 0) {
                i--;
            }
            view.setId(configVar2.b2[i]);
            view.setTag(2131361812, Integer.valueOf(config.this.b2[i]));
            ((com.eugene.hymnesetlouanges.a) view.getContext()).onClick(view);
        }
    }

    class b0 implements DialogInterface.OnClickListener {
        final SharedPreferences a;
        final long b;
        final Context c;

        b0(SharedPreferences sharedPreferences, long j, Context context) {
            this.a = sharedPreferences;
            this.b = j;
            this.c = context;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            String str;
            String str2;
            SharedPreferences.Editor edit = this.a.edit();
            edit.putBoolean("sinads_intentado", true);
            edit.putInt("sinads_comprobacionespago", 0);
            edit.apply();
            String str3 = config.this.g3;
            try {
                str3 = URLEncoder.encode(str3, "utf-8");
            } catch (Exception unused) {
            }
            try {
                str = URLEncoder.encode("https://pay." + config.f22l6 + "/srv/pay_item_sinads.php", "utf-8");
            } catch (Exception unused2) {
                str = "";
            }
            try {
                str2 = URLEncoder.encode(config.this.getString(2131886721), "utf-8");
            } catch (Exception unused3) {
                str2 = "NoAds";
            }
            String str4 = ((("https://www.paypal.com/cgi-bin/webscr/?rm=2&cmd=_xclick&business=" + str3 + "&amount=" + config.this.j3 + "&no_shipping=0&no_note=1&currency_code=" + config.this.e3 + "&bn=PP-BuyNowBF") + "&custom=" + this.b + "," + config.e1(10)) + "&item_name=" + str2) + "&notify_url=" + str;
            String str5 = "https://closethis";
            try {
                str5 = URLEncoder.encode("https://closethis", "utf-8");
            } catch (Exception unused4) {
            }
            String str6 = str4 + "&return=" + str5 + "&cancel_return=" + str5;
            Intent intent = new Intent((Activity) this.c, (Class<?>) t_url.class);
            intent.putExtra(ImagesContract.URL, str6);
            intent.putExtra("loader", false);
            intent.putExtra("linksexternos", false);
            intent.putExtra("adaptar_ancho", false);
            ((Activity) this.c).startActivityForResult(intent, FacebookMediationAdapter.ERROR_ADVIEW_CONSTRUCTOR_EXCEPTION);
        }
    }

    class c implements DrawerLayout.d {
        c() {
        }

        public void a(View view) {
            config.this.X(view);
        }

        public void b(View view) {
            try {
                if (config.this.f38a6) {
                    Activity activity = (Activity) view.getContext();
                    if (config.this.J3 == 1) {
                        View findViewWithTag = activity.findViewById(2131362685).findViewWithTag(2131361807);
                        if (findViewWithTag != null && findViewWithTag.getVisibility() == 4) {
                            findViewWithTag.setVisibility(0);
                        }
                    } else {
                        LinearLayout linearLayout = (LinearLayout) activity.findViewById(2131362610);
                        if (linearLayout != null && linearLayout.getChildCount() > 0 && linearLayout.getVisibility() == 4) {
                            linearLayout.setVisibility(0);
                        }
                    }
                }
            } catch (Exception unused) {
            }
        }

        public void c(int i) {
        }

        public void d(View view, float f) {
        }
    }

    class c0 implements DialogInterface.OnShowListener {
        final AlertDialog a;
        final String b;

        c0(AlertDialog alertDialog, String str) {
            this.a = alertDialog;
            this.b = str;
        }

        @Override
        public void onShow(DialogInterface dialogInterface) {
            this.a.getButton(-1).setTextColor(Color.parseColor("#" + this.b));
            this.a.getButton(-2).setTextColor(Color.parseColor("#" + this.b));
        }
    }

    class d extends InterstitialAdLoadCallback {

        class a extends FullScreenContentCallback {
            a() {
            }

            @Override
            public void onAdDismissedFullScreenContent() {
            }

            @Override
            public void onAdFailedToShowFullScreenContent(AdError adError) {
            }

            @Override
            public void onAdShowedFullScreenContent() {
                config.O6 = null;
            }
        }

        d() {
        }

        @Override
        public void onAdLoaded(InterstitialAd interstitialAd) {
            config.O6 = interstitialAd;
            interstitialAd.setFullScreenContentCallback(new a());
        }

        @Override
        public void onAdFailedToLoad(LoadAdError loadAdError) {
            config.O6 = null;
            if (config.f35y6.equals("")) {
                config.V6 = 0;
                config.W6 = 0;
            }
        }
    }

    class d0 implements DialogInterface.OnClickListener {
        final long a;
        final int b;
        final SharedPreferences c;
        final Context d;

        d0(long j, int i, SharedPreferences sharedPreferences, Context context) {
            this.a = j;
            this.b = i;
            this.c = sharedPreferences;
            this.d = context;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            String str;
            boolean z;
            String str2;
            config configVar = config.this;
            if (configVar.i3 == 1) {
                try {
                    configVar.getApplicationContext().getPackageManager().getPackageInfo("app.phantom", 0);
                    z = true;
                } catch (PackageManager.NameNotFoundException unused) {
                    z = false;
                }
                if (!z) {
                    this.d.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=app.phantom")));
                    return;
                }
                try {
                    str2 = URLEncoder.encode("https://pay." + config.f22l6 + "/srv/solana_transaction.php?idusu=" + this.a + "&idsec=" + this.b, "utf-8");
                } catch (UnsupportedEncodingException e) {
                    e.printStackTrace();
                    str2 = null;
                }
                if (str2 != null) {
                    SharedPreferences.Editor edit = this.c.edit();
                    edit.putBoolean("secc" + this.b + "_intentado", true);
                    edit.putInt("secc" + this.b + "_comprobacionespago", 0);
                    edit.apply();
                    this.d.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("solana:" + str2)));
                    return;
                }
                return;
            }
            SharedPreferences.Editor edit2 = this.c.edit();
            edit2.putBoolean("secc" + this.b + "_intentado", true);
            edit2.putInt("secc" + this.b + "_comprobacionespago", 0);
            edit2.apply();
            String str3 = config.this.g3;
            try {
                str3 = URLEncoder.encode(str3, "utf-8");
            } catch (Exception unused2) {
            }
            try {
                str = URLEncoder.encode("https://pay." + config.f22l6 + "/srv/pay_item.php", "utf-8");
            } catch (Exception unused3) {
                str = "";
            }
            String str4 = ((("https://www.paypal.com/cgi-bin/webscr/?rm=2&cmd=_xclick&business=" + str3 + "&amount=" + config.this.d3 + "&no_shipping=0&no_note=1&currency_code=" + config.this.e3 + "&bn=PP-BuyNowBF") + "&custom=" + this.a + "," + this.b + "," + config.e1(10)) + "&item_name=" + config.this.getString(2131886290)) + "&notify_url=" + str;
            String str5 = "https://closethis";
            try {
                str5 = URLEncoder.encode("https://closethis", "utf-8");
            } catch (Exception unused4) {
            }
            String str6 = str4 + "&return=" + str5 + "&cancel_return=" + str5;
            Intent intent = new Intent((Activity) this.d, (Class<?>) t_url.class);
            intent.putExtra(ImagesContract.URL, str6);
            intent.putExtra("loader", false);
            intent.putExtra("linksexternos", false);
            intent.putExtra("adaptar_ancho", false);
            ((Activity) this.d).startActivityForResult(intent, 0);
        }
    }

    class e implements InterstitialAdListener {
        e() {
        }

        @Override
        public void onAdClicked(Ad ad) {
        }

        @Override
        public void onAdLoaded(Ad ad) {
        }

        @Override
        public void onError(Ad ad, com.facebook.ads.AdError adError) {
            config.V6 = 0;
            config.W6 = 0;
        }

        @Override
        public void onInterstitialDismissed(Ad ad) {
        }

        @Override
        public void onInterstitialDisplayed(Ad ad) {
        }

        @Override
        public void onLoggingImpression(Ad ad) {
        }
    }

    class e0 implements DialogInterface.OnShowListener {
        final AlertDialog a;
        final String b;

        e0(AlertDialog alertDialog, String str) {
            this.a = alertDialog;
            this.b = str;
        }

        @Override
        public void onShow(DialogInterface dialogInterface) {
            this.a.getButton(-1).setTextColor(Color.parseColor("#" + this.b));
            this.a.getButton(-2).setTextColor(Color.parseColor("#" + this.b));
        }
    }

    class f implements AdEventListener {
        f() {
        }

        public void onFailedToReceiveAd(com.startapp.sdk.adsbase.Ad ad) {
            config.V6 = 0;
            config.W6 = 0;
        }

        public void onReceiveAd(com.startapp.sdk.adsbase.Ad ad) {
        }
    }

    class f0 implements DialogInterface.OnClickListener {
        final ProgressDialog a;
        final Integer b;
        final RewardedVideo c;
        final Context d;
        final RewardedAdLoadCallback e;
        final RewardedVideoAd f;
        final StartAppAd g;
        final View h;
        final View i;

        class a implements DialogInterface.OnShowListener {
            a() {
            }

            @Override
            public void onShow(DialogInterface dialogInterface) {
                config.b1((ProgressBar) f0.this.a.findViewById(R.id.progress), config.this.w1);
            }
        }

        class b implements IUnityAdsShowListener {
            b() {
            }

            public void onUnityAdsShowClick(String str) {
            }

            public void onUnityAdsShowComplete(String str, UnityAds.UnityAdsShowCompletionState unityAdsShowCompletionState) {
                if (unityAdsShowCompletionState.equals(UnityAds.UnityAdsShowCompletionState.COMPLETED)) {
                    config.i1(f0.this.d);
                    f0 f0Var = f0.this;
                    ((com.eugene.hymnesetlouanges.a) f0Var.d).abrir_secc(f0Var.h);
                }
            }

            public void onUnityAdsShowFailure(String str, UnityAds.UnityAdsShowError unityAdsShowError, String str2) {
                try {
                    f0.this.a.hide();
                } catch (Exception unused) {
                }
                f0 f0Var = f0.this;
                ((com.eugene.hymnesetlouanges.a) f0Var.d).abrir_secc(f0Var.h);
            }

            public void onUnityAdsShowStart(String str) {
                try {
                    f0.this.a.hide();
                } catch (Exception unused) {
                }
            }
        }

        class c implements IUnityAdsLoadListener {
            final IUnityAdsShowListener a;

            c(IUnityAdsShowListener iUnityAdsShowListener) {
                this.a = iUnityAdsShowListener;
            }

            public void onUnityAdsAdLoaded(String str) {
                f0 f0Var = f0.this;
                UnityAds.show((Activity) f0Var.d, config.this.f70v4, new UnityAdsShowOptions(), this.a);
            }

            public void onUnityAdsFailedToLoad(String str, UnityAds.UnityAdsLoadError unityAdsLoadError, String str2) {
                try {
                    f0.this.a.hide();
                } catch (Exception unused) {
                }
                f0 f0Var = f0.this;
                ((com.eugene.hymnesetlouanges.a) f0Var.d).abrir_secc(f0Var.h);
            }
        }

        class d implements RewardedAd.Listener {
            d() {
            }

            public void onRewardedClicked(RewardedAd rewardedAd) {
            }

            public void onRewardedCompleted(RewardedAd rewardedAd, Reward reward) {
                config.i1(f0.this.d);
                f0 f0Var = f0.this;
                ((com.eugene.hymnesetlouanges.a) f0Var.d).abrir_secc(f0Var.h);
            }

            public void onRewardedDismissed(RewardedAd rewardedAd) {
            }

            public void onRewardedFailedToLoad(RewardedAd rewardedAd, com.wortise.ads.AdError adError) {
                Log.e("wortise", "RewardedFailedToLoad:" + adError.toString());
                try {
                    f0.this.a.hide();
                } catch (Exception unused) {
                }
                f0 f0Var = f0.this;
                ((com.eugene.hymnesetlouanges.a) f0Var.d).abrir_secc(f0Var.h);
            }

            public void onRewardedFailedToShow(RewardedAd rewardedAd, com.wortise.ads.AdError adError) {
                Log.e("wortise", "RewardedFailedToShow:" + adError.toString());
                try {
                    f0.this.a.hide();
                } catch (Exception unused) {
                }
                f0 f0Var = f0.this;
                ((com.eugene.hymnesetlouanges.a) f0Var.d).abrir_secc(f0Var.h);
            }

            public void onRewardedImpression(RewardedAd rewardedAd) {
            }

            public void onRewardedLoaded(RewardedAd rewardedAd) {
                try {
                    f0.this.a.hide();
                } catch (Exception unused) {
                }
                rewardedAd.showAd();
            }

            public void onRewardedShown(RewardedAd rewardedAd) {
                try {
                    f0.this.a.hide();
                } catch (Exception unused) {
                }
            }
        }

        f0(ProgressDialog progressDialog, Integer num, RewardedVideo rewardedVideo, Context context, RewardedAdLoadCallback rewardedAdLoadCallback, RewardedVideoAd rewardedVideoAd, StartAppAd startAppAd, View view, View view2) {
            this.a = progressDialog;
            this.b = num;
            this.c = rewardedVideo;
            this.d = context;
            this.e = rewardedAdLoadCallback;
            this.f = rewardedVideoAd;
            this.g = startAppAd;
            this.h = view;
            this.i = view2;
        }

        public void a() {
            this.a.setMessage(config.this.getString(2131886228));
            this.a.setIndeterminate(true);
            this.a.setCancelable(false);
            if (!config.this.w1.equals("")) {
                this.a.setOnShowListener(new a());
            }
            this.a.show();
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            if (this.b.intValue() == 2) {
                a();
                this.c.setMute(false);
                this.c.setOnAdLoadedCallback(this.d);
                this.c.setOnAdClosedCallback(this.d);
                this.c.setOnAdErrorCallback(this.d);
                this.c.setOnVideoEndedCallback(this.d);
                this.c.loadAd();
                return;
            }
            if (this.b.intValue() == 1) {
                a();
                com.google.android.gms.ads.rewarded.RewardedAd.load(this.d, config.this.f58p4, new AdRequest.Builder().build(), this.e);
                return;
            }
            if (this.b.intValue() == 3) {
                a();
                RewardedVideoAd rewardedVideoAd = this.f;
                rewardedVideoAd.loadAd(rewardedVideoAd.buildLoadAdConfig().withAdListener((RewardedVideoAdListener) this.d).build());
                return;
            }
            if (this.b.intValue() == 4) {
                a();
                this.g.setVideoListener(this.d);
                this.g.loadAd(StartAppAd.AdMode.REWARDED_VIDEO, this.d);
                return;
            }
            if (this.b.intValue() == 6) {
                return;
            }
            if (this.b.intValue() == 7) {
                a();
                UnityAds.load(config.this.f70v4, new c(new b()));
            } else {
                if (this.b.intValue() == 8) {
                    config configVar = config.this;
                    configVar.A4 = this.d;
                    configVar.B4 = this.i;
                    IronSource.showRewardedVideo();
                    return;
                }
                if (this.b.intValue() == 9) {
                    a();
                    RewardedAd rewardedAd = new RewardedAd(this.d, config.this.f74x4);
                    rewardedAd.setListener(new d());
                    rewardedAd.loadAd();
                }
            }
        }
    }

    class g implements InterstitialAd.Listener {
        g() {
        }

        public void onInterstitialClicked(com.wortise.ads.interstitial.InterstitialAd interstitialAd) {
        }

        public void onInterstitialDismissed(com.wortise.ads.interstitial.InterstitialAd interstitialAd) {
        }

        public void onInterstitialFailedToLoad(com.wortise.ads.interstitial.InterstitialAd interstitialAd, com.wortise.ads.AdError adError) {
            Log.e("wortise", "wortise interstitial failed:" + adError.toString());
            com.wortise.ads.interstitial.InterstitialAd interstitialAd2 = config.S6;
            if (interstitialAd2 != null) {
                interstitialAd2.destroy();
            }
            config.S6 = null;
            if (config.f35y6.equals("")) {
                config.V6 = 0;
                config.W6 = 0;
            }
        }

        public void onInterstitialFailedToShow(com.wortise.ads.interstitial.InterstitialAd interstitialAd, com.wortise.ads.AdError adError) {
        }

        public void onInterstitialImpression(com.wortise.ads.interstitial.InterstitialAd interstitialAd) {
        }

        public void onInterstitialLoaded(com.wortise.ads.interstitial.InterstitialAd interstitialAd) {
            config.S6 = interstitialAd;
        }

        public void onInterstitialShown(com.wortise.ads.interstitial.InterstitialAd interstitialAd) {
        }
    }

    class g0 implements BannerView.IListener {
        final com.eugene.hymnesetlouanges.c a;

        g0(com.eugene.hymnesetlouanges.c cVar) {
            this.a = cVar;
        }

        public void onBannerClick(BannerView bannerView) {
        }

        public void onBannerFailedToLoad(BannerView bannerView, BannerErrorInfo bannerErrorInfo) {
        }

        public void onBannerLeftApplication(BannerView bannerView) {
        }

        public void onBannerLoaded(BannerView bannerView) {
            LinearLayout linearLayout;
            config configVar = config.this;
            if (configVar.J3 == 1) {
                View findViewWithTag = configVar.a.findViewWithTag(2131361807);
                if (findViewWithTag != null) {
                    ((LinearLayout) config.this.a).removeView(findViewWithTag);
                }
            } else {
                ((LinearLayout) configVar.a.getRootView().findViewById(2131362610)).removeAllViews();
            }
            this.a.d = bannerView;
            config configVar2 = config.this;
            if (configVar2.J3 == 1) {
                bannerView.setTag(2131361807);
                this.a.d.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));
                ((LinearLayout) config.this.a).addView(this.a.d);
            } else {
                try {
                    linearLayout = (LinearLayout) configVar2.a.getRootView().findViewById(2131362610);
                } catch (Exception unused) {
                    linearLayout = null;
                }
                if (linearLayout != null) {
                    linearLayout.addView(this.a.d);
                    linearLayout.findViewById(2131362610).setVisibility(0);
                }
            }
            config.this.f38a6 = true;
        }

        public void onBannerShown(BannerView bannerView) {
        }
    }

    class h implements com.vungle.ads.b1 {
        h() {
        }

        public void onAdClicked(com.vungle.ads.g0 g0Var) {
        }

        public void onAdEnd(com.vungle.ads.g0 g0Var) {
        }

        public void onAdFailedToLoad(com.vungle.ads.g0 g0Var, com.vungle.ads.b2 b2Var) {
            Log.e("liftoff", "error al cargar Liftoff:" + b2Var);
            config.T6 = null;
            config.V6 = 0;
            config.W6 = 0;
        }

        public void onAdFailedToPlay(com.vungle.ads.g0 g0Var, com.vungle.ads.b2 b2Var) {
        }

        public void onAdImpression(com.vungle.ads.g0 g0Var) {
        }

        public void onAdLeftApplication(com.vungle.ads.g0 g0Var) {
        }

        public void onAdLoaded(com.vungle.ads.g0 g0Var) {
        }

        public void onAdStart(com.vungle.ads.g0 g0Var) {
        }
    }

    class h0 implements DialogInterface.OnShowListener {
        final AlertDialog a;
        final String b;

        h0(AlertDialog alertDialog, String str) {
            this.a = alertDialog;
            this.b = str;
        }

        @Override
        public void onShow(DialogInterface dialogInterface) {
            this.a.getButton(-1).setTextColor(Color.parseColor("#" + this.b));
            this.a.getButton(-2).setTextColor(Color.parseColor("#" + this.b));
        }
    }

    class i implements NewInterstitialListener {
        i() {
        }

        public void onAdClicked(MBridgeIds mBridgeIds) {
            Log.i("mintegral", "onAdClicked: " + mBridgeIds.toString());
        }

        public void onAdClose(MBridgeIds mBridgeIds, RewardInfo rewardInfo) {
            Log.i("mintegral", "onAdClose: isCompleteViewï¼\u009a" + rewardInfo.isCompleteView() + " " + mBridgeIds.toString());
        }

        public void onAdCloseWithNIReward(MBridgeIds mBridgeIds, RewardInfo rewardInfo) {
            Log.i("mintegral", "onAdCloseWithNIReward: " + mBridgeIds.toString() + "  " + rewardInfo.toString());
            Log.i("mintegral", rewardInfo.isCompleteView() ? "Video playback/playable is complete." : "Video playback/playable is not complete.");
            int rewardAlertStatus = rewardInfo.getRewardAlertStatus();
            if (rewardAlertStatus == MBridgeConstans.IVREWARDALERT_STATUS_NOTSHOWN) {
                Log.e("mintegral", "The dialog is not shown.");
            }
            if (rewardAlertStatus == MBridgeConstans.IVREWARDALERT_STATUS_CLICKCONTINUE) {
                Log.e("mintegral", "The dialog's continue button clicked.");
            }
            if (rewardAlertStatus == MBridgeConstans.IVREWARDALERT_STATUS_CLICKCANCEL) {
                Log.e("mintegral", "The dialog's cancel button clicked.");
            }
        }

        public void onAdShow(MBridgeIds mBridgeIds) {
            Log.i("mintegral", "onAdShow: " + mBridgeIds.toString());
        }

        public void onEndcardShow(MBridgeIds mBridgeIds) {
            Log.i("mintegral", "onEndcardShow: " + mBridgeIds.toString());
        }

        public void onLoadCampaignSuccess(MBridgeIds mBridgeIds) {
            Log.i("mintegral", "onLoadCampaignSuccess: " + Thread.currentThread() + " " + mBridgeIds.toString());
        }

        public void onResourceLoadFail(MBridgeIds mBridgeIds, String str) {
            Log.e("mintegral", "onResourceLoadFail errorMsg: " + str + " " + mBridgeIds.toString());
            config.U6 = null;
            config.V6 = 0;
            config.W6 = 0;
        }

        public void onResourceLoadSuccess(MBridgeIds mBridgeIds) {
            Log.i("mintegral", "onResourceLoadSuccess: " + Thread.currentThread() + " " + mBridgeIds.toString());
        }

        public void onShowFail(MBridgeIds mBridgeIds, String str) {
            Log.e("mintegral", "onShowFail: " + str + " " + mBridgeIds.toString());
        }

        public void onVideoComplete(MBridgeIds mBridgeIds) {
            Log.i("mintegral", "onVideoComplete: " + mBridgeIds.toString());
        }
    }

    class i0 implements DialogInterface.OnClickListener {
        i0() {
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            CheckBox checkBox = (CheckBox) ((AlertDialog) dialogInterface).findViewById(2131363221);
            if (checkBox.isChecked()) {
                SharedPreferences.Editor edit = config.this.getSharedPreferences("sh", 0).edit();
                edit.putBoolean("popup_nomas_" + config.this.Z1[((Integer) checkBox.getTag()).intValue()].y, true);
                edit.commit();
            }
        }
    }

    class j implements OnAdLoaded {
        j() {
        }

        public void adLoaded(String str, AppnextAdCreativeType appnextAdCreativeType) {
            try {
                config.P6.showAd();
            } catch (Exception unused) {
            }
        }
    }

    class j0 implements DialogInterface.OnShowListener {
        final AlertDialog a;
        final String b;

        j0(AlertDialog alertDialog, String str) {
            this.a = alertDialog;
            this.b = str;
        }

        @Override
        public void onShow(DialogInterface dialogInterface) {
            this.a.getButton(-1).setTextColor(Color.parseColor("#" + this.b));
        }
    }

    class k extends AdListener {
        k() {
        }

        @Override
        public void onAdFailedToLoad(LoadAdError loadAdError) {
            ArrayList arrayList;
            if (config.this.s3.equals("") || (arrayList = config.this.f40b6) == null || arrayList.size() <= 0) {
                return;
            }
            try {
                config configVar = config.this;
                if (configVar.J3 == 1) {
                    View findViewWithTag = configVar.a.findViewWithTag(2131361807);
                    if (findViewWithTag != null) {
                        ((LinearLayout) config.this.a).removeView(findViewWithTag);
                    }
                } else {
                    ((LinearLayout) configVar.a.getRootView().findViewById(2131362610)).removeAllViews();
                }
                config configVar2 = config.this;
                configVar2.j(configVar2.a.getContext());
            } catch (Exception unused) {
            }
        }
    }

    class k0 implements BannerListener {
        k0() {
        }

        public void onBannerAdClicked() {
        }

        public void onBannerAdLeftApplication() {
        }

        public void onBannerAdLoadFailed(IronSourceError ironSourceError) {
        }

        public void onBannerAdLoaded() {
            LinearLayout linearLayout;
            config configVar = config.this;
            if (configVar.J3 == 1) {
                View findViewWithTag = configVar.a.findViewWithTag(2131361807);
                if (findViewWithTag != null) {
                    ((LinearLayout) config.this.a).removeView(findViewWithTag);
                }
            } else {
                ((LinearLayout) configVar.a.getRootView().findViewById(2131362610)).removeAllViews();
            }
            config configVar2 = config.this;
            if (configVar2.J3 == 1) {
                configVar2.S4.setTag(2131361807);
                config configVar3 = config.this;
                ((LinearLayout) configVar3.a).addView(configVar3.S4);
            } else {
                try {
                    linearLayout = (LinearLayout) configVar2.a.getRootView().findViewById(2131362610);
                } catch (Exception unused) {
                    linearLayout = null;
                }
                if (linearLayout != null) {
                    linearLayout.addView(config.this.S4);
                    linearLayout.findViewById(2131362610).setVisibility(0);
                }
            }
            config.this.f38a6 = true;
        }

        public void onBannerAdScreenDismissed() {
        }

        public void onBannerAdScreenPresented() {
        }
    }

    class l implements OnAdError {
        l() {
        }

        public void adError(String str) {
            Log.e("appnext", "AppNext Interstitial error:" + str);
            config.P6 = null;
        }
    }

    class l0 implements BannerAd.Listener {
        final Context a;
        final com.eugene.hymnesetlouanges.c b;

        l0(Context context, com.eugene.hymnesetlouanges.c cVar) {
            this.a = context;
            this.b = cVar;
        }

        public void onBannerClicked(BannerAd bannerAd) {
        }

        public void onBannerFailedToLoad(BannerAd bannerAd, com.wortise.ads.AdError adError) {
            ArrayList arrayList;
            Log.e("wortise", "wortise banner failed:" + adError.toString());
            if (config.this.s3.equals("") || (arrayList = config.this.f40b6) == null || arrayList.size() <= 0) {
                return;
            }
            config.this.j(this.a);
        }

        public void onBannerImpression(BannerAd bannerAd) {
        }

        public void onBannerLoaded(BannerAd bannerAd) {
            if (config.this.J3 == 1) {
                this.b.e.setTag(2131361807);
                ((LinearLayout) config.this.a).addView(this.b.e);
            } else {
                ((LinearLayout) ((Activity) this.a).findViewById(2131362610)).addView(this.b.e);
                ((LinearLayout) ((Activity) this.a).findViewById(2131362610)).setVisibility(0);
            }
            config.this.f38a6 = true;
        }
    }

    class m implements OnAdClosed {
        m() {
        }

        public void onAdClosed() {
            config.P6 = null;
        }
    }

    class m0 extends NativeAdListener {
        m0() {
        }

        public void onAdClicked(NativeAd nativeAd) {
            super.onAdClicked(nativeAd);
            View findViewById = nativeAd.getNativeAdView().findViewById(2131361909);
            if (findViewById != null) {
                findViewById.setVisibility(0);
            }
        }
    }

    class n implements IUnityAdsLoadListener {
        final Context a;

        n(Context context) {
            this.a = context;
        }

        public void onUnityAdsAdLoaded(String str) {
            UnityAds.show((Activity) this.a, config.H6, new UnityAdsShowOptions(), (IUnityAdsShowListener) null);
        }

        public void onUnityAdsFailedToLoad(String str, UnityAds.UnityAdsLoadError unityAdsLoadError, String str2) {
        }
    }

    class n0 implements Runnable {
        final HorizontalScrollView a;

        n0(HorizontalScrollView horizontalScrollView) {
            this.a = horizontalScrollView;
        }

        @Override
        public void run() {
            try {
                this.a.setScrollX(config.f26p6);
                config.f27q6.put(Integer.valueOf(config.g0(this.a).hashCode()), Boolean.TRUE);
            } catch (Exception unused) {
            }
        }
    }

    class o implements OnAdLoaded {
        o() {
        }

        public void adLoaded(String str, AppnextAdCreativeType appnextAdCreativeType) {
            try {
                config.P6.showAd();
            } catch (Exception unused) {
            }
        }
    }

    class o0 implements ViewTreeObserver.OnScrollChangedListener {
        final HorizontalScrollView a;

        o0(HorizontalScrollView horizontalScrollView) {
            this.a = horizontalScrollView;
        }

        @Override
        public void onScrollChanged() {
            try {
                int hashCode = config.g0(this.a).hashCode();
                if (config.f27q6.containsKey(Integer.valueOf(hashCode)) && ((Boolean) config.f27q6.get(Integer.valueOf(hashCode))).booleanValue()) {
                    config.f26p6 = this.a.getScrollX();
                }
            } catch (Exception unused) {
            }
        }
    }

    class p implements OnAdError {
        p() {
        }

        public void adError(String str) {
            Log.e("appnext", "AppNext Interstitial error:" + str);
            config.P6 = null;
        }
    }

    class p0 implements View.OnClickListener {
        p0() {
        }

        @Override
        public void onClick(View view) {
            try {
                config.this.X(((Activity) view.getContext()).findViewById(2131362584));
            } catch (Exception unused) {
            }
            ((Activity) view.getContext()).findViewById(2131362236).H(8388611);
        }
    }

    class q implements OnAdClosed {
        q() {
        }

        public void onAdClosed() {
            config.P6 = null;
        }
    }

    public class q0 extends ArrayAdapter {
        private List a;
        private Context b;

        public q0(List list, Context context) {
            super(context, 2131558515, list);
            this.a = list;
            this.b = context;
        }

        @Override
        public View getView(int i, View view, ViewGroup viewGroup) {
            r0 r0Var = new r0();
            if (view == null) {
                view = ((LayoutInflater) this.b.getSystemService("layout_inflater")).inflate(2131558515, (ViewGroup) null);
                View findViewById = view.findViewById(2131362708);
                TextView textView = (TextView) view.findViewById(2131363346);
                ImageView imageView = (ImageView) view.findViewById(2131362452);
                ProgressBar progressBar = (ProgressBar) view.findViewById(2131363046);
                r0Var.a = findViewById;
                r0Var.b = textView;
                r0Var.c = imageView;
                r0Var.d = progressBar;
                config configVar = config.this;
                if (configVar.p == 0) {
                    findViewById.getLayoutParams().width = 1;
                    r0Var.a.setBackgroundColor(0);
                } else if (configVar.b == 900) {
                    findViewById.setBackgroundColor(0);
                }
                if (!config.this.Y1) {
                    r0Var.c.setVisibility(8);
                }
                view.setTag(2131361811, r0Var);
            } else {
                r0Var = (r0) view.getTag(2131361811);
            }
            s0 s0Var = (s0) this.a.get(i);
            if (s0Var.d) {
                view.setTag(2131361809, "1");
            } else {
                view.setTag(2131361809, null);
            }
            config configVar2 = config.this;
            int[] iArr = configVar2.b2;
            if (i >= iArr.length || configVar2.b != iArr[i]) {
                r0Var.a.setBackgroundColor(0);
                r0Var.b.setTextColor(Color.parseColor("#" + config.this.q1));
            } else {
                if (configVar2.p > 0) {
                    r0Var.a.setBackgroundColor(Color.parseColor("#" + config.this.t1));
                }
                r0Var.b.setTextColor(Color.parseColor("#" + config.this.r1));
            }
            r0Var.b.setText(s0Var.a);
            if (config.this.Y1) {
                if (s0Var.c) {
                    r0Var.d.setVisibility(0);
                    r0Var.c.setImageDrawable(config.this.getResources().getDrawable(2131231682));
                } else {
                    r0Var.d.setVisibility(8);
                    Bitmap bitmap = s0Var.b;
                    if (bitmap != null) {
                        r0Var.c.setImageBitmap(bitmap);
                    } else {
                        r0Var.c.setImageDrawable(config.this.getResources().getDrawable(2131231682));
                    }
                }
            }
            return view;
        }
    }

    class r implements IUnityAdsLoadListener {
        final Context a;

        r(Context context) {
            this.a = context;
        }

        public void onUnityAdsAdLoaded(String str) {
            UnityAds.show((Activity) this.a, config.H6, new UnityAdsShowOptions(), (IUnityAdsShowListener) null);
        }

        public void onUnityAdsFailedToLoad(String str, UnityAds.UnityAdsLoadError unityAdsLoadError, String str2) {
        }
    }

    private static class r0 {
        public View a;
        public TextView b;
        public ImageView c;
        public ProgressBar d;

        private r0() {
        }
    }

    class s implements Runnable {
        final String a;

        s(String str) {
            this.a = str;
        }

        @Override
        public void run() {
            config.this.J0(1, this.a);
        }
    }

    public class s0 {
        public String a;
        public Bitmap b;
        public boolean c;
        public boolean d = false;

        public s0() {
        }
    }

    class t implements Runnable {
        final String a;

        t(String str) {
            this.a = str;
        }

        @Override
        public void run() {
            config.this.J0(0, this.a);
        }
    }

    public static class t0 extends AsyncTask {
        String a;
        String b;
        String c;
        Context d;
        ProgressDialog e;

        class a implements DialogInterface.OnShowListener {
            a() {
            }

            @Override
            public void onShow(DialogInterface dialogInterface) {
                config.b1((ProgressBar) t0.this.e.findViewById(R.id.progress), t0.this.b);
            }
        }

        class b implements DialogInterface.OnClickListener {
            b() {
            }

            public static void b(FormError formError) {
            }

            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                try {
                    UserMessagingPlatform.showPrivacyOptionsForm((Activity) t0.this.d, new ConsentForm.OnConsentFormDismissedListener() {
                        public final void onConsentFormDismissed(FormError formError) {
                            config.t0.b.b(formError);
                        }
                    });
                } catch (Exception unused) {
                }
            }
        }

        class c implements DialogInterface.OnShowListener {
            final AlertDialog a;

            c(AlertDialog alertDialog) {
                this.a = alertDialog;
            }

            @Override
            public void onShow(DialogInterface dialogInterface) {
                this.a.getButton(-1).setTextColor(Color.parseColor("#" + t0.this.c));
                if (config.f10a7) {
                    this.a.getButton(-3).setTextColor(Color.parseColor("#" + t0.this.c));
                }
            }
        }

        public t0(Context context, String str, String str2) {
            this.d = context;
            this.b = str;
            this.c = str2;
        }

        @Override
        public Byte doInBackground(String... strArr) {
            HttpURLConnection httpURLConnection;
            Throwable th;
            try {
                HttpURLConnection httpURLConnection2 = null;
                try {
                    try {
                        httpURLConnection = (HttpURLConnection) new URL(config.f20j6 + "privacy." + config.f22l6 + "/privacy.php?desde_app=1&ida=3014518&idl=" + Locale.getDefault().getLanguage()).openConnection();
                    } catch (Exception unused) {
                    }
                } catch (Throwable th2) {
                    httpURLConnection = httpURLConnection2;
                    th = th2;
                }
                try {
                    httpURLConnection.setDoInput(true);
                    httpURLConnection.setConnectTimeout(10000);
                    httpURLConnection.setReadTimeout(10000);
                    httpURLConnection.setRequestProperty("User-Agent", "Android Vinebre Software");
                    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));
                    StringBuilder sb = new StringBuilder();
                    while (true) {
                        String readLine = bufferedReader.readLine();
                        if (readLine == null) {
                            String sb2 = sb.toString();
                            this.a = sb2;
                            this.a = sb2.replace("@EURO@", "€");
                            httpURLConnection.disconnect();
                            return (byte) 0;
                        }
                        sb.append(readLine + "\n");
                    }
                } catch (Exception unused2) {
                    httpURLConnection2 = httpURLConnection;
                    if (httpURLConnection2 != null) {
                        httpURLConnection2.disconnect();
                    }
                    return (byte) -1;
                } catch (Throwable th3) {
                    th = th3;
                    if (httpURLConnection != null) {
                        httpURLConnection.disconnect();
                    }
                    throw th;
                }
            } catch (MalformedURLException unused3) {
                return (byte) -1;
            }
        }

        @Override
        public void onPostExecute(Byte b2) {
            try {
                this.e.dismiss();
            } catch (Exception unused) {
            }
            if (b2.byteValue() != 0) {
                Context context = this.d;
                config.H0(context, context.getString(2131886424), this.d.getString(2131886423), this.c);
                return;
            }
            AlertDialog.Builder builder = new AlertDialog.Builder(this.d);
            builder.setMessage(Html.fromHtml(this.a));
            builder.setCancelable(true);
            builder.setPositiveButton(this.d.getString(2131886286), (DialogInterface.OnClickListener) null);
            if (config.f10a7) {
                builder.setNeutralButton(2131886120, new b());
            }
            AlertDialog create = builder.create();
            if (!this.c.equals("")) {
                create.setOnShowListener(new c(create));
            }
            try {
                create.show();
            } catch (Exception unused2) {
            }
            try {
                ((TextView) create.findViewById(R.id.message)).setTypeface(Typeface.MONOSPACE);
            } catch (Exception unused3) {
            }
        }

        @Override
        protected void onPreExecute() {
            ProgressDialog progressDialog = new ProgressDialog(this.d);
            this.e = progressDialog;
            progressDialog.setMessage(this.d.getString(2131886228));
            this.e.setIndeterminate(true);
            if (!this.b.equals("")) {
                this.e.setOnShowListener(new a());
            }
            this.e.show();
        }
    }

    class u implements DialogInterface.OnShowListener {
        final AlertDialog a;
        final String b;

        u(AlertDialog alertDialog, String str) {
            this.a = alertDialog;
            this.b = str;
        }

        @Override
        public void onShow(DialogInterface dialogInterface) {
            this.a.getButton(-1).setTextColor(Color.parseColor("#" + this.b));
        }
    }

    private class u0 extends AsyncTask {
        long a;
        String b;
        String c;
        String d;
        int e;
        Context f;
        ProgressDialog g;
        View h;

        class a implements DialogInterface.OnShowListener {
            a() {
            }

            @Override
            public void onShow(DialogInterface dialogInterface) {
                config.b1((ProgressBar) u0.this.g.findViewById(R.id.progress), u0.this.d);
            }
        }

        u0(Context context, long j, String str, int i, String str2, String str3, View view) {
            this.f = context;
            this.a = j;
            this.b = str;
            this.e = i;
            this.c = str2;
            this.d = str3;
            this.h = view;
        }

        @Override
        public String doInBackground(String... strArr) {
            try {
                HttpURLConnection httpURLConnection = null;
                try {
                    HttpURLConnection httpURLConnection2 = (HttpURLConnection) new URL("https://pay." + config.f22l6 + "/srv/check_payment.php?idusu=" + this.a + "&c=" + this.b + "&idsec=" + this.e).openConnection();
                    try {
                        httpURLConnection2.setDoInput(true);
                        httpURLConnection2.setConnectTimeout(10000);
                        httpURLConnection2.setReadTimeout(TimeoutConfigurations.DEFAULT_TIMEOUT);
                        httpURLConnection2.setRequestProperty("User-Agent", "Android Vinebre Software");
                        httpURLConnection2.connect();
                        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection2.getInputStream()));
                        StringBuilder sb = new StringBuilder();
                        while (true) {
                            String readLine = bufferedReader.readLine();
                            if (readLine == null) {
                                String sb2 = sb.toString();
                                httpURLConnection2.disconnect();
                                return sb2;
                            }
                            sb.append(readLine + "\n");
                        }
                    } catch (Exception unused) {
                        httpURLConnection = httpURLConnection2;
                        if (httpURLConnection != null) {
                            httpURLConnection.disconnect();
                        }
                        return "";
                    } catch (Throwable th) {
                        th = th;
                        httpURLConnection = httpURLConnection2;
                        if (httpURLConnection != null) {
                            httpURLConnection.disconnect();
                        }
                        throw th;
                    }
                } catch (Exception unused2) {
                } catch (Throwable th2) {
                    th = th2;
                }
            } catch (MalformedURLException unused3) {
            }
        }

        @Override
        public void onPostExecute(String str) {
            try {
                this.g.dismiss();
            } catch (Exception unused) {
            }
            if (str.contains("ANDROID:NO")) {
                SharedPreferences sharedPreferences = config.this.getSharedPreferences("sh", 0);
                SharedPreferences.Editor edit = sharedPreferences.edit();
                edit.putInt("secc" + this.e + "_comprobacionespago", sharedPreferences.getInt("secc" + this.e + "_comprobacionespago", 0) + 1);
                edit.apply();
                config.this.O0(this.f, this.e, this.c, this.d);
                return;
            }
            if (!str.contains("ANDROID:YES DURACION:")) {
                config.H0(this.f, config.this.getResources().getString(2131886424), config.this.getResources().getString(2131886423), this.c);
                return;
            }
            int indexOf = str.indexOf("ANDROID:YES DURACION:") + 21;
            int parseInt = Integer.parseInt(str.substring(indexOf, str.indexOf("-", indexOf)));
            SharedPreferences.Editor edit2 = config.this.getSharedPreferences("sh", 0).edit();
            edit2.putInt("secc" + this.e + "_comprobacionespago", 0);
            edit2.putBoolean("secc" + this.e + "_pagada", true);
            edit2.putLong("secc" + this.e + "_fhasta", (parseInt == 18000 ? 2524604400000L : Long.valueOf(System.currentTimeMillis() + (parseInt * 60 * 60 * 1000))).longValue());
            edit2.apply();
            ((com.eugene.hymnesetlouanges.a) this.f).abrir_secc(this.h);
        }

        @Override
        protected void onPreExecute() {
            if (config.this.getSharedPreferences("sh", 0).getInt("secc" + this.e + "_comprobacionespago", 0) > 10) {
                cancel(false);
                config.this.O0(this.f, this.e, this.c, this.d);
                return;
            }
            ProgressDialog progressDialog = new ProgressDialog(this.f);
            this.g = progressDialog;
            progressDialog.setMessage(config.this.getResources().getString(2131886348));
            this.g.setIndeterminate(true);
            if (!this.d.equals("")) {
                this.g.setOnShowListener(new a());
            }
            this.g.show();
        }
    }

    class v implements com.startapp.sdk.ads.banner.BannerListener {
        v() {
        }

        public void onClick(View view) {
        }

        public void onFailedToReceiveAd(View view) {
        }

        public void onImpression(View view) {
        }

        public void onReceiveAd(View view) {
            config configVar = config.this;
            View view2 = configVar.a;
            if (view2 == null) {
                return;
            }
            if (configVar.J3 != 1) {
                LinearLayout linearLayout = (LinearLayout) view2.getRootView().findViewById(2131362610);
                if (linearLayout.getChildCount() == 0) {
                    linearLayout.addView(view);
                    linearLayout.setVisibility(0);
                }
            } else if (((LinearLayout) view2).findViewWithTag(2131361807) == null) {
                ((LinearLayout) config.this.a).addView(view);
            }
            config.this.f38a6 = true;
        }
    }

    private class v0 extends AsyncTask {
        long a;
        String b;
        String c;
        String d;
        Context e;
        ProgressDialog f;
        boolean g;

        class a implements DialogInterface.OnShowListener {
            a() {
            }

            @Override
            public void onShow(DialogInterface dialogInterface) {
                config.b1((ProgressBar) v0.this.f.findViewById(R.id.progress), v0.this.d);
            }
        }

        v0(Context context, long j, String str, String str2, String str3, boolean z) {
            this.e = context;
            this.a = j;
            this.b = str;
            this.c = str2;
            this.d = str3;
            this.g = z;
        }

        @Override
        public String doInBackground(String... strArr) {
            HttpURLConnection httpURLConnection;
            HttpURLConnection httpURLConnection2;
            try {
                httpURLConnection = null;
                try {
                    httpURLConnection2 = (HttpURLConnection) new URL("https://pay." + config.f22l6 + "/srv/check_payment_sinads.php?idusu=" + this.a + "&c=" + this.b).openConnection();
                } catch (Exception unused) {
                } catch (Throwable th) {
                    th = th;
                }
            } catch (MalformedURLException unused2) {
            }
            try {
                httpURLConnection2.setDoInput(true);
                httpURLConnection2.setConnectTimeout(10000);
                httpURLConnection2.setReadTimeout(TimeoutConfigurations.DEFAULT_TIMEOUT);
                httpURLConnection2.setRequestProperty("User-Agent", "Android Vinebre Software");
                httpURLConnection2.connect();
                BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection2.getInputStream()));
                StringBuilder sb = new StringBuilder();
                while (true) {
                    String readLine = bufferedReader.readLine();
                    if (readLine == null) {
                        String sb2 = sb.toString();
                        httpURLConnection2.disconnect();
                        return sb2;
                    }
                    sb.append(readLine + "\n");
                }
            } catch (Exception unused3) {
                httpURLConnection = httpURLConnection2;
                if (httpURLConnection != null) {
                    httpURLConnection.disconnect();
                }
                return "";
            } catch (Throwable th2) {
                th = th2;
                httpURLConnection = httpURLConnection2;
                if (httpURLConnection != null) {
                    httpURLConnection.disconnect();
                }
                throw th;
            }
        }

        @Override
        public void onPostExecute(String str) {
            try {
                this.f.dismiss();
            } catch (Exception unused) {
            }
            if (str.contains("ANDROID:NO")) {
                SharedPreferences sharedPreferences = config.this.getSharedPreferences("sh", 0);
                SharedPreferences.Editor edit = sharedPreferences.edit();
                edit.putInt("sinads_comprobacionespago", sharedPreferences.getInt("sinads_comprobacionespago", 0) + 1);
                edit.apply();
                if (this.g) {
                    return;
                }
                config.this.P0(this.e, this.c);
                return;
            }
            if (!str.contains("ANDROID:YES FHASTA:")) {
                config.H0(this.e, config.this.getResources().getString(2131886424), config.this.getResources().getString(2131886423), this.c);
                return;
            }
            int indexOf = str.indexOf("ANDROID:YES FHASTA:") + 19;
            Long valueOf = Long.valueOf(Double.valueOf(Double.parseDouble(str.substring(indexOf, str.indexOf("-", indexOf)))).longValue());
            SharedPreferences.Editor edit2 = config.this.getSharedPreferences("sh", 0).edit();
            edit2.putInt("sinads_comprobacionespago", 0);
            edit2.putBoolean("sinads", true);
            edit2.putLong("sinads_fhasta", valueOf.longValue());
            edit2.apply();
            config.this.R0(valueOf, this.e, this.c);
        }

        @Override
        protected void onPreExecute() {
            if (config.this.getSharedPreferences("sh", 0).getInt("sinads_comprobacionespago", 0) > 10) {
                cancel(false);
                config.this.P0(this.e, this.c);
                return;
            }
            ProgressDialog progressDialog = new ProgressDialog(this.e);
            this.f = progressDialog;
            progressDialog.setMessage(config.this.getResources().getString(2131886348));
            this.f.setIndeterminate(true);
            if (!this.d.equals("")) {
                this.f.setOnShowListener(new a());
            }
            this.f.show();
        }
    }

    class w implements DialogInterface.OnClickListener {
        final Context a;
        final String b;
        final long c;
        final String d;
        final SharedPreferences e;

        w(Context context, String str, long j, String str2, SharedPreferences sharedPreferences) {
            this.a = context;
            this.b = str;
            this.c = j;
            this.d = str2;
            this.e = sharedPreferences;
        }

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            config.Q0(Toast.makeText(this.a, config.this.getResources().getString(2131886415), 0));
            config.I(this.a, this.b);
            new t_chat.b0(this.b, this.c, this.d, this.a).execute(new String[0]);
            SharedPreferences.Editor edit = this.e.edit();
            edit.putBoolean("ban_" + this.b, true);
            edit.commit();
            t_chat.R(this.a, this.b);
        }
    }

    public static class w0 extends AsyncTask {
        String a;
        String b;

        w0(String str, String str2) {
            this.a = str;
            this.b = str2;
        }

        @Override
        public Boolean doInBackground(String... strArr) {
            try {
                yf.b bVar = new yf.b();
                yf.c.h(bVar, 10000);
                yf.c.i(bVar, 20000);
                rf.h hVar = new rf.h(bVar);
                bf.e eVar = new bf.e(this.a);
                eVar.a(new nf.g(nf.d.b));
                String str = this.b;
                if (str != null) {
                    eVar.x("User-Agent", str);
                }
                hVar.a(eVar);
            } catch (Exception e) {
                e.printStackTrace();
            }
            return Boolean.TRUE;
        }
    }

    class x implements DialogInterface.OnShowListener {
        final AlertDialog a;
        final String b;

        x(AlertDialog alertDialog, String str) {
            this.a = alertDialog;
            this.b = str;
        }

        @Override
        public void onShow(DialogInterface dialogInterface) {
            this.a.getButton(-1).setTextColor(Color.parseColor("#" + this.b));
            Button button = this.a.getButton(-2);
            if (button != null) {
                button.setTextColor(Color.parseColor("#" + this.b));
            }
        }
    }

    static class x0 {
        String a;
        int b;
        int c;
        int d;
        String e;
        Boolean f;
        MenuItem g;

        x0() {
        }
    }

    class y implements MenuItem.OnMenuItemClickListener {
        final Context a;
        final boolean b;
        final FragmentActivity_ext_class c;
        final Activity_ext_class d;

        y(Context context, boolean z, FragmentActivity_ext_class fragmentActivity_ext_class, Activity_ext_class activity_ext_class) {
            this.a = context;
            this.b = z;
            this.c = fragmentActivity_ext_class;
            this.d = activity_ext_class;
        }

        @Override
        public boolean onMenuItemClick(android.view.MenuItem r18) {
            throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.config.y.onMenuItemClick(android.view.MenuItem):boolean");
        }
    }

    public static class y0 extends AsyncTask {
        String a;
        String b;
        long c;
        int d;
        int e;

        y0(long j, String str, int i, String str2, int i2) {
            this.c = j;
            this.a = str;
            this.d = i;
            this.b = str2;
            this.e = i2;
        }

        @Override
        public Byte doInBackground(String... strArr) {
            try {
                yf.b bVar = new yf.b();
                yf.c.h(bVar, 100000);
                yf.c.i(bVar, 60000);
                rf.h hVar = new rf.h(bVar);
                bf.e eVar = new bf.e(config.f23m6 + "/srv/modif_usuchats.php?idusu=" + this.c + "&c=" + this.a + "&idchat=" + this.d + "&campo=" + this.b + "&modo=" + this.e);
                eVar.a(new nf.g(nf.d.b));
                eVar.x("User-Agent", "Android Vinebre Software");
                BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(hVar.a(eVar).c().j(), "UTF-8"));
                StringBuilder sb = new StringBuilder();
                while (true) {
                    String readLine = bufferedReader.readLine();
                    if (readLine == null) {
                        break;
                    }
                    sb.append(readLine);
                }
                return sb.indexOf("ANDROID:OK") != -1 ? (byte) 1 : (byte) 0;
            } catch (Exception unused) {
                return (byte) 0;
            }
        }

        @Override
        public void onPostExecute(Byte b) {
            b.byteValue();
        }
    }

    class z implements Runnable {
        final HorizontalScrollView a;

        z(HorizontalScrollView horizontalScrollView) {
            this.a = horizontalScrollView;
        }

        @Override
        public void run() {
            try {
                this.a.setScrollX(config.f26p6);
            } catch (Exception unused) {
            }
            config.f27q6.put(Integer.valueOf(config.g0(this.a).hashCode()), Boolean.TRUE);
        }
    }

    static {
        String str = Build.VERSION.SDK_INT < 22 ? "http://" : "https://";
        f20j6 = str;
        f21k6 = "";
        f22l6 = "e-droid.net";
        f23m6 = str + W();
        f24n6 = 1;
        f25o6 = false;
        f26p6 = 0;
        f27q6 = new HashMap();
        f30t6 = -1;
        f33w6 = false;
        L6 = "";
        O6 = null;
        P6 = null;
        Q6 = null;
        R6 = null;
        S6 = null;
        T6 = null;
        U6 = null;
        V6 = 0;
        W6 = 0;
        X6 = 0;
        Y6 = 0;
        Z6 = false;
        f10a7 = false;
    }

    static int B(Context context, String str, String str2, Intent intent, int i2, int i3, String str3, String str4) {
        if (str3.equals(null) || str3.equals("")) {
            str3 = "0";
        }
        if (str4.equals(null) || str4.equals("")) {
            str4 = "0";
        }
        SharedPreferences sharedPreferences = context.getSharedPreferences("sh", 0);
        SharedPreferences.Editor edit = sharedPreferences.edit();
        int i4 = sharedPreferences.getInt("id_ultnotif", 0) + 1;
        intent.putExtra("idnotif_marcar", i4);
        edit.putInt("id_ultnotif", i4);
        edit.putBoolean("hatenidonotif", true);
        edit.putLong("notif_" + i4 + "_fcrea", System.currentTimeMillis());
        edit.putString("notif_" + i4 + "_title", str);
        edit.putString("notif_" + i4 + "_text", str2);
        edit.putString("notif_" + i4 + "_intent", intent.toUri(0));
        edit.putInt("notif_" + i4 + "_numnotif", i2);
        edit.putBoolean("notif_" + i4 + "_leida", false);
        edit.putInt("notif_" + i4 + "_tipo", i3);
        edit.putString("notif_" + i4 + "_idusu1", str3);
        edit.putString("notif_" + i4 + "_idusu2", str4);
        if (i4 > 100) {
            StringBuilder sb = new StringBuilder();
            sb.append("notif_");
            int i7 = i4 - 100;
            sb.append(i7);
            sb.append("_fcrea");
            edit.remove(sb.toString());
            edit.remove("notif_" + i7 + "_title");
            edit.remove("notif_" + i7 + "_text");
            edit.remove("notif_" + i7 + "_intent");
            edit.remove("notif_" + i7 + "_numnotif");
            edit.remove("notif_" + i7 + "_leida");
            edit.remove("notif_" + i7 + "_tipo");
            edit.remove("notif_" + i7 + "_idusu1");
            edit.remove("notif_" + i7 + "_idusu2");
        }
        edit.commit();
        e(context);
        return i4;
    }

    public static boolean B0(int i2, int i3) {
        if (i2 == 1) {
            return true;
        }
        if (i2 != 0) {
            return false;
        }
        switch (i3) {
            case 3:
            case 5:
            case 6:
            case 8:
            case 9:
            case 10:
            case 12:
            case 13:
            case 14:
            case 15:
                return true;
            case 4:
            case 7:
            case 11:
            default:
                return false;
        }
    }

    public static boolean C0(Context context) {
        NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
        return activeNetworkInfo != null && activeNetworkInfo.isConnected();
    }

    public static Bitmap D(Bitmap bitmap, int i2) {
        Bitmap createBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(createBitmap);
        Paint paint = new Paint();
        Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
        RectF rectF = new RectF(0.0f, 0.0f, bitmap.getWidth(), bitmap.getHeight());
        paint.setAntiAlias(true);
        canvas.drawARGB(0, 0, 0, 0);
        paint.setColor(-12434878);
        if (i2 == 1) {
            i2 = 5;
        } else if (i2 == 2) {
            i2 = 10;
        } else if (i2 == 3) {
            i2 = 20;
        }
        float f2 = i2;
        canvas.drawRoundRect(rectF, f2, f2, paint);
        paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
        canvas.drawBitmap(bitmap, rect, rect, paint);
        return createBitmap;
    }

    static boolean D0(Context context, Uri uri) {
        try {
            context.startActivity(new Intent("android.intent.action.VIEW", uri).addCategory("android.intent.category.BROWSABLE").addFlags(268436480));
            return true;
        } catch (ActivityNotFoundException unused) {
            return false;
        }
    }

    private static boolean E0(Context context, Uri uri) {
        PackageManager packageManager = context.getPackageManager();
        Set T = T(packageManager.queryIntentActivities(new Intent().setAction("android.intent.action.VIEW").addCategory("android.intent.category.BROWSABLE").setData(Uri.fromParts("http", "", null)), 0));
        Intent addCategory = new Intent("android.intent.action.VIEW", uri).addCategory("android.intent.category.BROWSABLE");
        Set T2 = T(packageManager.queryIntentActivities(addCategory, 0));
        T2.removeAll(T);
        if (T2.isEmpty()) {
            return false;
        }
        addCategory.addFlags(268435456);
        context.startActivity(addCategory);
        return true;
    }

    static int F(Context context, int i2) {
        return (int) ((i2 * context.getResources().getDisplayMetrics().density) + 0.5d);
    }

    public static void G(EditText editText, Boolean bool, String str) {
        String str2;
        String str3;
        if (str == null || str.equals("") || str.equals("#")) {
            return;
        }
        if (bool.booleanValue()) {
            str2 = "FFFFFF";
            str3 = "FAFAFA";
        } else {
            str2 = "000000";
            str3 = "212121";
        }
        editText.setTextColor(Color.parseColor("#" + str2));
        editText.setBackgroundTintList(new ColorStateList(new int[][]{new int[]{R.attr.state_focused}, new int[]{-16842908}}, new int[]{Color.parseColor("#" + str), Color.parseColor("#" + str3)}));
    }

    static void H(Context context) {
        SharedPreferences sharedPreferences = context.getSharedPreferences("sh", 0);
        SharedPreferences.Editor edit = sharedPreferences.edit();
        int i2 = 0;
        for (int i3 = sharedPreferences.getInt("id_ultnotif", 0); i3 > 0; i3--) {
            edit.remove("notif_" + i3 + "_fcrea");
            edit.remove("notif_" + i3 + "_title");
            edit.remove("notif_" + i3 + "_text");
            edit.remove("notif_" + i3 + "_intent");
            edit.remove("notif_" + i3 + "_numnotif");
            edit.remove("notif_" + i3 + "_leida");
            edit.remove("notif_" + i3 + "_tipo");
            edit.remove("notif_" + i3 + "_idusu1");
            edit.remove("notif_" + i3 + "_idusu2");
            i2++;
            if (i2 > 99) {
                break;
            }
        }
        edit.putInt("id_ultnotif", 0);
        edit.putInt("notif_noleidas", 0);
        edit.commit();
        e(context);
    }

    static void H0(Context context, String str, String str2, String str3) {
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setCancelable(true).setPositiveButton(context.getString(2131886286), (DialogInterface.OnClickListener) null).setMessage(str2);
        if (!str.equals("")) {
            builder.setTitle(str);
        }
        AlertDialog create = builder.create();
        if (!str3.equals("")) {
            create.setOnShowListener(new u(create, str3));
        }
        try {
            create.show();
        } catch (Exception unused) {
        }
        try {
            ((TextView) create.findViewById(R.id.message)).setTypeface(Typeface.MONOSPACE);
        } catch (Exception unused2) {
        }
    }

    public static void I(Context context, String str) {
        boolean z2 = false;
        SharedPreferences sharedPreferences = context.getSharedPreferences("sh", 0);
        for (int i2 = 0; !z2 && i2 < 100; i2++) {
            if (sharedPreferences.getString("privado" + i2 + "_id", "").equals(str)) {
                SharedPreferences.Editor edit = sharedPreferences.edit();
                edit.remove("privado" + i2 + "_id");
                edit.commit();
                z2 = true;
            }
        }
    }

    static boolean J(String str) {
        return str.equals("") || str.equals("#") || ((int) Math.sqrt(((((double) (Color.red(Color.parseColor(str)) * Color.red(Color.parseColor(str)))) * 0.241d) + (((double) (Color.green(Color.parseColor(str)) * Color.green(Color.parseColor(str)))) * 0.691d)) + (((double) (Color.blue(Color.parseColor(str)) * Color.blue(Color.parseColor(str)))) * 0.068d))) > 130;
    }

    static boolean K(int i2) {
        return ((int) Math.sqrt(((((double) (Color.red(i2) * Color.red(i2))) * 0.241d) + (((double) (Color.green(i2) * Color.green(i2))) * 0.691d)) + (((double) (Color.blue(i2) * Color.blue(i2))) * 0.068d))) > 130;
    }

    static boolean L(String str) {
        return str.equals("") || str.equals("#") || ((int) Math.sqrt(((((double) (Color.red(Color.parseColor(str)) * Color.red(Color.parseColor(str)))) * 0.241d) + (((double) (Color.green(Color.parseColor(str)) * Color.green(Color.parseColor(str)))) * 0.691d)) + (((double) (Color.blue(Color.parseColor(str)) * Color.blue(Color.parseColor(str)))) * 0.068d))) > 200;
    }

    static boolean M(String str) {
        return str.equals("") || str.equals("#") || ((int) Math.sqrt(((((double) (Color.red(Color.parseColor(str)) * Color.red(Color.parseColor(str)))) * 0.241d) + (((double) (Color.green(Color.parseColor(str)) * Color.green(Color.parseColor(str)))) * 0.691d)) + (((double) (Color.blue(Color.parseColor(str)) * Color.blue(Color.parseColor(str)))) * 0.068d))) < 60;
    }

    static void N0(Context context) {
        SharedPreferences sharedPreferences = context.getSharedPreferences("sh", 0);
        int i2 = sharedPreferences.getInt("ico_notif_ord", 0);
        int i3 = i2 == 1 ? 2131362417 : i2 == 2 ? 2131362418 : i2 == 3 ? 2131362419 : i2 == 4 ? 2131362420 : 0;
        if (i3 > 0) {
            try {
                TextView textView = (TextView) ((Activity) context).findViewById(i3);
                int i4 = sharedPreferences.getInt("notif_noleidas", 0);
                if (i4 > 99) {
                    i4 = 99;
                }
                if (i4 <= 0 || sharedPreferences.getInt("ico_notif_idsec", 0) != 0) {
                    textView.setVisibility(8);
                    return;
                }
                int F = F(context, 3);
                int F2 = i4 < 10 ? F(context, 8) : F(context, 4);
                textView.setPadding(F2, F, F2, F);
                textView.setText("" + i4);
                textView.setVisibility(0);
            } catch (Exception unused) {
            }
        }
    }

    private boolean O() {
        String str = Build.TAGS;
        return str != null && str.contains("test-keys");
    }

    private boolean P() {
        String[] strArr = {"/system/app/Superuser.apk", "/system/bin/su", "/system/xbin/su", "/data/local/bin/su", "/system/sd/xbin/su", "/data/local/xbin/su", "/system/bin/failsafe/su", "/data/local/su", "/su/bin/su", "/sbin/su"};
        for (int i2 = 0; i2 < 10; i2++) {
            try {
                if (new File(strArr[i2]).exists()) {
                    return true;
                }
            } catch (Exception unused) {
            }
        }
        return false;
    }

    private boolean Q() {
        Process process = null;
        try {
            process = Runtime.getRuntime().exec(new String[]{"/system/xbin/which", "su"});
            if (new BufferedReader(new InputStreamReader(process.getInputStream())).readLine() != null) {
                process.destroy();
                return true;
            }
            process.destroy();
            return false;
        } catch (Throwable unused) {
            if (process != null) {
                process.destroy();
            }
            return false;
        }
    }

    static void Q0(Toast toast) {
        try {
            ((TextView) ((ViewGroup) toast.getView()).getChildAt(0)).setTypeface(Typeface.MONOSPACE);
        } catch (Exception unused) {
        }
        toast.show();
    }

    static boolean S(Context context, int i2, String str, String str2) {
        if (str.equals(null) || str.equals("")) {
            str = "0";
        }
        if (str2.equals(null) || str2.equals("")) {
            str2 = "0";
        }
        SharedPreferences sharedPreferences = context.getSharedPreferences("sh", 0);
        int i3 = 0;
        for (int i4 = sharedPreferences.getInt("id_ultnotif", 0); i4 > 0; i4--) {
            if (!sharedPreferences.getBoolean("notif_" + i4 + "_leida", false)) {
                if (sharedPreferences.getInt("notif_" + i4 + "_tipo", 0) == i2) {
                    if (sharedPreferences.getString("notif_" + i4 + "_idusu1", "").equals(str)) {
                        if (sharedPreferences.getString("notif_" + i4 + "_idusu2", "").equals(str2)) {
                            return true;
                        }
                    }
                }
            }
            i3++;
            if (i3 > 99) {
                return false;
            }
        }
        return false;
    }

    public static void S0(android.content.Context r70, java.lang.String r71) {
        throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.config.S0(android.content.Context, java.lang.String):void");
    }

    public static Set T(List list) {
        HashSet hashSet = new HashSet();
        Iterator it = list.iterator();
        while (it.hasNext()) {
            hashSet.add(((ResolveInfo) it.next()).activityInfo.packageName);
        }
        return hashSet;
    }

    private static String V(Context context) {
        try {
            return Locale.getDefault().getCountry() != "PK" ? context.getResources().getConfiguration().locale.getCountry() == "PK" ? "e-droid3.net" : "e-droid.net" : "e-droid3.net";
        } catch (Exception unused) {
            return "e-droid.net";
        }
    }

    private static String W() {
        return "srv" + (new Random().nextInt(9) + 11) + "." + f22l6;
    }

    static void W0(Context context) {
        config configVar;
        try {
            configVar = (config) context.getApplicationContext();
        } catch (Exception unused) {
            configVar = null;
        }
        if (configVar == null || configVar.B3.equals("")) {
            return;
        }
        IronSource.onPause((Activity) context);
    }

    static void X0(Context context) {
        config configVar;
        HorizontalScrollView horizontalScrollView;
        if (f25o6) {
            ((Activity) context).finish();
        }
        Activity activity = (Activity) context;
        if (activity.findViewById(2131361909) != null) {
            activity.findViewById(2131361909).setVisibility(8);
        }
        N0(context);
        try {
            configVar = (config) context.getApplicationContext();
        } catch (Exception unused) {
            configVar = null;
        }
        if (configVar != null && configVar.l1 != null && configVar.T4 == 0 && configVar.q == 3 && (horizontalScrollView = (HorizontalScrollView) activity.findViewById(2131362405)) != null) {
            f27q6.put(Integer.valueOf(activity.hashCode()), Boolean.FALSE);
            try {
                horizontalScrollView.post(new z(horizontalScrollView));
            } catch (Exception unused2) {
            }
        }
        if (configVar == null || configVar.B3.equals("")) {
            return;
        }
        IronSource.onResume(activity);
    }

    static void Z(ImageView imageView) {
        imageView.setAlpha(0.0f);
        imageView.setVisibility(0);
        imageView.animate().alpha(1.0f).setDuration(200L);
    }

    public static boolean Z0(Context context) {
        try {
            PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 4096);
            String[] strArr = packageInfo != null ? packageInfo.requestedPermissions : null;
            if (strArr == null || strArr.length <= 0) {
                return false;
            }
            List asList = Arrays.asList(strArr);
            ArrayList arrayList = new ArrayList();
            arrayList.addAll(asList);
            Iterator it = arrayList.iterator();
            while (it.hasNext()) {
                if (((String) it.next()).contains("ACCESS_FINE_LOCATION")) {
                    return true;
                }
            }
            return false;
        } catch (PackageManager.NameNotFoundException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public static boolean a1(Context context) {
        if (Build.VERSION.SDK_INT < 33) {
            return false;
        }
        try {
            PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 4096);
            String[] strArr = packageInfo != null ? packageInfo.requestedPermissions : null;
            if (strArr != null && strArr.length > 0) {
                List asList = Arrays.asList(strArr);
                ArrayList arrayList = new ArrayList();
                arrayList.addAll(asList);
                Iterator it = arrayList.iterator();
                while (it.hasNext()) {
                    if (((String) it.next()).contains("POST_NOTIFICATIONS")) {
                        return true;
                    }
                }
            }
        } catch (PackageManager.NameNotFoundException e2) {
            e2.printStackTrace();
        }
        return false;
    }

    static boolean b(String str) {
        return (str.startsWith("rtsp://") || str.startsWith("rtmp://") || str.startsWith("market://") || str.startsWith("whatsapp://") || str.startsWith("upi://") || str.startsWith("http://www.appcreator24.com/open") || str.startsWith("https://www.appcreator24.com/open") || str.endsWith(".apk") || str.endsWith(".m3u") || str.endsWith(".m3u8") || str.endsWith(".mp3") || str.endsWith(".mp4") || str.endsWith(".3gp")) ? false : true;
    }

    static void b0(String str, Context context) {
        String str2;
        if (str != null) {
            String fileExtensionFromUrl = MimeTypeMap.getFileExtensionFromUrl(str);
            String mimeTypeFromExtension = fileExtensionFromUrl != null ? MimeTypeMap.getSingleton().getMimeTypeFromExtension(fileExtensionFromUrl) : "image/*";
            try {
                str2 = URLUtil.guessFileName(str, null, mimeTypeFromExtension);
            } catch (Exception unused) {
                str2 = "";
            }
            if (str2.equals("")) {
                return;
            }
            if (str2.indexOf(".") != -1) {
                str2 = "img" + (new Random().nextInt(9000) + 1000) + str2.substring(str2.lastIndexOf("."));
            }
            String str3 = str2;
            try {
                if (Build.VERSION.SDK_INT >= 29) {
                    ContentResolver contentResolver = context.getContentResolver();
                    ContentValues contentValues = new ContentValues();
                    contentValues.put("_display_name", str3);
                    contentValues.put("mime_type", mimeTypeFromExtension);
                    y(new File(str.replace("file://", "")), context.getContentResolver().openOutputStream(contentResolver.insert(MediaStore.Images.Media.getContentUri("external_primary"), contentValues)));
                    Q0(Toast.makeText(context, context.getResources().getString(2131886517), 1));
                } else {
                    File file = new File(context.getExternalFilesDir(Environment.DIRECTORY_PICTURES), str3);
                    x(new File(str.replace("file://", "")), file);
                    ((DownloadManager) context.getSystemService("download")).addCompletedDownload(str3, str3, true, mimeTypeFromExtension, file.getAbsolutePath(), file.length(), true);
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }

    public static void b1(ProgressBar progressBar, String str) {
        if (str == null || str.equals("") || str.equals("#")) {
            return;
        }
        progressBar.setIndeterminateTintList(new ColorStateList(new int[][]{new int[]{R.attr.state_enabled}, new int[]{-16842910}, new int[]{-16842912}, new int[]{R.attr.state_pressed}}, new int[]{Color.parseColor("#" + str), Color.parseColor("#" + str), Color.parseColor("#" + str), Color.parseColor("#" + str)}));
    }

    public static Bitmap c1(Bitmap bitmap, Bitmap bitmap2) {
        Bitmap createBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(createBitmap);
        canvas.drawBitmap(bitmap, 0.0f, 0.0f, (Paint) null);
        canvas.drawBitmap(bitmap2, (bitmap.getWidth() - bitmap2.getWidth()) / 2, (bitmap.getHeight() - bitmap2.getHeight()) / 2, (Paint) null);
        return createBitmap;
    }

    static void d0(Context context) {
        try {
            config configVar = (config) context.getApplicationContext();
            if (configVar.Q2 == 2) {
                configVar.m1();
            }
        } catch (Exception unused) {
        }
    }

    static float d1(Context context, float f2) {
        return f2 / (context.getResources().getDisplayMetrics().densityDpi / 160.0f);
    }

    static void e(Context context) {
        SharedPreferences sharedPreferences = context.getSharedPreferences("sh", 0);
        SharedPreferences.Editor edit = sharedPreferences.edit();
        int i2 = 0;
        int i3 = 0;
        for (int i4 = sharedPreferences.getInt("id_ultnotif", 0); i4 > 0; i4--) {
            if (!sharedPreferences.getBoolean("notif_" + i4 + "_leida", false)) {
                i2++;
            }
            i3++;
            if (i3 > 99) {
                break;
            }
        }
        edit.putInt("notif_noleidas", i2);
        edit.commit();
    }

    private static String e0(Uri uri, Context context) {
        if (DocumentsContract.isDocumentUri(context, uri)) {
            String[] strArr = {"_data"};
            Cursor query = context.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, strArr, "_id=?", new String[]{DocumentsContract.getDocumentId(uri).split(":")[1]}, null);
            r1 = query.moveToFirst() ? query.getString(query.getColumnIndex(strArr[0])) : null;
            query.close();
        }
        return r1;
    }

    public static String e1(int i2) {
        Random random = new Random();
        StringBuilder sb = new StringBuilder(i2);
        for (int i3 = 0; i3 < i2; i3++) {
            sb.append("0123456789qwertyuiopasdfghjklzxcvbnm".charAt(random.nextInt(36)));
        }
        return sb.toString();
    }

    public static String f0(Uri uri, Context context) {
        String e02 = e0(uri, context);
        if (e02 != null) {
            return e02;
        }
        Cursor query = context.getContentResolver().query(uri, new String[]{"_data"}, null, null, null);
        if (query != null) {
            if (query.moveToFirst()) {
                e02 = query.getString(query.getColumnIndexOrThrow("_data"));
            }
            query.close();
        }
        return e02 == null ? uri.getPath() : e02;
    }

    public static void g(Context context, String str, String str2) {
        SharedPreferences sharedPreferences = context.getSharedPreferences("sh", 0);
        boolean z2 = false;
        int i2 = 0;
        while (!z2 && i2 < 100) {
            z2 = sharedPreferences.getString("privado" + i2 + "_id", "").equals(str);
            i2++;
        }
        SharedPreferences.Editor edit = sharedPreferences.edit();
        if (z2) {
            int i3 = i2 - 1;
            edit.putString("privado" + i3 + "_id", str);
            edit.putString("privado" + i3 + "_nombre", str2);
            edit.putLong("privado" + i3 + "_fultconex", System.currentTimeMillis());
        } else {
            for (int i4 = 0; !z2 && i4 < 100; i4++) {
                if (!sharedPreferences.contains("privado" + i4 + "_id")) {
                    edit.putString("privado" + i4 + "_id", str);
                    edit.putString("privado" + i4 + "_nombre", str2);
                    edit.putLong("privado" + i4 + "_fultconex", System.currentTimeMillis());
                    z2 = true;
                }
            }
        }
        edit.commit();
    }

    public static Activity g0(View view) {
        for (Context context = view.getContext(); context instanceof ContextWrapper; context = ((ContextWrapper) context).getBaseContext()) {
            if (context instanceof Activity) {
                return (Activity) context;
            }
        }
        return null;
    }

    static String g1(String str) {
        return Normalizer.normalize(str, Normalizer.Form.NFD).replaceAll("[\\p{InCombiningDiacriticalMarks}]", "");
    }

    static String h(String str, String str2) {
        if (str == null || str2 == null || str.equals("") || str2.equals("")) {
            return "";
        }
        if (L("#" + str2)) {
            if (L("#" + str)) {
                return "FF000000";
            }
        }
        if (M("#" + str2)) {
            if (M("#" + str)) {
                return "FFFFFFFF";
            }
        }
        return str2;
    }

    public static int h0(Context context) {
        try {
            return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode;
        } catch (PackageManager.NameNotFoundException e2) {
            throw new RuntimeException("Could not get package name: " + e2);
        }
    }

    public static void i(Activity activity, String str) {
        float[] fArr = new float[3];
        Color.colorToHSV(Color.parseColor("#" + str), fArr);
        fArr[2] = fArr[2] * 0.8f;
        int HSVToColor = Color.HSVToColor(fArr);
        activity.getWindow().addFlags(Integer.MIN_VALUE);
        activity.getWindow().setStatusBarColor(HSVToColor);
    }

    public static String i0(Context context) {
        try {
            return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName;
        } catch (PackageManager.NameNotFoundException unused) {
            return "";
        }
    }

    static void i1(Context context) {
        SharedPreferences.Editor edit = context.getSharedPreferences("sh", 0).edit();
        edit.putLong("fult_rew", System.currentTimeMillis());
        edit.putInt("n_imp", 0);
        edit.putInt("n_imp_chat", 0);
        edit.commit();
        V6 = 0;
        W6 = 0;
    }

    public static Bitmap j0(String str) {
        try {
            HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(str).openConnection();
            httpURLConnection.setDoInput(true);
            httpURLConnection.connect();
            return BitmapFactory.decodeStream(httpURLConnection.getInputStream());
        } catch (IOException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public static Bitmap k0(Bitmap bitmap, int i2) {
        int height;
        if (bitmap != null && !bitmap.isRecycled()) {
            try {
                int min = Math.min(bitmap.getWidth(), bitmap.getHeight());
                int i3 = 0;
                if (bitmap.getWidth() > bitmap.getHeight()) {
                    i3 = (bitmap.getWidth() / 2) - (min / 2);
                    height = 0;
                } else {
                    height = (bitmap.getHeight() / 2) - (min / 2);
                }
                Bitmap createBitmap = Bitmap.createBitmap(bitmap, i3, height, min, min);
                int width = createBitmap.getWidth() + i2;
                int height2 = createBitmap.getHeight() + i2;
                Bitmap createBitmap2 = Bitmap.createBitmap(width, height2, Bitmap.Config.ARGB_8888);
                Shader.TileMode tileMode = Shader.TileMode.CLAMP;
                BitmapShader bitmapShader = new BitmapShader(createBitmap, tileMode, tileMode);
                Paint paint = new Paint();
                paint.setAntiAlias(true);
                paint.setShader(bitmapShader);
                Canvas canvas = new Canvas(createBitmap2);
                float f2 = (width > height2 ? height2 : width) / 2.0f;
                canvas.drawCircle(width / 2, height2 / 2, f2, paint);
                paint.setShader(null);
                paint.setStyle(Paint.Style.STROKE);
                paint.setColor(-12303292);
                paint.setStrokeWidth(i2);
                canvas.drawCircle(width / 2, height2 / 2, f2 - (i2 / 2), paint);
                return createBitmap2;
            } catch (OutOfMemoryError unused) {
            }
        }
        return null;
    }

    static boolean k1(android.content.Context r3, android.net.Uri r4, java.lang.String r5) {
        throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.config.k1(android.content.Context, android.net.Uri, java.lang.String):boolean");
    }

    static int m(BitmapFactory.Options options, int i2, int i3) {
        int i4 = options.outHeight;
        int i7 = options.outWidth;
        if (i7 <= i2 && i4 <= i3) {
            return 1;
        }
        return Math.round(i7 / n(i7, i4, i2, i3));
    }

    static int n(int i2, int i3, int i4, int i7) {
        if (i2 > i4) {
            i3 = Math.round((i3 * i4) / i2);
            i2 = i4;
        }
        return i3 > i7 ? Math.round((i2 * i7) / i3) : i2;
    }

    public static int o(int r2, float r3, int r4) {
        throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.config.o(int, float, int):int");
    }

    public static void o1(TextInputLayout textInputLayout, Boolean bool, String str) {
        if (str == null || str.equals("") || str.equals("#")) {
            return;
        }
        String str2 = bool.booleanValue() ? "FFFFFF" : "000000";
        textInputLayout.setHintTextColor(ColorStateList.valueOf(Color.parseColor("#" + str2)));
        textInputLayout.setHelperTextColor(ColorStateList.valueOf(Color.parseColor("#" + str2)));
        textInputLayout.setBoxStrokeColor(Color.parseColor("#" + str2));
        EditText editText = textInputLayout.getEditText();
        editText.setTextColor(Color.parseColor("#" + str2));
        editText.setBackgroundColor(Color.parseColor("#00000000"));
    }

    public static void q(CheckBox checkBox, String str) {
        if (str == null || str.equals("") || str.equals("#")) {
            return;
        }
        checkBox.setButtonTintList(new ColorStateList(new int[][]{new int[]{R.attr.state_focused}, new int[]{-16842908}}, new int[]{Color.parseColor("#" + str), Color.parseColor("#" + str)}));
    }

    public static Intent r(Intent intent, Bundle bundle) {
        intent.putExtra("externo", true);
        intent.putExtra("idchat", bundle.getInt("idchat"));
        intent.putExtra("idtema", bundle.getInt("idtema"));
        intent.putExtra("fotos_perfil", bundle.getInt("fotos_perfil"));
        intent.putExtra("fnac", bundle.getInt("fnac"));
        intent.putExtra("sexo", bundle.getInt("sexo"));
        intent.putExtra("descr", bundle.getInt("descr"));
        intent.putExtra("dist", bundle.getInt("dist"));
        intent.putExtra("privados", bundle.getBoolean("privados"));
        intent.putExtra("coments", bundle.getBoolean("coments"));
        intent.putExtra("galeria", bundle.getBoolean("galeria"));
        intent.putExtra("fotos_chat", bundle.getInt("fotos_chat"));
        intent.putExtra("c1", bundle.getString("c1"));
        intent.putExtra("c2", bundle.getString("c2"));
        return intent;
    }

    public static boolean s0(Context context) {
        NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
        return activeNetworkInfo != null && activeNetworkInfo.isConnected() && B0(activeNetworkInfo.getType(), activeNetworkInfo.getSubtype());
    }

    static void t(Context context) {
        Q0(Toast.makeText(context, 2131886350, 0));
    }

    public static Bitmap t0(Context context) {
        String string = context.getSharedPreferences("sh", 0).getString("i", "");
        if (string.equals("") || string.length() <= 23 || !string.substring(23, 24).equals("1")) {
            return null;
        }
        return BitmapFactory.decodeResource(context.getResources(), 2131231335);
    }

    public static boolean u(String str, Context context) {
        PackageInfo packageInfo;
        String[] strArr;
        Boolean bool = Boolean.FALSE;
        try {
            packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 4096);
        } catch (PackageManager.NameNotFoundException e2) {
            e2.printStackTrace();
            packageInfo = null;
        }
        if (packageInfo != null && (strArr = packageInfo.requestedPermissions) != null) {
            bool = Boolean.valueOf(Arrays.asList(strArr).contains(str));
        }
        return bool.booleanValue();
    }

    public static String v(String str) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("ddMMyyHHmm");
        simpleDateFormat.setTimeZone(TimeZone.getTimeZone("Europe/Madrid"));
        try {
            Date parse = simpleDateFormat.parse(str);
            SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("ddMMyyHHmm");
            simpleDateFormat2.setTimeZone(TimeZone.getDefault());
            return simpleDateFormat2.format(parse);
        } catch (Exception e2) {
            e2.printStackTrace();
            return "";
        }
    }

    public static String w(String str) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("ddMMyyHHmm");
        simpleDateFormat.setTimeZone(TimeZone.getDefault());
        try {
            Date parse = simpleDateFormat.parse(str);
            SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("ddMMyyHHmm");
            simpleDateFormat2.setTimeZone(TimeZone.getTimeZone("Europe/Madrid"));
            return simpleDateFormat2.format(parse);
        } catch (Exception e2) {
            e2.printStackTrace();
            return "";
        }
    }

    public static java.util.ArrayList w1(java.io.InputStream r16) {
        throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.config.w1(java.io.InputStream):java.util.ArrayList");
    }

    public static void x(File file, File file2) {
        FileInputStream fileInputStream = new FileInputStream(file);
        FileOutputStream fileOutputStream = new FileOutputStream(file2);
        byte[] bArr = new byte[1024];
        while (true) {
            int read = fileInputStream.read(bArr);
            if (read <= 0) {
                fileInputStream.close();
                fileOutputStream.close();
                return;
            }
            fileOutputStream.write(bArr, 0, read);
        }
    }

    public static void y(File file, OutputStream outputStream) {
        FileInputStream fileInputStream = new FileInputStream(file);
        byte[] bArr = new byte[1024];
        while (true) {
            int read = fileInputStream.read(bArr);
            if (read <= 0) {
                fileInputStream.close();
                outputStream.close();
                return;
            }
            outputStream.write(bArr, 0, read);
        }
    }

    public static NotificationChannel z(Context context, int i2) {
        if (Build.VERSION.SDK_INT < 26) {
            return null;
        }
        NotificationManager notificationManager = (NotificationManager) context.getSystemService("notification");
        NotificationChannel a2 = r.g.a("channel_" + i2, "channel " + i2, 3);
        if (i2 == 0) {
            androidx.core.app.a0.a(a2, (Uri) null, (AudioAttributes) null);
        }
        r.b.a(notificationManager, a2);
        return a2;
    }

    int A(java.lang.String[] r29, java.lang.String[] r30, android.os.Bundle r31, android.content.Intent r32) {
        throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.config.A(java.lang.String[], java.lang.String[], android.os.Bundle, android.content.Intent):int");
    }

    com.eugene.hymnesetlouanges.k A0(Context context) {
        com.eugene.hymnesetlouanges.k kVar = new com.eugene.hymnesetlouanges.k();
        kVar.b = true;
        kVar.c = false;
        Intent intent = new Intent(context, (Class<?>) t_buscador_form.class);
        if (!this.y0 && !this.z0 && !this.A0 && !this.B0 && !this.C0 && !this.D0 && !this.E0) {
            intent = new Intent(context, (Class<?>) t_buscador.class);
            intent.putExtra("orden", this.V0.indexOf("TITULO") == -1 ? this.V0.indexOf("PRECIO") != -1 ? 2 : 3 : 1);
            intent.putExtra("orden_tipo", this.V0.contains("ASC"));
        }
        kVar.a = intent;
        return kVar;
    }

    com.eugene.hymnesetlouanges.k C(Integer num, Context context) {
        Intent intent;
        Intent intent2;
        Intent intent3;
        Intent intent4;
        Intent intent5;
        Intent intent6;
        Intent intent7;
        Intent intent8;
        Intent intent9;
        Intent intent10;
        Intent intent11;
        Intent intent12;
        Intent intent13;
        Intent intent14;
        Intent intent15;
        com.eugene.hymnesetlouanges.k kVar = new com.eugene.hymnesetlouanges.k();
        kVar.b = true;
        kVar.c = false;
        kVar.d = false;
        if (num.intValue() == -1) {
            int i2 = 0;
            while (true) {
                com.eugene.hymnesetlouanges.m[] mVarArr = this.Z1;
                if (i2 >= mVarArr.length) {
                    break;
                }
                if (!mVarArr[i2].B) {
                    num = Integer.valueOf(i2);
                    break;
                }
                i2++;
            }
        }
        if (num.intValue() >= 9997) {
            this.c = 0;
            SharedPreferences.Editor edit = getSharedPreferences("sh", 0).edit();
            edit.putInt("ind_secc_sel", this.b);
            edit.putInt("ind_secc_sel_2", this.c);
            edit.commit();
            kVar.a = new Intent(context, (Class<?>) t_chat_contra.class);
            return kVar;
        }
        com.eugene.hymnesetlouanges.m mVar = this.Z1[num.intValue()];
        if (!mVar.B) {
            this.b = num.intValue();
        }
        this.c = num.intValue();
        SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
        SharedPreferences.Editor edit2 = sharedPreferences.edit();
        edit2.putInt("ind_secc_sel", this.b);
        edit2.putInt("ind_secc_sel_2", this.c);
        edit2.commit();
        boolean z2 = sharedPreferences.getBoolean("chat" + mVar.y + "_validado", true);
        int i3 = mVar.t;
        if (i3 == 1) {
            if (z2) {
                intent15 = new Intent(context, (Class<?>) t_url.class);
            } else {
                Intent intent16 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent16.putExtra("clase", mVar.t);
                intent16.putExtra("ind", num);
                intent15 = intent16;
            }
            intent15.putExtra(ImagesContract.URL, mVar.e);
            kVar.a = intent15;
            return kVar;
        }
        if (i3 == 2) {
            if (z2) {
                intent14 = new Intent(context, (Class<?>) t_html.class);
            } else {
                intent14 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent14.putExtra("clase", mVar.t);
                intent14.putExtra("ind", num);
            }
            intent14.putExtra("idsecc", num);
            kVar.a = intent14;
            return kVar;
        }
        if (i3 == 3) {
            if (z2) {
                intent13 = new Intent(context, (Class<?>) t_and.class);
            } else {
                intent13 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent13.putExtra("clase", mVar.t);
                intent13.putExtra("ind", num);
            }
            intent13.putExtra("idsecc", num);
            kVar.a = intent13;
            return kVar;
        }
        if (i3 == 4) {
            if (z2) {
                return z0(context);
            }
            Intent intent17 = new Intent(context, (Class<?>) t_chat_contra.class);
            intent17.putExtra("clase", mVar.t);
            intent17.putExtra("ind", num);
            kVar.a = intent17;
            return kVar;
        }
        if (i3 == 5) {
            if (z2) {
                return A0(context);
            }
            Intent intent18 = new Intent(context, (Class<?>) t_chat_contra.class);
            intent18.putExtra("clase", mVar.t);
            intent18.putExtra("ind", num);
            kVar.a = intent18;
            return kVar;
        }
        if (i3 == 6) {
            if (z2) {
                int i4 = mVar.N;
                intent12 = i4 == 0 ? new Intent(context, (Class<?>) t_video.class) : i4 == 1 ? new Intent(context, (Class<?>) t_video_exoplayer.class) : new Intent(context, (Class<?>) t_video_playerjs.class);
            } else {
                intent12 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent12.putExtra("clase", mVar.t);
            }
            intent12.putExtra(ImagesContract.URL, mVar.e);
            intent12.putExtra("ua", mVar.j);
            intent12.putExtra("ind", num);
            kVar.a = intent12;
            return kVar;
        }
        if (i3 == 7) {
            if (z2) {
                intent11 = new Intent(context, (Class<?>) t_radio.class);
            } else {
                intent11 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent11.putExtra("clase", mVar.t);
            }
            intent11.putExtra("ind", num);
            kVar.a = intent11;
            return kVar;
        }
        if (i3 == 8) {
            if (z2) {
                intent10 = new Intent(context, (Class<?>) t_rss.class);
            } else {
                intent10 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent10.putExtra("clase", mVar.t);
            }
            intent10.putExtra("ind", num);
            kVar.a = intent10;
            return kVar;
        }
        if (i3 == 9) {
            Intent intent19 = new Intent(context, (Class<?>) t_chat_contra.class);
            intent19.putExtra("ind", num);
            kVar.a = intent19;
            return kVar;
        }
        if (i3 == 10) {
            if (mVar.K0 > 0) {
                if (z2) {
                    intent9 = new Intent(context, (Class<?>) t_buscchats_lista.class);
                } else {
                    intent9 = new Intent(context, (Class<?>) t_chat_contra.class);
                    intent9.putExtra("clase", mVar.t);
                }
                intent9.putExtra("ind", num);
                intent9.putExtra("idcat", mVar.J0);
                intent9.putExtra("idsubcat", mVar.K0);
            } else {
                if (z2) {
                    intent9 = new Intent(context, (Class<?>) t_buscchats.class);
                } else {
                    intent9 = new Intent(context, (Class<?>) t_chat_contra.class);
                    intent9.putExtra("clase", mVar.t);
                }
                intent9.putExtra("ind", num);
                intent9.putExtra("idcat", mVar.J0);
            }
            kVar.a = intent9;
            return kVar;
        }
        if (i3 == 11) {
            if (z2) {
                intent8 = new Intent(context, (Class<?>) t_buscusus.class);
            } else {
                intent8 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent8.putExtra("clase", mVar.t);
            }
            intent8.putExtra("ind", num);
            kVar.a = intent8;
            return kVar;
        }
        if (i3 == 12) {
            if (z2) {
                intent7 = new Intent(context, (Class<?>) t_submenu.class);
            } else {
                intent7 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent7.putExtra("clase", mVar.t);
            }
            intent7.putExtra("ind", num);
            kVar.a = intent7;
            return kVar;
        }
        if (i3 == 22) {
            if (z2) {
                intent6 = new Intent(context, (Class<?>) t_submenu_ultimas.class);
            } else {
                intent6 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent6.putExtra("clase", mVar.t);
            }
            intent6.putExtra("ind", num);
            kVar.a = intent6;
            return kVar;
        }
        if (i3 == 13) {
            if (z2) {
                intent5 = new Intent(context, (Class<?>) t_gal.class);
            } else {
                intent5 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent5.putExtra("clase", mVar.t);
            }
            intent5.putExtra("ind", num);
            kVar.a = intent5;
            return kVar;
        }
        if (i3 == 14) {
            if (z2) {
                intent4 = new Intent(context, (Class<?>) t_card.class);
            } else {
                intent4 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent4.putExtra("clase", mVar.t);
            }
            intent4.putExtra("ind", num);
            kVar.a = intent4;
            return kVar;
        }
        if (i3 == 16) {
            if (z2) {
                intent3 = new Intent(context, (Class<?>) t_buscvideos.class);
            } else {
                intent3 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent3.putExtra("clase", mVar.t);
            }
            intent3.putExtra("ind", num);
            kVar.a = intent3;
            return kVar;
        }
        if (i3 == 19) {
            if (z2) {
                intent2 = new Intent(context, (Class<?>) t_vistafb.class);
            } else {
                intent2 = new Intent(context, (Class<?>) t_chat_contra.class);
                intent2.putExtra("clase", mVar.t);
            }
            intent2.putExtra("ind", num);
            kVar.a = intent2;
            return kVar;
        }
        if (i3 == 20) {
            if (z2) {
                intent = new Intent(context, (Class<?>) t_qr.class);
            } else {
                intent = new Intent(context, (Class<?>) t_chat_contra.class);
                intent.putExtra("clase", mVar.t);
            }
            intent.putExtra("ind", num);
            kVar.a = intent;
        }
        return kVar;
    }

    public Bitmap E(Uri uri, int i2, int i3) {
        InputStream openInputStream = getContentResolver().openInputStream(uri);
        BitmapFactory.Options options = new BitmapFactory.Options();
        options.inJustDecodeBounds = true;
        BitmapFactory.decodeStream(openInputStream, null, options);
        openInputStream.close();
        options.inSampleSize = m(options, i2, i3);
        InputStream openInputStream2 = getContentResolver().openInputStream(uri);
        options.inJustDecodeBounds = false;
        Bitmap decodeStream = BitmapFactory.decodeStream(openInputStream2, null, options);
        openInputStream2.close();
        return decodeStream;
    }

    com.eugene.hymnesetlouanges.c F0(Context context, boolean z2) {
        return G0(context, z2, z2);
    }

    com.eugene.hymnesetlouanges.c G0(Context context, boolean z2, boolean z3) {
        ArrayList arrayList;
        if (getSharedPreferences("sh", 0).getBoolean("sinads", false)) {
            return null;
        }
        com.eugene.hymnesetlouanges.c cVar = new com.eugene.hymnesetlouanges.c();
        cVar.a = null;
        cVar.b = null;
        cVar.c = null;
        this.f38a6 = false;
        if (this.J3 != 0 && !z2) {
            ArrayList arrayList2 = new ArrayList();
            if (!this.t3.equals("") && !z3) {
                arrayList2.add(1);
            }
            if (!this.s3.equals("") && (arrayList = this.f40b6) != null && arrayList.size() > 0 && ((this.t3.equals("") || !Z6) && this.H3.equals(""))) {
                arrayList2.add(2);
            }
            if (!this.w3.equals("")) {
                arrayList2.add(3);
            }
            if (!this.x3.equals("")) {
                arrayList2.add(4);
            }
            if (!this.y3.equals("") && UnityAds.isInitialized()) {
                arrayList2.add(7);
            }
            if (!this.z3.equals("")) {
                arrayList2.add(8);
            }
            if (!this.H3.equals("")) {
                arrayList2.add(9);
            }
            int intValue = !arrayList2.isEmpty() ? ((Integer) arrayList2.get(new Random().nextInt(((arrayList2.size() - 1) - 0) + 1) + 0)).intValue() : 0;
            try {
                if (intValue == 1) {
                    cVar.a = new AdView(context);
                    AdSize adSize = this.O3;
                    if (adSize == AdSize.LARGE_BANNER && getResources().getConfiguration().orientation == 2) {
                        adSize = AdSize.SMART_BANNER;
                    }
                    cVar.a.setAdSize(adSize);
                    cVar.a.setAdUnitId(this.t3);
                    if (this.J3 == 1) {
                        cVar.a.setTag(2131361807);
                        ((LinearLayout) this.a).addView(cVar.a);
                    } else {
                        Activity activity = (Activity) context;
                        ((LinearLayout) activity.findViewById(2131362610)).addView(cVar.a);
                        ((LinearLayout) activity.findViewById(2131362610)).setVisibility(0);
                    }
                    this.f38a6 = true;
                    cVar.a.setAdListener(new k());
                    cVar.a.loadAd(new AdRequest.Builder().build());
                } else if (intValue == 2) {
                    j(context);
                } else if (intValue == 3) {
                    if (this.O3 == AdSize.LARGE_BANNER && getResources().getConfiguration().orientation == 1) {
                        cVar.b = new com.facebook.ads.AdView(context, this.w3, com.facebook.ads.AdSize.BANNER_HEIGHT_90);
                    } else {
                        cVar.b = new com.facebook.ads.AdView(context, this.w3, com.facebook.ads.AdSize.BANNER_HEIGHT_50);
                    }
                    if (this.J3 == 1) {
                        cVar.b.setTag(2131361807);
                        ((LinearLayout) this.a).addView(cVar.b);
                    } else {
                        Activity activity2 = (Activity) context;
                        ((LinearLayout) activity2.findViewById(2131362610)).setBackgroundColor(-7829368);
                        ((LinearLayout) activity2.findViewById(2131362610)).setPadding(0, F(this, 3), 0, 0);
                        ((LinearLayout) activity2.findViewById(2131362610)).addView(cVar.b);
                        ((LinearLayout) activity2.findViewById(2131362610)).setVisibility(0);
                    }
                    this.f38a6 = true;
                    cVar.b.loadAd();
                } else if (intValue == 4) {
                    Banner banner = new Banner(context, new v());
                    cVar.c = banner;
                    banner.setAdTag("BANNER");
                    if (this.J3 == 1) {
                        cVar.c.setTag(2131361807);
                    }
                    if (this.O3 == AdSize.LARGE_BANNER && getResources().getConfiguration().orientation == 1) {
                        cVar.c.loadAd(320, 100);
                    } else {
                        cVar.c.loadAd(320, 50);
                    }
                } else if (intValue == 7) {
                    if (UnityAds.isInitialized()) {
                        g0 g0Var = new g0(cVar);
                        UnityBannerSize unityBannerSize = new UnityBannerSize(320, 50);
                        if (this.O3 == AdSize.LARGE_BANNER && getResources().getConfiguration().orientation == 1) {
                            unityBannerSize = new UnityBannerSize(320, 100);
                        }
                        BannerView bannerView = new BannerView((Activity) context, this.y3, unityBannerSize);
                        cVar.d = bannerView;
                        bannerView.setListener(g0Var);
                        cVar.d.load();
                    }
                } else if (intValue == 8) {
                    ISBannerSize iSBannerSize = ISBannerSize.BANNER;
                    if (this.O3 == AdSize.LARGE_BANNER && getResources().getConfiguration().orientation == 1) {
                        iSBannerSize = ISBannerSize.LARGE;
                    }
                    IronSourceBannerLayout ironSourceBannerLayout = this.S4;
                    if (ironSourceBannerLayout != null) {
                        IronSource.destroyBanner(ironSourceBannerLayout);
                    }
                    IronSourceBannerLayout createBanner = IronSource.createBanner((Activity) context, iSBannerSize);
                    this.S4 = createBanner;
                    createBanner.setBannerListener(new k0());
                    IronSource.loadBanner(this.S4);
                } else if (intValue == 9) {
                    BannerAd bannerAd = new BannerAd(context);
                    cVar.e = bannerAd;
                    bannerAd.setAutoRefresh(false);
                    cVar.e.setAdSize((this.O3 == AdSize.LARGE_BANNER && getResources().getConfiguration().orientation == 1) ? com.wortise.ads.AdSize.HEIGHT_90 : com.wortise.ads.AdSize.HEIGHT_50);
                    cVar.e.setAdUnitId(this.H3);
                    cVar.e.setListener(new l0(context, cVar));
                    cVar.e.loadAd();
                }
            } catch (Exception unused) {
            }
        }
        return cVar;
    }

    void I0(Context context, ImageView imageView) {
        Bitmap bitmap;
        boolean z2 = false;
        SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
        if (this.s0 == 2 || sharedPreferences.getString("nick", "").equals("") || !p0(this, 1).exists()) {
            if (this.p0) {
                c0("ico_perfil", imageView);
                return;
            }
            Drawable drawable = ((Activity) context).getResources().getDrawable(2131231484);
            drawable.setColorFilter(Color.parseColor("#" + this.x1), PorterDuff.Mode.MULTIPLY);
            imageView.setImageDrawable(drawable);
            return;
        }
        int i2 = this.s0;
        if (i2 == 0 || i2 == 1) {
            File p02 = p0(this, 1);
            try {
                BitmapFactory.Options options = new BitmapFactory.Options();
                options.inJustDecodeBounds = true;
                BitmapFactory.decodeFile(p02.getPath(), options);
                int i3 = options.outWidth;
                int i4 = options.outHeight;
                if (i3 <= 200 && i4 <= 200) {
                    z2 = true;
                }
                if (z2) {
                    bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), Uri.fromFile(p02));
                } else {
                    int round = Math.round(i3 / n(i3, i4, 200, 200));
                    BitmapFactory.Options options2 = new BitmapFactory.Options();
                    options2.inSampleSize = round;
                    try {
                        bitmap = BitmapFactory.decodeFile(p02.getPath(), options2);
                    } catch (OutOfMemoryError unused) {
                        bitmap = null;
                    }
                }
                Bitmap k02 = this.s0 == 0 ? k0(bitmap, 1) : D(bitmap, 1);
                int F = F(this, 4);
                imageView.setPadding(F, F, F, F);
                imageView.setImageBitmap(k02);
            } catch (FileNotFoundException | IOException | OutOfMemoryError unused2) {
            }
        }
    }

    public void J0(int i2, String str) {
        SharedPreferences.Editor edit = getSharedPreferences("sh", 0).edit();
        edit.putString("f2_idfrase", "0");
        edit.putString("f2_id", "1");
        edit.putString("f2_nombre", getResources().getString(2131886214));
        edit.putString("f2_privados", "0");
        if (i2 == 0) {
            edit.putString("f2_frase", getResources().getString(2131886215));
            edit.putString("f2_b64", "");
        } else if (i2 == 1) {
            edit.putString("f2_frase", "");
            edit.putString("f2_b64", "es_ad");
        }
        edit.putString("f2_fcrea", new SimpleDateFormat("ddMMyyHHmm").format(new Date()));
        edit.putString("f2_tipo", "0");
        edit.putString("f2_b64_th", "");
        edit.putString("f2_idvideo", "");
        edit.putString("f2_formato", "");
        edit.putString("f2_idtema", str);
        edit.putString("f2_vfoto", "0");
        edit.putString("f2_fnac_d", "1");
        edit.putString("f2_fnac_m", "1");
        edit.putString("f2_fnac_a", "1977");
        edit.putString("f2_sexo", "0");
        edit.putString("f2_coments", "0");
        edit.putBoolean("f2_ultimas", false);
        edit.putString("f2_ts", System.currentTimeMillis() + "");
        edit.commit();
        if (i2 == 0) {
            new Handler().postDelayed(new s(str), 1000L);
        }
    }

    protected void K0(LinearLayout linearLayout, int i2, int i3) {
        ArrayList arrayList;
        ArrayList arrayList2;
        ArrayList arrayList3 = new ArrayList();
        String str = this.P3;
        if (str != null && !str.equals("") && (arrayList2 = this.f40b6) != null && arrayList2.size() > 0) {
            arrayList3.add(1);
        }
        String str2 = this.Q3;
        if (str2 != null && !str2.equals("") && (arrayList = this.f42c6) != null && arrayList.size() > 0) {
            arrayList3.add(2);
        }
        int intValue = !arrayList3.isEmpty() ? ((Integer) arrayList3.get(new Random().nextInt(((arrayList3.size() - 1) - 0) + 1) + 0)).intValue() : 0;
        if (intValue != 1) {
            if (intValue == 2) {
                ((RelativeLayout) linearLayout.findViewById(2131363173)).getLayoutParams().width = i3;
                NativeAdDetails nativeAdDetails = (NativeAdDetails) this.f42c6.get(new Random().nextInt(((this.f42c6.size() - 1) - 0) + 1) + 0);
                ((TextView) linearLayout.findViewById(2131363174)).setTextColor(i2);
                ((TextView) linearLayout.findViewById(2131363174)).setText(getResources().getString(2131886390) + " app");
                ((ImageView) linearLayout.findViewById(2131363175)).setImageBitmap(nativeAdDetails.getImageBitmap());
                nativeAdDetails.registerViewForInteraction(linearLayout);
                linearLayout.findViewById(2131363173).setVisibility(0);
                return;
            }
            return;
        }
        ((RelativeLayout) linearLayout.findViewById(2131362958)).getLayoutParams().width = i3;
        NativeAd nativeAd = (NativeAd) this.f40b6.get(new Random().nextInt(((this.f40b6.size() - 1) - 0) + 1) + 0);
        ((TextView) linearLayout.findViewById(2131362960)).setTextColor(i2);
        ((TextView) linearLayout.findViewById(2131362960)).setText(getResources().getString(2131886390) + " app");
        nativeAd.downloadAndDisplayImage(getApplicationContext(), (ImageView) linearLayout.findViewById(2131362961), nativeAd.getWideImageURL());
        ArrayList arrayList4 = new ArrayList();
        arrayList4.add(linearLayout.findViewById(2131362963));
        arrayList4.add(linearLayout.findViewById(2131362960));
        nativeAd.registerClickableViews(arrayList4);
        nativeAd.setNativeAdView(linearLayout.findViewById(2131362963));
        linearLayout.findViewById(2131362963).setVisibility(0);
    }

    void L0(Context context, Boolean bool) {
        MBNewInterstitialHandler mBNewInterstitialHandler;
        com.vungle.ads.z0 z0Var;
        StartAppAd startAppAd;
        com.facebook.ads.InterstitialAd interstitialAd;
        com.wortise.ads.interstitial.InterstitialAd interstitialAd2;
        com.google.android.gms.ads.interstitial.InterstitialAd interstitialAd3;
        int i2 = V6;
        if (i2 == 1 && (interstitialAd3 = O6) != null) {
            interstitialAd3.show((Activity) context);
            V6 = 0;
            W6 = 0;
            return;
        }
        if (i2 == 12 && (interstitialAd2 = S6) != null && interstitialAd2.isAvailable()) {
            S6.showAd();
            V6 = 0;
            W6 = 0;
            return;
        }
        int i3 = V6;
        if (i3 == 2 || ((i3 == 1 && !f35y6.equals("")) || (V6 == 12 && !f35y6.equals("")))) {
            if (P6 == null) {
                P6 = new Interstitial(getApplicationContext(), A6);
                if (M6.booleanValue()) {
                    P6.setMute(true);
                }
                if (!N6.booleanValue()) {
                    P6.setAutoPlay(false);
                }
                P6.setBackButtonCanClose(true);
                P6.setSkipText(getResources().getString(2131886117));
                P6.setOnAdLoadedCallback(new j());
                P6.setOnAdErrorCallback(new l());
                P6.setOnAdClosedCallback(new m());
                P6.loadAd();
            }
            V6 = 0;
            W6 = 0;
            return;
        }
        if (V6 == 3 && (interstitialAd = Q6) != null && interstitialAd.isAdLoaded()) {
            Q6.show();
            V6 = 0;
            W6 = 0;
            return;
        }
        if (V6 == 4 && (startAppAd = R6) != null && startAppAd.isReady()) {
            R6.showAd(X6 == 1 ? "Intersticial normal" : "INTERSTITIAL");
            V6 = 0;
            W6 = 0;
            return;
        }
        int i4 = V6;
        if (i4 == 6) {
            Intent intent = new Intent(context, (Class<?>) t_url.class);
            intent.putExtra(ImagesContract.URL, this.H4);
            try {
                intent.addFlags(Cast.MAX_MESSAGE_LENGTH);
            } catch (Exception unused) {
            }
            ((Activity) context).startActivityForResult(intent, 0);
            V6 = 0;
            W6 = 0;
            return;
        }
        if (i4 == 7) {
            c(context, this.I4);
            V6 = 0;
            W6 = 0;
            return;
        }
        if (i4 == 9 && UnityAds.isInitialized()) {
            UnityAds.load(H6, new n(context));
            V6 = 0;
            W6 = 0;
            return;
        }
        int i7 = V6;
        if (i7 == 10) {
            if (!IronSource.isInterstitialReady()) {
                try {
                    IronSource.loadInterstitial();
                    return;
                } catch (Exception unused2) {
                    return;
                }
            } else {
                IronSource.showInterstitial();
                V6 = 0;
                W6 = 0;
                return;
            }
        }
        if (i7 == 14 && (z0Var = T6) != null && z0Var.canPlayAd().booleanValue()) {
            T6.play(context);
            V6 = 0;
            W6 = 0;
        } else if (V6 == 15 && (mBNewInterstitialHandler = U6) != null && mBNewInterstitialHandler.isReady()) {
            U6.show();
            V6 = 0;
            W6 = 0;
        }
    }

    void M0(Context context) {
        MBNewInterstitialHandler mBNewInterstitialHandler;
        com.vungle.ads.z0 z0Var;
        StartAppAd startAppAd;
        com.facebook.ads.InterstitialAd interstitialAd;
        com.wortise.ads.interstitial.InterstitialAd interstitialAd2;
        com.google.android.gms.ads.interstitial.InterstitialAd interstitialAd3;
        int i2 = W6;
        if (i2 == 1 && (interstitialAd3 = O6) != null) {
            interstitialAd3.show((Activity) context);
            V6 = 0;
            W6 = 0;
            return;
        }
        if (i2 == 12 && (interstitialAd2 = S6) != null && interstitialAd2.isAvailable()) {
            S6.showAd();
            V6 = 0;
            W6 = 0;
            return;
        }
        int i3 = W6;
        if (i3 == 2 || ((i3 == 1 && !f35y6.equals("")) || (W6 == 12 && !f35y6.equals("")))) {
            if (P6 == null) {
                P6 = new Interstitial(getApplicationContext(), A6);
                if (M6.booleanValue()) {
                    P6.setMute(true);
                }
                if (!N6.booleanValue()) {
                    P6.setAutoPlay(false);
                }
                P6.setBackButtonCanClose(true);
                P6.setSkipText(getResources().getString(2131886117));
                P6.setOnAdLoadedCallback(new o());
                P6.setOnAdErrorCallback(new p());
                P6.setOnAdClosedCallback(new q());
                P6.loadAd();
            }
            V6 = 0;
            W6 = 0;
            return;
        }
        if (W6 == 3 && (interstitialAd = Q6) != null && interstitialAd.isAdLoaded()) {
            Q6.show();
            V6 = 0;
            W6 = 0;
            return;
        }
        if (W6 == 4 && (startAppAd = R6) != null && startAppAd.isReady()) {
            R6.showAd(X6 == 1 ? "Intersticial chat" : "INTERSTITIAL");
            V6 = 0;
            W6 = 0;
            return;
        }
        int i4 = W6;
        if (i4 == 6) {
            Intent intent = new Intent(context, (Class<?>) t_url.class);
            intent.putExtra(ImagesContract.URL, this.H4);
            try {
                intent.addFlags(Cast.MAX_MESSAGE_LENGTH);
            } catch (Exception unused) {
            }
            ((Activity) context).startActivityForResult(intent, 0);
            V6 = 0;
            W6 = 0;
            return;
        }
        if (i4 == 7) {
            Intent intent2 = new Intent();
            intent2.setAction("android.intent.action.VIEW");
            intent2.setData(Uri.parse(this.I4));
            intent2.addFlags(268435456);
            ((Activity) context).startActivity(intent2);
            V6 = 0;
            W6 = 0;
            return;
        }
        if (i4 == 9 && UnityAds.isInitialized()) {
            UnityAds.load(H6, new r(context));
            V6 = 0;
            W6 = 0;
            return;
        }
        if (W6 == 10 && IronSource.isInterstitialReady()) {
            IronSource.showInterstitial();
            V6 = 0;
            W6 = 0;
        } else if (W6 == 14 && (z0Var = T6) != null && z0Var.canPlayAd().booleanValue()) {
            T6.play(context);
            V6 = 0;
            W6 = 0;
        } else if (W6 == 15 && (mBNewInterstitialHandler = U6) != null && mBNewInterstitialHandler.isReady()) {
            U6.show();
            V6 = 0;
            W6 = 0;
        }
    }

    public boolean N() {
        return O() || P() || Q();
    }

    void O0(Context context, int i2, String str, String str2) {
        String str3;
        String replace;
        String str4;
        SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
        long j2 = sharedPreferences.getLong("idusu", 0L);
        String str5 = this.f3;
        if (str5 == null || str5.equals("")) {
            String str6 = getResources().getString(2131886937).replace("@X@", this.d3 + " " + this.e3) + "\n\n" + getResources().getString(2131886939);
            int i3 = this.h3;
            if (i3 == 0) {
                replace = str6.replace("@Y@", getResources().getString(2131886108));
            } else if (i3 == 18000) {
                replace = str6.replace("@Y@", getResources().getString(2131886741));
            } else {
                if (i3 == 1) {
                    str3 = "1 " + getResources().getString(2131886533);
                } else if (i3 < 25) {
                    str3 = this.h3 + " " + getResources().getString(2131886534);
                } else if (i3 < 2161) {
                    str3 = (this.h3 / 24) + " " + getResources().getString(2131886387);
                } else if (i3 == 8784) {
                    str3 = "1 " + getResources().getString(2131886180);
                } else if (i3 == 17568) {
                    str3 = "2 " + getResources().getString(2131886181);
                } else {
                    str3 = "";
                }
                if (str3 == "") {
                    return;
                } else {
                    replace = str6.replace("@Y@", str3);
                }
            }
            if (this.i3 == 1) {
                str4 = (replace + "\n\n" + getResources().getString(2131886940)) + "\n\n" + getResources().getString(2131886941);
            } else {
                str4 = replace;
            }
        } else {
            str4 = this.f3;
        }
        AlertDialog create = new AlertDialog.Builder(context).setNegativeButton(2131886227, (DialogInterface.OnClickListener) null).setPositiveButton(2131886114, new d0(j2, i2, sharedPreferences, context)).setMessage(str4).create();
        if (!str.equals("")) {
            create.setOnShowListener(new e0(create, str));
        }
        create.show();
        try {
            ((TextView) create.findViewById(R.id.message)).setTypeface(Typeface.MONOSPACE);
        } catch (Exception unused) {
        }
    }

    void P0(Context context, String str) {
        String str2;
        String replace;
        SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
        long j2 = sharedPreferences.getLong("idusu", 0L);
        String str3 = this.k3;
        if (str3 == null || str3.equals("")) {
            String str4 = getResources().getString(2131886938).replace("@X@", this.j3 + " " + this.e3) + "\n\n" + getResources().getString(2131886939);
            int i2 = this.l3;
            if (i2 == 18000) {
                replace = str4.replace("@Y@", getResources().getString(2131886741));
            } else {
                if (i2 < 2161) {
                    str2 = (this.l3 / 24) + " " + getResources().getString(2131886387);
                } else if (i2 == 8784) {
                    str2 = "1 " + getResources().getString(2131886180);
                } else if (i2 == 17568) {
                    str2 = "2 " + getResources().getString(2131886181);
                } else {
                    str2 = "";
                }
                if (str2 == "") {
                    return;
                } else {
                    replace = str4.replace("@Y@", str2);
                }
            }
        } else {
            replace = this.k3;
        }
        AlertDialog create = new AlertDialog.Builder(context).setNegativeButton(2131886227, (DialogInterface.OnClickListener) null).setPositiveButton(2131886114, new b0(sharedPreferences, j2, context)).setMessage(replace).create();
        if (!str.equals("")) {
            create.setOnShowListener(new c0(create, str));
        }
        create.show();
        try {
            ((TextView) create.findViewById(R.id.message)).setTypeface(Typeface.MONOSPACE);
        } catch (Exception unused) {
        }
    }

    protected void R(int i2) {
        if (f14d7 == null) {
            f14d7 = Typeface.create(Typeface.MONOSPACE, 0);
            f12c7 = Typeface.create(Typeface.SERIF, 0);
            f11b7 = Typeface.create(Typeface.SANS_SERIF, 0);
        }
        l1(this, "DEFAULT", i2);
        l1(this, "MONOSPACE", i2);
        l1(this, "SERIF", i2);
        l1(this, "SANS_SERIF", i2);
    }

    void R0(Long l2, Context context, String str) {
        String string = getString(2131886746);
        if (l2.longValue() < Long.parseLong("2524604400000")) {
            string = string + "(" + getString(2131886529) + " " + DateFormat.getDateFormat(context).format(new Date(l2.longValue())) + ")";
        }
        AlertDialog create = new AlertDialog.Builder(context).setPositiveButton(2131886114, (DialogInterface.OnClickListener) null).setMessage(string).create();
        if (!str.equals("")) {
            create.setOnShowListener(new a0(create, str));
        }
        create.show();
        try {
            ((TextView) create.findViewById(R.id.message)).setTypeface(Typeface.MONOSPACE);
        } catch (Exception unused) {
        }
    }

    protected String T0(int i2) {
        return i2 == 2 ? "CaviarDreams.ttf" : i2 == 3 ? "Pacifico.ttf" : i2 == 4 ? "Sansation-Regular.ttf" : i2 == 5 ? "Walkway_Bold.ttf" : "";
    }

    void U(Context context, ImageView imageView, String str) {
        SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
        long j2 = sharedPreferences.getLong("idusu", 0L);
        String string = sharedPreferences.getString("cod", "");
        String str2 = (String) imageView.getTag(2131362428);
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        StringBuilder sb = new StringBuilder();
        sb.append("ban_");
        sb.append(str2);
        AlertDialog create = sharedPreferences.getBoolean(sb.toString(), false) ? builder.setPositiveButton(2131886114, (DialogInterface.OnClickListener) null).setMessage(2131886926).create() : builder.setNegativeButton(2131886227, (DialogInterface.OnClickListener) null).setPositiveButton(2131886114, new w(context, str2, j2, string, sharedPreferences)).setMessage(getResources().getString(2131886353)).create();
        if (!str.equals("")) {
            create.setOnShowListener(new x(create, str));
        }
        create.show();
        try {
            ((TextView) create.findViewById(R.id.message)).setTypeface(Typeface.MONOSPACE);
        } catch (Exception unused) {
        }
    }

    boolean U0(int i2, int i3, Intent intent, Context context) {
        String str;
        String str2;
        if (i2 == 111) {
            SharedPreferences sharedPreferences = context.getSharedPreferences("sh", 0);
            long j2 = sharedPreferences.getLong("idusu", 0L);
            String string = sharedPreferences.getString("cod_g", "");
            try {
                try {
                    str2 = ((Activity_ext_class) context).a;
                } catch (Exception unused) {
                    str = "";
                }
            } catch (Exception unused2) {
                str2 = ((FragmentActivity_ext_class) context).a;
            }
            str = str2;
            new v0(context, j2, string, str, this.w1, true).execute(new String[0]);
        }
        return false;
    }

    void V0(Context context, boolean z2) {
        FragmentActivity_ext_class fragmentActivity_ext_class;
        Activity_ext_class activity_ext_class;
        int i2;
        com.eugene.hymnesetlouanges.m[] mVarArr;
        com.eugene.hymnesetlouanges.m[] mVarArr2;
        int i3;
        com.eugene.hymnesetlouanges.m mVar = null;
        if (z2) {
            activity_ext_class = null;
            fragmentActivity_ext_class = (FragmentActivity_ext_class) context;
        } else {
            fragmentActivity_ext_class = null;
            activity_ext_class = (Activity_ext_class) context;
        }
        int i4 = this.c;
        int i7 = 0;
        if (i4 > -1 && (mVarArr = this.Z1) != null && i4 < mVarArr.length) {
            int i8 = 0;
            while (true) {
                mVarArr2 = this.Z1;
                if (i8 >= mVarArr2.length) {
                    break;
                }
                com.eugene.hymnesetlouanges.m mVar2 = mVarArr2[i8];
                if (mVar2.t == 22) {
                    mVar = mVar2;
                    break;
                }
                i8++;
            }
            if (mVar != null && (i3 = mVarArr2[this.c].t) != 22 && ((i3 != 12 || mVar.i1) && (i3 != 14 || mVar.j1))) {
                String str = this.Z1[this.c].y + "";
                SharedPreferences sharedPreferences = context.getSharedPreferences("sh", 0);
                String[] split = sharedPreferences.getString("seccs_ultimas", "").split(",");
                String str2 = str;
                for (int i9 = 0; i9 < split.length && i9 < 7; i9++) {
                    if (!split[i9].equals(str)) {
                        str2 = str2 + "," + split[i9];
                    }
                }
                SharedPreferences.Editor edit = sharedPreferences.edit();
                edit.putString("seccs_ultimas", str2);
                edit.apply();
            }
        }
        if (f29s6.length > 0) {
            BottomNavigationView findViewById = ((Activity) context).findViewById(2131362974);
            if (!f31u6.equals("") && !f32v6.equals("")) {
                findViewById.setBackgroundColor(Color.parseColor("#" + f31u6));
                int parseColor = Color.parseColor("#" + f32v6);
                StringBuilder sb = new StringBuilder();
                sb.append("#");
                sb.append(f31u6);
                ColorStateList colorStateList = new ColorStateList(new int[][]{new int[]{R.attr.state_selected}, new int[]{R.attr.state_enabled}}, new int[]{o(parseColor, 0.4f, J(sb.toString()) ? 2 : 1), parseColor});
                findViewById.setItemTextColor(colorStateList);
                findViewById.setItemIconTintList(colorStateList);
            }
            findViewById.getMenu().clear();
            int i10 = 0;
            while (i10 < f29s6.length) {
                Menu menu = findViewById.getMenu();
                x0 x0Var = f29s6[i10];
                menu.add(i7, x0Var.b, i7, x0Var.a);
                if (f29s6[i10].d > 0) {
                    findViewById.getMenu().getItem(i10).setIcon(Drawable.createFromPath(context.getFileStreamPath("ico_mb_it" + f29s6[i10].b).getAbsolutePath()));
                }
                f29s6[i10].g = findViewById.getMenu().getItem(i10);
                findViewById.getMenu().getItem(i10).setOnMenuItemClickListener(new y(context, z2, fragmentActivity_ext_class, activity_ext_class));
                i10++;
                i7 = 0;
            }
            if (f30t6 != -1) {
                findViewById.getMenu().findItem(f30t6).setChecked(true);
                f30t6 = -1;
                i2 = 0;
            } else {
                i2 = 0;
                findViewById.getMenu().setGroupCheckable(0, true, false);
                for (int i11 = 0; i11 < findViewById.getMenu().size(); i11++) {
                    findViewById.getMenu().getItem(i11).setChecked(false);
                }
                findViewById.getMenu().setGroupCheckable(0, true, true);
            }
            findViewById.setVisibility(i2);
        }
    }

    void X(View view) {
        try {
            if (this.f38a6) {
                Activity activity = (Activity) view.getContext();
                if (this.J3 == 1) {
                    View findViewWithTag = activity.findViewById(2131362685).findViewWithTag(2131361807);
                    if (findViewWithTag != null && findViewWithTag.getVisibility() == 0) {
                        findViewWithTag.setVisibility(4);
                    }
                } else {
                    LinearLayout linearLayout = (LinearLayout) activity.findViewById(2131362610);
                    if (linearLayout != null && linearLayout.getChildCount() > 0 && linearLayout.getVisibility() == 0) {
                        linearLayout.setVisibility(4);
                    }
                }
            }
        } catch (Exception unused) {
        }
    }

    boolean Y(View view) {
        if (Build.VERSION.SDK_INT <= 22) {
            return false;
        }
        view.setForeground(getDrawable(2131231023));
        view.setFocusable(true);
        view.setFocusableInTouchMode(false);
        return true;
    }

    void Y0(Context context, int i2, String str, Bundle bundle) {
        if (i2 == -1 || bundle != null) {
            return;
        }
        SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
        com.eugene.hymnesetlouanges.m mVar = this.Z1[i2];
        if (mVar.o.equals("")) {
            return;
        }
        if (sharedPreferences.getBoolean("popup_nomas_" + mVar.y, false)) {
            return;
        }
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        if (!mVar.n.equals("")) {
            builder.setTitle(mVar.n);
        }
        if (mVar.p) {
            View inflate = ((Activity) context).getLayoutInflater().inflate(2131558463, (ViewGroup) null);
            TextView textView = (TextView) inflate.findViewById(2131362864);
            textView.setMovementMethod(new ScrollingMovementMethod());
            textView.setText(Html.fromHtml(mVar.o));
            CheckBox checkBox = (CheckBox) inflate.findViewById(2131363221);
            if (!str.equals("")) {
                q(checkBox, str);
            }
            checkBox.setChecked(mVar.q);
            checkBox.setTag(Integer.valueOf(i2));
            builder.setView(inflate);
        } else {
            builder.setMessage(Html.fromHtml(mVar.o));
        }
        builder.setCancelable(false);
        if (mVar.p) {
            builder.setPositiveButton(getString(2131886114), new i0());
        } else {
            builder.setPositiveButton(getString(2131886114), (DialogInterface.OnClickListener) null);
        }
        AlertDialog create = builder.create();
        if (!str.equals("")) {
            create.setOnShowListener(new j0(create, str));
        }
        try {
            create.show();
            if (mVar.p) {
                return;
            }
            ((TextView) create.findViewById(R.id.message)).setTypeface(Typeface.MONOSPACE);
        } catch (Exception unused) {
        }
    }

    void a0(String str, String str2, String str3, Context context) {
        if (str.equals("")) {
            return;
        }
        String lowerCase = str.toLowerCase(Locale.getDefault());
        try {
            DownloadManager.Request request = new DownloadManager.Request(Uri.parse(str));
            request.allowScanningByMediaScanner();
            request.setNotificationVisibility(1);
            if (str2 == null || str2.equals("")) {
                if (lowerCase.endsWith(".mp3")) {
                    str2 = "audio/mpeg";
                } else if (lowerCase.endsWith(".mp4")) {
                    str2 = "video/mp4";
                } else if (lowerCase.endsWith(".apk")) {
                    str2 = "application/vnd.android.package-archive";
                }
            }
            if (str2 != null && !str2.equals("")) {
                try {
                    request.setMimeType(str2);
                } catch (Exception unused) {
                }
            }
            if (str3.equals("") && (lowerCase.endsWith(".mp3") || lowerCase.endsWith(".mp4") || lowerCase.endsWith(".apk"))) {
                try {
                    str3 = str.substring(str.lastIndexOf("/") + 1);
                } catch (Exception unused2) {
                }
            }
            if (!str3.equals("")) {
                try {
                    if (Build.VERSION.SDK_INT >= 29) {
                        request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, str3);
                    } else {
                        request.setDestinationInExternalFilesDir(context, Environment.DIRECTORY_DOWNLOADS, str3);
                    }
                } catch (Exception unused3) {
                }
            }
            ((DownloadManager) getSystemService("download")).enqueue(request);
            Toast.makeText(getApplicationContext(), getResources().getString(2131886391), 1).show();
        } catch (Exception unused4) {
        }
    }

    @Override
    protected void attachBaseContext(Context context) {
        super.attachBaseContext(context);
        d3.a.l(this);
    }

    boolean c(Context context, String str) {
        Uri parse = Uri.parse(str);
        if (Build.VERSION.SDK_INT >= 30 ? D0(context, parse) : E0(context, parse)) {
            return true;
        }
        if (this.i1 && b(str)) {
            try {
                e.b bVar = new e.b();
                try {
                    bVar = bVar.d(new b.a().b(Color.parseColor("#" + this.l1)).a());
                } catch (Exception unused) {
                }
                bVar.a().a(context, Uri.parse(str));
                return true;
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
        try {
            context.startActivity(new Intent("android.intent.action.VIEW", parse));
            return true;
        } catch (Exception e3) {
            e3.printStackTrace();
            return false;
        }
    }

    int[] c0(String str, ImageView imageView) {
        int[] iArr = {0, 0};
        try {
            FileInputStream openFileInput = openFileInput(str);
            Bitmap decodeFileDescriptor = BitmapFactory.decodeFileDescriptor(openFileInput.getFD());
            openFileInput.close();
            imageView.setImageBitmap(decodeFileDescriptor);
            iArr[0] = decodeFileDescriptor.getWidth();
            iArr[1] = decodeFileDescriptor.getHeight();
        } catch (Exception e2) {
            e2.printStackTrace();
        } catch (OutOfMemoryError unused) {
        }
        return iArr;
    }

    void d(Context context, int i2) {
        if (i2 == -1) {
            return;
        }
        ((Activity) context).startActivityForResult(C(Integer.valueOf(i2), this).a, 0);
    }

    boolean f(Context context, RewardedVideo rewardedVideo) {
        if (rewardedVideo == null) {
            return false;
        }
        try {
            rewardedVideo.setOnAdLoadedCallback((OnAdLoaded) context);
            rewardedVideo.setOnAdClosedCallback((OnAdClosed) context);
            rewardedVideo.setOnAdErrorCallback((OnAdError) context);
            rewardedVideo.setOnVideoEndedCallback((OnVideoEnded) context);
            rewardedVideo.loadAd();
            return true;
        } catch (Exception unused) {
            return false;
        }
    }

    void f1() {
        SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
        String[] split = sharedPreferences.getString("idseccs", "").split(",");
        String string = sharedPreferences.getString("idofics", "");
        String[] strArr = new String[0];
        if (!string.equals("")) {
            strArr = string.split(",");
        }
        A(split, strArr, null, null);
        this.b = sharedPreferences.getInt("ind_secc_sel", 0);
        this.c = sharedPreferences.getInt("ind_secc_sel_2", 0);
        try {
            R(Integer.parseInt(sharedPreferences.getString("ft", "0")));
        } catch (Exception unused) {
        }
    }

    protected void h1(String str, Typeface typeface) {
        try {
            Field declaredField = Typeface.class.getDeclaredField(str);
            declaredField.setAccessible(true);
            declaredField.set(null, typeface);
        } catch (IllegalAccessException e2) {
            e2.printStackTrace();
        } catch (NoSuchFieldException e3) {
            e3.printStackTrace();
        }
    }

    protected void j(Context context) {
        k(context, 1, 1, -1, null);
    }

    boolean j1(android.content.Context r21, android.view.View r22, java.lang.String r23, android.app.ProgressDialog r24, com.google.android.gms.ads.rewarded.RewardedAdLoadCallback r25, com.appnext.ads.fullscreen.RewardedVideo r26, com.facebook.ads.RewardedVideoAd r27, com.startapp.sdk.adsbase.StartAppAd r28, android.view.View r29) {
        throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.config.j1(android.content.Context, android.view.View, java.lang.String, android.app.ProgressDialog, com.google.android.gms.ads.rewarded.RewardedAdLoadCallback, com.appnext.ads.fullscreen.RewardedVideo, com.facebook.ads.RewardedVideoAd, com.startapp.sdk.adsbase.StartAppAd, android.view.View):boolean");
    }

    protected void k(Context context, int i2, int i3, int i4, String str) {
        l(context, i2, i3, i4, str, false);
    }

    protected void l(android.content.Context r17, int r18, int r19, int r20, java.lang.String r21, boolean r22) {
        throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.config.l(android.content.Context, int, int, int, java.lang.String, boolean):void");
    }

    File l0(Context context, int i2) {
        return new File(context.getExternalFilesDir(null), "dt_foto" + i2 + "_temp.jpg");
    }

    protected void l1(Context context, String str, int i2) {
        Typeface defaultFromStyle;
        if (i2 == 0) {
            defaultFromStyle = Typeface.defaultFromStyle(0);
        } else if (i2 == 1) {
            try {
                defaultFromStyle = Typeface.createFromFile(new File(getFilesDir(), "font"));
            } catch (Exception unused) {
                defaultFromStyle = Typeface.defaultFromStyle(0);
            }
        } else {
            String T0 = T0(i2);
            if (T0.equals("")) {
                defaultFromStyle = Typeface.defaultFromStyle(0);
            } else {
                defaultFromStyle = Typeface.createFromAsset(context.getAssets(), "fonts/" + T0);
            }
        }
        h1(str, defaultFromStyle);
    }

    File m0(Context context, String str) {
        return new File(context.getExternalFilesDir(null), str);
    }

    public void m1() {
        Intent intent = new Intent(this, (Class<?>) s_mediaplayer_exo.class);
        intent.putExtra("accion", "stop");
        startService(intent);
    }

    com.eugene.hymnesetlouanges.k n0(View view, Context context) {
        Integer num;
        String str;
        int i2;
        int i3;
        int i4;
        int i7;
        int i8;
        int i9;
        int i10;
        int i11;
        com.eugene.hymnesetlouanges.k kVar = new com.eugene.hymnesetlouanges.k();
        kVar.b = true;
        kVar.c = false;
        kVar.d = false;
        String str2 = "";
        if (view.getTag(2131361805) != null) {
            num = -1;
            str = (String) view.getTag(2131361805);
        } else {
            num = (Integer) view.getTag(2131361812);
            str = "";
        }
        if (num.intValue() >= 0 && num.intValue() < this.Z1.length) {
            return C(num, context);
        }
        if (num.intValue() == 9998) {
            kVar.b = true;
            return kVar;
        }
        if (num.intValue() == 2131362438) {
            Intent intent = new Intent(context, (Class<?>) t_menu.class);
            kVar.b = false;
            kVar.d = true;
            kVar.a = intent;
            return kVar;
        }
        if (!str.equals("") || (num.intValue() > 10000 && num.intValue() <= this.c2.length + 10000)) {
            if (str.equals("share") || num.intValue() == this.h + 10000) {
                if (str.equals("share") || (i2 = this.T) <= 0) {
                    Intent intent2 = new Intent("android.intent.action.SEND");
                    intent2.setType("text/plain");
                    intent2.putExtra("android.intent.extra.SUBJECT", this.j1);
                    intent2.putExtra("android.intent.extra.TEXT", this.k1);
                    kVar.a = Intent.createChooser(intent2, getString(2131886344));
                    kVar.b = false;
                    return kVar;
                }
                if (i2 == 1) {
                    return o0(this.U, context);
                }
                SharedPreferences.Editor edit = getSharedPreferences("sh", 0).edit();
                int indexOf = f28r6.indexOf(Integer.valueOf(this.T));
                this.c = indexOf;
                this.b = indexOf;
                edit.putInt("ind_secc_sel_2", indexOf);
                edit.putInt("ind_secc_sel", this.b);
                edit.commit();
                return C(Integer.valueOf(this.b), context);
            }
            if (str.equals("search") || num.intValue() == this.i + 10000) {
                if (str.equals("search") || (i3 = this.X) <= 0) {
                    ((Activity) context).onSearchRequested();
                    com.eugene.hymnesetlouanges.k kVar2 = new com.eugene.hymnesetlouanges.k();
                    kVar2.a = null;
                    kVar2.b = true;
                    kVar2.c = false;
                    kVar2.d = false;
                    return kVar2;
                }
                if (i3 == 1) {
                    return o0(this.Y, context);
                }
                SharedPreferences.Editor edit2 = getSharedPreferences("sh", 0).edit();
                int indexOf2 = f28r6.indexOf(Integer.valueOf(this.X));
                this.c = indexOf2;
                this.b = indexOf2;
                edit2.putInt("ind_secc_sel_2", indexOf2);
                edit2.putInt("ind_secc_sel", this.b);
                edit2.commit();
                return C(Integer.valueOf(this.b), context);
            }
            if (str.equals("offices") || num.intValue() == this.k + 10000) {
                if (str.equals("offices") || (i4 = this.f0) <= 0) {
                    if (this.v != -1) {
                        SharedPreferences.Editor edit3 = getSharedPreferences("sh", 0).edit();
                        int i12 = this.v;
                        this.b = i12;
                        edit3.putInt("ind_secc_sel", i12);
                        edit3.commit();
                    }
                    return z0(context);
                }
                if (i4 == 1) {
                    return o0(this.g0, context);
                }
                SharedPreferences.Editor edit4 = getSharedPreferences("sh", 0).edit();
                int indexOf3 = f28r6.indexOf(Integer.valueOf(this.f0));
                this.c = indexOf3;
                this.b = indexOf3;
                edit4.putInt("ind_secc_sel_2", indexOf3);
                edit4.putInt("ind_secc_sel", this.b);
                edit4.commit();
                return C(Integer.valueOf(this.b), context);
            }
            if (str.equals("products") || num.intValue() == this.j + 10000) {
                if (str.equals("products") || (i7 = this.b0) <= 0) {
                    if (this.u != -1) {
                        SharedPreferences.Editor edit5 = getSharedPreferences("sh", 0).edit();
                        int i13 = this.u;
                        this.b = i13;
                        edit5.putInt("ind_secc_sel", i13);
                        edit5.commit();
                    }
                    return A0(context);
                }
                if (i7 == 1) {
                    return o0(this.c0, context);
                }
                SharedPreferences.Editor edit6 = getSharedPreferences("sh", 0).edit();
                int indexOf4 = f28r6.indexOf(Integer.valueOf(this.b0));
                this.c = indexOf4;
                this.b = indexOf4;
                edit6.putInt("ind_secc_sel_2", indexOf4);
                edit6.putInt("ind_secc_sel", this.b);
                edit6.commit();
                return C(Integer.valueOf(this.b), context);
            }
            if (str.equals("exit") || num.intValue() == this.l + 10000) {
                if (str.equals("exit") || (i8 = this.j0) <= 0) {
                    kVar.b = true;
                    kVar.c = true;
                    f25o6 = true;
                    return kVar;
                }
                if (i8 == 1) {
                    return o0(this.k0, context);
                }
                SharedPreferences.Editor edit7 = getSharedPreferences("sh", 0).edit();
                int indexOf5 = f28r6.indexOf(Integer.valueOf(this.j0));
                this.c = indexOf5;
                this.b = indexOf5;
                edit7.putInt("ind_secc_sel_2", indexOf5);
                edit7.putInt("ind_secc_sel", this.b);
                edit7.commit();
                return C(Integer.valueOf(this.b), context);
            }
            if (str.equals("notifications") || num.intValue() == this.m + 10000) {
                if (str.equals("notifications") || (i9 = this.n0) <= 0) {
                    Intent intent3 = new Intent(context, (Class<?>) notifs.class);
                    kVar.b = false;
                    kVar.d = true;
                    kVar.a = intent3;
                    return kVar;
                }
                if (i9 == 1) {
                    return o0(this.o0, context);
                }
                SharedPreferences.Editor edit8 = getSharedPreferences("sh", 0).edit();
                int indexOf6 = f28r6.indexOf(Integer.valueOf(this.n0));
                this.c = indexOf6;
                this.b = indexOf6;
                edit8.putInt("ind_secc_sel_2", indexOf6);
                edit8.putInt("ind_secc_sel", this.b);
                edit8.commit();
                return C(Integer.valueOf(this.b), context);
            }
            if (str.equals(Scopes.PROFILE) || num.intValue() == this.n + 10000) {
                if (!str.equals(Scopes.PROFILE) && (i10 = this.r0) > 0) {
                    if (i10 == 1) {
                        return o0(this.t0, context);
                    }
                    SharedPreferences.Editor edit9 = getSharedPreferences("sh", 0).edit();
                    int indexOf7 = f28r6.indexOf(Integer.valueOf(this.r0));
                    this.c = indexOf7;
                    this.b = indexOf7;
                    edit9.putInt("ind_secc_sel_2", indexOf7);
                    edit9.putInt("ind_secc_sel", this.b);
                    edit9.commit();
                    return C(Integer.valueOf(this.b), context);
                }
                Intent intent4 = new Intent(this, (Class<?>) preperfil.class);
                intent4.putExtra("desde_main", true);
                intent4.putExtra("desde_main_oblig", false);
                intent4.putExtra("nocompletar", true);
                if (this.T4 != 2) {
                    intent4.putExtra("es_root", true);
                }
                com.eugene.hymnesetlouanges.k kVar3 = new com.eugene.hymnesetlouanges.k();
                kVar3.b = false;
                kVar3.d = true;
                kVar3.a = intent4;
                return kVar3;
            }
            if (str.equals("noads") || num.intValue() == this.o + 10000) {
                if (str.equals("noads") || (i11 = this.w0) <= 0) {
                    try {
                        try {
                            str2 = ((Activity_ext_class) context).a;
                        } catch (Exception unused) {
                        }
                    } catch (Exception unused2) {
                        str2 = ((FragmentActivity_ext_class) context).a;
                    }
                    w0(context, str2);
                    com.eugene.hymnesetlouanges.k kVar4 = new com.eugene.hymnesetlouanges.k();
                    kVar4.a = null;
                    kVar4.b = false;
                    kVar4.c = false;
                    kVar4.d = false;
                    return kVar4;
                }
                if (i11 == 1) {
                    return o0(this.x0, context);
                }
                SharedPreferences.Editor edit10 = getSharedPreferences("sh", 0).edit();
                int indexOf8 = f28r6.indexOf(Integer.valueOf(this.w0));
                this.c = indexOf8;
                this.b = indexOf8;
                edit10.putInt("ind_secc_sel_2", indexOf8);
                edit10.putInt("ind_secc_sel", this.b);
                edit10.commit();
                return C(Integer.valueOf(this.b), context);
            }
        }
        return null;
    }

    boolean n1(Context context, int i2) {
        PackageInfo packageInfo;
        String[] strArr;
        Boolean bool = Boolean.FALSE;
        try {
            packageInfo = getPackageManager().getPackageInfo(getPackageName(), 4096);
        } catch (PackageManager.NameNotFoundException e2) {
            e2.printStackTrace();
            packageInfo = null;
        }
        if (packageInfo != null && (strArr = packageInfo.requestedPermissions) != null) {
            bool = Boolean.valueOf(Arrays.asList(strArr).contains("android.permission.CAMERA"));
        }
        if (!bool.booleanValue() || androidx.core.content.b.checkSelfPermission(this, "android.permission.CAMERA") == 0) {
            return false;
        }
        androidx.core.app.b.g((Activity) context, new String[]{"android.permission.CAMERA"}, i2);
        return true;
    }

    com.eugene.hymnesetlouanges.k o0(String str, Context context) {
        String str2;
        String str3;
        String str4;
        String lowerCase = str.toLowerCase();
        String[] strArr = {"offices", "share", "search", "products", "exit", "notifications", Scopes.PROFILE, "noads"};
        for (int i2 = 0; i2 < 8; i2++) {
            String str5 = strArr[i2];
            if (!lowerCase.startsWith("action_" + str5)) {
                if (!lowerCase.startsWith("http://action_" + str5)) {
                }
            }
            View view = new View(context);
            view.setTag(2131361805, str5);
            return n0(view, context);
        }
        com.eugene.hymnesetlouanges.k kVar = new com.eugene.hymnesetlouanges.k();
        kVar.b = false;
        kVar.c = false;
        kVar.d = false;
        if (lowerCase.startsWith("tel:") || lowerCase.startsWith("http://tel:")) {
            String substring = lowerCase.startsWith("tel:") ? str.substring(4) : str.substring(11);
            if (substring.endsWith("/")) {
                substring = substring.substring(0, substring.length() - 1);
            }
            kVar.a = new Intent("android.intent.action.DIAL", Uri.parse("tel:" + substring));
            return kVar;
        }
        if (lowerCase.startsWith("mailto:") || lowerCase.startsWith("http://mailto:")) {
            String trim = lowerCase.startsWith("mailto:") ? str.substring(7).trim() : str.substring(14).trim();
            if (trim.equals("")) {
                kVar.a = new Intent("android.intent.action.SENDTO", Uri.parse(str));
                return kVar;
            }
            int indexOf = trim.indexOf("?");
            if (indexOf > 0) {
                int indexOf2 = trim.indexOf("?subject=");
                if (indexOf2 != -1) {
                    str2 = trim.substring(indexOf2 + 9).trim();
                    int indexOf3 = str2.indexOf("&body=");
                    if (indexOf3 != -1) {
                        str3 = str2.substring(indexOf3 + 6).trim();
                        str2 = str2.substring(0, indexOf3).trim();
                    } else {
                        str3 = "";
                    }
                } else {
                    str2 = "";
                    str3 = str2;
                }
                trim = trim.substring(0, indexOf).trim();
            } else {
                str2 = "";
                str3 = str2;
            }
            if (trim.endsWith("/")) {
                trim = trim.substring(0, trim.length() - 1);
            }
            Intent intent = new Intent("android.intent.action.SENDTO", Uri.fromParts("mailto", trim, null));
            if (!str2.equals("")) {
                try {
                    str2 = URLDecoder.decode(str2, "UTF-8");
                } catch (Exception unused) {
                }
                intent.putExtra("android.intent.extra.SUBJECT", str2);
            }
            if (!str3.equals("")) {
                try {
                    str3 = URLDecoder.decode(str3, "UTF-8");
                } catch (Exception unused2) {
                }
                intent.putExtra("android.intent.extra.TEXT", str3);
            }
            kVar.a = Intent.createChooser(intent, getResources().getString(2131886417));
            return kVar;
        }
        if (lowerCase.startsWith("smsto:") || lowerCase.startsWith("http://smsto:")) {
            String trim2 = lowerCase.startsWith("smsto:") ? str.substring(6).trim() : str.substring(13).trim();
            if (trim2.equals("")) {
                kVar.a = new Intent("android.intent.action.SENDTO", Uri.parse(str));
                return kVar;
            }
            int indexOf4 = trim2.indexOf("?");
            if (indexOf4 > 0) {
                int indexOf5 = trim2.indexOf("?body=");
                str4 = indexOf5 != -1 ? trim2.substring(indexOf5 + 6).trim() : "";
                trim2 = trim2.substring(0, indexOf4).trim();
            } else {
                str4 = "";
            }
            if (trim2.endsWith("/")) {
                trim2 = trim2.substring(0, trim2.length() - 1);
            }
            Intent intent2 = new Intent("android.intent.action.SENDTO", Uri.parse("smsto:" + trim2));
            if (!str4.equals("")) {
                try {
                    str4 = URLDecoder.decode(str4, "UTF-8");
                } catch (Exception unused3) {
                }
                intent2.putExtra("sms_body", str4);
            }
            kVar.a = intent2;
            return kVar;
        }
        if (lowerCase.startsWith("vnd.youtube:")) {
            int indexOf6 = str.indexOf("?");
            String str6 = "https://www.youtube.com/watch?v=" + (indexOf6 > 0 ? str.substring(12, indexOf6) : str.substring(12));
            kVar.a = new Intent("android.intent.action.VIEW", Uri.parse(str6));
            if (this.i1 && b(str6)) {
                Bundle bundle = new Bundle();
                bundle.putBinder("android.support.customtabs.extra.SESSION", null);
                try {
                    bundle.putInt("android.support.customtabs.extra.TOOLBAR_COLOR", Color.parseColor("#" + this.l1));
                } catch (Exception unused4) {
                }
                kVar.a.putExtras(bundle);
            }
            return kVar;
        }
        if (lowerCase.endsWith(".mp3")) {
            Intent intent3 = new Intent("android.intent.action.VIEW");
            intent3.setDataAndType(Uri.parse(str), "audio/*");
            kVar.a = intent3;
            return kVar;
        }
        if (lowerCase.endsWith(".mp4") || lowerCase.endsWith(".3gp")) {
            Intent intent4 = new Intent("android.intent.action.VIEW");
            intent4.setDataAndType(Uri.parse(str), "video/*");
            kVar.a = intent4;
            return kVar;
        }
        kVar.a = new Intent("android.intent.action.VIEW", Uri.parse(str));
        if (this.i1 && b(str)) {
            Bundle bundle2 = new Bundle();
            bundle2.putBinder("android.support.customtabs.extra.SESSION", null);
            try {
                bundle2.putInt("android.support.customtabs.extra.TOOLBAR_COLOR", Color.parseColor("#" + this.l1));
            } catch (Exception unused5) {
            }
            kVar.a.putExtras(bundle2);
        }
        return kVar;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        Thread.setDefaultUncaughtExceptionHandler(new com.eugene.hymnesetlouanges.f());
        f22l6 = V(this);
    }

    @Override
    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String str) {
        ListView listView;
        if (this.T4 == 1 && this.f2 != null && str.equals("ico_cargado")) {
            this.f2.notifyDataSetChanged();
            return;
        }
        if (this.T4 != 1 || (listView = this.d2) == null || listView.getHeaderViewsCount() <= 0 || !str.equals("slider_v_act")) {
            return;
        }
        RelativeLayout relativeLayout = (RelativeLayout) this.d2.findViewById(2131362646);
        ImageView imageView = (ImageView) relativeLayout.findViewById(2131362496);
        try {
            FileInputStream openFileInput = openFileInput("slider_header");
            Bitmap decodeFileDescriptor = BitmapFactory.decodeFileDescriptor(openFileInput.getFD());
            openFileInput.close();
            imageView.setImageBitmap(decodeFileDescriptor);
        } catch (Exception | OutOfMemoryError unused) {
        }
        if (this.z > 0) {
            relativeLayout.setLayoutParams(new AbsListView.LayoutParams(-1, this.z));
        }
        relativeLayout.findViewById(2131363041).setVisibility(8);
        Animation loadAnimation = AnimationUtils.loadAnimation(this, 2130771997);
        imageView.setVisibility(0);
        imageView.startAnimation(loadAnimation);
    }

    void p(Context context) {
        int i2;
        int i3 = V6;
        if (i3 == 1 || (i2 = W6) == 1) {
            com.google.android.gms.ads.interstitial.InterstitialAd.load(this, B6, new AdRequest.Builder().build(), new d());
            return;
        }
        if (i3 == 2 || i2 == 2) {
            return;
        }
        if (i3 == 3 || i2 == 3) {
            Q6 = new com.facebook.ads.InterstitialAd(context, D6);
            e eVar = new e();
            com.facebook.ads.InterstitialAd interstitialAd = Q6;
            interstitialAd.loadAd(interstitialAd.buildLoadAdConfig().withAdListener(eVar).build());
            return;
        }
        if (i3 == 4 || i2 == 4) {
            StartAppAd startAppAd = new StartAppAd(getApplicationContext());
            R6 = startAppAd;
            startAppAd.loadAd(new f());
            return;
        }
        if (i3 == 9 || i2 == 9) {
            return;
        }
        if (i3 == 10 || i2 == 10) {
            IronSource.loadInterstitial();
            return;
        }
        if (i3 == 12 || i2 == 12) {
            com.wortise.ads.interstitial.InterstitialAd interstitialAd2 = S6;
            if (interstitialAd2 != null) {
                interstitialAd2.destroy();
            }
            S6 = null;
            com.wortise.ads.interstitial.InterstitialAd interstitialAd3 = new com.wortise.ads.interstitial.InterstitialAd(context, G6);
            S6 = interstitialAd3;
            interstitialAd3.setListener(new g());
            S6.loadAd();
            return;
        }
        if (i3 == 14 || i2 == 14) {
            if (T6 != null) {
                T6 = null;
            }
            com.vungle.ads.z0 z0Var = new com.vungle.ads.z0(this, I6, new com.vungle.ads.c());
            T6 = z0Var;
            z0Var.setAdListener(new h());
            T6.load((String) null);
            return;
        }
        if (i3 == 15 || i2 == 15) {
            if (U6 != null) {
                U6 = null;
            }
            MBNewInterstitialHandler mBNewInterstitialHandler = new MBNewInterstitialHandler(this, J6, K6);
            U6 = mBNewInterstitialHandler;
            mBNewInterstitialHandler.setInterstitialVideoListener(new i());
            U6.load();
        }
    }

    File p0(Context context, int i2) {
        return new File(context.getFilesDir(), "dt_foto" + i2 + "_temp.jpg");
    }

    public void p1(Context context, SharedPreferences sharedPreferences, String str) {
        String str2;
        String str3;
        ArrayList arrayList;
        ArrayList arrayList2;
        boolean z2 = false;
        if (getSharedPreferences("sh", 0).getBoolean("sinads", false)) {
            return;
        }
        if (this.R3 > 0 && this.S3 > 0 && (((str2 = this.P3) != null && !str2.equals("") && (arrayList2 = this.f40b6) != null && arrayList2.size() > 0) || ((str3 = this.Q3) != null && !str3.equals("") && (arrayList = this.f42c6) != null && arrayList.size() > 0))) {
            int i2 = sharedPreferences.getInt("n_inchat", 0) + 1;
            SharedPreferences.Editor edit = sharedPreferences.edit();
            edit.putInt("n_inchat", i2);
            edit.commit();
            int i3 = this.R3;
            if (i2 == i3 || (i2 > i3 && (i2 - i3) % this.S3 == 0)) {
                z2 = true;
            }
        }
        if (z2) {
            new Handler().postDelayed(new t(str), 2000L);
        }
    }

    File q0(Context context, String str) {
        return new File(context.getFilesDir(), str);
    }

    public void q1(Context context, boolean z2, boolean z3) {
        r1(context, z2, z3, true);
    }

    File r0(Context context, int i2, boolean z2) {
        String str = z2 ? "_g" : "";
        return new File(context.getFilesDir(), "dt_foto" + i2 + str + ".jpg");
    }

    public void r1(Context context, boolean z2, boolean z3, boolean z7) {
        s1(context, z2, z3, true, false);
    }

    public void s(ListView listView) {
        listView.setOnItemClickListener(new b());
        listView.getParent().a(new c());
    }

    public void s1(Context context, boolean z2, boolean z3, boolean z7, boolean z8) {
        int i2;
        int i3;
        if (getSharedPreferences("sh", 0).getBoolean("sinads", false)) {
            return;
        }
        L0(context, Boolean.valueOf(z7));
        if (V6 > 0) {
            return;
        }
        if (z2 || z3) {
            int i4 = W6;
            if (i4 == 2) {
                return;
            }
            if (z2) {
                V6 = 1;
            } else if (!z3) {
                return;
            } else {
                V6 = 3;
            }
            if (i4 == 0) {
                p(context);
            }
            SharedPreferences.Editor edit = getSharedPreferences("sh", 0).edit();
            edit.putInt("n_imp", 0);
            edit.putInt("n_imp_chat", 0);
            edit.commit();
            return;
        }
        if ((!z8 && this.K3 > 0) || (z8 && this.L3 > 0)) {
            SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
            int i7 = sharedPreferences.getInt("n_imp", 0) + 1;
            SharedPreferences.Editor edit2 = sharedPreferences.edit();
            edit2.putInt("n_imp", i7);
            edit2.commit();
            if ((!z8 && (i3 = this.K3) > 0 && i7 % i3 == 0) || (z8 && (i2 = this.L3) > 0 && i7 % i2 == 0)) {
                edit2.putInt("n_imp_chat", 0);
                edit2.commit();
                ArrayList arrayList = new ArrayList();
                if (!B6.equals("")) {
                    arrayList.add(1);
                }
                if (!f35y6.equals("") && ((B6.equals("") || !Z6) && G6.equals(""))) {
                    arrayList.add(2);
                }
                if (!D6.equals("")) {
                    arrayList.add(3);
                }
                if (!E6.equals("")) {
                    arrayList.add(4);
                }
                if (!this.H4.equals("")) {
                    arrayList.add(6);
                }
                if (!this.I4.equals("")) {
                    arrayList.add(7);
                }
                if (!H6.equals("")) {
                    arrayList.add(9);
                }
                if (!F6.equals("")) {
                    arrayList.add(10);
                }
                if (!G6.equals("")) {
                    arrayList.add(12);
                }
                if (!I6.equals("")) {
                    arrayList.add(14);
                }
                if (!J6.equals("")) {
                    arrayList.add(15);
                }
                if (arrayList.isEmpty()) {
                    return;
                }
                if (arrayList.size() > 1) {
                    int i8 = W6;
                    if (i8 > 0) {
                        V6 = i8;
                    } else {
                        V6 = ((Integer) arrayList.get(new Random().nextInt(((arrayList.size() - 1) - 0) + 1) + 0)).intValue();
                    }
                } else {
                    V6 = ((Integer) arrayList.get(0)).intValue();
                }
                if (W6 == 0) {
                    p(context);
                    return;
                }
                return;
            }
        }
        V6 = 0;
    }

    public void t1(Context context) {
        if (getSharedPreferences("sh", 0).getBoolean("sinads", false)) {
            return;
        }
        M0(context);
        if (W6 > 0) {
            return;
        }
        if (this.N3 > 0) {
            SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
            int i2 = sharedPreferences.getInt("n_imp_chat", 0) + 1;
            SharedPreferences.Editor edit = sharedPreferences.edit();
            edit.putInt("n_imp_chat", i2);
            edit.commit();
            if (i2 % this.N3 == 0) {
                edit.putInt("n_imp", 0);
                edit.commit();
                ArrayList arrayList = new ArrayList();
                if (!B6.equals("")) {
                    arrayList.add(1);
                }
                if (!f35y6.equals("") && ((B6.equals("") || !Z6) && G6.equals(""))) {
                    arrayList.add(2);
                }
                if (!D6.equals("")) {
                    arrayList.add(3);
                }
                if (!E6.equals("")) {
                    arrayList.add(4);
                }
                if (!this.H4.equals("")) {
                    arrayList.add(6);
                }
                if (!this.I4.equals("")) {
                    arrayList.add(7);
                }
                if (!H6.equals("")) {
                    arrayList.add(9);
                }
                if (!F6.equals("")) {
                    arrayList.add(10);
                }
                if (!G6.equals("")) {
                    arrayList.add(12);
                }
                if (!I6.equals("")) {
                    arrayList.add(14);
                }
                if (!J6.equals("")) {
                    arrayList.add(15);
                }
                if (arrayList.isEmpty()) {
                    return;
                }
                if (arrayList.size() > 1) {
                    int i3 = V6;
                    if (i3 > 0) {
                        W6 = i3;
                    } else {
                        W6 = ((Integer) arrayList.get(new Random().nextInt(((arrayList.size() - 1) - 0) + 1) + 0)).intValue();
                    }
                } else {
                    W6 = ((Integer) arrayList.get(0)).intValue();
                }
                if (V6 == 0) {
                    p(context);
                    return;
                }
                return;
            }
        }
        W6 = 0;
    }

    int u0(Context context) {
        return v0(context, Boolean.TRUE);
    }

    public int u1() {
        if (getSharedPreferences("sh", 0).getBoolean("sinads", false)) {
            return 0;
        }
        V6 = 0;
        W6 = 0;
        if (!this.W2.equals("")) {
            return 5;
        }
        if (this.M3 <= 0) {
            return 0;
        }
        SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
        int i2 = sharedPreferences.getInt("n_impentrada", 0) + 1;
        SharedPreferences.Editor edit = sharedPreferences.edit();
        edit.putInt("n_impentrada", i2);
        edit.commit();
        if (i2 % this.M3 != 0 && i2 != 1) {
            return 0;
        }
        edit.putInt("n_imp", 0);
        edit.putInt("n_imp_chat", 0);
        edit.commit();
        ArrayList arrayList = new ArrayList();
        if (!B6.equals("") || !C6.equals("")) {
            arrayList.add(1);
        }
        if (!f35y6.equals("") && ((B6.equals("") && C6.equals("")) || !Z6)) {
            arrayList.add(2);
        }
        if (!D6.equals("")) {
            arrayList.add(3);
        }
        if (!E6.equals("")) {
            arrayList.add(4);
        }
        if (!H6.equals("")) {
            arrayList.add(9);
        }
        if (!F6.equals("")) {
            arrayList.add(10);
        }
        if (!G6.equals("")) {
            arrayList.add(12);
        }
        if (arrayList.isEmpty()) {
            return 0;
        }
        return arrayList.size() > 1 ? ((Integer) arrayList.get(new Random().nextInt(((arrayList.size() - 1) - 0) + 1) + 0)).intValue() : ((Integer) arrayList.get(0)).intValue();
    }

    int v0(android.content.Context r30, java.lang.Boolean r31) {
        throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.config.v0(android.content.Context, java.lang.Boolean):int");
    }

    void v1(ImageView imageView, Boolean bool, int i2) {
        if (imageView.getParent() instanceof LinearLayout) {
            LinearLayout.LayoutParams layoutParams = i2 == 0 ? new LinearLayout.LayoutParams(-2, -2) : new LinearLayout.LayoutParams(-1, -1);
            if (bool.booleanValue()) {
                int F = F(this, 10);
                layoutParams.setMargins(F, F, F, F);
            }
            imageView.setLayoutParams(layoutParams);
        } else if (imageView.getParent() instanceof FrameLayout) {
            FrameLayout.LayoutParams layoutParams2 = i2 == 0 ? new FrameLayout.LayoutParams(-2, -2) : new FrameLayout.LayoutParams(-1, -1);
            if (bool.booleanValue()) {
                int F2 = F(this, 10);
                layoutParams2.setMargins(F2, F2, F2, F2);
            }
            layoutParams2.gravity = 17;
            imageView.setLayoutParams(layoutParams2);
        } else {
            if (!(imageView.getParent() instanceof RelativeLayout)) {
                return;
            }
            RelativeLayout.LayoutParams layoutParams3 = i2 == 0 ? new RelativeLayout.LayoutParams(-2, -2) : new RelativeLayout.LayoutParams(-1, -1);
            if (bool.booleanValue()) {
                int F3 = F(this, 10);
                layoutParams3.setMargins(F3, F3, F3, F3);
            }
            layoutParams3.addRule(13, -1);
            imageView.setLayoutParams(layoutParams3);
        }
        if (i2 == 2) {
            imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
        } else if (i2 == 3) {
            imageView.setScaleType(ImageView.ScaleType.FIT_XY);
        }
    }

    void w0(Context context, String str) {
        SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
        long j2 = sharedPreferences.getLong("idusu", 0L);
        String string = sharedPreferences.getString("cod_g", "");
        Long valueOf = Long.valueOf(sharedPreferences.getLong("sinads_fhasta", 0L));
        if (!sharedPreferences.getBoolean("sinads", false) || System.currentTimeMillis() >= valueOf.longValue()) {
            new v0(context, j2, string, str, this.w1, false).execute(new String[0]);
        } else {
            R0(valueOf, context, str);
        }
    }

    void x0(Context context, File file) {
        Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
        try {
            intent.putExtra("output", FileProvider.getUriForFile(context, "com.eugene.hymnesetlouanges.fileprovider", file));
            intent.addFlags(1);
            intent.addFlags(2);
            ((Activity) context).startActivityForResult(intent, 106);
        } catch (ActivityNotFoundException | Exception unused) {
        }
    }

    void y0(Context context, File file) {
        Intent intent = new Intent("android.media.action.VIDEO_CAPTURE");
        if (file != null) {
            intent.putExtra("output", FileProvider.getUriForFile(context, "com.eugene.hymnesetlouanges.fileprovider", file));
        }
        intent.putExtra("android.intent.extra.videoQuality", 0);
        intent.putExtra("android.intent.extra.durationLimit", 40);
        intent.putExtra("android.intent.extra.sizeLimit", 111149056);
        intent.putExtra("android.intent.extra.videoQuality", 0);
        intent.putExtra("android.intent.extra.durationLimit", 40);
        intent.putExtra("android.intent.extra.sizeLimit", 111149056);
        try {
            ((Activity) context).startActivityForResult(intent, 108);
        } catch (ActivityNotFoundException unused) {
        }
    }

    com.eugene.hymnesetlouanges.k z0(Context context) {
        com.eugene.hymnesetlouanges.k kVar = new com.eugene.hymnesetlouanges.k();
        boolean z2 = true;
        kVar.b = true;
        kVar.c = false;
        Intent intent = new Intent(context, (Class<?>) t_oficinas.class);
        com.eugene.hymnesetlouanges.j[] jVarArr = this.a2;
        if (jVarArr.length == 1) {
            if (jVarArr[0].d.equals("") && this.a2[0].g.equals("") && this.a2[0].h.equals("") && this.a2[0].i.equals("") && this.a2[0].j.equals("") && this.a2[0].k.equals("")) {
                com.eugene.hymnesetlouanges.j jVar = this.a2[0];
                if (jVar.m <= 0 && jVar.r == 0) {
                    z2 = false;
                }
            }
            com.eugene.hymnesetlouanges.j jVar2 = this.a2[0];
            if (jVar2.y && jVar2.b.equals("") && this.a2[0].c.equals("") && this.a2[0].f.equals("") && !this.a2[0].z && !z2) {
                intent = new Intent(context, (Class<?>) contactar.class);
                intent.putExtra("idofic", this.a2[0].l);
            } else {
                com.eugene.hymnesetlouanges.j jVar3 = this.a2[0];
                if (jVar3.y || jVar3.b.equals("") || !this.a2[0].c.equals("") || !this.a2[0].f.equals("") || this.a2[0].z || z2) {
                    com.eugene.hymnesetlouanges.j jVar4 = this.a2[0];
                    if (jVar4.y || !jVar4.b.equals("") || this.a2[0].c.equals("") || !this.a2[0].f.equals("") || this.a2[0].z || z2) {
                        com.eugene.hymnesetlouanges.j jVar5 = this.a2[0];
                        if (!jVar5.y && jVar5.b.equals("") && this.a2[0].c.equals("") && !this.a2[0].f.equals("")) {
                            com.eugene.hymnesetlouanges.j jVar6 = this.a2[0];
                            if (!jVar6.z && !z2) {
                                if (jVar6.B) {
                                    intent = new Intent("android.intent.action.VIEW");
                                    intent.setData(Uri.parse(this.a2[0].f));
                                    if (this.i1 && b(this.a2[0].f)) {
                                        Bundle bundle = new Bundle();
                                        bundle.putBinder("android.support.customtabs.extra.SESSION", null);
                                        try {
                                            bundle.putInt("android.support.customtabs.extra.TOOLBAR_COLOR", Color.parseColor("#" + this.l1));
                                        } catch (Exception unused) {
                                        }
                                        intent.putExtras(bundle);
                                    }
                                    kVar.b = false;
                                } else {
                                    intent = new Intent(context, (Class<?>) t_url.class);
                                    intent.putExtra(ImagesContract.URL, this.a2[0].f);
                                }
                            }
                        }
                        com.eugene.hymnesetlouanges.j jVar7 = this.a2[0];
                        if (!jVar7.y && jVar7.b.equals("") && this.a2[0].c.equals("") && this.a2[0].f.equals("") && this.a2[0].z && !z2) {
                            intent = new Intent(context, (Class<?>) chat.class);
                        }
                    } else {
                        intent = new Intent("android.intent.action.DIAL", Uri.parse("tel:" + this.a2[0].c));
                        kVar.b = false;
                    }
                } else {
                    intent = new Intent("android.intent.action.DIAL", Uri.parse("tel:" + this.a2[0].b));
                    kVar.b = false;
                }
            }
        }
        kVar.a = intent;
        return kVar;
    }
}