正在查看: Súper Préstamo v1.9.1 应用的 ContactPersonActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Súper Préstamo v1.9.1 应用的 ContactPersonActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.pf.prestafast.view.activity.apply;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.CollectionUtils;
import com.bumptech.glide.Glide;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.analytics.ktx.AnalyticsKt;
import com.google.firebase.analytics.ktx.ParametersBuilder;
import com.google.firebase.ktx.Firebase;
import com.pf.prestafast.R$id;
import com.pf.prestafast.R$layout;
import com.pf.prestafast.base.BaseActivity;
import com.pf.prestafast.model.Api;
import com.pf.prestafast.model.resp.ContactResp;
import com.pf.prestafast.model.resp.Lievg;
import com.pf.prestafast.model.resp.NextStepResp;
import com.pf.prestafast.model.resp.TimeData;
import com.pf.prestafast.model.resp.Traceless;
import com.pf.prestafast.model.resp.TracelessItem;
import com.pf.prestafast.mrytNetwork.RxObservable;
import com.pf.prestafast.mrytNetwork.mrytBase.MrytBaseObserver;
import com.pf.prestafast.mrytNetwork.mrytBase.MrytBaseResponse;
import com.pf.prestafast.view.activity.ApplyProcessListActivity;
import com.pf.prestafast.view.activity.MainActivity;
import com.pf.prestafast.view.activity.apply.ContactPersonActivity;
import com.pf.prestafast.view.weight.CountdownCertificationView;
import com.xiaweizi.marquee.MarqueeTextView;
import defpackage.b20;
import defpackage.f30;
import defpackage.g50;
import defpackage.h50;
import defpackage.j50;
import defpackage.nw;
import defpackage.s51;
import defpackage.tj;
import defpackage.us0;
import defpackage.w51;
import defpackage.y5;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public final class ContactPersonActivity extends BaseActivity {
public String f;
public String h;
public boolean n;
public Traceless o;
public Map t = new LinkedHashMap();
public int j = 1;
public int m = 5;
public FirebaseAnalytics p = AnalyticsKt.getAnalytics(Firebase.INSTANCE);
public final h50 q = j50.a(f.a);
public boolean r = true;
public long s = System.currentTimeMillis();
public static final class a extends MrytBaseObserver {
public a() {
}
@Override
public void hideLoading() {
ContactPersonActivity.this.r();
}
@Override
public void showLoading() {
ContactPersonActivity.this.A();
}
@Override
public void _onSuccess(MrytBaseResponse mrytBaseResponse) {
ContactResp contactResp;
if (mrytBaseResponse != null && (contactResp = (ContactResp) mrytBaseResponse.getWise()) != null) {
ContactPersonActivity contactPersonActivity = ContactPersonActivity.this;
contactPersonActivity.n = contactResp.getStrides() == 1;
contactPersonActivity.o = contactResp.getTraceless();
tj X = contactPersonActivity.X();
Traceless traceless = contactPersonActivity.o;
X.setNewData(traceless != null ? traceless.getFair() : null);
contactPersonActivity.Y(contactResp.getTime_data(), contactResp.getBUramigLnre());
}
ContactPersonActivity.this.b0(6);
}
}
public static final class b extends MrytBaseObserver {
public b() {
}
@Override
public void _onSuccess(MrytBaseResponse mrytBaseResponse) {
List list;
if (mrytBaseResponse == null || (list = (List) mrytBaseResponse.getWise()) == null) {
return;
}
ContactPersonActivity contactPersonActivity = ContactPersonActivity.this;
if (CollectionUtils.isEmpty(list)) {
return;
}
((LinearLayout) contactPersonActivity.D(R$id.mLlMarqueeViewContainer)).setVisibility(0);
StringBuilder sb = new StringBuilder();
Iterator it = list.iterator();
while (it.hasNext()) {
sb.append((String) it.next());
sb.append(" ");
}
int i = R$id.mMtvMarquee;
((MarqueeTextView) contactPersonActivity.D(i)).setText(sb.toString());
((MarqueeTextView) contactPersonActivity.D(i)).g();
}
}
public static final class c extends MrytBaseObserver {
public c() {
}
@Override
public void hideLoading() {
ContactPersonActivity.this.r();
}
@Override
public void showLoading() {
ContactPersonActivity.this.A();
}
@Override
public void _onSuccess(MrytBaseResponse mrytBaseResponse) {
NextStepResp nextStepResp;
NextStepResp.NextStep postcNext;
ContactPersonActivity.this.V("contactPerson_submit_success_a");
y5.y().z(ContactPersonActivity.this.s, ContactPersonActivity.this.f, "", "9", ContactPersonActivity.this.h);
ApplyProcessListActivity.p.a(ContactPersonActivity.this, (mrytBaseResponse == null || (nextStepResp = (NextStepResp) mrytBaseResponse.getWise()) == null || (postcNext = nextStepResp.getPostcNext()) == null) ? null : postcNext.getWhich(), ContactPersonActivity.this.f, ContactPersonActivity.this.h, ContactPersonActivity.this.j + 1, ContactPersonActivity.this.m, ContactPersonActivity.this.n);
ContactPersonActivity.this.setResult(-1, new Intent());
ContactPersonActivity.this.finish();
}
}
public static final class d implements s51.b {
public d() {
}
@Override
public void a() {
}
@Override
public void onCancel() {
ContactPersonActivity.this.setResult(-1);
ContactPersonActivity.this.finish();
}
}
public static final class e implements tj.a {
public static final class a implements us0.b {
public final TracelessItem a;
public final ContactPersonActivity b;
public final int c;
public a(TracelessItem tracelessItem, ContactPersonActivity contactPersonActivity, int i) {
this.a = tracelessItem;
this.b = contactPersonActivity;
this.c = i;
}
@Override
public void a(int i, Lievg lievg) {
this.a.setRZdjWz(lievg != null ? lievg.getEvening() : null);
this.a.setBqlMiS(lievg != null ? Integer.valueOf(lievg.getThough()).toString() : null);
this.b.V(this.a.getPQilqU() + "_a");
this.b.X().notifyItemChanged(this.c);
}
}
public e() {
}
@Override
public void a(int i, TracelessItem tracelessItem) {
f30.h(tracelessItem, "item");
ContactPersonActivity.this.i0(tracelessItem.getMznxmT(), tracelessItem, new a(tracelessItem, ContactPersonActivity.this, i));
}
@Override
public void b(int i, TracelessItem tracelessItem) {
f30.h(tracelessItem, "item");
if (ContactPersonActivity.this.r) {
ContactPersonActivity.this.j0(i);
} else {
ContactPersonActivity.this.h0(i, tracelessItem.getApXhwB(), tracelessItem.getBZdnhp());
}
}
}
public static final class f extends g50 implements nw {
public static final f a = new f();
public f() {
super(0);
}
@Override
public final tj invoke() {
return new tj(new ArrayList());
}
}
public static final class g implements b20.b {
public final int b;
public g(int i) {
this.b = i;
}
@Override
public void a(String str, String str2) {
f30.h(str, "nameValue");
f30.h(str2, "phoneNum");
((TracelessItem) ContactPersonActivity.this.X().getData().get(this.b)).setApXhwB(str);
((TracelessItem) ContactPersonActivity.this.X().getData().get(this.b)).setBZdnhp(str2);
ContactPersonActivity.this.V(((TracelessItem) ContactPersonActivity.this.X().getData().get(this.b)).getNkxDhP() + "_a");
ContactPersonActivity.this.X().notifyItemChanged(this.b);
}
}
public static final void e0(ContactPersonActivity contactPersonActivity, View view) {
f30.h(contactPersonActivity, "this$0");
contactPersonActivity.V("contact_back_click_a");
if (contactPersonActivity.n) {
contactPersonActivity.setResult(-1);
contactPersonActivity.finish();
} else {
s51 a2 = s51.f.a(contactPersonActivity.j, contactPersonActivity.m);
a2.g(contactPersonActivity.new d());
a2.showNow(contactPersonActivity.getSupportFragmentManager(), "UrgeToStayDialogFragment");
}
}
public static final void f0(ContactPersonActivity contactPersonActivity, View view) {
f30.h(contactPersonActivity, "this$0");
contactPersonActivity.V("contactPerson_submit_a");
contactPersonActivity.c0();
}
public View D(int i) {
Map map = this.t;
View view = (View) map.get(Integer.valueOf(i));
if (view != null) {
return view;
}
View findViewById = findViewById(i);
if (findViewById == null) {
return null;
}
map.put(Integer.valueOf(i), findViewById);
return findViewById;
}
public final void V(String str) {
if (MainActivity.s.b()) {
this.p.logEvent(str, new ParametersBuilder().getBundle());
}
}
public final void W() {
this.f = getIntent().getStringExtra("behind");
this.h = getIntent().getStringExtra("dreaming");
this.j = getIntent().getIntExtra(FirebaseAnalytics.Param.INDEX, 1);
this.m = getIntent().getIntExtra("total", 5);
this.n = getIntent().getBooleanExtra("CertificationResult", false);
}
public final tj X() {
return (tj) this.q.getValue();
}
public final void Y(TimeData timeData, String str) {
if (timeData != null) {
if (timeData.getTime_num() == null || timeData.getTime_num().longValue() <= 0) {
((CountdownCertificationView) D(R$id.mCcvCountDown)).setVisibility(8);
} else {
int i = R$id.mCcvCountDown;
((CountdownCertificationView) D(i)).startCountDown(timeData.getTime_num().longValue());
((CountdownCertificationView) D(i)).setVisibility(0);
}
((CountdownCertificationView) D(R$id.mCcvCountDown)).setNoticeMsg(timeData.getTime_msg(), timeData.getTime_log());
}
if (TextUtils.isEmpty(str)) {
((ImageView) D(R$id.ad)).setVisibility(8);
return;
}
int i2 = R$id.ad;
((ImageView) D(i2)).setVisibility(0);
Glide.with(this).load(str).into((ImageView) D(i2));
}
public final HashMap Z(Intent intent) {
Uri data = intent != null ? intent.getData() : null;
if (data == null) {
return null;
}
Cursor query = getContentResolver().query(data, new String[]{"data1", "display_name"}, null, null, null);
if (query == null || query.getCount() <= 0) {
return null;
}
query.moveToFirst();
HashMap hashMap = new HashMap();
String string = query.getString(1);
f30.g(string, "cursor.getString(1)");
hashMap.put(AppMeasurementSdk.ConditionalUserProperty.NAME, string);
String string2 = query.getString(0);
f30.g(string2, "cursor.getString(0)");
hashMap.put("phone", string2);
query.close();
return hashMap;
}
public final void a0() {
RxObservable.getObservable(((Api) RxObservable.createService(Api.class)).httpContactConfigInit(w51.a().b(), this.f), o()).subscribe(new a());
}
public final void b0(Integer num) {
RxObservable.getObservable(((Api) RxObservable.createService(Api.class)).httpGetTopNoticeMsgList(num), o()).subscribe(new b());
}
public final void c0() {
HashMap hashMap = new HashMap();
if (!CollectionUtils.isEmpty(X().getData())) {
List<TracelessItem> data = X().getData();
f30.g(data, "mAdapter.data");
for (TracelessItem tracelessItem : data) {
hashMap.put(tracelessItem.getNkxDhP(), tracelessItem.getApXhwB());
hashMap.put(tracelessItem.getMaOSuD(), tracelessItem.getBZdnhp());
hashMap.put(tracelessItem.getPQilqU(), tracelessItem.getBqlMiS());
}
}
hashMap.put("blink", this.f);
hashMap.put("dreaming", this.h);
RxObservable.getObservable(((Api) RxObservable.createService(Api.class)).httpSaveContact(hashMap), o()).subscribe(new c());
}
public final void d0() {
((ImageView) D(R$id.mIvFinish)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
ContactPersonActivity.e0(ContactPersonActivity.this, view);
}
});
X().w(new e());
((TextView) D(R$id.mTvSubmit)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
ContactPersonActivity.f0(ContactPersonActivity.this, view);
}
});
}
public final void g0() {
int i = R$id.mRlvContactList;
D(i).setLayoutManager(new LinearLayoutManager(this, 1, false));
D(i).setItemAnimator(new DefaultItemAnimator());
D(i).setAdapter(X());
}
public final void h0(int i, String str, String str2) {
b20 a2 = b20.f.a(str, str2);
a2.e(new g(i));
a2.show(getSupportFragmentManager(), "InputContactPersonInfoDialog");
}
public final void i0(List list, TracelessItem tracelessItem, us0.b bVar) {
us0 a2 = us0.m.a(new ArrayList(list), tracelessItem.getGosl());
a2.i(bVar);
if (ActivityUtils.getTopActivity() instanceof FragmentActivity) {
FragmentActivity topActivity = ActivityUtils.getTopActivity();
f30.f(topActivity, "null cannot be cast to non-null type androidx.fragment.app.FragmentActivity");
a2.showNow(topActivity.getSupportFragmentManager(), "SelectOptionsFragment");
}
}
public final void j0(int i) {
y5 y = y5.y();
String valueOf = String.valueOf(i + 6);
String bqlMiS = ((TracelessItem) X().getData().get(i)).getBqlMiS();
if (bqlMiS == null) {
bqlMiS = "";
}
y.B(valueOf, "0", "1", "", bqlMiS, "", "", "", "", "", String.valueOf(System.currentTimeMillis()));
startActivityForResult(new Intent("android.intent.action.PICK", ContactsContract.CommonDataKinds.Phone.CONTENT_URI), i);
}
public void onActivityResult(int r22, int r23, android.content.Intent r24) {
throw new UnsupportedOperationException("Method not decompiled: com.pf.prestafast.view.activity.apply.ContactPersonActivity.onActivityResult(int, int, android.content.Intent):void");
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R$layout.activity_contact_person);
V("contact_info_enter_a");
W();
g0();
d0();
a0();
}
public boolean onKeyDown(int i, KeyEvent keyEvent) {
if (i != 4) {
return super.onKeyDown(i, keyEvent);
}
((ImageView) D(R$id.mIvFinish)).performClick();
return true;
}
}