CheetahGram v8.5.4版本的 MD5 值为:3d14e79cc242c314d3933620ff3ab030
以下内容为反编译后的 i0.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.InputFilter;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.widget.AdapterView;
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.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
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.MessagesController;
import org.telegram.messenger.MessagesStorage;
import org.telegram.messenger.NotificationCenter;
import org.telegram.messenger.UserConfig;
import org.telegram.messenger.p110.ah5;
import org.telegram.messenger.p110.ch5;
import org.telegram.messenger.p110.cs1;
import org.telegram.messenger.p110.f27;
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.nf5;
import org.telegram.messenger.p110.nh5;
import org.telegram.messenger.p110.oh5;
import org.telegram.messenger.p110.ov5;
import org.telegram.messenger.p110.pz4;
import org.telegram.messenger.p110.qd5;
import org.telegram.messenger.p110.qh5;
import org.telegram.messenger.p110.u27;
import org.telegram.messenger.p110.ur;
import org.telegram.messenger.p110.uw3;
import org.telegram.messenger.p110.v27;
import org.telegram.messenger.p110.vq5;
import org.telegram.messenger.p110.wg5;
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.ActionBar.i;
import org.telegram.ui.Components.EditTextBoldCursor;
import org.telegram.ui.Components.RLottieDrawable;
import org.telegram.ui.i0;
import org.telegram.ui.l3;
import org.telegram.ui.y5;
import uk.co.chrisjenx.calligraphy.BuildConfig;
public class i0 extends org.telegram.ui.ActionBar.k {
private org.telegram.ui.ActionBar.i s;
private Dialog t;
private View w;
private int x;
private int q = 0;
private pz4[] r = new pz4[5];
private ArrayList<String> u = new ArrayList<>();
private boolean v = true;
class a extends a.h {
a() {
}
@Override
public void b(int i) {
if (i == 1) {
i0.this.r[i0.this.q].f(null);
} else if (i == -1) {
i0.this.D();
}
}
}
class b extends ScrollView {
b(Context context) {
super(context);
}
@Override
protected void onMeasure(int i, int i2) {
i0.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 (i0.this.q == 1 || i0.this.q == 2 || i0.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(i0 i0Var, 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 String B;
private int G;
private int H;
private String a;
private String b;
private String c;
private String d;
private LinearLayout e;
private EditTextBoldCursor[] f;
private TextView g;
private TextView h;
private ImageView i;
private ke4 j;
private TextView k;
private TextView l;
private f m;
RLottieDrawable n;
private Timer o;
private Timer p;
private final Object q;
private int r;
private int s;
private double t;
private double u;
private boolean v;
private boolean w;
private boolean x;
private String y;
private int z;
class a extends TextView {
a(d dVar, Context context, i0 i0Var) {
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, i0 i0Var) {
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.v && (length = editable.length()) >= 1) {
if (length > 1) {
String obj = editable.toString();
d.this.v = true;
for (int i = 0; i < Math.min(d.this.G - this.a, length); i++) {
if (i == 0) {
editable.replace(0, length, obj.substring(i, i + 1));
} else {
d.this.f[this.a + i].setText(obj.substring(i, i + 1));
}
}
d.this.v = false;
}
if (this.a != d.this.G - 1) {
d.this.f[this.a + 1].setSelection(d.this.f[this.a + 1].length());
d.this.f[this.a + 1].requestFocus();
}
if ((this.a == d.this.G - 1 || (this.a == d.this.G - 2 && length >= 2)) && d.this.getCode().length() == d.this.G) {
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 C0171d extends TimerTask {
C0171d() {
}
public void b() {
double currentTimeMillis = System.currentTimeMillis();
double d = d.this.u;
Double.isNaN(currentTimeMillis);
d.this.u = currentTimeMillis;
d.F(d.this, currentTimeMillis - d);
if (d.this.s <= 1000) {
d.this.l.setVisibility(0);
d.this.k.setVisibility(8);
d.this.f0();
}
}
@Override
public void run() {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
i0.d.C0171d.this.b();
}
});
}
}
public class e extends TimerTask {
e() {
}
public void d(ov5 ov5Var) {
d.this.y = 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() {
i0.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.t;
Double.isNaN(currentTimeMillis);
d.N(d.this, currentTimeMillis - d);
d.this.t = currentTimeMillis;
if (d.this.r < 1000) {
if (d.this.m != null) {
d.this.m.a(1.0f);
}
d.this.g0();
if (d.this.z == 3) {
AndroidUtilities.setWaitingForCall(false);
globalInstance = NotificationCenter.getGlobalInstance();
dVar = d.this;
i2 = NotificationCenter.didReceiveCall;
} else {
if (d.this.z != 2 && d.this.z != 4) {
return;
}
if (d.this.A == 4 || d.this.A == 2) {
if (d.this.A == 4) {
textView = d.this.k;
i = R.string.Calling;
str = "Calling";
} else {
textView = d.this.k;
i = R.string.SendingSms;
str = "SendingSms";
}
textView.setText(LocaleController.getString(str, i));
d.this.d0();
ih5 ih5Var = new ih5();
ih5Var.a = d.this.c;
ih5Var.b = d.this.b;
ConnectionsManager.getInstance(((org.telegram.ui.ActionBar.k) i0.this).d).sendRequest(ih5Var, new RequestDelegate() {
@Override
public final void run(i95 i95Var, ov5 ov5Var) {
i0.d.e.this.e(i95Var, ov5Var);
}
}, 2);
return;
}
if (d.this.A != 3) {
return;
}
AndroidUtilities.setWaitingForSms(false);
globalInstance = NotificationCenter.getGlobalInstance();
dVar = d.this;
i2 = NotificationCenter.didReceiveSmsCode;
}
globalInstance.removeObserver(dVar, i2);
d.this.w = false;
d.this.f0();
d.this.s0();
return;
}
int i3 = (d.this.r / 1000) / 60;
int i4 = (d.this.r / 1000) - (i3 * 60);
if (d.this.A != 4 && d.this.A != 3) {
if (d.this.A == 2) {
textView2 = d.this.k;
formatString = LocaleController.formatString("SmsText", R.string.SmsText, Integer.valueOf(i3), Integer.valueOf(i4));
}
if (d.this.m == null) {
d.this.m.a(1.0f - (d.this.r / d.this.H));
return;
}
return;
}
textView2 = d.this.k;
formatString = LocaleController.formatString("CallText", R.string.CallText, Integer.valueOf(i3), Integer.valueOf(i4));
textView2.setText(formatString);
if (d.this.m == null) {
}
}
@Override
public void run() {
if (d.this.o == null) {
return;
}
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
i0.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.q = new Object();
this.r = 60000;
this.s = 15000;
this.y = BuildConfig.FLAVOR;
this.B = "*";
this.z = i;
setOrientation(1);
TextView textView3 = new TextView(context);
this.g = textView3;
textView3.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteGrayText6"));
this.g.setTextSize(1, 14.0f);
this.g.setLineSpacing(AndroidUtilities.dp(2.0f), 1.0f);
TextView textView4 = new TextView(context);
this.h = textView4;
textView4.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.h.setTextSize(1, 18.0f);
this.h.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
this.h.setGravity(LocaleController.isRTL ? 5 : 3);
this.h.setLineSpacing(AndroidUtilities.dp(2.0f), 1.0f);
this.h.setGravity(49);
if (this.z == 3) {
this.g.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.g;
b2 = g52.b(-1, -2.0f, LocaleController.isRTL ? 5 : 3, 82.0f, 0.0f, 0.0f, 0.0f);
view = view2;
} else {
frameLayout.addView(this.g, 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.g.setGravity(49);
FrameLayout frameLayout2 = new FrameLayout(context);
addView(frameLayout2, g52.l(-2, -2, 49));
if (this.z == 1) {
ImageView imageView2 = new ImageView(context);
this.i = imageView2;
imageView2.setImageResource(org.telegram.messenger.R.drawable.sms_devices);
this.i.setColorFilter(new PorterDuffColorFilter(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"), PorterDuff.Mode.MULTIPLY));
frameLayout2.addView(this.i, g52.b(-2, -2.0f, 51, 0.0f, 0.0f, 0.0f, 0.0f));
ke4 ke4Var = new ke4(context);
this.j = ke4Var;
ke4Var.setImageResource(org.telegram.messenger.R.drawable.sms_bubble);
this.j.setColorFilter(new PorterDuffColorFilter(org.telegram.ui.ActionBar.w.r1("chats_actionBackground"), PorterDuff.Mode.MULTIPLY));
frameLayout2.addView(this.j, g52.b(-2, -2.0f, 51, 0.0f, 0.0f, 0.0f, 0.0f));
textView = this.h;
i2 = R.string.SentAppCodeTitle;
str = "SentAppCodeTitle";
} else {
this.j = new ke4(context);
RLottieDrawable rLottieDrawable = new RLottieDrawable(R.raw.sms_incoming_info, "2131558496", AndroidUtilities.dp(64.0f), AndroidUtilities.dp(64.0f), true, null);
this.n = rLottieDrawable;
rLottieDrawable.f0("Bubble.**", org.telegram.ui.ActionBar.w.r1("chats_actionBackground"));
this.n.f0("Phone.**", org.telegram.ui.ActionBar.w.r1("chats_actionBackground"));
this.j.setAnimation(this.n);
frameLayout2.addView(this.j, g52.b(-2, -2.0f, 51, 0.0f, 0.0f, 0.0f, 0.0f));
textView = this.h;
i2 = R.string.SentSmsCodeTitle;
str = "SentSmsCodeTitle";
}
textView.setText(LocaleController.getString(str, i2));
addView(this.h, g52.m(-2, -2, 49, 0, 18, 0, 0));
addView(this.g, g52.m(-2, -2, 49, 0, 17, 0, 0));
}
LinearLayout linearLayout = new LinearLayout(context);
this.e = linearLayout;
linearLayout.setOrientation(0);
addView(this.e, g52.l(-2, 36, 1));
if (this.z == 3) {
this.e.setVisibility(8);
}
a aVar = new a(this, context, i0.this);
this.k = aVar;
aVar.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteGrayText6"));
this.k.setLineSpacing(AndroidUtilities.dp(2.0f), 1.0f);
if (this.z == 3) {
this.k.setTextSize(1, 14.0f);
addView(this.k, g52.l(-2, -2, LocaleController.isRTL ? 5 : 3));
this.m = new f(context);
this.k.setGravity(LocaleController.isRTL ? 5 : 3);
addView(this.m, g52.h(-1, 3, 0.0f, 12.0f, 0.0f, 0.0f));
} else {
this.k.setPadding(0, AndroidUtilities.dp(2.0f), 0, AndroidUtilities.dp(10.0f));
this.k.setTextSize(1, 15.0f);
this.k.setGravity(49);
addView(this.k, g52.l(-2, -2, 49));
}
b bVar = new b(this, context, i0.this);
this.l = bVar;
bVar.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlueText4"));
this.l.setLineSpacing(AndroidUtilities.dp(2.0f), 1.0f);
this.l.setPadding(0, AndroidUtilities.dp(2.0f), 0, AndroidUtilities.dp(10.0f));
this.l.setTextSize(1, 15.0f);
this.l.setGravity(49);
if (this.z == 1) {
textView2 = this.l;
i3 = R.string.DidNotGetTheCodeSms;
str2 = "DidNotGetTheCodeSms";
} else {
textView2 = this.l;
i3 = R.string.DidNotGetTheCode;
str2 = "DidNotGetTheCode";
}
textView2.setText(LocaleController.getString(str2, i3));
addView(this.l, g52.l(-2, -2, 49));
this.l.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
i0.d.this.h0(view3);
}
});
}
static int F(d dVar, double d) {
double d2 = dVar.s;
Double.isNaN(d2);
int i = (int) (d2 - d);
dVar.s = i;
return i;
}
static int N(d dVar, double d) {
double d2 = dVar.r;
Double.isNaN(d2);
int i = (int) (d2 - d);
dVar.r = i;
return i;
}
public void d0() {
if (this.p != null) {
return;
}
this.s = 15000;
this.p = new Timer();
this.u = System.currentTimeMillis();
this.p.schedule(new C0171d(), 0L, 1000L);
}
private void e0() {
if (this.o != null) {
return;
}
Timer timer = new Timer();
this.o = timer;
timer.schedule(new e(), 0L, 1000L);
}
public void f0() {
try {
synchronized (this.q) {
Timer timer = this.p;
if (timer != null) {
timer.cancel();
this.p = null;
}
}
} catch (Exception e2) {
FileLog.e(e2);
}
}
public void g0() {
try {
synchronized (this.q) {
Timer timer = this.o;
if (timer != null) {
timer.cancel();
this.o = null;
}
}
} catch (Exception e2) {
FileLog.e(e2);
}
}
public String getCode() {
if (this.f == null) {
return BuildConfig.FLAVOR;
}
StringBuilder sb = new StringBuilder();
int i = 0;
while (true) {
EditTextBoldCursor[] editTextBoldCursorArr = this.f;
if (i >= editTextBoldCursorArr.length) {
return sb.toString();
}
sb.append(uw3.h(editTextBoldCursorArr[i].getText().toString()));
i++;
}
}
public void h0(View view) {
if (this.x) {
return;
}
int i = this.A;
if (!((i == 4 && this.z == 2) || i == 0)) {
s0();
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 registration/login issue " + format + " " + this.d);
intent.putExtra("android.intent.extra.TEXT", "Phone: " + this.c + "\nApp version: " + format + "\nOS version: SDK " + Build.VERSION.SDK_INT + "\nDevice Name: " + Build.MANUFACTURER + Build.MODEL + "\nLocale: " + Locale.getDefault() + "\nError: " + this.y);
getContext().startActivity(Intent.createChooser(intent, "Send email..."));
} catch (Exception unused) {
org.telegram.ui.Components.b.A4(i0.this, LocaleController.getString("NoMailInstalled", R.string.NoMailInstalled));
}
}
public void i0(DialogInterface dialogInterface, int i) {
b(true);
i0.this.S1(0, true, null, true);
}
public static void j0(i95 i95Var, ov5 ov5Var) {
}
public void k0(ov5 ov5Var, i95 i95Var, qd5 qd5Var) {
int i;
NotificationCenter globalInstance;
int i2;
int i3;
EditTextBoldCursor[] editTextBoldCursorArr;
int i4;
i0.this.Q1();
this.x = false;
if (ov5Var == null) {
f27 f27Var = (f27) i95Var;
g0();
f0();
UserConfig.getInstance(((org.telegram.ui.ActionBar.k) i0.this).d).setCurrentUser(f27Var);
UserConfig.getInstance(((org.telegram.ui.ActionBar.k) i0.this).d).saveConfig(true);
ArrayList<f27> arrayList = new ArrayList<>();
arrayList.add(f27Var);
MessagesStorage.getInstance(((org.telegram.ui.ActionBar.k) i0.this).d).putUsersAndChats(arrayList, null, true, true);
MessagesController.getInstance(((org.telegram.ui.ActionBar.k) i0.this).d).putUser(f27Var, false);
i0.this.D();
NotificationCenter.getInstance(((org.telegram.ui.ActionBar.k) i0.this).d).postNotificationName(NotificationCenter.mainUserInfoChanged, new Object[0]);
i0.this.W().removeSuggestion(0L, "VALIDATE_PHONE_NUMBER");
return;
}
this.y = ov5Var.b;
int i5 = this.z;
if ((i5 == 3 && ((i4 = this.A) == 4 || i4 == 2)) || ((i5 == 2 && ((i = this.A) == 4 || i == 3)) || (i5 == 4 && this.A == 2))) {
e0();
}
int i6 = this.z;
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.w = true;
if (this.z != 3) {
org.telegram.ui.Components.b.l4(((org.telegram.ui.ActionBar.k) i0.this).d, ov5Var, i0.this, qd5Var, 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);
i0.this.S1(0, true, null, true);
return;
}
return;
}
i3 = 0;
while (true) {
editTextBoldCursorArr = this.f;
if (i3 < editTextBoldCursorArr.length) {
editTextBoldCursorArr[0].requestFocus();
return;
} else {
editTextBoldCursorArr[i3].setText(BuildConfig.FLAVOR);
i3++;
}
}
}
globalInstance.addObserver(this, i2);
this.w = true;
if (this.z != 3) {
}
if (ov5Var.b.contains("PHONE_CODE_EMPTY")) {
}
i3 = 0;
while (true) {
editTextBoldCursorArr = this.f;
if (i3 < editTextBoldCursorArr.length) {
}
editTextBoldCursorArr[i3].setText(BuildConfig.FLAVOR);
i3++;
}
}
public void l0(final qd5 qd5Var, final i95 i95Var, final ov5 ov5Var) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
i0.d.this.k0(ov5Var, i95Var, qd5Var);
}
});
}
public void m0() {
EditTextBoldCursor[] editTextBoldCursorArr = this.f;
if (editTextBoldCursorArr != null) {
for (int length = editTextBoldCursorArr.length - 1; length >= 0; length--) {
if (length == 0 || this.f[length].length() != 0) {
this.f[length].requestFocus();
EditTextBoldCursor[] editTextBoldCursorArr2 = this.f;
editTextBoldCursorArr2[length].setSelection(editTextBoldCursorArr2[length].length());
AndroidUtilities.showKeyboard(this.f[length]);
break;
}
}
}
RLottieDrawable rLottieDrawable = this.n;
if (rLottieDrawable != null) {
rLottieDrawable.start();
}
}
public void n0(DialogInterface dialogInterface, int i) {
b(true);
i0.this.D();
}
public void o0(ov5 ov5Var, Bundle bundle, i95 i95Var, ih5 ih5Var) {
this.x = false;
if (ov5Var == null) {
i0.this.O1(bundle, (lh5) i95Var);
} else {
org.telegram.ui.ActionBar.i iVar = (org.telegram.ui.ActionBar.i) org.telegram.ui.Components.b.l4(((org.telegram.ui.ActionBar.k) i0.this).d, ov5Var, i0.this, ih5Var, new Object[0]);
if (iVar != null && ov5Var.b.contains("PHONE_CODE_EXPIRED")) {
iVar.J0(new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
i0.d.this.n0(dialogInterface, i);
}
});
}
}
i0.this.Q1();
}
public void p0(final Bundle bundle, final ih5 ih5Var, final i95 i95Var, final ov5 ov5Var) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
i0.d.this.o0(ov5Var, bundle, i95Var, ih5Var);
}
});
}
public boolean q0(int i, View view, int i2, KeyEvent keyEvent) {
if (i2 != 67 || this.f[i].length() != 0 || i <= 0) {
return false;
}
EditTextBoldCursor[] editTextBoldCursorArr = this.f;
int i3 = i - 1;
editTextBoldCursorArr[i3].setSelection(editTextBoldCursorArr[i3].length());
this.f[i3].requestFocus();
this.f[i3].dispatchKeyEvent(keyEvent);
return true;
}
public boolean r0(TextView textView, int i, KeyEvent keyEvent) {
if (i != 5) {
return false;
}
f(null);
return true;
}
public void s0() {
final Bundle bundle = new Bundle();
bundle.putString("phone", this.a);
bundle.putString("ephone", this.d);
bundle.putString("phoneFormated", this.c);
this.x = true;
i0.this.R1();
final ih5 ih5Var = new ih5();
ih5Var.a = this.c;
ih5Var.b = this.b;
ConnectionsManager.getInstance(((org.telegram.ui.ActionBar.k) i0.this).d).sendRequest(ih5Var, new RequestDelegate() {
@Override
public final void run(i95 i95Var, ov5 ov5Var) {
i0.d.this.p0(bundle, ih5Var, i95Var, ov5Var);
}
}, 2);
}
@Override
public boolean a() {
return true;
}
@Override
public boolean b(boolean z) {
NotificationCenter globalInstance;
int i;
if (!z) {
i.C0142i c0142i = new i.C0142i(i0.this.c0());
c0142i.u(LocaleController.getString("AppName", R.string.AppName));
c0142i.l(LocaleController.getString("StopVerification", R.string.StopVerification));
c0142i.s(LocaleController.getString("Continue", R.string.Continue), null);
c0142i.n(LocaleController.getString("Stop", R.string.Stop), new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i2) {
i0.d.this.i0(dialogInterface, i2);
}
});
i0.this.o1(c0142i.a());
return false;
}
wg5 wg5Var = new wg5();
wg5Var.a = this.c;
wg5Var.b = this.b;
ConnectionsManager.getInstance(((org.telegram.ui.ActionBar.k) i0.this).d).sendRequest(wg5Var, new RequestDelegate() {
@Override
public final void run(i95 i95Var, ov5 ov5Var) {
i0.d.j0(i95Var, ov5Var);
}
}, 10);
g0();
f0();
int i2 = this.z;
if (i2 != 2) {
if (i2 == 3) {
AndroidUtilities.setWaitingForCall(false);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveCall;
}
this.w = false;
return true;
}
AndroidUtilities.setWaitingForSms(false);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveSmsCode;
globalInstance.removeObserver(this, i);
this.w = false;
return true;
}
@Override
public void d() {
this.x = false;
}
@Override
public void didReceivedNotification(int i, int i2, Object... objArr) {
EditTextBoldCursor[] editTextBoldCursorArr;
if (!this.w || (editTextBoldCursorArr = this.f) == 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.B, str)) {
return;
}
this.v = true;
this.f[0].setText(str);
this.v = false;
}
f(null);
}
@Override
public void e() {
NotificationCenter globalInstance;
int i;
super.e();
int i2 = this.z;
if (i2 != 2) {
if (i2 == 3) {
AndroidUtilities.setWaitingForCall(false);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveCall;
}
this.w = false;
g0();
f0();
}
AndroidUtilities.setWaitingForSms(false);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveSmsCode;
globalInstance.removeObserver(this, i);
this.w = false;
g0();
f0();
}
@Override
public void f(String str) {
NotificationCenter globalInstance;
int i;
if (this.x) {
return;
}
String code = getCode();
if (TextUtils.isEmpty(code)) {
AndroidUtilities.shakeView(this.e, 2.0f, 0);
return;
}
this.x = true;
int i2 = this.z;
if (i2 != 2) {
if (i2 == 3) {
AndroidUtilities.setWaitingForCall(false);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveCall;
}
this.w = false;
final qd5 qd5Var = new qd5();
qd5Var.a = this.c;
qd5Var.c = code;
qd5Var.b = this.b;
g0();
i0.this.R1();
ConnectionsManager.getInstance(((org.telegram.ui.ActionBar.k) i0.this).d).sendRequest(qd5Var, new RequestDelegate() {
@Override
public final void run(i95 i95Var, ov5 ov5Var) {
i0.d.this.l0(qd5Var, i95Var, ov5Var);
}
}, 2);
}
AndroidUtilities.setWaitingForSms(false);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveSmsCode;
globalInstance.removeObserver(this, i);
this.w = false;
final qd5 qd5Var2 = new qd5();
qd5Var2.a = this.c;
qd5Var2.c = code;
qd5Var2.b = this.b;
g0();
i0.this.R1();
ConnectionsManager.getInstance(((org.telegram.ui.ActionBar.k) i0.this).d).sendRequest(qd5Var2, new RequestDelegate() {
@Override
public final void run(i95 i95Var, ov5 ov5Var) {
i0.d.this.l0(qd5Var2, i95Var, ov5Var);
}
}, 2);
}
@Override
public void g() {
super.g();
if (this.z == 3) {
return;
}
RLottieDrawable rLottieDrawable = this.n;
if (rLottieDrawable != null) {
rLottieDrawable.X(0);
}
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
i0.d.this.m0();
}
}, 100L);
}
@Override
public String getHeaderName() {
return this.z == 1 ? this.a : LocaleController.getString("YourCode", R.string.YourCode);
}
@Override
public void j(Bundle bundle, boolean z) {
NotificationCenter globalInstance;
int i;
int i2;
EditTextBoldCursor[] editTextBoldCursorArr;
final int i3;
f fVar;
String formatString;
int i4;
TextView textView;
int i5;
int i6;
TextView textView2;
String formatString2;
if (bundle == null) {
return;
}
this.w = true;
int i7 = this.z;
if (i7 == 2) {
AndroidUtilities.setWaitingForSms(true);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveSmsCode;
} else {
if (i7 == 3) {
AndroidUtilities.setWaitingForCall(true);
globalInstance = NotificationCenter.getGlobalInstance();
i = NotificationCenter.didReceiveCall;
}
this.a = bundle.getString("phone");
this.d = bundle.getString("ephone");
this.c = bundle.getString("phoneFormated");
this.b = bundle.getString("phoneHash");
int i8 = bundle.getInt("timeout");
this.r = i8;
this.H = i8;
this.A = bundle.getInt("nextType");
this.B = bundle.getString("pattern");
i2 = bundle.getInt("length");
this.G = i2;
if (i2 == 0) {
this.G = 5;
}
editTextBoldCursorArr = this.f;
CharSequence charSequence = BuildConfig.FLAVOR;
int i9 = 8;
if (editTextBoldCursorArr == null && editTextBoldCursorArr.length == this.G) {
int i10 = 0;
while (true) {
EditTextBoldCursor[] editTextBoldCursorArr2 = this.f;
if (i10 >= editTextBoldCursorArr2.length) {
break;
}
editTextBoldCursorArr2[i10].setText(BuildConfig.FLAVOR);
i10++;
}
} else {
this.f = new EditTextBoldCursor[this.G];
i3 = 0;
while (i3 < this.G) {
this.f[i3] = new EditTextBoldCursor(getContext());
this.f[i3].setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.f[i3].setCursorColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.f[i3].setCursorSize(AndroidUtilities.dp(20.0f));
this.f[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.f[i3].setBackgroundDrawable(mutate);
this.f[i3].setImeOptions(268435461);
this.f[i3].setTextSize(1, 20.0f);
this.f[i3].setMaxLines(1);
this.f[i3].setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
this.f[i3].setPadding(0, 0, 0, 0);
this.f[i3].setGravity(49);
if (this.z == 3) {
this.f[i3].setEnabled(false);
this.f[i3].setInputType(0);
this.f[i3].setVisibility(8);
} else {
this.f[i3].setInputType(3);
}
this.e.addView(this.f[i3], g52.m(34, 36, 1, 0, 0, i3 != this.G - 1 ? 7 : 0, 0));
this.f[i3].addTextChangedListener(new c(i3));
this.f[i3].setOnKeyListener(new View.OnKeyListener() {
@Override
public final boolean onKey(View view, int i11, KeyEvent keyEvent) {
boolean q0;
q0 = i0.d.this.q0(i3, view, i11, keyEvent);
return q0;
}
});
this.f[i3].setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public final boolean onEditorAction(TextView textView3, int i11, KeyEvent keyEvent) {
boolean r0;
r0 = i0.d.this.r0(textView3, i11, keyEvent);
return r0;
}
});
i3++;
}
}
fVar = this.m;
if (fVar != null) {
fVar.setVisibility(this.A != 0 ? 0 : 8);
}
if (this.a != null) {
return;
}
String c2 = uw3.d().c(this.a);
int i11 = this.z;
if (i11 == 1) {
formatString = LocaleController.getString("SentAppCode", R.string.SentAppCode);
} else if (i11 == 2) {
formatString = LocaleController.formatString("SentSmsCode", R.string.SentSmsCode, LocaleController.addNbsp(c2));
} else {
if (i11 != 3) {
if (i11 == 4) {
formatString = LocaleController.formatString("SentCallOnly", R.string.SentCallOnly, LocaleController.addNbsp(c2));
}
this.g.setText(charSequence);
if (this.z == 3) {
AndroidUtilities.showKeyboard(this.f[0]);
this.f[0].requestFocus();
} else {
AndroidUtilities.hideKeyboard(this.f[0]);
}
g0();
f0();
this.t = System.currentTimeMillis();
i4 = this.z;
if (i4 != 1) {
this.l.setVisibility(0);
this.k.setVisibility(8);
return;
}
if (i4 == 3 && ((i6 = this.A) == 4 || i6 == 2)) {
this.l.setVisibility(8);
this.k.setVisibility(0);
int i12 = this.A;
if (i12 == 4) {
textView2 = this.k;
formatString2 = LocaleController.formatString("CallText", R.string.CallText, 1, 0);
} else if (i12 == 2) {
textView2 = this.k;
formatString2 = LocaleController.formatString("SmsText", R.string.SmsText, 1, 0);
}
textView2.setText(formatString2);
} else if (i4 == 2 && ((i5 = this.A) == 4 || i5 == 3)) {
this.k.setText(LocaleController.formatString("CallText", R.string.CallText, 2, 0));
this.l.setVisibility(this.r < 1000 ? 0 : 8);
textView = this.k;
} else if (i4 != 4 || this.A != 2) {
this.k.setVisibility(8);
this.l.setVisibility(8);
d0();
return;
} else {
this.k.setText(LocaleController.formatString("SmsText", R.string.SmsText, 2, 0));
this.l.setVisibility(this.r < 1000 ? 0 : 8);
textView = this.k;
}
e0();
return;
}
formatString = LocaleController.formatString("SentCallCode", R.string.SentCallCode, LocaleController.addNbsp(c2));
}
charSequence = AndroidUtilities.replaceTags(formatString);
this.g.setText(charSequence);
if (this.z == 3) {
}
g0();
f0();
this.t = System.currentTimeMillis();
i4 = this.z;
if (i4 != 1) {
}
}
globalInstance.addObserver(this, i);
this.a = bundle.getString("phone");
this.d = bundle.getString("ephone");
this.c = bundle.getString("phoneFormated");
this.b = bundle.getString("phoneHash");
int i82 = bundle.getInt("timeout");
this.r = i82;
this.H = i82;
this.A = bundle.getInt("nextType");
this.B = bundle.getString("pattern");
i2 = bundle.getInt("length");
this.G = i2;
if (i2 == 0) {
}
editTextBoldCursorArr = this.f;
CharSequence charSequence2 = BuildConfig.FLAVOR;
int i92 = 8;
if (editTextBoldCursorArr == null) {
}
this.f = new EditTextBoldCursor[this.G];
i3 = 0;
while (i3 < this.G) {
}
fVar = this.m;
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.z == 3 || this.j == null) {
return;
}
int bottom = this.g.getBottom();
int measuredHeight2 = getMeasuredHeight() - bottom;
if (this.l.getVisibility() == 0) {
measuredHeight = this.l.getMeasuredHeight();
i5 = (measuredHeight2 + bottom) - measuredHeight;
textView = this.l;
left = textView.getLeft();
textView2 = this.l;
} else {
if (this.k.getVisibility() != 0) {
i5 = measuredHeight2 + bottom;
int measuredHeight3 = this.e.getMeasuredHeight();
int i6 = (((i5 - bottom) - measuredHeight3) / 2) + bottom;
LinearLayout linearLayout = this.e;
linearLayout.layout(linearLayout.getLeft(), i6, this.e.getRight(), measuredHeight3 + i6);
}
measuredHeight = this.k.getMeasuredHeight();
i5 = (measuredHeight2 + bottom) - measuredHeight;
textView = this.k;
left = textView.getLeft();
textView2 = this.k;
}
textView.layout(left, i5, textView2.getRight(), measuredHeight + i5);
int measuredHeight32 = this.e.getMeasuredHeight();
int i62 = (((i5 - bottom) - measuredHeight32) / 2) + bottom;
LinearLayout linearLayout2 = this.e;
linearLayout2.layout(linearLayout2.getLeft(), i62, this.e.getRight(), measuredHeight32 + i62);
}
@Override
protected void onMeasure(int i, int i2) {
ke4 ke4Var;
super.onMeasure(i, i2);
if (this.z == 3 || (ke4Var = this.j) == null) {
return;
}
int measuredHeight = ke4Var.getMeasuredHeight() + this.h.getMeasuredHeight() + this.g.getMeasuredHeight() + AndroidUtilities.dp(35.0f);
int dp = AndroidUtilities.dp(80.0f);
int dp2 = AndroidUtilities.dp(291.0f);
if (i0.this.x - measuredHeight < dp) {
setMeasuredDimension(getMeasuredWidth(), measuredHeight + dp);
} else {
setMeasuredDimension(getMeasuredWidth(), Math.min(i0.this.x, dp2));
}
}
}
public class e extends pz4 implements AdapterView.OnItemSelectedListener {
private EditTextBoldCursor a;
private cs1 b;
private TextView c;
private View d;
private TextView e;
private TextView f;
private int g;
private ArrayList<String> h;
private HashMap<String, String> i;
private HashMap<String, String> j;
private HashMap<String, String> k;
private boolean l;
private boolean m;
private boolean n;
private boolean o;
class a implements TextWatcher {
a(i0 i0Var) {
}
@Override
public void afterTextChanged(Editable editable) {
String str;
boolean z;
int indexOf;
if (e.this.m) {
return;
}
e.this.m = true;
String h = uw3.h(e.this.a.getText().toString());
e.this.a.setText(h);
if (h.length() == 0) {
e.this.c.setText(LocaleController.getString("ChooseCountry", R.string.ChooseCountry));
e.this.b.setHintText((String) null);
e.this.g = 1;
} else {
int i = 4;
if (h.length() > 4) {
e.this.m = true;
while (true) {
if (i < 1) {
str = null;
z = false;
break;
}
String substring = h.substring(0, i);
if (((String) e.this.j.get(substring)) != null) {
String str2 = h.substring(i) + e.this.b.getText().toString();
e.this.a.setText(substring);
z = true;
str = str2;
h = substring;
break;
}
i--;
}
if (!z) {
e.this.m = true;
str = h.substring(1) + e.this.b.getText().toString();
EditTextBoldCursor editTextBoldCursor = e.this.a;
h = h.substring(0, 1);
editTextBoldCursor.setText(h);
}
} else {
str = null;
z = false;
}
String str3 = (String) e.this.j.get(h);
if (str3 == null || (indexOf = e.this.h.indexOf(str3)) == -1) {
e.this.c.setText(LocaleController.getString("WrongCountry", R.string.WrongCountry));
e.this.b.setHintText((String) null);
e.this.g = 2;
} else {
e.this.l = true;
e.this.c.setText((CharSequence) e.this.h.get(indexOf));
String str4 = (String) e.this.k.get(h);
e.this.b.setHintText(str4 != null ? str4.replace('X', (char) 8211) : null);
e.this.g = 0;
}
if (!z) {
e.this.a.setSelection(e.this.a.getText().length());
}
if (str != null) {
e.this.b.requestFocus();
e.this.b.setText(str);
e.this.b.setSelection(e.this.b.length());
}
}
e.this.m = false;
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
}
class b implements TextWatcher {
private int a = -1;
private int b;
b(i0 i0Var) {
}
@Override
public void afterTextChanged(Editable editable) {
int i;
int i2;
if (e.this.n) {
return;
}
int selectionStart = e.this.b.getSelectionStart();
String obj = e.this.b.getText().toString();
if (this.a == 3) {
obj = obj.substring(0, this.b) + obj.substring(this.b + 1);
selectionStart--;
}
StringBuilder sb = new StringBuilder(obj.length());
int i3 = 0;
while (i3 < obj.length()) {
int i4 = i3 + 1;
String substring = obj.substring(i3, i4);
if ("0123456789".contains(substring)) {
sb.append(substring);
}
i3 = i4;
}
e.this.n = true;
String hintText = e.this.b.getHintText();
if (hintText != null) {
int i5 = 0;
while (true) {
if (i5 >= sb.length()) {
break;
}
if (i5 < hintText.length()) {
if (hintText.charAt(i5) == ' ') {
sb.insert(i5, ' ');
i5++;
if (selectionStart == i5 && (i2 = this.a) != 2 && i2 != 3) {
selectionStart++;
}
}
i5++;
} else {
sb.insert(i5, ' ');
if (selectionStart == i5 + 1 && (i = this.a) != 2 && i != 3) {
selectionStart++;
}
}
}
}
e.this.b.setText(sb);
if (selectionStart >= 0) {
e.this.b.setSelection(Math.min(selectionStart, e.this.b.length()));
}
e.this.b.K();
e.this.n = false;
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
int i4;
if (i2 == 0 && i3 == 1) {
this.a = 1;
return;
}
if (i2 != 1 || i3 != 0) {
i4 = -1;
} else {
if (charSequence.charAt(i) == ' ' && i > 0) {
this.a = 3;
this.b = i - 1;
return;
}
i4 = 2;
}
this.a = i4;
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
}
public e(Context context) {
super(context);
String str;
String str2;
TelephonyManager telephonyManager;
this.g = 0;
this.h = new ArrayList<>();
this.i = new HashMap<>();
this.j = new HashMap<>();
this.k = new HashMap<>();
this.l = false;
this.m = false;
this.n = false;
this.o = false;
setOrientation(1);
TextView textView = new TextView(context);
this.c = textView;
textView.setTextSize(1, 18.0f);
this.c.setPadding(AndroidUtilities.dp(4.0f), AndroidUtilities.dp(4.0f), AndroidUtilities.dp(4.0f), AndroidUtilities.dp(4.0f));
this.c.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.c.setMaxLines(1);
this.c.setSingleLine(true);
this.c.setEllipsize(TextUtils.TruncateAt.END);
this.c.setGravity((LocaleController.isRTL ? 5 : 3) | 1);
this.c.setBackground(org.telegram.ui.ActionBar.w.S0(org.telegram.ui.ActionBar.w.r1("listSelectorSDK21"), 7));
addView(this.c, g52.h(-1, 36, 0.0f, 0.0f, 0.0f, 14.0f));
this.c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
i0.e.this.L(view);
}
});
View view = new View(context);
this.d = view;
view.setPadding(AndroidUtilities.dp(12.0f), 0, AndroidUtilities.dp(12.0f), 0);
this.d.setBackgroundColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteGrayLine"));
addView(this.d, g52.h(-1, 1, 4.0f, -17.5f, 4.0f, 0.0f));
LinearLayout linearLayout = new LinearLayout(context);
linearLayout.setOrientation(0);
addView(linearLayout, g52.h(-1, -2, 0.0f, 20.0f, 0.0f, 0.0f));
TextView textView2 = new TextView(context);
this.e = textView2;
textView2.setText("+");
this.e.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.e.setTextSize(1, 18.0f);
linearLayout.addView(this.e, g52.f(-2, -2));
EditTextBoldCursor editTextBoldCursor = new EditTextBoldCursor(context);
this.a = editTextBoldCursor;
editTextBoldCursor.setInputType(3);
this.a.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.a.setCursorColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.a.setCursorSize(AndroidUtilities.dp(20.0f));
this.a.setCursorWidth(1.5f);
this.a.setBackgroundDrawable(org.telegram.ui.ActionBar.w.K0(context, false));
this.a.setPadding(AndroidUtilities.dp(10.0f), 0, 0, 0);
this.a.setTextSize(1, 18.0f);
this.a.setMaxLines(1);
this.a.setGravity(19);
this.a.setImeOptions(268435461);
this.a.setFilters(new InputFilter[]{new InputFilter.LengthFilter(5)});
linearLayout.addView(this.a, g52.h(55, 36, -9.0f, 0.0f, 16.0f, 0.0f));
this.a.addTextChangedListener(new a(i0.this));
this.a.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public final boolean onEditorAction(TextView textView3, int i, KeyEvent keyEvent) {
boolean M;
M = i0.e.this.M(textView3, i, keyEvent);
return M;
}
});
cs1 cs1Var = new cs1(context);
this.b = cs1Var;
cs1Var.setInputType(3);
this.b.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.b.setHintTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteHintText"));
this.b.setBackgroundDrawable(org.telegram.ui.ActionBar.w.K0(context, false));
this.b.setPadding(0, 0, 0, 0);
this.b.setCursorColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteBlackText"));
this.b.setCursorSize(AndroidUtilities.dp(20.0f));
this.b.setCursorWidth(1.5f);
this.b.setTextSize(1, 18.0f);
this.b.setMaxLines(1);
this.b.setGravity(19);
this.b.setImeOptions(268435461);
linearLayout.addView(this.b, g52.a(-1, 36.0f));
this.b.addTextChangedListener(new b(i0.this));
this.b.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public final boolean onEditorAction(TextView textView3, int i, KeyEvent keyEvent) {
boolean N;
N = i0.e.this.N(textView3, i, keyEvent);
return N;
}
});
this.b.setOnKeyListener(new View.OnKeyListener() {
@Override
public final boolean onKey(View view2, int i, KeyEvent keyEvent) {
boolean O;
O = i0.e.this.O(view2, i, keyEvent);
return O;
}
});
TextView textView3 = new TextView(context);
this.f = textView3;
textView3.setText(LocaleController.getString("ChangePhoneHelp", R.string.ChangePhoneHelp));
this.f.setTextColor(org.telegram.ui.ActionBar.w.r1("windowBackgroundWhiteGrayText6"));
this.f.setTextSize(1, 14.0f);
this.f.setGravity(LocaleController.isRTL ? 5 : 3);
this.f.setLineSpacing(AndroidUtilities.dp(2.0f), 1.0f);
addView(this.f, g52.m(-2, -2, LocaleController.isRTL ? 5 : 3, 0, 28, 0, 10));
HashMap hashMap = new HashMap();
try {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getResources().getAssets().open("countries.txt")));
while (true) {
String readLine = bufferedReader.readLine();
if (readLine == null) {
break;
}
String[] split = readLine.split(";");
this.h.add(0, split[2]);
this.i.put(split[2], split[0]);
this.j.put(split[0], split[2]);
if (split.length > 3) {
this.k.put(split[0], split[3]);
}
hashMap.put(split[1], split[2]);
}
bufferedReader.close();
} catch (Exception e) {
FileLog.e(e);
}
Collections.sort(this.h, ur.a);
try {
telephonyManager = (TelephonyManager) ApplicationLoader.applicationContext.getSystemService("phone");
} catch (Exception e2) {
FileLog.e(e2);
}
if (telephonyManager != null) {
str = telephonyManager.getSimCountryIso().toUpperCase();
if (str != null && (str2 = (String) hashMap.get(str)) != null && this.h.indexOf(str2) != -1) {
this.a.setText(this.i.get(str2));
this.g = 0;
}
if (this.a.length() == 0) {
this.c.setText(LocaleController.getString("ChooseCountry", R.string.ChooseCountry));
this.b.setHintText((String) null);
this.g = 1;
}
if (this.a.length() != 0) {
AndroidUtilities.showKeyboard(this.a);
this.a.requestFocus();
return;
} else {
AndroidUtilities.showKeyboard(this.b);
this.b.requestFocus();
cs1 cs1Var2 = this.b;
cs1Var2.setSelection(cs1Var2.length());
return;
}
}
str = null;
if (str != null) {
this.a.setText(this.i.get(str2));
this.g = 0;
}
if (this.a.length() == 0) {
}
if (this.a.length() != 0) {
}
}
public void J() {
AndroidUtilities.showKeyboard(this.b);
}
public void K(l3.d dVar) {
R(dVar.a);
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
i0.e.this.J();
}
}, 300L);
this.b.requestFocus();
cs1 cs1Var = this.b;
cs1Var.setSelection(cs1Var.length());
}
public void L(View view) {
l3 l3Var = new l3(true);
l3Var.C1(new l3.g() {
@Override
public final void a(l3.d dVar) {
i0.e.this.K(dVar);
}
});
i0.this.S0(l3Var);
}
public boolean M(TextView textView, int i, KeyEvent keyEvent) {
if (i != 5) {
return false;
}
this.b.requestFocus();
cs1 cs1Var = this.b;
cs1Var.setSelection(cs1Var.length());
return true;
}
public boolean N(TextView textView, int i, KeyEvent keyEvent) {
if (i != 5) {
return false;
}
f(null);
return true;
}
public boolean O(View view, int i, KeyEvent keyEvent) {
if (i != 67 || this.b.length() != 0) {
return false;
}
this.a.requestFocus();
EditTextBoldCursor editTextBoldCursor = this.a;
editTextBoldCursor.setSelection(editTextBoldCursor.length());
this.a.dispatchKeyEvent(keyEvent);
return true;
}
public void P(ov5 ov5Var, Bundle bundle, i95 i95Var, nf5 nf5Var) {
this.o = false;
if (ov5Var == null) {
i0.this.O1(bundle, (lh5) i95Var);
} else {
org.telegram.ui.Components.b.l4(((org.telegram.ui.ActionBar.k) i0.this).d, ov5Var, i0.this, nf5Var, bundle.getString("phone"));
}
i0.this.Q1();
}
public void Q(final Bundle bundle, final nf5 nf5Var, final i95 i95Var, final ov5 ov5Var) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
i0.e.this.P(ov5Var, bundle, i95Var, nf5Var);
}
});
}
public void R(String str) {
if (this.h.indexOf(str) != -1) {
this.m = true;
String str2 = this.i.get(str);
this.a.setText(str2);
this.c.setText(str);
String str3 = this.k.get(str2);
this.b.setHintText(str3 != null ? str3.replace('X', (char) 8211) : null);
this.g = 0;
this.m = false;
}
}
@Override
public void d() {
this.o = false;
}
@Override
public void f(String str) {
boolean z;
if (i0.this.c0() == null || this.o) {
return;
}
TelephonyManager telephonyManager = (TelephonyManager) ApplicationLoader.applicationContext.getSystemService("phone");
boolean z2 = (telephonyManager.getSimState() == 1 || telephonyManager.getPhoneType() == 0) ? false : true;
if (Build.VERSION.SDK_INT < 23 || !z2) {
z = true;
} else {
z = i0.this.c0().checkSelfPermission("android.permission.READ_PHONE_STATE") == 0;
if (i0.this.v) {
i0.this.u.clear();
if (!z) {
i0.this.u.add("android.permission.READ_PHONE_STATE");
}
if (!i0.this.u.isEmpty()) {
SharedPreferences globalMainSettings = MessagesController.getGlobalMainSettings();
if (!globalMainSettings.getBoolean("firstlogin", true) && !i0.this.c0().shouldShowRequestPermissionRationale("android.permission.READ_PHONE_STATE")) {
i0.this.c0().requestPermissions((String[]) i0.this.u.toArray(new String[0]), 6);
return;
}
globalMainSettings.edit().putBoolean("firstlogin", false).commit();
i.C0142i c0142i = new i.C0142i(i0.this.c0());
c0142i.u(LocaleController.getString("AppName", R.string.AppName));
c0142i.s(LocaleController.getString("OK", R.string.OK), null);
c0142i.l(LocaleController.getString("AllowReadCall", R.string.AllowReadCall));
i0 i0Var = i0.this;
i0Var.t = i0Var.o1(c0142i.a());
return;
}
}
}
if (this.g == 1) {
org.telegram.ui.Components.b.A4(i0.this, LocaleController.getString("ChooseCountry", R.string.ChooseCountry));
return;
}
if (this.a.length() == 0) {
org.telegram.ui.Components.b.A4(i0.this, LocaleController.getString("InvalidPhoneNumber", R.string.InvalidPhoneNumber));
return;
}
final nf5 nf5Var = new nf5();
String h = uw3.h(BuildConfig.FLAVOR + ((Object) this.a.getText()) + ((Object) this.b.getText()));
nf5Var.a = h;
vq5 vq5Var = new vq5();
nf5Var.b = vq5Var;
vq5Var.b = z2 && z;
vq5Var.d = ApplicationLoader.hasPlayServices;
SharedPreferences sharedPreferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", 0);
boolean z3 = nf5Var.b.d;
SharedPreferences.Editor edit = sharedPreferences.edit();
(z3 ? edit.putString("sms_hash", BuildVars.SMS_HASH) : edit.remove("sms_hash")).commit();
if (nf5Var.b.b) {
try {
String line1Number = telephonyManager.getLine1Number();
if (TextUtils.isEmpty(line1Number)) {
nf5Var.b.c = false;
} else {
nf5Var.b.c = PhoneNumberUtils.compare(h, line1Number);
vq5 vq5Var2 = nf5Var.b;
if (!vq5Var2.c) {
vq5Var2.b = false;
}
}
} catch (Exception e) {
nf5Var.b.b = false;
FileLog.e(e);
}
}
final Bundle bundle = new Bundle();
bundle.putString("phone", "+" + ((Object) this.a.getText()) + " " + ((Object) this.b.getText()));
try {
bundle.putString("ephone", "+" + uw3.h(this.a.getText().toString()) + " " + uw3.h(this.b.getText().toString()));
} catch (Exception e2) {
FileLog.e(e2);
bundle.putString("ephone", "+" + h);
}
bundle.putString("phoneFormated", h);
this.o = true;
i0.this.R1();
ConnectionsManager.getInstance(((org.telegram.ui.ActionBar.k) i0.this).d).sendRequest(nf5Var, new RequestDelegate() {
@Override
public final void run(i95 i95Var, ov5 ov5Var) {
i0.e.this.Q(bundle, nf5Var, i95Var, ov5Var);
}
}, 2);
}
@Override
public void g() {
super.g();
if (this.b != null) {
if (this.a.length() == 0) {
AndroidUtilities.showKeyboard(this.a);
this.a.requestFocus();
} else {
AndroidUtilities.showKeyboard(this.b);
this.b.requestFocus();
cs1 cs1Var = this.b;
cs1Var.setSelection(cs1Var.length());
}
}
}
@Override
public String getHeaderName() {
return LocaleController.getString("ChangePhoneNewNumber", R.string.ChangePhoneNewNumber);
}
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long j) {
if (this.l) {
this.l = false;
return;
}
this.m = true;
this.a.setText(this.i.get(this.h.get(i)));
this.m = false;
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
}
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 void O1(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);
S1(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);
S1(4, true, bundle, false);
} else if (v27Var instanceof oh5) {
bundle.putInt("type", 3);
bundle.putString("pattern", lh5Var.b.b);
S1(3, true, bundle, false);
} else if (v27Var instanceof qh5) {
bundle.putInt("type", 2);
bundle.putInt("length", lh5Var.b.a);
S1(2, true, bundle, false);
}
}
public void P1() {
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 (Build.VERSION.SDK_INT < 23 || dialog != this.t || this.u.isEmpty()) {
return;
}
c0().requestPermissions((String[]) this.u.toArray(new String[0]), 6);
}
@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);
}
@Override
public void K0(int i, String[] strArr, int[] iArr) {
if (i == 6) {
this.v = false;
int i2 = this.q;
if (i2 == 0) {
this.r[i2].f(null);
}
}
}
@Override
public void M0() {
super.M0();
AndroidUtilities.requestAdjustResize(c0(), this.k);
}
@Override
public void O0(boolean z, boolean z2) {
if (z) {
this.r[this.q].g();
}
}
public void Q1() {
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 R1() {
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();
}
public void S1(int i, boolean z, Bundle bundle, boolean z2) {
if (i == 3) {
this.w.setVisibility(8);
} else {
if (i == 0) {
this.v = true;
}
this.w.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 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.i0.this.P1();
}
};
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.c, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.c, org.telegram.ui.ActionBar.a0.v | org.telegram.ui.ActionBar.a0.G, null, null, null, null, "listSelectorSDK21"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.d, org.telegram.ui.ActionBar.a0.q, null, null, null, null, "windowBackgroundWhiteGrayLine"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.e, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.a, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.a, org.telegram.ui.ActionBar.a0.v, null, null, null, null, "windowBackgroundWhiteInputField"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.a, org.telegram.ui.ActionBar.a0.v | org.telegram.ui.ActionBar.a0.G, null, null, null, null, "windowBackgroundWhiteInputFieldActivated"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.b, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.b, org.telegram.ui.ActionBar.a0.N, null, null, null, null, "windowBackgroundWhiteHintText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.b, org.telegram.ui.ActionBar.a0.v, null, null, null, null, "windowBackgroundWhiteInputField"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.b, org.telegram.ui.ActionBar.a0.v | org.telegram.ui.ActionBar.a0.G, null, null, null, null, "windowBackgroundWhiteInputFieldActivated"));
arrayList.add(new org.telegram.ui.ActionBar.a0(eVar.f, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.g, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.h, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
if (dVar.f != null) {
for (int i = 0; i < dVar.f.length; i++) {
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.f[i], org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.f[i], org.telegram.ui.ActionBar.a0.v, null, null, null, null, "windowBackgroundWhiteInputFieldActivated"));
}
}
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.k, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.l, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlueText4"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.m, 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.m, 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.i, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar.j, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "chats_actionBackground"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.g, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.h, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
if (dVar2.f != null) {
for (int i2 = 0; i2 < dVar2.f.length; i2++) {
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.f[i2], org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.f[i2], org.telegram.ui.ActionBar.a0.v, null, null, null, null, "windowBackgroundWhiteInputFieldActivated"));
}
}
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.k, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.l, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlueText4"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.m, 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.m, 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.i, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar2.j, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "chats_actionBackground"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.g, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.h, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
if (dVar3.f != null) {
for (int i3 = 0; i3 < dVar3.f.length; i3++) {
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.f[i3], org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.f[i3], org.telegram.ui.ActionBar.a0.v, null, null, null, null, "windowBackgroundWhiteInputFieldActivated"));
}
}
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.k, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.l, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlueText4"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.m, 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.m, 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.i, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar3.j, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "chats_actionBackground"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.g, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.h, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
if (dVar4.f != null) {
for (int i4 = 0; i4 < dVar4.f.length; i4++) {
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.f[i4], org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.f[i4], org.telegram.ui.ActionBar.a0.v, null, null, null, null, "windowBackgroundWhiteInputFieldActivated"));
}
}
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.k, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteGrayText6"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.l, org.telegram.ui.ActionBar.a0.s, null, null, null, null, "windowBackgroundWhiteBlueText4"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.m, 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.m, 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.i, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "windowBackgroundWhiteBlackText"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.j, org.telegram.ui.ActionBar.a0.t, null, null, null, null, "chats_actionBackground"));
arrayList.add(new org.telegram.ui.ActionBar.a0(dVar4.j, 0, null, null, null, aVar, "chats_actionBackground"));
return arrayList;
}
@Override
public boolean x0() {
int i = this.q;
int i2 = 0;
if (i != 0) {
if (this.r[i].b(false)) {
S1(0, true, null, true);
}
return false;
}
while (true) {
pz4[] pz4VarArr = this.r;
if (i2 >= pz4VarArr.length) {
return true;
}
if (pz4VarArr[i2] != null) {
pz4VarArr[i2].e();
}
i2++;
}
}
@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());
this.w = this.g.z().j(1, org.telegram.messenger.R.drawable.ic_done, AndroidUtilities.dp(56.0f), LocaleController.getString("Done", R.string.Done));
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++;
}
}
}