正在查看: MedEd v5.3.6 应用的 NeetPGUserProfileActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MedEd v5.3.6 应用的 NeetPGUserProfileActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.penpencil.physicswallah.feature.profile.presentation.activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.lifecycle.I;
import androidx.lifecycle.n;
import androidx.paging.LoadStates;
import androidx.paging.PageEvent;
import androidx.paging.U;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.bumptech.glide.Glide;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textfield.TextInputLayout;
import com.penpencil.network.models.NeetPGAddressPayload;
import com.penpencil.network.response.UpdateProfileResponse;
import com.penpencil.physicswallah.feature.batch.presentation.activity.a;
import com.penpencil.ts.data.local.entity.Xqr.ckEAqKiCyuVj;
import defpackage.ER1;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.internal.Intrinsics;
public class NeetPGUserProfileActivity extends rp {
public static final int W0 = 0;
public Jq0 H0;
public mj2 I0;
public final cV2 J0;
public final cV2 K0;
public List<String> L0;
public String M0;
public String N0;
public String O0;
public String P0;
public String Q0;
public String R0;
public String S0;
public String T0;
public final int U0;
public Boolean V0;
@BindView
RelativeLayout additionalSettings;
@BindView
MaterialButton editBtn;
@BindView
TextView nameTv;
@BindView
TextInputEditText passwordEt;
@BindView
TextInputLayout passwordLayout;
@BindView
TextInputEditText profileAdmissionYearEt;
@BindView
TextInputEditText profileCollegeEt;
@BindView
TextInputLayout profileCourseLayout;
@BindView
TextInputEditText profileCourseTv;
@BindView
TextInputEditText profileEmailEt;
@BindView
TextInputEditText profileNameEt;
@BindView
TextInputEditText profileNumberTv;
@BindView
TextInputEditText profileStateEt;
@BindView
TextInputLayout profileYearLayout;
@BindView
TextInputEditText profileYearTv;
@BindView
MaterialButton saveBtn;
@BindView
ImageView userImageIv;
public NeetPGUserProfileActivity() {
tk0 tk0Var = tk0.a;
Lx0 lx0 = new Lx0(new PageEvent.StaticList(tk0Var, (LoadStates) null, (LoadStates) null));
U.b bVar = U.e;
U.a aVar = U.f;
U.c.a aVar2 = U.c.a.a;
this.J0 = dV2.a(new U(lx0, bVar, aVar, aVar2));
this.K0 = dV2.a(new U(new Lx0(new PageEvent.StaticList(tk0Var, (LoadStates) null, (LoadStates) null)), bVar, aVar, aVar2));
this.L0 = new ArrayList();
this.U0 = 101;
this.V0 = null;
}
public static void U0(NeetPGUserProfileActivity neetPGUserProfileActivity, String str) {
neetPGUserProfileActivity.R0 = str;
neetPGUserProfileActivity.O0 = "";
neetPGUserProfileActivity.profileAdmissionYearEt.setText("");
neetPGUserProfileActivity.profileCollegeEt.setText(str);
}
public static void V0(NeetPGUserProfileActivity neetPGUserProfileActivity, File file, UpdateProfileResponse updateProfileResponse) {
neetPGUserProfileActivity.S0();
if (updateProfileResponse == null) {
Toast.makeText((Context) neetPGUserProfileActivity, (CharSequence) neetPGUserProfileActivity.getString(2132018186), 0).show();
} else if (updateProfileResponse.getSuccess()) {
Glide.f(neetPGUserProfileActivity.getApplicationContext()).p(file).B(qy2.B()).B(qy2.A(db0.a)).F(neetPGUserProfileActivity.userImageIv);
Toast.makeText((Context) neetPGUserProfileActivity, (CharSequence) neetPGUserProfileActivity.getString(2132020093), 0).show();
}
}
public static void W0(NeetPGUserProfileActivity neetPGUserProfileActivity, String str, String str2) {
neetPGUserProfileActivity.M0 = str2;
neetPGUserProfileActivity.N0 = str;
neetPGUserProfileActivity.R0 = "";
neetPGUserProfileActivity.profileCollegeEt.setText("");
neetPGUserProfileActivity.O0 = "";
neetPGUserProfileActivity.profileAdmissionYearEt.setText("");
neetPGUserProfileActivity.profileStateEt.setText(str);
}
public static void X0(NeetPGUserProfileActivity neetPGUserProfileActivity, Integer num) {
String str = neetPGUserProfileActivity.L0.get(num.intValue());
neetPGUserProfileActivity.O0 = str;
neetPGUserProfileActivity.profileAdmissionYearEt.setText(str);
}
public final void Y0() {
this.profileNameEt.setEnabled(false);
this.profileNumberTv.setEnabled(false);
this.profileEmailEt.setEnabled(false);
this.profileYearTv.setEnabled(false);
this.profileCourseTv.setEnabled(false);
this.profileStateEt.setEnabled(false);
this.profileStateEt.setClickable(false);
this.profileStateEt.setFocusable(false);
this.profileCollegeEt.setEnabled(false);
this.profileCollegeEt.setClickable(false);
this.profileCollegeEt.setFocusable(false);
this.profileAdmissionYearEt.setEnabled(false);
this.profileAdmissionYearEt.setClickable(false);
this.profileAdmissionYearEt.setFocusable(false);
this.editBtn.setEnabled(true);
this.saveBtn.setBackgroundColor(getResources().getColor(2131100510));
this.saveBtn.setEnabled(false);
if (this.V0 != null) {
this.passwordEt.setEnabled(false);
this.passwordEt.setClickable(false);
this.passwordEt.setFocusable(false);
}
}
@OnClick
public void changePassword(View view) {
bp1 c = ((rp) this).C0.c();
String n = c.a.n(a.A);
cy1 cy1Var = new cy1(this, 1);
Intrinsics.checkNotNullParameter(this, "context");
Intrinsics.checkNotNullParameter(n, "existingPassword");
Intrinsics.checkNotNullParameter(cy1Var, "onSaveClick");
tw.e(this, (String) null, (AD1) null, new pM(1545803541, new CR1(n, cy1Var), true), 126);
}
@OnClick
public void changeProfilePicture(View view) {
ArrayList arrayList = new ArrayList();
arrayList.add(f.a);
n nVar = ((rp) this).F0;
vn1 vn1Var = new vn1(this, 20);
A71 a71 = new A71(4);
Intrinsics.checkNotNullParameter(arrayList, "permissions");
Intrinsics.checkNotNullParameter(nVar, "scope");
Intrinsics.checkNotNullParameter(vn1Var, "onGranted");
Intrinsics.checkNotNullParameter(a71, "onPermissionDenied");
Db2.a(arrayList, nVar, vn1Var, a71, 56);
}
public final void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i == this.U0 && i2 == -1 && intent != null) {
Uri data = intent.getData();
if (data == null) {
Toast.makeText((Context) this, (CharSequence) getString(2132018186), 0).show();
return;
}
T0(getString(2132021091));
n nVar = ((rp) this).F0;
Intrinsics.checkNotNullParameter(nVar, "scope");
UU uu = new UU(nVar);
uu.a(new YL1(1, this, data, uu));
}
}
public final void onPostResume() {
String str;
File file = new File(iu0.c(this) + "/" + ((rp) this).C0.c().n() + "_profile.png");
if (file.exists()) {
Glide.f(getApplicationContext()).p(file).B(qy2.B()).B(qy2.A(db0.a)).F(this.userImageIv);
}
if (TextUtils.isEmpty(((rp) this).C0.c().n()) || ((rp) this).C0.c().n().equals("Unknown")) {
str = "";
} else if (TextUtils.isEmpty(((rp) this).C0.c().p())) {
str = ((rp) this).C0.c().n();
} else {
str = ((rp) this).C0.c().n() + " " + ((rp) this).C0.c().p();
}
this.nameTv.setText(str);
super/*ag*/.onPostResume();
}
@OnClick
public void openAdditionalSettings() {
startActivity(new Intent((Context) this, (Class<?>) MedEdAdditionalSettingsActivity.class));
}
@OnClick
public void openEditProfileActivity(View view) {
this.profileNameEt.setEnabled(true);
this.profileNumberTv.setEnabled(false);
this.profileEmailEt.setEnabled(true);
this.profileYearTv.setEnabled(false);
this.profileCourseTv.setEnabled(false);
this.profileStateEt.setEnabled(true);
this.profileStateEt.setClickable(true);
this.profileStateEt.setFocusable(false);
this.profileCollegeEt.setEnabled(true);
this.profileCollegeEt.setClickable(true);
this.profileCollegeEt.setFocusable(false);
this.profileAdmissionYearEt.setEnabled(true);
this.profileAdmissionYearEt.setClickable(true);
this.profileAdmissionYearEt.setFocusable(false);
this.editBtn.setEnabled(false);
this.saveBtn.setBackgroundColor(getResources().getColor(2131099827));
this.saveBtn.setEnabled(true);
if (this.V0 != null) {
this.passwordEt.setEnabled(true);
this.passwordEt.setClickable(true);
this.passwordEt.setFocusable(false);
}
}
@OnClick
public void previousActivity(View view) {
super/*OL*/.onBackPressed();
}
@OnClick
public void selectAdmissionYear(View view) {
int i = 0;
if (this.R0.isEmpty()) {
Toast.makeText((Context) this, (CharSequence) getString(2132019990), 0).show();
return;
}
List<String> list = this.L0;
String str = this.O0;
Intrinsics.checkNotNullParameter(list, "<this>");
Intrinsics.checkNotNullParameter(str, "year");
Iterator<String> it = list.iterator();
while (true) {
if (!it.hasNext()) {
i = -1;
break;
} else if (Intrinsics.b(it.next(), str)) {
break;
} else {
i++;
}
}
List<String> list2 = this.L0;
LX0 lx0 = new LX0(this, 5);
Intrinsics.checkNotNullParameter(this, "context");
Intrinsics.checkNotNullParameter(list2, "data");
Intrinsics.checkNotNullParameter(lx0, "onValueChange");
tw.e(this, (String) null, (AD1) null, new pM(-1072450323, new AR1(i, list2, lx0), true), 126);
}
@OnClick
public void selectCollege(View view) {
T0(getString(2132018355));
mj2 mj2Var = this.I0;
String str = this.M0;
mj2Var.getClass();
Intrinsics.checkNotNullParameter(str, "stateId");
lH1 lh1 = new lH1();
Lx.q(Qa1.b(mj2Var), (CoroutineContext) null, (mV) null, new jj2(mj2Var, str, lh1, (iT) null), 3);
lh1.f(this, new a(this, 1));
}
@OnClick
public void selectState(View view) {
ER1.d(this, "Select State", this.N0, this.J0, new gf0(this, 1), new MV(this, 5));
}
@OnClick
public void updateProfile() {
if (this.profileNameEt.getText().toString().isEmpty() || this.profileEmailEt.getText().toString().isEmpty() || this.profileCollegeEt.getText().toString().isEmpty() || this.profileCollegeEt.getText().toString().isEmpty() || this.profileStateEt.getText().toString().isEmpty() || this.profileStateEt.getText().toString().isEmpty() || this.profileAdmissionYearEt.getText().toString().isEmpty() || this.profileAdmissionYearEt.getText().toString().isEmpty()) {
Toast.makeText((Context) this, (CharSequence) getString(2132020091), 0).show();
return;
}
if (!Pattern.compile("^(([\\w-]+\\.)+[\\w-]+|([a-zA-Z]{1}|[\\w-]{2,}))@((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|([a-zA-Z]+[\\w-]+\\.)+[a-zA-Z]{2,4})$", 2).matcher(this.profileEmailEt.getText().toString()).matches()) {
Toast.makeText((Context) this, (CharSequence) getString(2132018157), 0).show();
return;
}
String obj = this.profileNameEt.getText().toString();
String q = ((rp) this).C0.c().q();
bp1 c = ((rp) this).C0.c();
String n = c.a.n(a.n);
bp1 c2 = ((rp) this).C0.c();
String n2 = c2.a.n(a.o);
bp1 c3 = ((rp) this).C0.c();
String n3 = c3.a.n(a.p);
bp1 c4 = ((rp) this).C0.c();
NeetPGAddressPayload neetPGAddressPayload = new NeetPGAddressPayload(obj, q, n, n2, n3, (String) null, (String) null, c4.a.n(a.q), ((rp) this).C0.c().s(), this.R0, this.N0, this.O0, this.profileEmailEt.getText().toString(), Boolean.TRUE);
this.S0 = "";
this.T0 = "";
String obj2 = this.profileNameEt.getText().toString();
if (obj2.contains(" ")) {
String[] split = obj2.split(" ");
if (split.length > 0) {
String str = split[0];
this.S0 = str;
this.T0 = obj2.substring(str.length() + 1);
}
} else {
this.S0 = obj2;
}
T0(getString(2132021077));
mj2 mj2Var = this.I0;
String str2 = this.M0;
mj2Var.getClass();
Intrinsics.checkNotNullParameter(neetPGAddressPayload, "payload");
Intrinsics.checkNotNullParameter(str2, "stateId");
lH1 lh1 = new lH1();
Lx.q(Qa1.b(mj2Var), (CoroutineContext) null, (mV) null, new lj2(mj2Var, neetPGAddressPayload, str2, lh1, (iT) null), 3);
lh1.f(this, new a(this));
}
public final void onCreate(Bundle bundle) {
String str;
super.onCreate(bundle);
setContentView(2131558458);
ButterKnife.b(this);
Intrinsics.checkNotNullParameter(this, "owner");
Qt3 viewModelStore = getViewModelStore();
I.c c = Pt3.c(this);
SW b = Pt3.b(this);
Intrinsics.checkNotNullParameter(viewModelStore, "store");
Intrinsics.checkNotNullParameter(c, "factory");
Ot3 b2 = Yd.b(b, "defaultCreationExtras", viewModelStore, c, b);
EG b3 = Y0.b(Jq0.class, "modelClass", Jq0.class, "<this>", Jq0.class);
Intrinsics.checkNotNullParameter(b3, "modelClass");
this.H0 = Ot3.b(b2, b3);
Intrinsics.checkNotNullParameter(this, "owner");
Qt3 viewModelStore2 = getViewModelStore();
I.c c2 = Pt3.c(this);
SW b4 = Pt3.b(this);
Intrinsics.checkNotNullParameter(viewModelStore2, "store");
Intrinsics.checkNotNullParameter(c2, "factory");
Ot3 b5 = Yd.b(b4, "defaultCreationExtras", viewModelStore2, c2, b4);
EG b6 = Y0.b(mj2.class, "modelClass", mj2.class, "<this>", mj2.class);
Intrinsics.checkNotNullParameter(b6, "modelClass");
this.I0 = Ot3.b(b5, b6);
File file = new File(iu0.c(this) + "/" + ((rp) this).C0.c().n() + "_profile.png");
if (file.exists()) {
Glide.f(getApplicationContext()).p(file).B(qy2.B()).B(qy2.A(db0.a)).F(this.userImageIv);
}
if (TextUtils.isEmpty(((rp) this).C0.c().n()) || ((rp) this).C0.c().n().equals("Unknown")) {
str = "";
} else if (TextUtils.isEmpty(((rp) this).C0.c().p())) {
str = ((rp) this).C0.c().n();
} else {
str = ((rp) this).C0.c().n() + ckEAqKiCyuVj.oXTZXIvgd + ((rp) this).C0.c().p();
}
this.nameTv.setText(str);
this.profileNameEt.setText(str);
String k = ((rp) this).C0.c().k();
if (!TextUtils.isEmpty(k)) {
this.profileEmailEt.setText(k);
}
String r = ((rp) this).C0.c().r();
if (!TextUtils.isEmpty(r)) {
this.profileNumberTv.setText(r);
}
this.N0 = ((rp) this).C0.c().h();
bp1 c3 = ((rp) this).C0.c();
c3.getClass();
this.M0 = c3.a.n(a.u);
if (TextUtils.isEmpty(this.N0)) {
this.profileStateEt.setText("");
} else {
this.profileStateEt.setText(this.N0);
}
String g = ((rp) this).C0.c().g();
this.R0 = g;
if (TextUtils.isEmpty(g)) {
this.profileCollegeEt.setText("");
} else {
this.profileCollegeEt.setText(this.R0);
}
String c4 = ((rp) this).C0.c().c();
this.O0 = c4;
if (TextUtils.isEmpty(c4)) {
this.profileAdmissionYearEt.setText("");
} else {
this.profileAdmissionYearEt.setText(this.O0);
}
this.P0 = ((rp) this).C0.c().j();
try {
List a = pK0.a(String.class, ((rp) this).C0.c().a.n(a.z));
if (a == null || a.isEmpty()) {
this.Q0 = "";
} else {
this.Q0 = (String) a.get(0);
}
} catch (Exception e) {
this.Q0 = "";
rm2.b("Exam Parsing :- ", e);
}
if (TextUtils.isEmpty(this.P0)) {
this.profileYearLayout.setVisibility(8);
} else {
this.profileYearTv.setText(this.P0);
}
if (TextUtils.isEmpty(this.Q0)) {
this.profileCourseLayout.setVisibility(8);
} else {
this.profileCourseTv.setText(this.Q0);
}
String l = ((rp) this).C0.c().a.l(a.j);
Kv0 a2 = kw2.a();
mw2 mw2Var = mw2.a;
String g2 = a2.h.g("whatsapp_disabled_country_group");
Intrinsics.checkNotNullExpressionValue(g2, "getString(...)");
List a3 = pK0.a(String.class, g2);
if (a3 != null && !a3.contains(l)) {
bp1 c5 = ((rp) this).C0.c();
this.V0 = Boolean.valueOf(!c5.a.n(a.A).isEmpty());
}
if (this.V0 != null) {
this.passwordLayout.setVisibility(0);
} else {
this.passwordLayout.setVisibility(8);
}
mj2 mj2Var = this.I0;
mj2Var.getClass();
Intrinsics.checkNotNullParameter("", "query");
Lx.q(Qa1.b(mj2Var), (CoroutineContext) null, (mV) null, new kj2(mj2Var, "", (iT) null), 3);
mj2 mj2Var2 = this.I0;
mj2Var2.getClass();
lH1 lh1 = new lH1();
Lx.q(Qa1.b(mj2Var2), (CoroutineContext) null, (mV) null, new ij2(mj2Var2, lh1, (iT) null), 3);
lh1.f(this, new Hs(this, 1));
this.I0.s.f(this, new SR1(this));
Y0();
}
}