CheetahGram v8.5.4版本的 MD5 值为:3d14e79cc242c314d3933620ff3ab030
以下内容为反编译后的 d0.java 源代码,内容仅作参考
package org.telegram.ui;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.telephony.PhoneNumberUtils;
import android.telephony.TelephonyManager;
import android.text.Editable;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import co.cheetah.gram.R;
import java.util.ArrayList;
import java.util.Locale;
import java.util.Timer;
import java.util.TimerTask;
import org.telegram.messenger.AndroidUtilities;
import org.telegram.messenger.ApplicationLoader;
import org.telegram.messenger.BuildVars;
import org.telegram.messenger.FileLog;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.NotificationCenter;
import org.telegram.messenger.p110.ah5;
import org.telegram.messenger.p110.ch5;
import org.telegram.messenger.p110.g52;
import org.telegram.messenger.p110.i95;
import org.telegram.messenger.p110.ih5;
import org.telegram.messenger.p110.ke4;
import org.telegram.messenger.p110.lh5;
import org.telegram.messenger.p110.mh5;
import org.telegram.messenger.p110.nh5;
import org.telegram.messenger.p110.of5;
import org.telegram.messenger.p110.oh5;
import org.telegram.messenger.p110.ov5;
import org.telegram.messenger.p110.pz4;
import org.telegram.messenger.p110.qh5;
import org.telegram.messenger.p110.td5;
import org.telegram.messenger.p110.u27;
import org.telegram.messenger.p110.uw3;
import org.telegram.messenger.p110.v27;
import org.telegram.messenger.p110.vq5;
import org.telegram.messenger.p110.zg5;
import org.telegram.tgnet.ConnectionsManager;
import org.telegram.tgnet.RequestDelegate;
import org.telegram.ui.ActionBar.a;
import org.telegram.ui.ActionBar.a0;
import org.telegram.ui.Components.EditTextBoldCursor;
import org.telegram.ui.Components.RLottieDrawable;
import org.telegram.ui.Components.RadialProgressView;
import org.telegram.ui.d0;
import org.telegram.ui.y5;
import uk.co.chrisjenx.calligraphy.BuildConfig;
public class d0 extends org.telegram.ui.ActionBar.k {
private int q;
private pz4[] r;
private org.telegram.ui.ActionBar.i s;
private View t;
private String u;
private String v;
private Dialog w;
private int x;
class a extends a.h {
a() {
}
@Override
public void b(int i) {
if (i == 1) {
d0.this.r[d0.this.q].f(null);
} else if (i == -1) {
d0.this.D();
}
}
}
class b extends ScrollView {
b(Context context) {
super(context);
}
@Override
protected void onMeasure(int i, int i2) {
d0.this.x = View.MeasureSpec.getSize(i2) - AndroidUtilities.dp(30.0f);
super.onMeasure(i, i2);
}
@Override
public boolean requestChildRectangleOnScreen(View view, Rect rect, boolean z) {
if (d0.this.q == 1 || d0.this.q == 2 || d0.this.q == 4) {
rect.bottom += AndroidUtilities.dp(40.0f);
}
return super.requestChildRectangleOnScreen(view, rect, z);
}
}
public class c extends AnimatorListenerAdapter {
final pz4 a;
final pz4 b;
c(d0 d0Var, pz4 pz4Var, pz4 pz4Var2) {
this.a = pz4Var;
this.b = pz4Var2;
}
@Override
public void onAnimationEnd(Animator animator) {
this.b.setVisibility(8);
this.b.setX(0.0f);
}
@Override
public void onAnimationStart(Animator animator) {
this.a.setVisibility(0);
}
}
public class d extends pz4 implements NotificationCenter.NotificationCenterDelegate {
private int A;
private int B;
private String a;
private String b;
private LinearLayout c;
private EditTextBoldCursor[] d;
private TextView e;
private TextView f;
private ImageView g;
private ke4 h;
private TextView i;
private TextView j;
private f k;
RLottieDrawable l;
private Timer m;
private Timer n;
private final Object o;
private int p;
private int q;
private double r;
private double s;
private boolean t;
private boolean u;
private boolean v;
private String w;
private int x;
private int y;
private String z;
class a extends TextView {
a(d dVar, Context context, d0 d0Var) {
super(context);
}
@Override
protected void onMeasure(int i, int i2) {
super.onMeasure(i, View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(100.0f), Integer.MIN_VALUE));
}
}
class b extends TextView {
b(d dVar, Context context, d0 d0Var) {
super(context);
}
@Override
protected void onMeasure(int i, int i2) {
super.onMeasure(i, View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(100.0f), Integer.MIN_VALUE));
}
}
class c implements TextWatcher {
final int a;
c(int i) {
this.a = i;
}
@Override
public void afterTextChanged(Editable editable) {
int length;
if (!d.this.t && (length = editable.length()) >= 1) {
if (length > 1) {
String obj = editable.toString();
d.this.t = true;
for (int i = 0; i < Math.min(d.this.A - this.a, length); i++) {
if (i == 0) {
editable.replace(0, length, obj.substring(i, i + 1));
} else {
d.this.d[this.a + i].setText(obj.substring(i, i + 1));
}
}
d.this.t = false;
}
if (this.a != d.this.A - 1) {
d.this.d[this.a + 1].setSelection(d.this.d[this.a + 1].length());
d.this.d[this.a + 1].requestFocus();
}
if ((this.a == d.this.A - 1 || (this.a == d.this.A - 2 && length >= 2)) && d.this.getCode().length() == d.this.A) {
d.this.f(null);
}
}
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
}
public class C0170d extends TimerTask {
C0170d() {
}
public void b() {
double currentTimeMillis = System.currentTimeMillis();
double d = d.this.s;
Double.isNaN(currentTimeMillis);
d.this.s = currentTimeMillis;
d.D(d.this, currentTimeMillis - d);
if (d.this.q <= 1000) {
d.this.j.setVisibility(0);
d.this.i.setVisibility(8);
d.this.d0();
}
}
@Override
public void run() {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
d0.d.C0170d.this.b();
}
});
}
}
public class e extends TimerTask {
e() {
}
public void d(ov5 ov5Var) {
d.this.w = ov5Var.b;
}
public void e(i95 i95Var, final ov5 ov5Var) {
if (ov5Var == null || ov5Var.b == null) {
return;
}
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
d0.d.e.this.d(ov5Var);
}
});
}
public void f() {
TextView textView;
int i;
String str;
NotificationCenter globalInstance;
d dVar;
int i2;
TextView textView2;
String formatString;
double currentTimeMillis = System.currentTimeMillis();
double d = d.this.r;
Double.isNaN(currentTimeMillis);
d.L(d.this, currentTimeMillis - d);
d.this.r = currentTimeMillis;
if (d.this.p < 1000) {
if (d.this.k != null) {
d.this.k.a(1.0f);
}
d.this.e0();
if (d.this.x == 3) {
AndroidUtilities.setWaitingForCall(false);
globalInstance = NotificationCenter.getGlobalInstance();
dVar = d.this;
i2 = NotificationCenter.didReceiveCall;
} else {
if (d.this.x != 2 && d.this.x != 4) {
return;
}
if (d.this.y == 4 || d.this.y == 2) {
if (d.this.y == 4) {
textView = d.this.i;
i = R.string.Calling;
str = "Calling";
} else {
textView = d.this.i;
i = R.string.SendingSms;
str = "SendingSms";
}
textView.setText(LocaleController.getString(str, i));
d.this.b0();
ih5 ih5Var = new ih5();
ih5Var.a = d.this.a;
ih5Var.b = d.this.b;
ConnectionsManager.getInstance(((org.telegram.ui.ActionBar.k) d0.this).d).sendRequest(ih5Var, new RequestDelegate() {
@Override
public final void run(i95 i95Var, ov5 ov5Var) {
d0.d.e.this.e(i95Var, ov5Var);
}
}, 2);
return;
}
if (d.this.y != 3) {
return;
}
AndroidUtilities.setWaitingForSms(false);
globalInstance = NotificationCenter.getGlobalInstance();
dVar = d.this;
i2 = NotificationCenter.didReceiveSmsCode;
}
globalInstance.removeObserver(dVar, i2);
d.this.u = false;
d.this.d0();
d.this.o0();
return;
}
int i3 = (d.this.p / 1000) / 60;
int i4 = (d.this.p / 1000) - (i3 * 60);
if (d.this.y != 4 && d.this.y != 3) {
if (d.this.y == 2) {
textView2 = d.this.i;
formatString = LocaleController.formatString("SmsText", R.string.SmsText, Integer.valueOf(i3), Integer.valueOf(i4));
}
if (d.this.k == null) {
d.this.k.a(1.0f - (d.this.p / d.this.B));
return;
}
return;
}
textView2 = d.this.i;
formatString = LocaleController.formatString("CallText", R.string.CallText, Integer.valueOf(i3), Integer.valueOf(i4));
textView2.setText(formatString);
if (d.this.k == null) {
}
}
@Override
public void run() {
if (d.this.m == null) {
return;
}
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
d0.d.e.this.f();
}
});
}
}
public d(Context context, int i) {
super(context);
TextView textView;
int i2;
String str;
TextView textView2;
int i3;
String str2;
FrameLayout.LayoutParams b2;
View view;
this.o = new Object();
this.p = 60000;
this.q = 15000;
this.w = BuildConfig.FLAVOR;
this.z = "*";
this.x = i;
setOrientation(1);
TextView textView3 = new TextView(context);
this.e = textView3;
textView3.setLinkTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteLinkText"));
this.e.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteGrayText6"));
this.e.setHighlightColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteLinkSelection"));
this.e.setTextSize(1, 14.0f);
this.e.setLineSpacing(AndroidUtilities.dp(2.0f), 1.0f);
TextView textView4 = new TextView(context);
this.f = textView4;
textView4.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.f.setTextSize(1, 18.0f);
this.f.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
this.f.setGravity(LocaleController.isRTL ? 5 : 3);
this.f.setLineSpacing(AndroidUtilities.dp(2.0f), 1.0f);
this.f.setGravity(49);
if (this.x == 3) {
this.e.setGravity((LocaleController.isRTL ? 5 : 3) | 48);
FrameLayout frameLayout = new FrameLayout(context);
addView(frameLayout, g52.l(-2, -2, LocaleController.isRTL ? 5 : 3));
ImageView imageView = new ImageView(context);
imageView.setImageResource(org.telegram.messenger.R.drawable.phone_activate);
boolean z = LocaleController.isRTL;
if (z) {
frameLayout.addView(imageView, g52.b(64, 76.0f, 19, 2.0f, 2.0f, 0.0f, 0.0f));
View view2 = this.e;
b2 = g52.b(-1, -2.0f, LocaleController.isRTL ? 5 : 3, 82.0f, 0.0f, 0.0f, 0.0f);
view = view2;
} else {
frameLayout.addView(this.e, g52.b(-1, -2.0f, z ? 5 : 3, 0.0f, 0.0f, 82.0f, 0.0f));
b2 = g52.b(64, 76.0f, 21, 0.0f, 2.0f, 0.0f, 2.0f);
view = imageView;
}
frameLayout.addView(view, b2);
} else {
this.e.setGravity(49);
FrameLayout frameLayout2 = new FrameLayout(context);
addView(frameLayout2, g52.l(-2, -2, 49));
if (this.x == 1) {
ImageView imageView2 = new ImageView(context);
this.g = imageView2;
imageView2.setImageResource(org.telegram.messenger.R.drawable.sms_devices);
this.g.setColorFilter(new PorterDuffColorFilter(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"), PorterDuff.Mode.MULTIPLY));
frameLayout2.addView(this.g, g52.b(-2, -2.0f, 51, 0.0f, 0.0f, 0.0f, 0.0f));
ke4 ke4Var = new ke4(context);
this.h = ke4Var;
ke4Var.setImageResource(org.telegram.messenger.R.drawable.sms_bubble);
this.h.setColorFilter(new PorterDuffColorFilter(org.telegram.ui.ActionBar.w.r1("chats_actionBackground"), PorterDuff.Mode.MULTIPLY));
frameLayout2.addView(this.h, g52.b(-2, -2.0f, 51, 0.0f, 0.0f, 0.0f, 0.0f));
textView = this.f;
i2 = R.string.SentAppCodeTitle;
str = "SentAppCodeTitle";
} else {
this.h = new ke4(context);
RLottieDrawable rLottieDrawable = new RLottieDrawable(R.raw.sms_incoming_info, "2131558496", AndroidUtilities.dp(48.0f), AndroidUtilities.dp(48.0f), true, null);
this.l = rLottieDrawable;
rLottieDrawable.f0("Bubble.**", org.telegram.ui.ActionBar.w.r1("chats_actionBackground"));
this.l.f0("Phone.**", org.telegram.ui.ActionBar.w.r1("chats_actionBackground"));
this.h.setAnimation(this.l);
frameLayout2.addView(this.h, g52.b(48, 48.0f, 51, 0.0f, 0.0f, 0.0f, 0.0f));
textView = this.f;
i2 = R.string.SentSmsCodeTitle;
str = "SentSmsCodeTitle";
}
textView.setText(LocaleController.getString(str, i2));
addView(this.f, g52.m(-2, -2, 49, 0, 18, 0, 0));
addView(this.e, g52.m(-2, -2, 49, 0, 17, 0, 0));
}
LinearLayout linearLayout = new LinearLayout(context);
this.c = linearLayout;
linearLayout.setOrientation(0);
addView(this.c, g52.l(-2, 36, 1));
if (this.x == 3) {
this.c.setVisibility(8);
}
a aVar = new a(this, context, d0.this);
this.i = aVar;
aVar.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteGrayText6"));
this.i.setLineSpacing(AndroidUtilities.dp(2.0f), 1.0f);
if (this.x == 3) {
this.i.setTextSize(1, 14.0f);
addView(this.i, g52.l(-2, -2, LocaleController.isRTL ? 5 : 3));
this.k = new f(context);
this.i.setGravity(LocaleController.isRTL ? 5 : 3);
addView(this.k, g52.h(-1, 3, 0.0f, 12.0f, 0.0f, 0.0f));
} else {
this.i.setPadding(0, AndroidUtilities.dp(2.0f), 0, AndroidUtilities.dp(10.0f));
this.i.setTextSize(1, 15.0f);
this.i.setGravity(49);
addView(this.i, g52.l(-2, -2, 49));
}
b bVar = new b(this, context, d0.this);
this.j = bVar;
bVar.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlueText4"));
this.j.setLineSpacing(AndroidUtilities.dp(2.0f), 1.0f);
this.j.setPadding(0, AndroidUtilities.dp(2.0f), 0, AndroidUtilities.dp(10.0f));
this.j.setTextSize(1, 15.0f);
this.j.setGravity(49);
if (this.x == 1) {
textView2 = this.j;
i3 = R.string.DidNotGetTheCodeSms;
str2 = "DidNotGetTheCodeSms";
} else {
textView2 = this.j;
i3 = R.string.DidNotGetTheCode;
str2 = "DidNotGetTheCode";
}
textView2.setText(LocaleController.getString(str2, i3));
addView(this.j, g52.l(-2, -2, 49));
this.j.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
d0.d.this.f0(view3);
}
});
}
static int D(d dVar, double d) {
double d2 = dVar.q;
Double.isNaN(d2);
int i = (int) (d2 - d);
dVar.q = i;
return i;
}
static int L(d dVar, double d) {
double d2 = dVar.p;
Double.isNaN(d2);
int i = (int) (d2 - d);
dVar.p = i;
return i;
}
public void b0() {
if (this.n != null) {
return;
}
this.q = 15000;
this.n = new Timer();
this.s = System.currentTimeMillis();
this.n.schedule(new C0170d(), 0L, 1000L);
}
private void c0() {
if (this.m != null) {
return;
}
Timer timer = new Timer();
this.m = timer;
timer.schedule(new e(), 0L, 1000L);
}
public void d0() {
try {
synchronized (this.o) {
Timer timer = this.n;
if (timer != null) {
timer.cancel();
this.n = null;
}
}
} catch (Exception e2) {
FileLog.e(e2);
}
}
public void e0() {
try {
synchronized (this.o) {
Timer timer = this.m;
if (timer != null) {
timer.cancel();
this.m = null;
}
}
} catch (Exception e2) {
FileLog.e(e2);
}
}
public void f0(View view) {
if (this.v) {
return;
}
int i = this.y;
if (!((i == 4 && this.x == 2) || i == 0)) {
o0();
return;
}
try {
PackageInfo packageInfo = ApplicationLoader.applicationContext.getPackageManager().getPackageInfo(ApplicationLoader.applicationContext.getPackageName(), 0);
String format = String.format(Locale.US, "%s (%d)", packageInfo.versionName, Integer.valueOf(packageInfo.versionCode));
Intent intent = new Intent("android.intent.action.SENDTO");
intent.setData(Uri.parse("mailto:"));
intent.putExtra("android.intent.extra.EMAIL", new String[]{"sms@telegram.org"});
intent.putExtra("android.intent.extra.SUBJECT", "Android cancel account deletion issue " + format + " " + this.a);
intent.putExtra("android.intent.extra.TEXT", "Phone: " + this.a + "\nApp version: " + format + "\nOS version: SDK " + Build.VERSION.SDK_INT + "\nDevice Name: " + Build.MANUFACTURER + Build.MODEL + "\nLocale: " + Locale.getDefault() + "\nError: " + this.w);
getContext().startActivity(Intent.createChooser(intent, "Send email..."));
} catch (Exception unused) {
org.telegram.ui.Components.b.A4(d0.this, LocaleController.getString("NoMailInstalled", R.string.NoMailInstalled));
}
}
public void g0(ov5 ov5Var, td5 td5Var) {
int i;
NotificationCenter globalInstance;
int i2;
int i3;
EditTextBoldCursor[] editTextBoldCursorArr;
int i4;
d0.this.K1();
this.v = false;
if (ov5Var == null) {
d0 d0Var = d0.this;
d0Var.w = org.telegram.ui.Components.b.A4(d0Var, LocaleController.formatString("CancelLinkSuccess", R.string.CancelLinkSuccess, uw3.d().c("+" + this.a)));
return;
}
this.w = ov5Var.b;
int i5 = this.x;
if ((i5 == 3 && ((i4 = this.y) == 4 || i4 == 2)) || ((i5 == 2 && ((i = this.y) == 4 || i == 3)) || (i5 == 4 && this.y == 2))) {
c0();
}
int i6 = this.x;
if (i6 == 2) {
AndroidUtilities.setWaitingForSms(true);
globalInstance = NotificationCenter.getGlobalInstance();
i2 = NotificationCenter.didReceiveSmsCode;
} else {
if (i6 == 3) {
AndroidUtilities.setWaitingForCall(true);
globalInstance = NotificationCenter.getGlobalInstance();
i2 = NotificationCenter.didReceiveCall;
}
this.u = true;
if (this.x != 3) {
org.telegram.ui.Components.b.l4(((org.telegram.ui.ActionBar.k) d0.this).d, ov5Var, d0.this, td5Var, new Object[0]);
}
if (ov5Var.b.contains("PHONE_CODE_EMPTY") && !ov5Var.b.contains("PHONE_CODE_INVALID")) {
if (ov5Var.b.contains("PHONE_CODE_EXPIRED")) {
b(true);
d0.this.M1(0, true, null, true);
return;
}
return;
}
i3 = 0;
while (true) {
editTextBoldCursorArr = this.d;
if (i3 < editTextBoldCursorArr.length) {
editTextBoldCursorArr[0].requestFocus();
return;
} else {
editTextBoldCursorArr[i3].setText(BuildConfig.FLAVOR);
i3++;
}
}
}
globalInstance.addObserver(this, i2);
this.u = true;
if (this.x != 3) {
}
if (ov5Var.b.contains("PHONE_CODE_EMPTY")) {
}
i3 = 0;
while (true) {
editTextBoldCursorArr = this.d;
if (i3 < editTextBoldCursorArr.length) {
}
editTextBoldCursorArr[i3].setText(BuildConfig.FLAVOR);
i3++;
}
}
public String getCode() {
if (this.d == null) {
return BuildConfig.FLAVOR;
}
StringBuilder sb = new StringBuilder();
int i = 0;
while (true) {
EditTextBoldCursor[] editTextBoldCursorArr = this.d;
if (i >= editTextBoldCursorArr.length) {
return sb.toString();
}
sb.append(uw3.h(editTextBoldCursorArr[i].getText().toString()));
i++;
}
}
public void h0(final td5 td5Var, i95 i95Var, final ov5 ov5Var) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
d0.d.this.g0(ov5Var, td5Var);
}
});
}
public void i0() {
EditTextBoldCursor[] editTextBoldCursorArr = this.d;
if (editTextBoldCursorArr != null) {
for (int length = editTextBoldCursorArr.length - 1; length >= 0; length--) {
if (length == 0 || this.d[length].length() != 0) {
this.d[length].requestFocus();
EditTextBoldCursor[] editTextBoldCursorArr2 = this.d;
editTextBoldCursorArr2[length].setSelection(editTextBoldCursorArr2[length].length());
AndroidUtilities.showKeyboard(this.d[length]);
break;
}
}
}
RLottieDrawable rLottieDrawable = this.l;
if (rLottieDrawable != null) {
rLottieDrawable.start();
}
}
public void j0(DialogInterface dialogInterface, int i) {
b(true);
d0.this.D();
}
public void k0(ov5 ov5Var, Bundle bundle, i95 i95Var, ih5 ih5Var) {
org.telegram.ui.ActionBar.i iVar;
this.v = false;
if (ov5Var == null) {
d0.this.I1(bundle, (lh5) i95Var);
} else if (ov5Var.b != null && (iVar = (org.telegram.ui.ActionBar.i) org.telegram.ui.Components.b.l4(((org.telegram.ui.ActionBar.k) d0.this).d, ov5Var, d0.this, ih5Var, new Object[0])) != null && ov5Var.b.contains("PHONE_CODE_EXPIRED")) {
iVar.J0(new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
d0.d.this.j0(dialogInterface, i);
}
});
}
d0.this.K1();
}
public void l0(final Bundle bundle, final ih5 ih5Var, final i95 i95Var, final ov5 ov5Var) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
d0.d.this.k0(ov5Var, bundle, i95Var, ih5Var);
}
});
}
public boolean m0(int i, View view, int i2, KeyEvent keyEvent) {
if (i2 != 67 || this.d[i].length() != 0 || i <= 0) {
return false;
}
EditTextBoldCursor[] editTextBoldCursorArr = this.d;
int i3 = i - 1;
editTextBoldCursorArr[i3].setSelection(editTextBoldCursorArr[i3].length());
this.d[i3].requestFocus();
this.d[i3].dispatchKeyEvent(keyEvent);
return true;
}
public boolean n0(TextView textView, int i, KeyEvent keyEvent) {
if (i != 5) {
return false;
}
f(null);
return true;
}
public void o0() {
final Bundle bundle = new Bundle();
bundle.putString("phone", this.a);
this.v = true;
d0.this.L1();
final ih5 ih5Var = new ih5();
ih5Var.a = this.a;
ih5Var.b = this.b;
ConnectionsManager.getInstance(((org.telegram.ui.ActionBar.k) d0.this).d).sendRequest(ih5Var, new RequestDelegate() {
@Override
public final void run(i95 i95Var, ov5 ov5Var) {
d0.d.this.l0(bundle, ih5Var, i95Var, ov5Var);
}
}, 2);
}
@Override
public boolean a() {
return true;
}
@Override
public void didReceivedNotification(int i, int i2, Object... objArr) {
EditTextBoldCursor[] editTextBoldCursorArr;
if (!this.u || (editTextBoldCursorArr = this.d) == null) {
return;
}
if (i == NotificationCenter.didReceiveSmsCode) {
editTextBoldCursorArr[0].setText(BuildConfig.FLAVOR + objArr[0]);
} else {
if (i != NotificationCenter.didReceiveCall) {
return;
}
String str = BuildConfig.FLAVOR + objArr[0];
if (!AndroidUtilities.checkPhonePattern(this.z, str)) {
return;
}
this.t = true;
this.d[0].setText(str);
this.t = false;
}
f(null);
}
@Override
public void e() {
NotificationCenter globalInstance;
int i;
super.e();
int i2 = this.x;
if (i2 != 2) {
if (i2 == 3) {
AndroidUtilities.setWaitingForCall(false);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveCall;
}
this.u = false;
e0();
d0();
}
AndroidUtilities.setWaitingForSms(false);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveSmsCode;
globalInstance.removeObserver(this, i);
this.u = false;
e0();
d0();
}
@Override
public void f(String str) {
NotificationCenter globalInstance;
int i;
if (this.v) {
return;
}
if (str == null) {
str = getCode();
}
if (TextUtils.isEmpty(str)) {
AndroidUtilities.shakeView(this.c, 2.0f, 0);
return;
}
this.v = true;
int i2 = this.x;
if (i2 != 2) {
if (i2 == 3) {
AndroidUtilities.setWaitingForCall(false);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveCall;
}
this.u = false;
final td5 td5Var = new td5();
td5Var.b = str;
td5Var.a = this.b;
e0();
d0.this.L1();
ConnectionsManager.getInstance(((org.telegram.ui.ActionBar.k) d0.this).d).sendRequest(td5Var, new RequestDelegate() {
@Override
public final void run(i95 i95Var, ov5 ov5Var) {
d0.d.this.h0(td5Var, i95Var, ov5Var);
}
}, 2);
}
AndroidUtilities.setWaitingForSms(false);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveSmsCode;
globalInstance.removeObserver(this, i);
this.u = false;
final td5 td5Var2 = new td5();
td5Var2.b = str;
td5Var2.a = this.b;
e0();
d0.this.L1();
ConnectionsManager.getInstance(((org.telegram.ui.ActionBar.k) d0.this).d).sendRequest(td5Var2, new RequestDelegate() {
@Override
public final void run(i95 i95Var, ov5 ov5Var) {
d0.d.this.h0(td5Var2, i95Var, ov5Var);
}
}, 2);
}
@Override
public void g() {
super.g();
if (this.x == 3) {
return;
}
RLottieDrawable rLottieDrawable = this.l;
if (rLottieDrawable != null) {
rLottieDrawable.X(0);
}
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
d0.d.this.i0();
}
}, 100L);
}
@Override
public String getHeaderName() {
return this.x == 1 ? this.a : LocaleController.getString("CancelAccountReset", R.string.CancelAccountReset);
}
@Override
public void j(Bundle bundle, boolean z) {
NotificationCenter globalInstance;
int i;
int i2;
EditTextBoldCursor[] editTextBoldCursorArr;
final int i3;
f fVar;
TextView textView;
int i4;
int i5;
TextView textView2;
String formatString;
if (bundle == null) {
return;
}
this.u = true;
int i6 = this.x;
if (i6 != 2) {
if (i6 == 3) {
AndroidUtilities.setWaitingForCall(true);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveCall;
}
this.a = bundle.getString("phone");
this.b = bundle.getString("phoneHash");
int i7 = bundle.getInt("timeout");
this.p = i7;
this.B = i7;
this.y = bundle.getInt("nextType");
this.z = bundle.getString("pattern");
i2 = bundle.getInt("length");
this.A = i2;
if (i2 == 0) {
this.A = 5;
}
editTextBoldCursorArr = this.d;
int i8 = 8;
if (editTextBoldCursorArr == null && editTextBoldCursorArr.length == this.A) {
int i9 = 0;
while (true) {
EditTextBoldCursor[] editTextBoldCursorArr2 = this.d;
if (i9 >= editTextBoldCursorArr2.length) {
break;
}
editTextBoldCursorArr2[i9].setText(BuildConfig.FLAVOR);
i9++;
}
} else {
this.d = new EditTextBoldCursor[this.A];
i3 = 0;
while (i3 < this.A) {
this.d[i3] = new EditTextBoldCursor(getContext());
this.d[i3].setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.d[i3].setCursorColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.d[i3].setCursorSize(AndroidUtilities.dp(20.0f));
this.d[i3].setCursorWidth(1.5f);
Drawable mutate = getResources().getDrawable(org.telegram.messenger.R.drawable.search_dark_activated).mutate();
mutate.setColorFilter(new PorterDuffColorFilter(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteInputFieldActivated"), PorterDuff.Mode.MULTIPLY));
this.d[i3].setBackgroundDrawable(mutate);
this.d[i3].setImeOptions(268435461);
this.d[i3].setTextSize(1, 20.0f);
this.d[i3].setMaxLines(1);
this.d[i3].setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
this.d[i3].setPadding(0, 0, 0, 0);
this.d[i3].setGravity(49);
if (this.x == 3) {
this.d[i3].setEnabled(false);
this.d[i3].setInputType(0);
this.d[i3].setVisibility(8);
} else {
this.d[i3].setInputType(3);
}
this.c.addView(this.d[i3], g52.m(34, 36, 1, 0, 0, i3 != this.A - 1 ? 7 : 0, 0));
this.d[i3].addTextChangedListener(new c(i3));
this.d[i3].setOnKeyListener(new View.OnKeyListener() {
@Override
public final boolean onKey(View view, int i10, KeyEvent keyEvent) {
boolean m0;
m0 = d0.d.this.m0(i3, view, i10, keyEvent);
return m0;
}
});
this.d[i3].setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public final boolean onEditorAction(TextView textView3, int i10, KeyEvent keyEvent) {
boolean n0;
n0 = d0.d.this.n0(textView3, i10, keyEvent);
return n0;
}
});
i3++;
}
}
fVar = this.k;
if (fVar != null) {
fVar.setVisibility(this.y != 0 ? 0 : 8);
}
if (this.a != null) {
return;
}
String c2 = uw3.d().c(this.a);
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(AndroidUtilities.replaceTags(LocaleController.formatString("CancelAccountResetInfo2", R.string.CancelAccountResetInfo2, uw3.d().c("+" + c2))));
int indexOf = TextUtils.indexOf((CharSequence) spannableStringBuilder, '*');
int lastIndexOf = TextUtils.lastIndexOf(spannableStringBuilder, '*');
if (indexOf != -1 && lastIndexOf != -1 && indexOf != lastIndexOf) {
this.e.setMovementMethod(new AndroidUtilities.LinkMovementMethodMy());
spannableStringBuilder.replace(lastIndexOf, lastIndexOf + 1, (CharSequence) BuildConfig.FLAVOR);
spannableStringBuilder.replace(indexOf, indexOf + 1, (CharSequence) BuildConfig.FLAVOR);
spannableStringBuilder.setSpan(new org.telegram.ui.Components.z8("tg://settings/change_number"), indexOf, lastIndexOf - 1, 33);
}
this.e.setText(spannableStringBuilder);
if (this.x != 3) {
AndroidUtilities.showKeyboard(this.d[0]);
this.d[0].requestFocus();
} else {
AndroidUtilities.hideKeyboard(this.d[0]);
}
e0();
d0();
this.r = System.currentTimeMillis();
int i10 = this.x;
if (i10 == 1) {
this.j.setVisibility(0);
this.i.setVisibility(8);
return;
}
if (i10 == 3 && ((i5 = this.y) == 4 || i5 == 2)) {
this.j.setVisibility(8);
this.i.setVisibility(0);
int i11 = this.y;
if (i11 == 4) {
textView2 = this.i;
formatString = LocaleController.formatString("CallText", R.string.CallText, 1, 0);
} else if (i11 == 2) {
textView2 = this.i;
formatString = LocaleController.formatString("SmsText", R.string.SmsText, 1, 0);
}
textView2.setText(formatString);
} else if (i10 == 2 && ((i4 = this.y) == 4 || i4 == 3)) {
this.i.setText(LocaleController.formatString("CallText", R.string.CallText, 2, 0));
this.j.setVisibility(this.p < 1000 ? 0 : 8);
textView = this.i;
} else if (i10 != 4 || this.y != 2) {
this.i.setVisibility(8);
this.j.setVisibility(8);
b0();
return;
} else {
this.i.setText(LocaleController.formatString("SmsText", R.string.SmsText, 2, 0));
this.j.setVisibility(this.p < 1000 ? 0 : 8);
textView = this.i;
}
c0();
return;
}
AndroidUtilities.setWaitingForSms(true);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveSmsCode;
globalInstance.addObserver(this, i);
this.a = bundle.getString("phone");
this.b = bundle.getString("phoneHash");
int i72 = bundle.getInt("timeout");
this.p = i72;
this.B = i72;
this.y = bundle.getInt("nextType");
this.z = bundle.getString("pattern");
i2 = bundle.getInt("length");
this.A = i2;
if (i2 == 0) {
}
editTextBoldCursorArr = this.d;
int i82 = 8;
if (editTextBoldCursorArr == null) {
}
this.d = new EditTextBoldCursor[this.A];
i3 = 0;
while (i3 < this.A) {
}
fVar = this.k;
if (fVar != null) {
}
if (this.a != null) {
}
}
@Override
protected void onLayout(boolean z, int i, int i2, int i3, int i4) {
int i5;
int measuredHeight;
TextView textView;
int left;
TextView textView2;
super.onLayout(z, i, i2, i3, i4);
if (this.x == 3 || this.h == null) {
return;
}
int bottom = this.e.getBottom();
int measuredHeight2 = getMeasuredHeight() - bottom;
if (this.j.getVisibility() == 0) {
measuredHeight = this.j.getMeasuredHeight();
i5 = (measuredHeight2 + bottom) - measuredHeight;
textView = this.j;
left = textView.getLeft();
textView2 = this.j;
} else {
if (this.i.getVisibility() != 0) {
i5 = measuredHeight2 + bottom;
int measuredHeight3 = this.c.getMeasuredHeight();
int i6 = (((i5 - bottom) - measuredHeight3) / 2) + bottom;
LinearLayout linearLayout = this.c;
linearLayout.layout(linearLayout.getLeft(), i6, this.c.getRight(), measuredHeight3 + i6);
}
measuredHeight = this.i.getMeasuredHeight();
i5 = (measuredHeight2 + bottom) - measuredHeight;
textView = this.i;
left = textView.getLeft();
textView2 = this.i;
}
textView.layout(left, i5, textView2.getRight(), measuredHeight + i5);
int measuredHeight32 = this.c.getMeasuredHeight();
int i62 = (((i5 - bottom) - measuredHeight32) / 2) + bottom;
LinearLayout linearLayout2 = this.c;
linearLayout2.layout(linearLayout2.getLeft(), i62, this.c.getRight(), measuredHeight32 + i62);
}
@Override
protected void onMeasure(int i, int i2) {
ke4 ke4Var;
super.onMeasure(i, i2);
if (this.x == 3 || (ke4Var = this.h) == null) {
return;
}
int measuredHeight = ke4Var.getMeasuredHeight() + this.f.getMeasuredHeight() + this.e.getMeasuredHeight() + AndroidUtilities.dp(35.0f);
if (this.i.getVisibility() == 0) {
measuredHeight += this.i.getMeasuredHeight();
}
int dp = AndroidUtilities.dp(80.0f);
int dp2 = AndroidUtilities.dp(340.0f);
if (d0.this.x - measuredHeight < dp) {
setMeasuredDimension(getMeasuredWidth(), measuredHeight + dp);
} else {
setMeasuredDimension(getMeasuredWidth(), Math.min(d0.this.x, dp2));
}
}
}
public class e extends pz4 {
private boolean a;
private RadialProgressView b;
public e(Context context) {
super(context);
this.a = false;
setOrientation(1);
FrameLayout frameLayout = new FrameLayout(context);
addView(frameLayout, g52.f(-1, 200));
RadialProgressView radialProgressView = new RadialProgressView(context);
this.b = radialProgressView;
frameLayout.addView(radialProgressView, g52.c(-2, -2, 17));
}
public void p(ov5 ov5Var, Bundle bundle, i95 i95Var, of5 of5Var) {
this.a = false;
if (ov5Var == null) {
d0.this.I1(bundle, (lh5) i95Var);
} else {
d0 d0Var = d0.this;
d0Var.w = org.telegram.ui.Components.b.l4(((org.telegram.ui.ActionBar.k) d0Var).d, ov5Var, d0.this, of5Var, new Object[0]);
}
}
public void q(final Bundle bundle, final of5 of5Var, final i95 i95Var, final ov5 ov5Var) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
d0.e.this.p(ov5Var, bundle, i95Var, of5Var);
}
});
}
@Override
public void f(String str) {
if (d0.this.c0() == null || this.a) {
return;
}
TelephonyManager telephonyManager = (TelephonyManager) ApplicationLoader.applicationContext.getSystemService("phone");
final of5 of5Var = new of5();
of5Var.a = d0.this.u;
vq5 vq5Var = new vq5();
of5Var.b = vq5Var;
vq5Var.b = false;
vq5Var.d = ApplicationLoader.hasPlayServices;
SharedPreferences sharedPreferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", 0);
boolean z = of5Var.b.d;
SharedPreferences.Editor edit = sharedPreferences.edit();
(z ? edit.putString("sms_hash", BuildVars.SMS_HASH) : edit.remove("sms_hash")).commit();
if (of5Var.b.b) {
try {
String line1Number = telephonyManager.getLine1Number();
if (TextUtils.isEmpty(line1Number)) {
of5Var.b.c = false;
} else {
of5Var.b.c = PhoneNumberUtils.compare(d0.this.v, line1Number);
vq5 vq5Var2 = of5Var.b;
if (!vq5Var2.c) {
vq5Var2.b = false;
}
}
} catch (Exception e) {
of5Var.b.b = false;
FileLog.e(e);
}
}
final Bundle bundle = new Bundle();
bundle.putString("phone", d0.this.v);
this.a = true;
ConnectionsManager.getInstance(((org.telegram.ui.ActionBar.k) d0.this).d).sendRequest(of5Var, new RequestDelegate() {
@Override
public final void run(i95 i95Var, ov5 ov5Var) {
d0.e.this.q(bundle, of5Var, i95Var, ov5Var);
}
}, 2);
}
@Override
public void g() {
super.g();
f(null);
}
@Override
public String getHeaderName() {
return LocaleController.getString("CancelAccountReset", R.string.CancelAccountReset);
}
}
public static class f extends View {
private Paint a;
private Paint b;
private float c;
public f(Context context) {
super(context);
this.a = new Paint();
this.b = new Paint();
this.a.setColor(org.telegram.ui.ActionBar.w.r1("login_progressInner"));
this.b.setColor(org.telegram.ui.ActionBar.w.r1("login_progressOuter"));
}
public void a(float f) {
this.c = f;
invalidate();
}
@Override
protected void onDraw(Canvas canvas) {
float measuredWidth = (int) (getMeasuredWidth() * this.c);
canvas.drawRect(0.0f, 0.0f, measuredWidth, getMeasuredHeight(), this.b);
canvas.drawRect(measuredWidth, 0.0f, getMeasuredWidth(), getMeasuredHeight(), this.a);
}
}
public d0(Bundle bundle) {
super(bundle);
this.q = 0;
this.r = new pz4[5];
this.u = bundle.getString("hash");
this.v = bundle.getString("phone");
}
public void I1(Bundle bundle, lh5 lh5Var) {
bundle.putString("phoneHash", lh5Var.c);
u27 u27Var = lh5Var.d;
if (u27Var instanceof zg5) {
bundle.putInt("nextType", 4);
} else if (u27Var instanceof ah5) {
bundle.putInt("nextType", 3);
} else if (u27Var instanceof ch5) {
bundle.putInt("nextType", 2);
}
if (lh5Var.b instanceof mh5) {
bundle.putInt("type", 1);
bundle.putInt("length", lh5Var.b.a);
M1(1, true, bundle, false);
return;
}
if (lh5Var.e == 0) {
lh5Var.e = 60;
}
bundle.putInt("timeout", lh5Var.e * 1000);
v27 v27Var = lh5Var.b;
if (v27Var instanceof nh5) {
bundle.putInt("type", 4);
bundle.putInt("length", lh5Var.b.a);
M1(4, true, bundle, false);
} else if (v27Var instanceof oh5) {
bundle.putInt("type", 3);
bundle.putString("pattern", lh5Var.b.b);
M1(3, true, bundle, false);
} else if (v27Var instanceof qh5) {
bundle.putInt("type", 2);
bundle.putInt("length", lh5Var.b.a);
M1(2, true, bundle, false);
}
}
public void J1() {
y5.m mVar;
RLottieDrawable rLottieDrawable;
int i = 0;
while (true) {
pz4[] pz4VarArr = this.r;
if (i >= pz4VarArr.length) {
return;
}
if ((pz4VarArr[i] instanceof y5.m) && (rLottieDrawable = (mVar = (y5.m) pz4VarArr[i]).o) != null) {
rLottieDrawable.f0("Bubble.**", org.telegram.ui.ActionBar.w.r1("chats_actionBackground"));
mVar.o.f0("Phone.**", org.telegram.ui.ActionBar.w.r1("chats_actionBackground"));
}
i++;
}
}
@Override
public void D0(Dialog dialog) {
if (dialog == this.w) {
D();
}
}
@Override
public void F0() {
super.F0();
int i = 0;
while (true) {
pz4[] pz4VarArr = this.r;
if (i >= pz4VarArr.length) {
break;
}
if (pz4VarArr[i] != null) {
pz4VarArr[i].e();
}
i++;
}
org.telegram.ui.ActionBar.i iVar = this.s;
if (iVar != null) {
try {
iVar.dismiss();
} catch (Exception e2) {
FileLog.e(e2);
}
this.s = null;
}
AndroidUtilities.removeAdjustResize(c0(), this.k);
}
public void K1() {
org.telegram.ui.ActionBar.i iVar = this.s;
if (iVar == null) {
return;
}
try {
iVar.dismiss();
} catch (Exception e2) {
FileLog.e(e2);
}
this.s = null;
}
public void L1() {
if (c0() == null || c0().isFinishing() || this.s != null) {
return;
}
org.telegram.ui.ActionBar.i iVar = new org.telegram.ui.ActionBar.i(c0(), 3);
this.s = iVar;
iVar.E0(false);
this.s.show();
}
@Override
public void M0() {
super.M0();
AndroidUtilities.requestAdjustResize(c0(), this.k);
}
public void M1(int i, boolean z, Bundle bundle, boolean z2) {
if (i == 3 || i == 0) {
this.t.setVisibility(8);
} else {
this.t.setVisibility(0);
}
pz4[] pz4VarArr = this.r;
pz4 pz4Var = pz4VarArr[this.q];
pz4 pz4Var2 = pz4VarArr[i];
this.q = i;
pz4Var2.j(bundle, false);
this.g.setTitle(pz4Var2.getHeaderName());
pz4Var2.g();
int i2 = AndroidUtilities.displaySize.x;
if (z2) {
i2 = -i2;
}
pz4Var2.setX(i2);
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.setInterpolator(new AccelerateDecelerateInterpolator());
animatorSet.setDuration(300L);
Animator[] animatorArr = new Animator[2];
float[] fArr = new float[1];
fArr[0] = z2 ? AndroidUtilities.displaySize.x : -AndroidUtilities.displaySize.x;
animatorArr[0] = ObjectAnimator.ofFloat(pz4Var, "translationX", fArr);
animatorArr[1] = ObjectAnimator.ofFloat(pz4Var2, "translationX", 0.0f);
animatorSet.playTogether(animatorArr);
animatorSet.addListener(new c(this, pz4Var2, pz4Var));
animatorSet.start();
}
@Override
public void O0(boolean z, boolean z2) {
if (z) {
this.r[this.q].g();
}
}
@Override
public ArrayList<org.telegram.ui.ActionBar.a0> i0() {
pz4[] pz4VarArr = this.r;
e eVar = (e) pz4VarArr[0];
d dVar = (d) pz4VarArr[1];
d dVar2 = (d) pz4VarArr[2];
d dVar3 = (d) pz4VarArr[3];
d dVar4 = (d) pz4VarArr[4];
ArrayList<org.telegram.ui.ActionBar.a0> arrayList = new ArrayList<>();
a0.a aVar = new a0.a() {
@Override
public void a(float f2) {
aa7.a(this, f2);
}
@Override
public final void b() {
org.telegram.ui.d0.this.J1();
}
};
arrayList.add(new org.telegram.ui.ActionBar.a0(this.e, org.telegram.ui.ActionBar.a0.q, null, null, null, null, "windowBackgroundWhite"));
arrayList.add(new org.telegram.ui.ActionBar.a0(this.g, org.telegram.ui.ActionBar.a0.q, null, null, null, null, "actionBarDefault"));
arrayList.add(new org.telegram.ui.ActionBar.a0(this.e, org.telegram.ui.ActionBar.a0.F, null, null, null, null, "actionBarDefault"));
arrayList.add(new org.telegram.ui.ActionBar.a0(this.g, org.telegram.ui.ActionBar.a0.w, null, null, null, null, "actionBarDefaultIcon"));
arrayList.add(new org.telegram.ui.ActionBar.a0(this.g, org.telegram.ui.ActionBar.a0.x, null, null, null, null, "actionBarDefaultTitle"));
arrayList.add(new org.telegram.ui.ActionBar.a0(this.g, org.telegram.ui.ActionBar.a0.y, null, null, null, null, "actionBarDefaultSelector"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.b, org.telegram.ui.ActionBar.a0.B, null, null, null, null, "progressCircle"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.e, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.e, org.telegram.ui.ActionBar.a0.r, null, null, null, null, "windowBackgroundWhiteLinkText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.f, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
if (dVar.d != null) {
for (int i = 0; i < dVar.d.length; i++) {
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.d[i], org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.d[i], org.telegram.ui.ActionBar.a0.v, null, null, null, null, "windowBackgroundWhiteInputFieldActivated"));
}
}
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.i, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.j, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlueText4"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.k, 0, new Class[]{f.class}, new String[]{"paint"}, (Paint[]) null, (Drawable[]) null, (a0.a) null, "login_progressInner"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.k, 0, new Class[]{f.class}, new String[]{"paint"}, (Paint[]) null, (Drawable[]) null, (a0.a) null, "login_progressOuter"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.g, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.h, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "chats_actionBackground"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.e, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.f, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
if (dVar2.d != null) {
for (int i2 = 0; i2 < dVar2.d.length; i2++) {
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.d[i2], org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.d[i2], org.telegram.ui.ActionBar.a0.v, null, null, null, null, "windowBackgroundWhiteInputFieldActivated"));
}
}
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.i, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.j, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlueText4"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.k, 0, new Class[]{f.class}, new String[]{"paint"}, (Paint[]) null, (Drawable[]) null, (a0.a) null, "login_progressInner"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.k, 0, new Class[]{f.class}, new String[]{"paint"}, (Paint[]) null, (Drawable[]) null, (a0.a) null, "login_progressOuter"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.g, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.h, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "chats_actionBackground"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.e, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.f, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
if (dVar3.d != null) {
for (int i3 = 0; i3 < dVar3.d.length; i3++) {
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.d[i3], org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.d[i3], org.telegram.ui.ActionBar.a0.v, null, null, null, null, "windowBackgroundWhiteInputFieldActivated"));
}
}
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.i, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.j, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlueText4"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.k, 0, new Class[]{f.class}, new String[]{"paint"}, (Paint[]) null, (Drawable[]) null, (a0.a) null, "login_progressInner"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.k, 0, new Class[]{f.class}, new String[]{"paint"}, (Paint[]) null, (Drawable[]) null, (a0.a) null, "login_progressOuter"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.g, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.h, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "chats_actionBackground"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.e, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.f, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
if (dVar4.d != null) {
for (int i4 = 0; i4 < dVar4.d.length; i4++) {
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.d[i4], org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.d[i4], org.telegram.ui.ActionBar.a0.v, null, null, null, null, "windowBackgroundWhiteInputFieldActivated"));
}
}
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.i, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.j, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlueText4"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.k, 0, new Class[]{f.class}, new String[]{"paint"}, (Paint[]) null, (Drawable[]) null, (a0.a) null, "login_progressInner"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.k, 0, new Class[]{f.class}, new String[]{"paint"}, (Paint[]) null, (Drawable[]) null, (a0.a) null, "login_progressOuter"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.g, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.h, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "chats_actionBackground"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.h, 0, null, null, null, aVar, "chats_actionBackground"));
return arrayList;
}
@Override
public boolean x0() {
int i = 0;
while (true) {
pz4[] pz4VarArr = this.r;
if (i >= pz4VarArr.length) {
return true;
}
if (pz4VarArr[i] != null) {
pz4VarArr[i].e();
}
i++;
}
}
@Override
public View z(Context context) {
this.g.setTitle(LocaleController.getString("AppName", R.string.AppName));
this.g.setBackButtonImage(org.telegram.messenger.R.drawable.ic_ab_back);
this.g.setActionBarMenuOnItemClick(new a());
org.telegram.ui.ActionBar.d j = this.g.z().j(1, org.telegram.messenger.R.drawable.ic_done, AndroidUtilities.dp(56.0f), LocaleController.getString("Done", R.string.Done));
this.t = j;
j.setVisibility(8);
b bVar = new b(context);
bVar.setFillViewport(true);
this.e = bVar;
FrameLayout frameLayout = new FrameLayout(context);
bVar.addView(frameLayout, g52.s(-1, -2, 51));
this.r[0] = new e(context);
this.r[1] = new d(context, 1);
this.r[2] = new d(context, 2);
this.r[3] = new d(context, 3);
this.r[4] = new d(context, 4);
int i = 0;
while (true) {
pz4[] pz4VarArr = this.r;
if (i >= pz4VarArr.length) {
this.g.setTitle(pz4VarArr[0].getHeaderName());
return this.e;
}
pz4VarArr[i].setVisibility(i == 0 ? 0 : 8);
frameLayout.addView(this.r[i], g52.b(-1, i == 0 ? -2.0f : -1.0f, 51, AndroidUtilities.isTablet() ? 26.0f : 18.0f, 30.0f, AndroidUtilities.isTablet() ? 26.0f : 18.0f, 0.0f));
i++;
}
}
}