正在查看: Cantique de Louanges v12 应用的 preperfil.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cantique de Louanges v12 应用的 preperfil.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.eugene.hymnesetlouanges;
import android.R;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.app.SearchManager;
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.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
public class preperfil extends Activity_ext_class implements com.eugene.hymnesetlouanges.a, View.OnClickListener {
boolean A;
boolean B;
ListView C;
SharedPreferences D;
Bundle E;
private ProgressDialog k;
long l;
int m;
int n;
config o;
boolean p = false;
boolean q = false;
boolean r = false;
boolean s = false;
boolean t = false;
boolean u = false;
boolean v = false;
boolean w = false;
boolean x = false;
boolean y = false;
boolean z;
class a implements SearchManager.OnCancelListener {
a() {
}
@Override
public void onCancel() {
preperfil preperfilVar = preperfil.this;
preperfilVar.b = false;
preperfilVar.setResult(0);
}
}
class b implements SearchManager.OnDismissListener {
b() {
}
@Override
public void onDismiss() {
preperfil.this.c = false;
}
}
class c implements DialogInterface.OnShowListener {
c() {
}
@Override
public void onShow(DialogInterface dialogInterface) {
config.b1((ProgressBar) preperfil.this.k.findViewById(R.id.progress), preperfil.this.o.w1);
}
}
class d implements DialogInterface.OnShowListener {
final AlertDialog a;
d(AlertDialog alertDialog) {
this.a = alertDialog;
}
@Override
public void onShow(DialogInterface dialogInterface) {
this.a.getButton(-1).setTextColor(Color.parseColor("#" + preperfil.this.a));
}
}
private class e extends AsyncTask {
@Override
public Byte doInBackground(String... strArr) {
HttpURLConnection httpURLConnection;
HttpURLConnection httpURLConnection2 = null;
try {
try {
httpURLConnection = (HttpURLConnection) new URL(config.f23m6 + "/srv/obtener_perfil.php?v=1&idusu=" + preperfil.this.l + "&c=" + preperfil.this.D.getString("cod", "")).openConnection();
} catch (Throwable th) {
th = th;
}
} 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()));
StringBuilder sb = new StringBuilder();
while (true) {
String readLine = bufferedReader.readLine();
if (readLine == null) {
break;
}
sb.append(readLine + "\n");
}
String sb2 = sb.toString();
if (sb2.indexOf("ANDROID:PERFILKO") != -1) {
httpURLConnection.disconnect();
return (byte) 3;
}
if (sb2.indexOf("ANDROID:OK") == -1) {
httpURLConnection.disconnect();
return (byte) 2;
}
int indexOf = sb2.indexOf("DATOSUSU:") + 9;
int indexOf2 = sb2.indexOf(";", indexOf);
String substring = sb2.substring(indexOf, indexOf2);
int i = indexOf2 + 1;
int indexOf3 = sb2.indexOf(";", i);
String substring2 = sb2.substring(i, indexOf3);
int i2 = indexOf3 + 1;
int indexOf4 = sb2.indexOf(";", i2);
int parseInt = Integer.parseInt(sb2.substring(i2, indexOf4));
int i3 = indexOf4 + 1;
int indexOf5 = sb2.indexOf(";", i3);
int parseInt2 = Integer.parseInt(sb2.substring(i3, indexOf5));
int i4 = indexOf5 + 1;
int indexOf6 = sb2.indexOf(";", i4);
int parseInt3 = Integer.parseInt(sb2.substring(i4, indexOf6));
int i7 = indexOf6 + 1;
int indexOf7 = sb2.indexOf(";", i7);
int parseInt4 = Integer.parseInt(sb2.substring(i7, indexOf7));
int i8 = indexOf7 + 1;
int indexOf8 = sb2.indexOf(";", i8);
int parseInt5 = Integer.parseInt(sb2.substring(i8, indexOf8));
int i9 = indexOf8 + 1;
int indexOf9 = sb2.indexOf(";", i9);
int parseInt6 = Integer.parseInt(sb2.substring(i9, indexOf9));
int i10 = indexOf9 + 1;
int indexOf10 = sb2.indexOf(";", i10);
String substring3 = sb2.substring(i10, indexOf10);
int i11 = indexOf10 + 1;
String substring4 = sb2.substring(i11, sb2.indexOf(";", i11));
SharedPreferences.Editor edit = preperfil.this.D.edit();
edit.putString("nick", substring);
edit.putInt("privados", parseInt);
edit.putInt("fnac_d", parseInt2);
edit.putInt("fnac_m", parseInt3);
edit.putInt("fnac_a", parseInt4);
edit.putInt("sexo", parseInt5);
edit.putInt("coments", parseInt6);
edit.putString("descr", substring3);
edit.commit();
if (substring2.equals("1")) {
preperfil.this.c(1, substring4);
} else {
preperfil preperfilVar = preperfil.this;
preperfilVar.o.p0(preperfilVar, 1).delete();
}
httpURLConnection.disconnect();
return (byte) 1;
} catch (Exception unused2) {
httpURLConnection2 = httpURLConnection;
if (httpURLConnection2 != null) {
httpURLConnection2.disconnect();
}
return (byte) 2;
} catch (Throwable th2) {
th = th2;
httpURLConnection2 = httpURLConnection;
if (httpURLConnection2 != null) {
httpURLConnection2.disconnect();
}
throw th;
}
}
@Override
public void onPostExecute(Byte b) {
try {
preperfil.this.k.dismiss();
} catch (Exception unused) {
}
if (b.byteValue() != 1) {
if (b.byteValue() == 3) {
preperfil.this.e(3);
return;
} else {
preperfil.this.e(2);
return;
}
}
Intent intent = new Intent(preperfil.this, (Class<?>) chat_perfil.class);
preperfil preperfilVar = preperfil.this;
if (preperfilVar.z) {
intent = config.r(intent, preperfilVar.E);
} else {
intent.putExtra("idsecc", preperfilVar.n);
}
intent.putExtra("nocompletar", preperfil.this.p);
intent.putExtra("desde_buscusus", preperfil.this.q);
intent.putExtra("desde_buscvideos", preperfil.this.r);
intent.putExtra("desde_foro", preperfil.this.s);
intent.putExtra("desde_game", preperfil.this.t);
intent.putExtra("desde_px", preperfil.this.u);
intent.putExtra("desde_video", preperfil.this.v);
intent.putExtra("desde_radio", preperfil.this.w);
intent.putExtra("desde_quiz", preperfil.this.x);
intent.putExtra("desde_vistafb", preperfil.this.y);
intent.putExtra("desde_main", preperfil.this.A);
intent.putExtra("desde_main_oblig", preperfil.this.B);
preperfil.this.startActivityForResult(intent, 0);
}
private e() {
}
}
public void c(int i, String str) {
URL url;
try {
url = new URL(config.f21k6 + "/srv/imgs/usus/" + this.l + "_" + i + ".jpg?v=" + str);
} catch (MalformedURLException unused) {
url = null;
}
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.setDoInput(true);
httpURLConnection.setConnectTimeout(10000);
httpURLConnection.setReadTimeout(20000);
httpURLConnection.connect();
InputStream inputStream = httpURLConnection.getInputStream();
Bitmap decodeStream = BitmapFactory.decodeStream(inputStream);
inputStream.close();
httpURLConnection.disconnect();
decodeStream.compress(Bitmap.CompressFormat.JPEG, 100, new FileOutputStream(this.o.p0(this, i)));
} catch (IOException | Exception unused2) {
}
}
@Override
public void abrir_secc(View view) {
}
void d() {
int u0 = this.o.u0(this);
int i = this.o.T4;
int i2 = 0;
if (i == 1) {
ListView listView = (ListView) findViewById(2131362584);
this.C = listView;
this.o.s(listView);
} else if (i == 0) {
int i3 = 0;
int i4 = 0;
while (true) {
m[] mVarArr = this.o.Z1;
if (i3 >= mVarArr.length) {
break;
}
if (!mVarArr[i3].B) {
findViewById(i3).setOnClickListener(this);
i4++;
if (i4 == u0) {
break;
}
}
i3++;
}
if (findViewById(2131362438) != null && findViewById(2131362438).getVisibility() == 0) {
findViewById(2131362438).setOnClickListener(this);
}
}
while (true) {
int[] iArr = this.o.c2;
if (i2 >= iArr.length) {
return;
}
int i7 = iArr[i2];
if (i7 > 0) {
findViewById(i7).setOnClickListener(this);
}
i2++;
}
}
void e(int i) {
int i2 = i == 3 ? 2131886699 : 2131886423;
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setCancelable(false).setPositiveButton(getString(2131886114), (DialogInterface.OnClickListener) null).setMessage(i2);
try {
AlertDialog create = builder.create();
if (!this.a.equals("")) {
create.setOnShowListener(new d(create));
}
create.show();
((TextView) create.findViewById(R.id.message)).setTypeface(Typeface.MONOSPACE);
} catch (Exception unused) {
}
}
@Override
protected void onActivityResult(int i, int i2, Intent intent) {
config configVar = this.o;
if (configVar == null || !configVar.U0(i, i2, intent, this)) {
if (i2 != -1) {
finish();
return;
}
if (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 onAttachedToWindow() {
super.onAttachedToWindow();
getWindow().setFormat(1);
}
@Override
public void onClick(android.view.View r5) {
throw new UnsupportedOperationException("Method not decompiled: com.eugene.hymnesetlouanges.preperfil.onClick(android.view.View):void");
}
@Override
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
((LinearLayout) findViewById(2131362685)).removeViewAt(0);
d();
}
@Override
public void onCreate(Bundle bundle) {
String str;
String str2;
boolean z;
config configVar = (config) getApplicationContext();
this.o = configVar;
if (configVar.l1 == null) {
configVar.f1();
}
this.m = this.o.c;
Bundle extras = getIntent().getExtras();
this.E = extras;
if (bundle == null) {
this.d = extras != null && extras.containsKey("es_root") && this.E.getBoolean("es_root", false);
} else {
this.d = bundle.containsKey("es_root") && bundle.getBoolean("es_root", false);
}
this.z = this.E.containsKey("externo");
this.A = this.E.getBoolean("desde_main", false);
this.B = this.E.getBoolean("desde_main_oblig", false);
if (this.A) {
config configVar2 = this.o;
str = configVar2.n1;
str2 = configVar2.o1;
this.n = 0;
} else if (this.z) {
m mVar = this.o.Z1[this.m];
str = mVar.g;
str2 = mVar.h;
} else {
this.n = this.E.getInt("idsecc");
m mVar2 = this.o.Z1[this.m];
str = mVar2.g;
str2 = mVar2.h;
}
boolean J = config.J("#" + str);
this.a = config.h(str, this.o.w1);
if (!J) {
setTheme(2131952516);
}
super.onCreate(bundle);
setContentView(2131558691);
d();
SearchManager searchManager = (SearchManager) getSystemService("search");
searchManager.setOnCancelListener(new a());
searchManager.setOnDismissListener(new b());
this.p = this.E.getBoolean("nocompletar", false);
this.q = this.E.getBoolean("desde_buscusus", false);
this.r = this.E.getBoolean("desde_buscvideos", false);
this.s = this.E.getBoolean("desde_foro", false);
this.t = this.E.getBoolean("desde_game", false);
this.u = this.E.getBoolean("desde_px", false);
this.v = this.E.getBoolean("desde_video", false);
this.w = this.E.getBoolean("desde_radio", false);
this.x = this.E.getBoolean("desde_quiz", false);
this.y = this.E.getBoolean("desde_vistafb", false);
SharedPreferences sharedPreferences = getSharedPreferences("sh", 0);
this.D = sharedPreferences;
this.l = sharedPreferences.getLong("idusu", 0L);
if (!str.equals("")) {
findViewById(2131362685).setBackgroundDrawable(new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[]{Color.parseColor("#" + str), Color.parseColor("#" + str2)}));
}
if (!this.D.getString("nick", "").equals("")) {
ProgressDialog progressDialog = new ProgressDialog(this);
this.k = progressDialog;
progressDialog.setMessage(getString(2131886719));
this.k.setIndeterminate(true);
this.k.setOnShowListener(new c());
this.k.show();
new e().execute(new String[0]);
return;
}
Intent intent = new Intent(this, (Class<?>) chat_perfil.class);
if (this.z) {
intent = config.r(intent, this.E);
} else {
intent.putExtra("idsecc", this.n);
}
intent.putExtra("nocompletar", this.p);
intent.putExtra("desde_buscusus", this.q);
intent.putExtra("desde_buscvideos", this.r);
intent.putExtra("desde_foro", this.s);
intent.putExtra("desde_game", this.t);
intent.putExtra("desde_px", this.u);
intent.putExtra("desde_video", this.v);
intent.putExtra("desde_radio", this.w);
intent.putExtra("desde_quiz", this.x);
intent.putExtra("desde_vistafb", this.y);
if ((this.A || this.o.T4 == 2) && !this.B) {
z = true;
} else {
z = true;
intent.putExtra("es_root", true);
}
this.d = false;
intent.putExtra("desde_main", this.A);
intent.putExtra("desde_main_oblig", this.B);
this.b = z;
Intent intent2 = new Intent();
intent2.putExtra("finalizar", z);
setResult(-1, intent2);
startActivityForResult(intent, 0);
finish();
}
@Override
public void onDestroy() {
if ((this.d && isFinishing()) || config.f25o6) {
config.d0(this);
}
super.onDestroy();
}
@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();
}
}