正在查看: Cantique de Louanges v12 应用的 fotogal.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cantique de Louanges v12 应用的 fotogal.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.AsyncTask;
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.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.AdapterView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
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.ads.mediation.facebook.FacebookMediationAdapter;
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.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
public class fotogal extends Activity_ext_class implements com.eugene.hymnesetlouanges.a, View.OnClickListener, RewardedVideoAdListener, OnAdLoaded, OnAdClosed, OnVideoEnded, OnAdError, VideoListener, AdEventListener {
private r0 A;
m B;
AlertDialog.Builder C;
View D;
ListView E;
config k;
Bundle l;
long m;
int n;
String q;
String r;
String s;
String t;
String u;
SharedPreferences v;
WebView w;
com.eugene.hymnesetlouanges.c x;
private ArrayList z;
int o = 0;
boolean p = true;
boolean y = false;
class a implements DialogInterface.OnShowListener {
final AlertDialog a;
a(AlertDialog alertDialog) {
this.a = alertDialog;
}
@Override
public void onShow(DialogInterface dialogInterface) {
this.a.getButton(-1).setTextColor(Color.parseColor("#" + fotogal.this.a));
this.a.getButton(-2).setTextColor(Color.parseColor("#" + fotogal.this.a));
}
}
class b extends RewardedAdLoadCallback {
final Context b;
class a extends FullScreenContentCallback {
a() {
}
@Override
public void onAdDismissedFullScreenContent() {
fotogal fotogalVar = fotogal.this;
if (fotogalVar.y) {
fotogalVar.abrir_secc(fotogalVar.e);
}
}
@Override
public void onAdFailedToShowFullScreenContent(AdError adError) {
fotogal fotogalVar = fotogal.this;
fotogalVar.abrir_secc(fotogalVar.e);
}
@Override
public void onAdShowedFullScreenContent() {
}
}
class C0088b implements OnUserEarnedRewardListener {
C0088b() {
}
@Override
public void onUserEarnedReward(RewardItem rewardItem) {
b bVar = b.this;
fotogal.this.y = true;
config.i1(bVar.b);
}
}
b(Context context) {
this.b = context;
}
@Override
public void onAdLoaded(RewardedAd rewardedAd) {
fotogal.this.f.cancel();
rewardedAd.setFullScreenContentCallback(new a());
rewardedAd.show((Activity) this.b, new C0088b());
}
@Override
public void onAdFailedToLoad(LoadAdError loadAdError) {
fotogal fotogalVar = fotogal.this;
if (fotogalVar.k.f(this.b, fotogalVar.h)) {
return;
}
fotogal.this.f.cancel();
fotogal fotogalVar2 = fotogal.this;
fotogalVar2.abrir_secc(fotogalVar2.e);
}
}
class c implements AdDisplayListener {
c() {
}
public void adClicked(Ad ad) {
}
public void adDisplayed(Ad ad) {
}
public void adHidden(Ad ad) {
fotogal fotogalVar = fotogal.this;
if (fotogalVar.y) {
fotogalVar.abrir_secc(fotogalVar.e);
}
}
public void adNotDisplayed(Ad ad) {
}
}
class d implements SearchManager.OnCancelListener {
d() {
}
@Override
public void onCancel() {
fotogal fotogalVar = fotogal.this;
fotogalVar.b = false;
fotogalVar.setResult(0);
}
}
class e implements SearchManager.OnDismissListener {
e() {
}
@Override
public void onDismiss() {
fotogal.this.c = false;
}
}
class f extends WebChromeClient {
f() {
}
}
class g implements View.OnTouchListener {
g() {
}
@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 h extends WebViewClient {
h() {
}
@Override
public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
boolean z;
boolean z2;
fotogal fotogalVar = fotogal.this;
if (fotogalVar.b || fotogalVar.isFinishing() || fotogal.this.l.getString(ImagesContract.URL).contains("youtube.com") || fotogal.this.l.getString(ImagesContract.URL).contains("youtu.be")) {
return;
}
fotogal fotogalVar2 = fotogal.this;
if (fotogalVar2.p) {
Bundle bundle = fotogalVar2.l;
z = bundle != null && bundle.containsKey("ad_entrar");
Bundle bundle2 = fotogal.this.l;
z2 = bundle2 != null && bundle2.containsKey("fb_entrar");
fotogal.this.p = false;
} else {
z = false;
z2 = false;
}
fotogal fotogalVar3 = fotogal.this;
fotogalVar3.k.r1(fotogalVar3, z, z2, false);
}
}
class i implements AdapterView.OnItemClickListener {
i() {
}
@Override
public void onItemClick(AdapterView adapterView, View view, int i, long j) {
s0 s0Var = (s0) fotogal.this.z.get(i);
if (s0Var.c) {
m mVar = fotogal.this.B;
if (mVar == null || mVar.getStatus() != AsyncTask.Status.RUNNING) {
fotogal.this.B = new m();
fotogal.this.B.execute(new String[0]);
return;
}
return;
}
if (s0Var.f.equals(fotogal.this.m + "")) {
return;
}
if (s0Var.f.equals(fotogal.this.u + "")) {
return;
}
Intent intent = new Intent(fotogal.this, (Class<?>) profile.class);
intent.putExtra(FacebookMediationAdapter.KEY_ID, s0Var.f);
intent.putExtra("privados", s0Var.h);
intent.putExtra("nombre", s0Var.e);
intent.putExtra("coments", s0Var.j);
intent.putExtra("fnac_d", s0Var.k);
intent.putExtra("fnac_m", s0Var.l);
intent.putExtra("fnac_a", s0Var.m);
intent.putExtra("sexo", s0Var.i);
intent.putExtra("vfoto", s0Var.g);
if (fotogal.this.l.containsKey("desdepriv")) {
intent.putExtra("desdepriv", "1");
}
intent.putExtra("p_fnac", fotogal.this.l.getInt("p_fnac"));
intent.putExtra("p_sexo", fotogal.this.l.getInt("p_sexo"));
intent.putExtra("p_descr", fotogal.this.l.getInt("p_descr"));
intent.putExtra("p_dist", fotogal.this.l.getInt("p_dist"));
intent.putExtra("coments_chat", fotogal.this.l.getBoolean("coments_chat"));
intent.putExtra("galeria", fotogal.this.l.getBoolean("galeria"));
intent.putExtra("privados_chat", fotogal.this.l.getBoolean("privados_chat"));
intent.putExtra("fotos_perfil", fotogal.this.l.getInt("fotos_perfil"));
intent.putExtra("fotos_chat", fotogal.this.l.getInt("fotos_chat"));
fotogal.this.startActivityForResult(intent, 0);
}
}
class j implements DialogInterface.OnClickListener {
j() {
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
fotogal.this.findViewById(2131362549).setVisibility(8);
fotogal fotogalVar = fotogal.this;
config.Q0(Toast.makeText(fotogalVar, fotogalVar.getResources().getString(2131886415), 0));
new p().execute(new String[0]);
}
}
class k implements DialogInterface.OnShowListener {
final AlertDialog a;
k(AlertDialog alertDialog) {
this.a = alertDialog;
}
@Override
public void onShow(DialogInterface dialogInterface) {
this.a.getButton(-1).setTextColor(Color.parseColor("#" + fotogal.this.a));
this.a.getButton(-2).setTextColor(Color.parseColor("#" + fotogal.this.a));
}
}
class l implements DialogInterface.OnClickListener {
l() {
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
fotogal fotogalVar = fotogal.this;
fotogalVar.new n(fotogalVar.s).execute(new String[0]);
Intent intent = new Intent();
intent.putExtra("elim_foto", fotogal.this.s);
intent.putExtra("indf", fotogal.this.n);
fotogal.this.setResult(-1, intent);
fotogal.this.finish();
}
}
private class m extends AsyncTask {
@Override
public String doInBackground(String... strArr) {
HttpURLConnection httpURLConnection;
Throwable th;
HttpURLConnection httpURLConnection2 = null;
try {
httpURLConnection = (HttpURLConnection) new URL(config.f23m6 + "/srv/likes.php?idusu=" + fotogal.this.m + "&c=" + fotogal.this.q + "&id_fotogal=" + fotogal.this.s + "&n=" + fotogal.this.o).openConnection();
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();
httpURLConnection.disconnect();
return sb2;
}
sb.append(readLine + "\n");
}
} catch (Exception unused) {
httpURLConnection2 = httpURLConnection;
if (httpURLConnection2 != null) {
httpURLConnection2.disconnect();
}
return "";
} catch (Throwable th2) {
th = th2;
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
throw th;
}
} catch (Exception unused2) {
} catch (Throwable th3) {
httpURLConnection = null;
th = th3;
}
}
@Override
public void onPostExecute(String str) {
boolean z;
try {
fotogal.this.D.findViewById(2131362592).setVisibility(8);
} catch (Exception unused) {
}
if (str.contains("ANDROID:OK DATOS:")) {
int indexOf = str.indexOf("DATOS:") + 6;
String[] split = str.substring(indexOf, str.indexOf(";", indexOf)).split(",");
if (fotogal.this.z.size() == 0) {
if (fotogal.this.t.equals("1")) {
s0 s0Var = new s0();
s0Var.f = fotogal.this.m + "";
s0Var.e = fotogal.this.getResources().getString(2131886923);
fotogal fotogalVar = fotogal.this;
s0Var.b = fotogalVar.k.p0(fotogalVar, 1).exists();
fotogal.this.z.add(s0Var);
}
} else if (((s0) fotogal.this.z.get(fotogal.this.z.size() - 1)).c) {
fotogal.this.z.remove(fotogal.this.z.size() - 1);
}
int i = 0;
while (!split[i].equals("S") && !split[i].equals("N")) {
String[] split2 = split[i].split("-");
int i2 = 0;
while (true) {
if (i2 >= fotogal.this.z.size()) {
z = false;
break;
} else {
if (((s0) fotogal.this.z.get(i2)).f.equals(split2[0])) {
z = true;
break;
}
i2++;
}
}
if (!z) {
s0 s0Var2 = new s0();
s0Var2.f = split2[0];
s0Var2.e = split2[1].replace("@X@", ",").replace("@Y@", "-");
String str2 = split2[2];
s0Var2.g = str2;
if (!str2.equals("0")) {
s0Var2.b = true;
}
s0Var2.h = split2[3];
s0Var2.k = split2[4];
s0Var2.l = split2[5];
s0Var2.m = split2[6];
s0Var2.i = split2[7];
s0Var2.j = split2[8];
s0Var2.d = split2[9].equals("1");
fotogal.this.z.add(s0Var2);
fotogal.this.o++;
}
i++;
}
if (split[i].equals("S")) {
s0 s0Var3 = new s0();
s0Var3.c = true;
fotogal.this.z.add(s0Var3);
}
fotogal.this.A.notifyDataSetChanged();
}
}
@Override
protected void onPreExecute() {
fotogal.this.D.findViewById(2131362592).setVisibility(0);
}
private m() {
}
}
private class n extends AsyncTask {
String a;
n(String str) {
this.a = str;
}
@Override
public Byte doInBackground(String... strArr) {
HttpURLConnection httpURLConnection;
Throwable th;
HttpURLConnection httpURLConnection2 = null;
try {
try {
httpURLConnection = (HttpURLConnection) new URL(config.f23m6 + "/srv/eliminar_fotogal.php?idusu=" + fotogal.this.m + "&c=" + fotogal.this.q + "&idf=" + this.a).openConnection();
} catch (Throwable th2) {
httpURLConnection = null;
th = th2;
}
} catch (Exception unused) {
}
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()));
while (true) {
String readLine = bufferedReader.readLine();
if (readLine == null) {
httpURLConnection.disconnect();
return (byte) 1;
}
StringBuilder sb = new StringBuilder();
sb.append(readLine);
sb.append("\n");
}
} catch (Exception unused2) {
httpURLConnection2 = httpURLConnection;
if (httpURLConnection2 != null) {
httpURLConnection2.disconnect();
}
return (byte) 2;
} catch (Throwable th3) {
th = th3;
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
throw th;
}
}
}
private class o extends AsyncTask {
@Override
public String 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(config.f23m6 + "/srv/like_fotogal.php?idusu=" + fotogal.this.m + "&c=" + fotogal.this.q + "&idusu_pro=" + fotogal.this.u + "&idf=" + fotogal.this.s + "&modo=" + fotogal.this.t);
eVar.a(new nf.g(nf.d.b));
eVar.x("User-Agent", "Android Vinebre Software");
hVar.a(eVar);
return "1";
} catch (Exception unused) {
return "ANDROID:KO";
}
}
@Override
public void onPostExecute(String str) {
}
private o() {
}
}
private class p extends AsyncTask {
@Override
public String 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(config.f23m6 + "/srv/reportar_fotogal.php?idusu=" + fotogal.this.m + "&c=" + fotogal.this.q + "&idusu_pro=" + fotogal.this.u + "&idf=" + fotogal.this.s);
eVar.a(new nf.g(nf.d.b));
eVar.x("User-Agent", "Android Vinebre Software");
hVar.a(eVar);
return "1";
} catch (Exception unused) {
return "ANDROID:KO";
}
}
@Override
public void onPostExecute(String str) {
}
private p() {
}
}
private void c(Context context) {
this.g = new b(context);
}
@Override
public void abrir_secc(android.view.View r5) {
throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.fotogal.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 d() {
Intent intent = new Intent();
intent.putExtra("nlikes", this.r);
intent.putExtra("liked", this.t);
intent.putExtra("idf", this.s);
setResult(-1, intent);
finish();
}
void e() {
int u0 = this.k.u0(this);
int i2 = this.k.T4;
int i3 = 0;
if (i2 == 1) {
ListView listView = (ListView) findViewById(2131362584);
this.E = listView;
this.k.s(listView);
} else if (i2 == 0) {
int i4 = 0;
int i7 = 0;
while (true) {
com.eugene.hymnesetlouanges.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) {
if (intent != null && intent.hasExtra("finalizar")) {
if (intent.getExtras().getBoolean("finalizar")) {
if (!intent.getExtras().getBoolean("finalizar_app")) {
this.d = false;
}
setResult(-1, intent);
finish();
return;
}
return;
}
if (intent == null || !intent.hasExtra("accion_usu_fav_id")) {
return;
}
for (int i4 = 0; i4 < this.z.size(); i4++) {
if (((s0) this.z.get(i4)).f.equals(intent.getStringExtra("accion_usu_fav_id"))) {
((s0) this.z.get(i4)).d = intent.getBooleanExtra("accion_usu_fav_accion", false);
this.A.notifyDataSetChanged();
return;
}
}
}
}
@Override
public void onAdClicked(com.facebook.ads.Ad ad) {
}
public void onAdClosed() {
if (this.y) {
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) {
d();
return;
}
Object[] objArr = 0;
if (view.getId() == 2131363480) {
if (this.r.equals("0")) {
return;
}
this.C = new AlertDialog.Builder(this);
View inflate = getLayoutInflater().inflate(2131558541, (ViewGroup) null);
this.D = inflate;
config.b1((ProgressBar) inflate.findViewById(2131362592), this.k.w1);
this.C.setView(this.D);
this.C.setCancelable(true);
ListView listView = (ListView) this.D.findViewById(2131362706);
listView.setCacheColorHint(0);
r0 r0Var = new r0(this, 2131558540, this.z, this.m);
this.A = r0Var;
listView.setAdapter((ListAdapter) r0Var);
listView.setOnItemClickListener(new i());
this.C.show();
if (this.z.size() == 0) {
m mVar = this.B;
if (mVar == null || mVar.getStatus() != AsyncTask.Status.RUNNING) {
m mVar2 = new m();
this.B = mVar2;
mVar2.execute(new String[0]);
return;
}
return;
}
return;
}
if (view.getId() != 2131362526) {
try {
if (view.getId() == 2131362549) {
AlertDialog create = new AlertDialog.Builder(this).setNegativeButton(2131886227, (DialogInterface.OnClickListener) null).setPositiveButton(2131886114, new j()).setMessage(2131886362).create();
if (!this.a.equals("")) {
create.setOnShowListener(new k(create));
}
create.show();
((TextView) create.findViewById(R.id.message)).setTypeface(Typeface.MONOSPACE);
} else {
if (view.getId() != 2131362497) {
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);
return;
}
AlertDialog create2 = new AlertDialog.Builder(this).setNegativeButton(2131886669, (DialogInterface.OnClickListener) null).setPositiveButton(2131886740, new l()).setMessage(2131886354).create();
if (!this.a.equals("")) {
create2.setOnShowListener(new a(create2));
}
create2.show();
((TextView) create2.findViewById(R.id.message)).setTypeface(Typeface.MONOSPACE);
}
return;
} catch (Exception unused) {
return;
}
}
if (this.t.equals("0")) {
this.r = (Integer.parseInt(this.r) + 1) + "";
this.t = "1";
if (!this.u.equals(this.m + "")) {
if (!this.v.contains("usufav_" + this.u)) {
if (!this.v.contains("usufav_noactivar_" + this.u)) {
SharedPreferences.Editor edit = this.v.edit();
edit.putBoolean("usufav_" + this.u, true);
edit.commit();
}
}
}
if (this.z.size() > 0) {
if (!((s0) this.z.get(0)).f.equals(this.m + "")) {
s0 s0Var = new s0();
s0Var.f = this.m + "";
s0Var.e = getResources().getString(2131886923);
s0Var.b = this.k.p0(this, 1).exists();
this.z.add(0, s0Var);
this.A.notifyDataSetChanged();
}
}
} else {
this.r = (Integer.parseInt(this.r) - 1) + "";
this.t = "0";
if (this.z.size() > 0) {
if (((s0) this.z.get(0)).f.equals(this.m + "")) {
this.z.remove(0);
this.A.notifyDataSetChanged();
}
}
}
((TextView) findViewById(2131363480)).setText(this.r);
((TextView) findViewById(2131363470)).setText(this.t.equals("1") ? getResources().getString(2131886755) : "");
new o().execute(new String[0]);
}
@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);
e();
((LinearLayout) findViewById(2131362610)).removeAllViews();
com.eugene.hymnesetlouanges.c cVar = this.x;
if (cVar != null && (adView2 = cVar.a) != null) {
try {
adView2.destroy();
} catch (Exception unused) {
}
}
com.eugene.hymnesetlouanges.c cVar2 = this.x;
if (cVar2 != null && (adView = cVar2.b) != null) {
try {
adView.destroy();
} catch (Exception unused2) {
}
}
com.eugene.hymnesetlouanges.c cVar3 = this.x;
if (cVar3 != null && (bannerAd = cVar3.e) != null) {
try {
bannerAd.destroy();
} catch (Exception unused3) {
}
}
this.x = 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();
}
c(this);
this.a = config.h("FFFFFFFF", this.k.w1);
super.onCreate(bundle);
setContentView(2131558533);
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);
}
e();
this.k.V0(this, false);
SearchManager searchManager = (SearchManager) getSystemService("search");
searchManager.setOnCancelListener(new d());
searchManager.setOnDismissListener(new e());
this.x = this.k.F0(this, false);
SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
this.v = sharedPreferences;
this.m = sharedPreferences.getLong("idusu", 0L);
this.q = this.v.getString("cod", "");
this.r = this.l.getString("nlikes");
this.s = this.l.getString("idf");
this.n = this.l.getInt("indf");
this.t = this.l.getString("liked");
this.u = this.l.getString("idusu_profile");
this.z = new ArrayList();
TextView textView = (TextView) findViewById(2131363480);
findViewById(2131363480).setBackgroundDrawable(getResources().getDrawable(2131231492));
textView.setTextColor(config.f13d6);
textView.setText(this.r);
((TextView) findViewById(2131363470)).setText(this.t.equals("1") ? getResources().getString(2131886755) : "");
findViewById(2131362485).setOnClickListener(this);
findViewById(2131362526).setOnClickListener(this);
findViewById(2131363480).setOnClickListener(this);
if (this.u.equals(this.m + "")) {
findViewById(2131362549).setVisibility(8);
findViewById(2131362497).setOnClickListener(this);
findViewById(2131362497).setVisibility(0);
} else {
findViewById(2131362549).setOnClickListener(this);
}
this.w = (WebView) findViewById(2131363594);
if (this.l.getString(ImagesContract.URL).startsWith("file://")) {
this.w.getSettings().setAllowFileAccess(true);
registerForContextMenu(this.w);
config configVar2 = this.k;
String str = configVar2.n1;
String str2 = configVar2.o1;
int i2 = configVar2.c;
if (i2 != -1) {
com.eugene.hymnesetlouanges.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.w.setBackgroundColor(0);
}
}
this.w.setWebChromeClient(new f());
this.w.getSettings().setBuiltInZoomControls(true);
this.w.getSettings().setSupportZoom(true);
this.w.setOnTouchListener(new g());
this.w.getSettings().setUseWideViewPort(true);
this.w.getSettings().setLoadWithOverviewMode(true);
this.w.setWebViewClient(new h());
if (bundle == null) {
this.w.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.x) != null && (adView2 = cVar3.a) != null) {
adView2.destroy();
}
if (this.k.J3 != 0 && (cVar2 = this.x) != null && (adView = cVar2.b) != null) {
adView.destroy();
}
if (this.k.J3 != 0 && (cVar = this.x) != 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.w.canGoBack()) {
this.w.goBack();
return true;
}
d();
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.x) != null && (adView = cVar2.a) != null) {
adView.pause();
}
if (this.k.J3 != 0 && (cVar = this.x) != 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 c());
}
@Override
protected void onRestoreInstanceState(Bundle bundle) {
super.onRestoreInstanceState(bundle);
this.w.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.x) != null && (adView = cVar2.a) != null) {
adView.resume();
}
if (this.k.J3 != 0 && (cVar = this.x) != null && (bannerAd = cVar.e) != null) {
bannerAd.resume();
}
this.w.onResume();
}
@Override
public void onRewardedVideoClosed() {
if (this.y) {
abrir_secc(this.e);
}
}
@Override
public void onRewardedVideoCompleted() {
this.y = true;
config.i1(this);
}
@Override
protected void onSaveInstanceState(Bundle bundle) {
super.onSaveInstanceState(bundle);
this.w.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.y = true;
config.i1(this);
}
public void videoEnded() {
this.y = true;
config.i1(this);
}
}