238 lines
8.7 KiB
Java
238 lines
8.7 KiB
Java
|
package com.scb.phone.view.fragment.transferandpay;
|
||
|
|
||
|
import android.util.Base64;
|
||
|
import android.view.View;
|
||
|
import android.widget.ImageView;
|
||
|
import android.widget.LinearLayout;
|
||
|
import android.widget.TextView;
|
||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||
|
import androidx.recyclerview.widget.RecyclerView;
|
||
|
import butterknife.BindView;
|
||
|
import butterknife.OnClick;
|
||
|
import com.scb.phone.R;
|
||
|
import com.scb.phone.view.adapter.transferandpay.FavouriteTargetAdapter;
|
||
|
import com.scb.phone.view.custom.transferandpay.CustomFavoriteHeaderSection;
|
||
|
import java.nio.charset.StandardCharsets;
|
||
|
import java.util.List;
|
||
|
import o.AbstractC1181Xh;
|
||
|
import o.InterfaceC12824fIT;
|
||
|
import o.InterfaceC9010dbe;
|
||
|
import o.fSJ;
|
||
|
|
||
|
/* loaded from: classes5.dex */
|
||
|
public class FavouriteTargetFragment extends Hilt_FavouriteTargetFragment implements InterfaceC9010dbe.Heg {
|
||
|
private static int f = 1;
|
||
|
private static int g = 0;
|
||
|
private static byte i = 6;
|
||
|
public View.OnClickListener c;
|
||
|
public InterfaceC12824fIT d;
|
||
|
public fSJ h;
|
||
|
|
||
|
@BindView
|
||
|
protected CustomFavoriteHeaderSection mCustomFavoriteHeaderSection;
|
||
|
|
||
|
@BindView
|
||
|
View mError;
|
||
|
|
||
|
@BindView
|
||
|
protected ImageView mFavouriteAddIcon;
|
||
|
|
||
|
@BindView
|
||
|
protected LinearLayout mFavouriteEmpty;
|
||
|
|
||
|
@BindView
|
||
|
protected TextView mFavouriteEmptySuggestion;
|
||
|
|
||
|
@BindView
|
||
|
protected TextView mFavouriteEmptySuggestionWithImage;
|
||
|
|
||
|
@BindView
|
||
|
protected RecyclerView mFavouriteTargetRecyclerView;
|
||
|
|
||
|
private void m(String str, Object[] objArr) {
|
||
|
byte[] decode = Base64.decode(str, 0);
|
||
|
byte[] bArr = new byte[decode.length];
|
||
|
for (int i2 = 0; i2 < decode.length; i2++) {
|
||
|
bArr[i2] = (byte) (decode[(decode.length - i2) - 1] ^ i);
|
||
|
}
|
||
|
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
|
||
|
}
|
||
|
|
||
|
public void d(List<? extends AbstractC1181Xh> list) {
|
||
|
getContext();
|
||
|
this.mFavouriteTargetRecyclerView.setLayoutManager(new LinearLayoutManager(0, false));
|
||
|
this.mFavouriteTargetRecyclerView.setAdapter(new FavouriteTargetAdapter(getContext(), list, this.d));
|
||
|
}
|
||
|
|
||
|
public void e() {
|
||
|
this.mError.setVisibility(0);
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC9010dbe.Heg
|
||
|
public final void a() {
|
||
|
d();
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.BaseFragment
|
||
|
public final void u(String str) {
|
||
|
this.mCustomFavoriteHeaderSection.setVisibility(0);
|
||
|
this.mFavouriteTargetRecyclerView.setVisibility(0);
|
||
|
this.mCustomFavoriteHeaderSection.setTitle(str);
|
||
|
this.mCustomFavoriteHeaderSection.setButton(true);
|
||
|
this.mCustomFavoriteHeaderSection.setOnClickListener(this.c);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:13:0x004c, code lost:
|
||
|
|
||
|
if ((!r5.startsWith(",*,)")) != false) goto L14;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:4:0x002e, code lost:
|
||
|
|
||
|
if ((!r5.startsWith(",*,)")) != false) goto L14;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:5:0x004f, code lost:
|
||
|
|
||
|
r3 = new java.lang.Object[1];
|
||
|
m(r5.substring(4), r3);
|
||
|
r5 = ((java.lang.String) r3[0]).intern();
|
||
|
r13 = r4.getText(r13);
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:6:0x0068, code lost:
|
||
|
|
||
|
if ((r13 instanceof android.text.Spanned) == false) goto L13;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:7:0x006a, code lost:
|
||
|
|
||
|
r0 = new android.text.SpannableString(r5);
|
||
|
r13 = (android.text.SpannableString) r0;
|
||
|
android.text.TextUtils.copySpansFrom((android.text.SpannedString) r13, 0, r5.length(), java.lang.Object.class, r0, 0);
|
||
|
r5 = r0;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:8:0x0083, code lost:
|
||
|
|
||
|
r13 = com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment.f + 27;
|
||
|
com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment.g = r13 % 128;
|
||
|
r13 = r13 % 2;
|
||
|
*/
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
/* JADX WARN: Type inference failed for: r0v1, types: [android.text.SpannableString, android.text.Spannable] */
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public final void e(int r13) {
|
||
|
/*
|
||
|
r12 = this;
|
||
|
r0 = 2
|
||
|
int r1 = r0 % r0
|
||
|
int r1 = com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment.f
|
||
|
int r1 = r1 + 23
|
||
|
int r2 = r1 % 128
|
||
|
com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment.g = r2
|
||
|
int r1 = r1 % r0
|
||
|
java.lang.String r2 = ",*,)"
|
||
|
r3 = 1
|
||
|
if (r1 == 0) goto L31
|
||
|
android.widget.TextView r1 = r12.mFavouriteEmptySuggestionWithImage
|
||
|
r4 = 54
|
||
|
r1.setVisibility(r4)
|
||
|
android.widget.ImageView r1 = r12.mFavouriteAddIcon
|
||
|
r4 = 126(0x7e, float:1.77E-43)
|
||
|
r1.setVisibility(r4)
|
||
|
android.widget.TextView r1 = r12.mFavouriteEmptySuggestion
|
||
|
android.content.Context r4 = r1.getContext()
|
||
|
java.lang.String r5 = r4.getString(r13)
|
||
|
boolean r2 = r5.startsWith(r2)
|
||
|
r2 = r2 ^ r3
|
||
|
if (r2 == 0) goto L4f
|
||
|
goto L8c
|
||
|
L31:
|
||
|
android.widget.TextView r1 = r12.mFavouriteEmptySuggestionWithImage
|
||
|
r4 = 8
|
||
|
r1.setVisibility(r4)
|
||
|
android.widget.ImageView r1 = r12.mFavouriteAddIcon
|
||
|
r1.setVisibility(r4)
|
||
|
android.widget.TextView r1 = r12.mFavouriteEmptySuggestion
|
||
|
android.content.Context r4 = r1.getContext()
|
||
|
java.lang.String r5 = r4.getString(r13)
|
||
|
boolean r2 = r5.startsWith(r2)
|
||
|
r2 = r2 ^ r3
|
||
|
if (r2 == 0) goto L4f
|
||
|
goto L8c
|
||
|
L4f:
|
||
|
r2 = 4
|
||
|
java.lang.String r2 = r5.substring(r2)
|
||
|
java.lang.Object[] r3 = new java.lang.Object[r3]
|
||
|
r12.m(r2, r3)
|
||
|
r2 = 0
|
||
|
r2 = r3[r2]
|
||
|
java.lang.String r2 = (java.lang.String) r2
|
||
|
java.lang.String r5 = r2.intern()
|
||
|
java.lang.CharSequence r13 = r4.getText(r13)
|
||
|
boolean r2 = r13 instanceof android.text.Spanned
|
||
|
if (r2 == 0) goto L83
|
||
|
android.text.SpannableString r0 = new android.text.SpannableString
|
||
|
r0.<init>(r5)
|
||
|
r6 = r13
|
||
|
android.text.SpannedString r6 = (android.text.SpannedString) r6
|
||
|
r7 = 0
|
||
|
int r8 = r5.length()
|
||
|
java.lang.Class<java.lang.Object> r9 = java.lang.Object.class
|
||
|
r13 = r0
|
||
|
android.text.SpannableString r13 = (android.text.SpannableString) r13
|
||
|
r11 = 0
|
||
|
r10 = r0
|
||
|
android.text.TextUtils.copySpansFrom(r6, r7, r8, r9, r10, r11)
|
||
|
r5 = r0
|
||
|
goto L8c
|
||
|
L83:
|
||
|
int r13 = com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment.f
|
||
|
int r13 = r13 + 27
|
||
|
int r2 = r13 % 128
|
||
|
com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment.g = r2
|
||
|
int r13 = r13 % r0
|
||
|
L8c:
|
||
|
r1.setText(r5)
|
||
|
return
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.view.fragment.transferandpay.FavouriteTargetFragment.e(int):void");
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public final void g() {
|
||
|
this.mFavouriteEmptySuggestionWithImage.setVisibility(0);
|
||
|
this.mFavouriteAddIcon.setVisibility(0);
|
||
|
this.mFavouriteEmptySuggestion.setText(R.string.favorite_add_suggestion_transfer_start);
|
||
|
this.mFavouriteEmptySuggestionWithImage.setText(R.string.favorite_add_suggestion_transfer_end);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public final void a(String str) {
|
||
|
this.mCustomFavoriteHeaderSection.setTitle(str);
|
||
|
this.mCustomFavoriteHeaderSection.setButton(false);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: protected */
|
||
|
public final void d() {
|
||
|
this.mCustomFavoriteHeaderSection.setVisibility(8);
|
||
|
this.mFavouriteEmpty.setVisibility(8);
|
||
|
this.mFavouriteTargetRecyclerView.setVisibility(8);
|
||
|
this.mError.setVisibility(8);
|
||
|
}
|
||
|
|
||
|
@Override // com.scb.phone.view.fragment.BaseFragment, androidx.fragment.app.Fragment
|
||
|
public void onDestroy() {
|
||
|
fSJ fsj = this.h;
|
||
|
if (fsj != null && !fsj.isDisposed()) {
|
||
|
this.h.dispose();
|
||
|
}
|
||
|
super.onDestroy();
|
||
|
}
|
||
|
|
||
|
@OnClick
|
||
|
public void onErrorViewClicked() {
|
||
|
this.mError.setVisibility(8);
|
||
|
}
|
||
|
}
|