导航菜单

页面标题

页面副标题

Cantique de Louanges v12 - fotoperfil.java 源代码

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

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


package com.eugene.hymnesetlouanges;

import android.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.app.SearchManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.GradientDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import androidx.core.content.FileProvider;
import com.appnext.ads.fullscreen.RewardedVideo;
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.facebook.ads.AdView;
import com.facebook.ads.RewardedVideoAd;
import com.facebook.ads.RewardedVideoAdListener;
import com.google.android.gms.ads.AdError;
import com.google.android.gms.ads.FullScreenContentCallback;
import com.google.android.gms.ads.LoadAdError;
import com.google.android.gms.ads.OnUserEarnedRewardListener;
import com.google.android.gms.ads.rewarded.RewardItem;
import com.google.android.gms.ads.rewarded.RewardedAd;
import com.google.android.gms.ads.rewarded.RewardedAdLoadCallback;
import com.google.android.gms.common.internal.ImagesContract;
import com.startapp.sdk.adsbase.Ad;
import com.startapp.sdk.adsbase.StartAppAd;
import com.startapp.sdk.adsbase.VideoListener;
import com.startapp.sdk.adsbase.adlisteners.AdDisplayListener;
import com.startapp.sdk.adsbase.adlisteners.AdEventListener;
import com.wortise.ads.banner.BannerAd;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class fotoperfil extends Activity_ext_class implements com.eugene.hymnesetlouanges.a, View.OnClickListener, RewardedVideoAdListener, OnAdLoaded, OnAdClosed, OnVideoEnded, OnAdError, VideoListener, AdEventListener {
    config k;
    Bundle l;
    long m;
    String o;
    String p;
    SharedPreferences q;
    WebView r;
    com.eugene.hymnesetlouanges.c s;
    ListView u;
    boolean n = true;
    boolean t = false;

    class a implements SearchManager.OnCancelListener {
        a() {
        }

        @Override
        public void onCancel() {
            fotoperfil fotoperfilVar = fotoperfil.this;
            fotoperfilVar.b = false;
            fotoperfilVar.setResult(0);
        }
    }

    class b implements SearchManager.OnDismissListener {
        b() {
        }

        @Override
        public void onDismiss() {
            fotoperfil.this.c = false;
        }
    }

    class c extends WebChromeClient {
        c() {
        }
    }

    class d implements View.OnTouchListener {
        d() {
        }

        @Override
        public boolean onTouch(View view, MotionEvent motionEvent) {
            int action = motionEvent.getAction();
            if ((action != 0 && action != 1) || view.hasFocus()) {
                return false;
            }
            view.requestFocus();
            return false;
        }
    }

    class e extends WebViewClient {
        e() {
        }

        @Override
        public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
            boolean z;
            boolean z2;
            fotoperfil fotoperfilVar = fotoperfil.this;
            if (fotoperfilVar.b || fotoperfilVar.isFinishing() || fotoperfil.this.l.getString(ImagesContract.URL).contains("youtube.com") || fotoperfil.this.l.getString(ImagesContract.URL).contains("youtu.be")) {
                return;
            }
            fotoperfil fotoperfilVar2 = fotoperfil.this;
            if (fotoperfilVar2.n) {
                Bundle bundle = fotoperfilVar2.l;
                z = bundle != null && bundle.containsKey("ad_entrar");
                Bundle bundle2 = fotoperfil.this.l;
                z2 = bundle2 != null && bundle2.containsKey("fb_entrar");
                fotoperfil.this.n = false;
            } else {
                z = false;
                z2 = false;
            }
            fotoperfil fotoperfilVar3 = fotoperfil.this;
            fotoperfilVar3.k.r1(fotoperfilVar3, z, z2, false);
        }
    }

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

        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            Intent intent = new Intent();
            intent.putExtra("elim_fotoperfil", "1");
            fotoperfil.this.setResult(-1, intent);
            fotoperfil.this.finish();
        }
    }

    class g implements DialogInterface.OnShowListener {
        final AlertDialog a;

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

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

    class h extends RewardedAdLoadCallback {
        final Context b;

        class a extends FullScreenContentCallback {
            a() {
            }

            @Override
            public void onAdDismissedFullScreenContent() {
                fotoperfil fotoperfilVar = fotoperfil.this;
                if (fotoperfilVar.t) {
                    fotoperfilVar.abrir_secc(fotoperfilVar.e);
                }
            }

            @Override
            public void onAdFailedToShowFullScreenContent(AdError adError) {
                fotoperfil fotoperfilVar = fotoperfil.this;
                fotoperfilVar.abrir_secc(fotoperfilVar.e);
            }

            @Override
            public void onAdShowedFullScreenContent() {
            }
        }

        class b implements OnUserEarnedRewardListener {
            b() {
            }

            @Override
            public void onUserEarnedReward(RewardItem rewardItem) {
                h hVar = h.this;
                fotoperfil.this.t = true;
                config.i1(hVar.b);
            }
        }

        h(Context context) {
            this.b = context;
        }

        @Override
        public void onAdLoaded(RewardedAd rewardedAd) {
            fotoperfil.this.f.cancel();
            rewardedAd.setFullScreenContentCallback(new a());
            rewardedAd.show((Activity) this.b, new b());
        }

        @Override
        public void onAdFailedToLoad(LoadAdError loadAdError) {
            fotoperfil fotoperfilVar = fotoperfil.this;
            if (fotoperfilVar.k.f(this.b, fotoperfilVar.h)) {
                return;
            }
            fotoperfil.this.f.cancel();
            fotoperfil fotoperfilVar2 = fotoperfil.this;
            fotoperfilVar2.abrir_secc(fotoperfilVar2.e);
        }
    }

    class i implements AdDisplayListener {
        i() {
        }

        public void adClicked(Ad ad) {
        }

        public void adDisplayed(Ad ad) {
        }

        public void adHidden(Ad ad) {
            fotoperfil fotoperfilVar = fotoperfil.this;
            if (fotoperfilVar.t) {
                fotoperfilVar.abrir_secc(fotoperfilVar.e);
            }
        }

        public void adNotDisplayed(Ad ad) {
        }
    }

    private void a(Context context) {
        this.g = new h(context);
    }

    @Override
    public void abrir_secc(android.view.View r5) {
        throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.fotoperfil.abrir_secc(android.view.View):void");
    }

    public void adError(String str) {
        this.f.cancel();
        abrir_secc(this.e);
    }

    public void adLoaded(String str, AppnextAdCreativeType appnextAdCreativeType) {
        this.f.cancel();
        this.h.showAd();
    }

    public void b() {
        finish();
    }

    void c() {
        int u0 = this.k.u0(this);
        int i2 = this.k.T4;
        int i3 = 0;
        if (i2 == 1) {
            ListView listView = (ListView) findViewById(2131362584);
            this.u = listView;
            this.k.s(listView);
        } else if (i2 == 0) {
            int i4 = 0;
            int i7 = 0;
            while (true) {
                m[] mVarArr = this.k.Z1;
                if (i4 >= mVarArr.length) {
                    break;
                }
                if (!mVarArr[i4].B) {
                    findViewById(i4).setOnClickListener(this);
                    i7++;
                    if (i7 == u0) {
                        break;
                    }
                }
                i4++;
            }
            if (findViewById(2131362438) != null && findViewById(2131362438).getVisibility() == 0) {
                findViewById(2131362438).setOnClickListener(this);
            }
        }
        while (true) {
            int[] iArr = this.k.c2;
            if (i3 >= iArr.length) {
                return;
            }
            int i8 = iArr[i3];
            if (i8 > 0) {
                findViewById(i8).setOnClickListener(this);
            }
            i3++;
        }
    }

    @Override
    protected void onActivityResult(int i2, int i3, Intent intent) {
        config configVar = this.k;
        if ((configVar == null || !configVar.U0(i2, i3, intent, this)) && i3 == -1 && intent != null && intent.hasExtra("finalizar") && intent.getExtras().getBoolean("finalizar")) {
            if (!intent.getExtras().getBoolean("finalizar_app")) {
                this.d = false;
            }
            setResult(-1, intent);
            finish();
        }
    }

    @Override
    public void onAdClicked(com.facebook.ads.Ad ad) {
    }

    public void onAdClosed() {
        if (this.t) {
            abrir_secc(this.e);
        }
    }

    @Override
    public void onAdLoaded(com.facebook.ads.Ad ad) {
        this.f.cancel();
        this.i.show();
    }

    @Override
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        getWindow().setFormat(1);
    }

    @Override
    public void onClick(View view) {
        String str;
        String str2;
        String str3;
        String str4;
        String str5;
        String str6;
        String str7;
        if (view.getId() == 2131362485) {
            b();
            return;
        }
        if (view.getId() == 2131362549) {
            AlertDialog create = new AlertDialog.Builder(this).setNegativeButton(2131886227, (DialogInterface.OnClickListener) null).setPositiveButton(2131886114, new f()).setMessage(2131886357).create();
            if (!this.a.equals("")) {
                create.setOnShowListener(new g(create));
            }
            create.show();
            try {
                ((TextView) create.findViewById(R.id.message)).setTypeface(Typeface.MONOSPACE);
                return;
            } catch (Exception unused) {
                return;
            }
        }
        String str8 = this.k.f60q4;
        if ((str8 == null || str8.equals("")) && (((str = this.k.d3) == null || str.equals("")) && (((str2 = this.k.f58p4) == null || str2.equals("")) && (((str3 = this.k.f66t4) == null || str3.equals("")) && (((str4 = this.k.f68u4) == null || str4.equals("")) && (((str5 = this.k.J4) == null || str5.equals("")) && (((str6 = this.k.f70v4) == null || str6.equals("")) && ((str7 = this.k.f72w4) == null || str7.equals(""))))))))) {
            abrir_secc(view);
            return;
        }
        String str9 = this.k.f60q4;
        if (str9 != null && !str9.equals("")) {
            this.h = new RewardedVideo(this, this.k.f60q4);
        }
        String str10 = this.k.f58p4;
        if (str10 != null) {
            str10.equals("");
        }
        String str11 = this.k.f66t4;
        if (str11 != null && !str11.equals("")) {
            this.i = new RewardedVideoAd(this, this.k.f66t4);
        }
        String str12 = this.k.f68u4;
        if (str12 != null && !str12.equals("")) {
            this.j = new StartAppAd(this);
        }
        ProgressDialog progressDialog = new ProgressDialog(this);
        this.f = progressDialog;
        this.e = view;
        if (this.k.j1(this, view, this.a, progressDialog, this.g, this.h, this.i, this.j, view)) {
            return;
        }
        abrir_secc(view);
    }

    @Override
    public void onConfigurationChanged(Configuration configuration) {
        BannerAd bannerAd;
        AdView adView;
        com.google.android.gms.ads.AdView adView2;
        super.onConfigurationChanged(configuration);
        ((LinearLayout) findViewById(2131362685)).removeViewAt(0);
        c();
        ((LinearLayout) findViewById(2131362610)).removeAllViews();
        com.eugene.hymnesetlouanges.c cVar = this.s;
        if (cVar != null && (adView2 = cVar.a) != null) {
            try {
                adView2.destroy();
            } catch (Exception unused) {
            }
        }
        com.eugene.hymnesetlouanges.c cVar2 = this.s;
        if (cVar2 != null && (adView = cVar2.b) != null) {
            try {
                adView.destroy();
            } catch (Exception unused2) {
            }
        }
        com.eugene.hymnesetlouanges.c cVar3 = this.s;
        if (cVar3 != null && (bannerAd = cVar3.e) != null) {
            try {
                bannerAd.destroy();
            } catch (Exception unused3) {
            }
        }
        this.s = this.k.F0(this, false);
    }

    @Override
    public boolean onContextItemSelected(MenuItem menuItem) {
        boolean z;
        Uri uriForFile;
        int itemId = menuItem.getItemId();
        if (itemId == 2131362396) {
            config.b0(this.l.getString(ImagesContract.URL), this);
            return true;
        }
        if (itemId != 2131362173) {
            return super.onContextItemSelected(menuItem);
        }
        BitmapFactory.Options options = new BitmapFactory.Options();
        options.inPreferredConfig = Bitmap.Config.ARGB_8888;
        Bitmap decodeFile = BitmapFactory.decodeFile(this.l.getString(ImagesContract.URL).replace("file://", ""), options);
        try {
            File file = new File(getCacheDir(), "images");
            file.mkdirs();
            FileOutputStream fileOutputStream = new FileOutputStream(file + "/temporal.png");
            decodeFile.compress(Bitmap.CompressFormat.PNG, 100, fileOutputStream);
            fileOutputStream.close();
            z = true;
        } catch (IOException e2) {
            e2.printStackTrace();
            z = false;
        }
        if (z && (uriForFile = FileProvider.getUriForFile(this, "com.eugene.hymnesetlouanges.fileprovider", new File(new File(getCacheDir(), "images"), "temporal.png"))) != null) {
            Intent intent = new Intent();
            intent.setAction("android.intent.action.SEND");
            intent.addFlags(1);
            intent.setType(getContentResolver().getType(uriForFile));
            intent.putExtra("android.intent.extra.STREAM", uriForFile);
            startActivity(Intent.createChooser(intent, getResources().getString(2131886344)));
        }
        return true;
    }

    @Override
    public void onCreate(Bundle bundle) {
        config configVar = (config) getApplicationContext();
        this.k = configVar;
        if (configVar.l1 == null) {
            configVar.f1();
        }
        a(this);
        this.a = config.h("FFFFFFFF", this.k.w1);
        super.onCreate(bundle);
        setContentView(2131558534);
        Bundle extras = getIntent().getExtras();
        this.l = extras;
        if (bundle == null) {
            this.d = extras != null && extras.containsKey("es_root") && this.l.getBoolean("es_root", false);
        } else {
            this.d = bundle.containsKey("es_root") && bundle.getBoolean("es_root", false);
        }
        c();
        this.k.V0(this, false);
        SearchManager searchManager = (SearchManager) getSystemService("search");
        searchManager.setOnCancelListener(new a());
        searchManager.setOnDismissListener(new b());
        this.s = this.k.F0(this, false);
        SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
        this.q = sharedPreferences;
        this.m = sharedPreferences.getLong("idusu", 0L);
        this.o = this.q.getString("cod", "");
        this.p = this.l.getString("idusu_profile");
        findViewById(2131362485).setOnClickListener(this);
        if (this.p.equals(this.m + "")) {
            findViewById(2131362549).setVisibility(8);
        } else {
            findViewById(2131362549).setOnClickListener(this);
        }
        this.r = (WebView) findViewById(2131363594);
        if (this.l.getString(ImagesContract.URL).startsWith("file://")) {
            this.r.getSettings().setAllowFileAccess(true);
            registerForContextMenu(this.r);
            config configVar2 = this.k;
            String str = configVar2.n1;
            String str2 = configVar2.o1;
            int i2 = configVar2.c;
            if (i2 != -1) {
                m mVar = configVar2.Z1[i2];
                str = mVar.g;
                str2 = mVar.h;
            }
            if (this.l.containsKey("bg1")) {
                str = this.l.getString("bg1");
                str2 = this.l.getString("bg2");
            }
            if (!str.equals("")) {
                findViewById(2131362685).setBackgroundDrawable(new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[]{Color.parseColor("#" + str), Color.parseColor("#" + str2)}));
                this.r.setBackgroundColor(0);
            }
        }
        this.r.setWebChromeClient(new c());
        this.r.getSettings().setBuiltInZoomControls(true);
        this.r.getSettings().setSupportZoom(true);
        this.r.setOnTouchListener(new d());
        this.r.getSettings().setUseWideViewPort(true);
        this.r.getSettings().setLoadWithOverviewMode(true);
        this.r.setWebViewClient(new e());
        if (bundle == null) {
            this.r.loadUrl(this.l.getString(ImagesContract.URL));
        }
    }

    @Override
    public void onCreateContextMenu(ContextMenu contextMenu, View view, ContextMenu.ContextMenuInfo contextMenuInfo) {
        super.onCreateContextMenu(contextMenu, view, contextMenuInfo);
        getMenuInflater().inflate(2131623938, contextMenu);
        MenuItem findItem = contextMenu.findItem(2131362396);
        String str = ((Object) findItem.getTitle()) + "";
        findItem.setTitle(str.substring(0, 1).toUpperCase() + str.substring(1).toLowerCase());
    }

    @Override
    public void onDestroy() {
        com.eugene.hymnesetlouanges.c cVar;
        BannerAd bannerAd;
        com.eugene.hymnesetlouanges.c cVar2;
        AdView adView;
        com.eugene.hymnesetlouanges.c cVar3;
        com.google.android.gms.ads.AdView adView2;
        if (this.k.J3 != 0 && (cVar3 = this.s) != null && (adView2 = cVar3.a) != null) {
            adView2.destroy();
        }
        if (this.k.J3 != 0 && (cVar2 = this.s) != null && (adView = cVar2.b) != null) {
            adView.destroy();
        }
        if (this.k.J3 != 0 && (cVar = this.s) != null && (bannerAd = cVar.e) != null) {
            bannerAd.destroy();
        }
        if ((this.d && isFinishing()) || config.f25o6) {
            config.d0(this);
        }
        super.onDestroy();
    }

    @Override
    public void onError(com.facebook.ads.Ad ad, com.facebook.ads.AdError adError) {
        this.f.cancel();
        abrir_secc(this.e);
    }

    public void onFailedToReceiveAd(Ad ad) {
        this.f.cancel();
        abrir_secc(this.e);
    }

    @Override
    public boolean onKeyDown(int i2, KeyEvent keyEvent) {
        if (i2 != 4) {
            return super.onKeyDown(i2, keyEvent);
        }
        if (this.r.canGoBack()) {
            this.r.goBack();
            return true;
        }
        b();
        return true;
    }

    @Override
    public void onLoggingImpression(com.facebook.ads.Ad ad) {
    }

    @Override
    public void onPause() {
        com.eugene.hymnesetlouanges.c cVar;
        BannerAd bannerAd;
        com.eugene.hymnesetlouanges.c cVar2;
        com.google.android.gms.ads.AdView adView;
        if (this.k.J3 != 0 && (cVar2 = this.s) != null && (adView = cVar2.a) != null) {
            adView.pause();
        }
        if (this.k.J3 != 0 && (cVar = this.s) != null && (bannerAd = cVar.e) != null) {
            bannerAd.pause();
        }
        super.onPause();
        config.W0(this);
    }

    public void onReceiveAd(Ad ad) {
        this.f.cancel();
        this.j.showAd("REWARDED VIDEO", new i());
    }

    @Override
    protected void onRestoreInstanceState(Bundle bundle) {
        super.onRestoreInstanceState(bundle);
        this.r.restoreState(bundle);
    }

    @Override
    public void onResume() {
        com.eugene.hymnesetlouanges.c cVar;
        BannerAd bannerAd;
        com.eugene.hymnesetlouanges.c cVar2;
        com.google.android.gms.ads.AdView adView;
        super.onResume();
        config.X0(this);
        if (this.k.J3 != 0 && (cVar2 = this.s) != null && (adView = cVar2.a) != null) {
            adView.resume();
        }
        if (this.k.J3 != 0 && (cVar = this.s) != null && (bannerAd = cVar.e) != null) {
            bannerAd.resume();
        }
        this.r.onResume();
    }

    @Override
    public void onRewardedVideoClosed() {
        if (this.t) {
            abrir_secc(this.e);
        }
    }

    @Override
    public void onRewardedVideoCompleted() {
        this.t = true;
        config.i1(this);
    }

    @Override
    protected void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        this.r.saveState(bundle);
    }

    @Override
    public boolean onSearchRequested() {
        this.b = true;
        this.c = true;
        return super.onSearchRequested();
    }

    @Override
    public void onStop() {
        super.onStop();
        if (!this.b || this.c) {
            return;
        }
        finish();
    }

    public void onVideoCompleted() {
        this.t = true;
        config.i1(this);
    }

    public void videoEnded() {
        this.t = true;
        config.i1(this);
    }
}