TopTV v3.0.1版本的 MD5 值为:0fc1b9ce94885bc92edd11a6ee3e5932
以下内容为反编译后的 LoginActivity.java 源代码,内容仅作参考
package com.toptvone.toptviptvbox.view.activity;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.text.InputFilter;
import android.text.Spanned;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.amazonaws.services.s3.internal.Constants;
import com.toptvone.toptviptvbox.R;
import com.toptvone.toptviptvbox.WHMCSClientapp.activities.FreeTrailActivity;
import com.toptvone.toptviptvbox.model.callback.ActivationCallBack;
import com.toptvone.toptviptvbox.model.callback.LoginCallback;
import com.toptvone.toptviptvbox.model.database.DatabaseHandler;
import com.toptvone.toptviptvbox.model.database.LiveStreamDBHandler;
import com.toptvone.toptviptvbox.model.database.MultiUserDBHandler;
import com.toptvone.toptviptvbox.model.database.SharepreferenceDBHandler;
import com.toptvone.toptviptvbox.vpn.activities.ProfileActivity;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.List;
import java.util.Random;
import me.zhanghai.android.materialprogressbar.BuildConfig;
import org.json.JSONObject;
public class LoginActivity extends a.b.k.c implements c.k.a.i.f.f, c.k.a.e.c<String>, c.k.a.i.f.a {
public static InputFilter f25237d = new a();
public SharedPreferences A;
public SharedPreferences B;
public SharedPreferences C;
public SharedPreferences D;
public SharedPreferences.Editor E;
public SharedPreferences.Editor F;
public SharedPreferences.Editor G;
public SharedPreferences.Editor H;
public SharedPreferences.Editor I;
public SharedPreferences.Editor J;
public SharedPreferences K;
public SharedPreferences L;
public SharedPreferences.Editor M;
public MultiUserDBHandler N;
public DatabaseHandler O;
public String X;
public SharedPreferences Y;
public SharedPreferences.Editor Z;
@BindView
public LinearLayout activityLogin;
@BindView
public Button btn_free_trail;
public EditText f25238e;
@BindView
public ImageView eyepass;
public EditText f25239f;
public SharedPreferences f0;
public EditText f25240g;
public SharedPreferences.Editor g0;
public EditText f25241h;
public SharedPreferences h0;
@BindView
public ImageView iv_connect_vpn;
@BindView
public ImageView iv_list_users;
public c.k.a.h.c f25244k;
@BindView
public LinearLayout linearLayout;
@BindView
public TextView link_transform;
@BindView
public TextView loginTV;
public String f25246m;
public String f25247n;
public String n0;
public String f25248o;
public String o0;
public ProgressDialog p;
public String p0;
@BindView
public LinearLayout password_full;
public SharedPreferences q;
public String q0;
public SharedPreferences.Editor r;
@BindView
public Button rl_bt_refresh;
@BindView
public RelativeLayout rl_bt_submit;
@BindView
public RelativeLayout rl_connect_vpn;
@BindView
public RelativeLayout rl_email;
@BindView
public RelativeLayout rl_list_users;
@BindView
public RelativeLayout rl_name;
@BindView
public RelativeLayout rl_password;
@BindView
public RelativeLayout rl_server_url;
public SharedPreferences s;
public int s0;
public SharedPreferences t;
public String t0;
@BindView
public TextView tv_add_user;
@BindView
public TextView tv_list_users;
@BindView
public TextView tv_vpn_con;
public SharedPreferences u;
public c.k.a.h.a u0;
public SharedPreferences.Editor v;
public c.k.a.i.d.a.a v0;
public SharedPreferences w;
public SharedPreferences.Editor x;
public LiveStreamDBHandler y;
@BindView
public ImageView yourLogioTV;
public SharedPreferences z;
public int f25242i = -1;
public boolean f25243j = false;
public Context f25245l = this;
public String P = BuildConfig.FLAVOR;
public String Q = BuildConfig.FLAVOR;
public String R = BuildConfig.FLAVOR;
public String S = BuildConfig.FLAVOR;
public long T = -1;
public String U = BuildConfig.FLAVOR;
public String V = BuildConfig.FLAVOR;
public long W = -1;
public String i0 = BuildConfig.FLAVOR;
public ArrayList<String> j0 = new ArrayList<>();
public String k0 = J0();
public long l0 = 0;
public SimpleDateFormat m0 = new SimpleDateFormat("dd/MM/yyyy");
public String r0 = Build.MODEL;
public static class a implements InputFilter {
@Override
public CharSequence filter(CharSequence charSequence, int i2, int i3, Spanned spanned, int i4, int i5) {
while (i2 < i3) {
if (Character.getType(charSequence.charAt(i2)) == 19) {
return BuildConfig.FLAVOR;
}
i2++;
}
return null;
}
}
public class b implements View.OnClickListener {
public b() {
}
@Override
public void onClick(View view) {
c.k.a.g.n.a.f17273a = true;
SharepreferenceDBHandler.f0("login", LoginActivity.this.f25245l);
Intent intent = new Intent(LoginActivity.this.f25245l, ProfileActivity.class);
intent.putExtra("typeid", "login");
LoginActivity.this.startActivity(intent);
}
}
public class c implements View.OnClickListener {
public c() {
}
@Override
public void onClick(View view) {
LoginActivity.this.S0();
}
}
public class d implements View.OnClickListener {
public d() {
}
@Override
public void onClick(View view) {
LoginActivity.this.Q0();
}
}
public class e implements View.OnClickListener {
public e() {
}
@Override
public void onClick(View view) {
LoginActivity.this.startActivity(new Intent(LoginActivity.this, FreeTrailActivity.class));
}
}
public class f implements View.OnClickListener {
public f() {
}
@Override
public void onClick(View view) {
c.k.a.g.n.a.f17280h = c.k.a.g.n.a.f17280h.booleanValue() ? Boolean.FALSE : Boolean.TRUE;
LoginActivity.this.L0();
}
}
public class g implements View.OnClickListener {
public g() {
}
@Override
public void onClick(View view) {
LoginActivity loginActivity = LoginActivity.this;
int i2 = loginActivity.f25242i;
if (i2 != -1) {
loginActivity.f25242i = i2 - 1;
loginActivity.f25239f.setInputType(129);
LoginActivity.this.eyepass.setImageResource(R.drawable.hidepassword);
return;
}
loginActivity.f25239f.setInputType(145);
LoginActivity.this.eyepass.setImageResource(R.drawable.showpassword);
LoginActivity.this.f25242i++;
}
}
public class h implements Runnable {
public h() {
}
@Override
public void run() {
LoginActivity.this.f25243j = false;
}
}
public class i extends Dialog implements View.OnClickListener {
public Activity f25256b;
public TextView f25257c;
public TextView f25258d;
public LinearLayout f25259e;
public LinearLayout f25260f;
public class a implements View.OnFocusChangeListener {
public View f25262b;
public a(View view) {
this.f25262b = view;
}
@Override
@SuppressLint({"ResourceType"})
public void onFocusChange(View view, boolean z) {
int i2;
LinearLayout linearLayout;
if (z) {
View view2 = this.f25262b;
i2 = R.drawable.blue_btn_effect;
if (view2 == null || view2.getTag() == null || !this.f25262b.getTag().equals("1")) {
View view3 = this.f25262b;
if (view3 == null || view3.getTag() == null || !this.f25262b.getTag().equals("2")) {
return;
}
linearLayout = i.this.f25260f;
}
linearLayout = i.this.f25259e;
} else {
View view4 = this.f25262b;
i2 = R.drawable.black_button_dark;
if (view4 == null || view4.getTag() == null || !this.f25262b.getTag().equals("1")) {
View view5 = this.f25262b;
if (view5 == null || view5.getTag() == null || !this.f25262b.getTag().equals("2")) {
return;
}
linearLayout = i.this.f25260f;
}
linearLayout = i.this.f25259e;
}
linearLayout.setBackgroundResource(i2);
}
}
public i(Activity activity) {
super(activity);
this.f25256b = activity;
}
@Override
public void onClick(View view) {
int id = view.getId();
try {
if (id != R.id.btn_close) {
if (id == R.id.btn_try_again) {
dismiss();
LoginActivity.this.S0();
}
}
dismiss();
} catch (Exception unused) {
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(LoginActivity.this.v0.z().equals(c.k.a.g.n.a.s0) ? R.layout.custom_internet_not_working_layout_tv : R.layout.custom_internet_not_working_layout);
this.f25257c = (TextView) findViewById(R.id.btn_try_again);
this.f25258d = (TextView) findViewById(R.id.btn_close);
this.f25259e = (LinearLayout) findViewById(R.id.ll_yes_button_main_layout);
this.f25260f = (LinearLayout) findViewById(R.id.ll_no_button_main_layout);
this.f25257c.setOnClickListener(this);
this.f25258d.setOnClickListener(this);
TextView textView = this.f25257c;
textView.setOnFocusChangeListener(new a(textView));
TextView textView2 = this.f25258d;
textView2.setOnFocusChangeListener(new a(textView2));
}
}
@SuppressLint({"StaticFieldLeak"})
public class j extends AsyncTask<Void, Boolean, Boolean> {
public j() {
}
@Override
public Boolean doInBackground(Void... voidArr) {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL("http://www.google.com").openConnection();
httpURLConnection.setRequestMethod("HEAD");
httpURLConnection.setReadTimeout(1500);
httpURLConnection.setConnectTimeout(1500);
return Boolean.valueOf(httpURLConnection.getResponseCode() == 200);
} catch (Exception e2) {
Log.e("LOG_TAG", e2.toString());
return Boolean.FALSE;
}
}
@Override
public void onPostExecute(Boolean bool) {
super.onPostExecute(bool);
if (!bool.booleanValue()) {
LoginActivity.this.b();
LoginActivity loginActivity = LoginActivity.this;
i iVar = new i((Activity) loginActivity.f25245l);
iVar.setCancelable(false);
iVar.show();
} else if (!c.k.a.g.n.a.f17280h.booleanValue()) {
LoginActivity.this.u0();
} else {
LoginActivity loginActivity2 = LoginActivity.this;
loginActivity2.u0 = new c.k.a.h.a(loginActivity2, loginActivity2.f25245l);
LoginActivity.this.u0.a(LoginActivity.this.f25246m);
}
}
}
public class k implements View.OnFocusChangeListener {
public final View f25265b;
public k(View view) {
this.f25265b = view;
}
public final void a(boolean z) {
if (z) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f25265b, "alpha", z ? 0.6f : 0.5f);
ofFloat.setDuration(150L);
ofFloat.start();
}
}
public final void b(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f25265b, "scaleX", f2);
ofFloat.setDuration(150L);
ofFloat.start();
}
public final void c(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f25265b, "scaleY", f2);
ofFloat.setDuration(150L);
ofFloat.start();
}
@Override
@SuppressLint({"ResourceType"})
public void onFocusChange(View view, boolean z) {
EditText editText;
int length;
if (!z) {
if (z) {
return;
}
float f2 = z ? 1.09f : 1.0f;
b(f2);
c(f2);
a(z);
return;
}
try {
Log.e("id is", BuildConfig.FLAVOR + this.f25265b.getTag());
if (this.f25265b.getTag().equals("1")) {
editText = LoginActivity.this.f25238e;
length = editText.length();
} else if (this.f25265b.getTag().equals("2")) {
editText = LoginActivity.this.f25239f;
length = editText.length();
} else if (!this.f25265b.getTag().equals("3")) {
return;
} else {
editText = LoginActivity.this.f25240g;
length = editText.length();
}
editText.setSelection(length);
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
public static String F0(String str) {
if (TextUtils.isEmpty(str)) {
return str;
}
char[] charArray = str.toCharArray();
StringBuilder sb = new StringBuilder();
boolean z = true;
for (char c2 : charArray) {
if (z && Character.isLetter(c2)) {
sb.append(Character.toUpperCase(c2));
z = false;
} else {
if (Character.isWhitespace(c2)) {
z = true;
}
sb.append(c2);
}
}
return sb.toString();
}
public static String K0() {
String str = Build.MANUFACTURER;
String str2 = Build.MODEL;
if (str2.startsWith(str)) {
return F0(str2);
}
return F0(str) + " " + str2;
}
public static String N0(String str) {
try {
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
messageDigest.update(str.getBytes());
byte[] digest = messageDigest.digest();
StringBuilder sb = new StringBuilder();
for (byte b2 : digest) {
String hexString = Integer.toHexString(b2 & 255);
while (hexString.length() < 2) {
hexString = "0" + hexString;
}
sb.append(hexString);
}
return sb.toString();
} catch (NoSuchAlgorithmException e2) {
e2.printStackTrace();
return BuildConfig.FLAVOR;
}
}
@Override
public void D(String str) {
ProgressDialog progressDialog = this.p;
if (progressDialog != null) {
progressDialog.dismiss();
Toast.makeText(this, this.f25245l.getResources().getString(R.string.invalid_server_url), 0).show();
}
}
public void E0() {
try {
this.q0 = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
} catch (PackageManager.NameNotFoundException e2) {
e2.printStackTrace();
}
}
@Override
public void G(ArrayList<String> arrayList, String str) {
if (arrayList == null || arrayList.size() <= 0) {
b();
if (c.k.a.g.n.a.f17274b.booleanValue()) {
Toast.makeText(this, getResources().getString(R.string.invalid_detail), 0).show();
return;
} else {
c.k.a.g.n.e.j0(this.f25245l, "Your Account is invalid or has expired !");
return;
}
}
try {
this.x.putString(c.k.a.g.n.a.t, arrayList.get(0).trim());
this.x.apply();
arrayList.remove(0);
this.f25244k.h(this.f25246m, this.f25247n, arrayList);
} catch (IOException e2) {
e2.printStackTrace();
}
}
public final void G0() {
Window window = getWindow();
int i2 = Build.VERSION.SDK_INT;
if (i2 >= 19) {
window.clearFlags(67108864);
}
if (i2 >= 21) {
window.addFlags(Integer.MIN_VALUE);
}
if (i2 >= 21) {
window.setStatusBarColor(a.i.i.b.d(this, R.color.colorPrimaryDark));
}
}
public boolean H0() {
EditText editText;
Resources resources;
int i2;
EditText editText2;
Resources resources2;
int i3;
if (c.k.a.g.n.a.f17276d.booleanValue() && this.f25241h.getText().toString().trim().length() == 0) {
this.f25241h.requestFocus();
editText = this.f25241h;
resources = getResources();
i2 = R.string.enter_any_name;
} else if (this.f25238e.getText().toString().trim().length() == 0) {
this.f25238e.requestFocus();
if (c.k.a.g.n.a.f17280h.booleanValue()) {
editText2 = this.f25238e;
resources2 = getResources();
i3 = R.string.enter_act_code;
} else {
editText2 = this.f25238e;
resources2 = getResources();
i3 = R.string.enter_username_error;
}
editText2.setError(resources2.getString(i3));
return false;
} else if (!c.k.a.g.n.a.f17280h.booleanValue() && this.f25239f.getText().toString().trim().length() == 0) {
this.f25239f.requestFocus();
editText = this.f25239f;
resources = getResources();
i2 = R.string.enter_password_error;
} else if (!c.k.a.g.n.a.M.booleanValue() || this.f25240g.getText().toString().trim().length() != 0) {
return true;
} else {
this.f25240g.requestFocus();
editText = this.f25240g;
resources = getResources();
i2 = R.string.enter_server_url_error;
}
editText.setError(resources.getString(i2));
return false;
}
@SuppressLint({"ResourceType"})
public void I0() {
Button button;
int i2;
P0();
this.rl_connect_vpn.setOnClickListener(new b());
this.rl_bt_submit.setOnClickListener(new c());
this.rl_list_users.setOnClickListener(new d());
if (c.k.a.g.n.a.f17279g.booleanValue()) {
button = this.btn_free_trail;
i2 = 0;
} else {
button = this.btn_free_trail;
i2 = 8;
}
button.setVisibility(i2);
this.btn_free_trail.setOnClickListener(new e());
this.link_transform.setOnClickListener(new f());
}
public final String J0() {
return c.k.a.g.n.e.P(Calendar.getInstance().getTime().toString());
}
public final void L0() {
RelativeLayout relativeLayout;
RelativeLayout relativeLayout2;
ProgressDialog progressDialog;
String string;
try {
this.f25245l = this;
this.N = new MultiUserDBHandler(this.f25245l);
this.y = new LiveStreamDBHandler(this.f25245l);
if (c.k.a.g.n.a.f17281i.booleanValue()) {
this.link_transform.setVisibility(0);
}
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.link_transform.setNextFocusLeftId(R.id.rl_list_users);
} else {
this.link_transform.setNextFocusLeftId(R.id.rl_connect_vpn);
}
if (c.k.a.g.n.a.f17280h.booleanValue()) {
this.f25238e.setHint((CharSequence) null);
this.f25238e.setHint(BuildConfig.FLAVOR);
this.link_transform.setText(getResources().getString(R.string.with_act_code));
this.loginTV.setText(getResources().getString(R.string.enter_act_code));
this.rl_server_url.setVisibility(8);
this.password_full.setVisibility(8);
this.f25238e.setVisibility(8);
this.f25238e.setVisibility(0);
this.f25238e.setHint(getResources().getString(R.string.act_code));
this.tv_add_user.setText(getResources().getString(R.string.code_act));
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.rl_name.setVisibility(0);
} else {
this.rl_name.setVisibility(8);
}
if (c.k.a.g.n.a.f17275c.booleanValue() && c.k.a.g.n.a.f17276d.booleanValue()) {
relativeLayout2 = this.rl_list_users;
} else if (c.k.a.g.n.a.f17277e.booleanValue()) {
relativeLayout2 = this.rl_list_users;
} else {
relativeLayout = this.rl_list_users;
relativeLayout.setVisibility(8);
}
relativeLayout2.setVisibility(0);
} else {
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.f25238e.setHint((CharSequence) null);
this.f25238e.setHint(BuildConfig.FLAVOR);
this.link_transform.setText(getResources().getString(R.string.with_user_pass));
this.tv_add_user.setText(getResources().getString(R.string.add_user));
this.f25238e.setVisibility(8);
this.f25238e.setVisibility(0);
this.f25238e.setHint(getResources().getString(R.string.username));
this.password_full.setVisibility(0);
this.rl_name.setVisibility(0);
if (c.k.a.g.n.a.M.booleanValue()) {
this.rl_server_url.setVisibility(0);
} else {
this.rl_server_url.setVisibility(8);
}
if (c.k.a.g.n.a.f17275c.booleanValue() && c.k.a.g.n.a.f17276d.booleanValue()) {
relativeLayout2 = this.rl_list_users;
} else if (c.k.a.g.n.a.f17277e.booleanValue()) {
relativeLayout2 = this.rl_list_users;
} else {
relativeLayout = this.rl_list_users;
}
relativeLayout2.setVisibility(0);
} else {
this.f25238e.setHint((CharSequence) null);
this.f25238e.setHint(BuildConfig.FLAVOR);
this.link_transform.setText(getResources().getString(R.string.with_user_pass));
this.loginTV.setText(getResources().getString(R.string.credential_detail));
this.f25238e.setVisibility(8);
this.f25238e.setVisibility(0);
this.password_full.setVisibility(0);
this.f25238e.setHint(getResources().getString(R.string.username));
this.tv_add_user.setText(getResources().getString(R.string.submit));
this.rl_server_url.setVisibility(8);
this.rl_name.setVisibility(8);
relativeLayout = this.rl_list_users;
}
relativeLayout.setVisibility(8);
}
this.f25241h.setError(null);
this.f25238e.setError(null);
this.f25239f.setError(null);
this.O = new DatabaseHandler(this.f25245l);
if (this.f25245l != null) {
this.p = new ProgressDialog(this.f25245l);
String str = this.t0;
if (str != null && str.equalsIgnoreCase("login_perform")) {
progressDialog = this.p;
string = "Auto Login";
} else if (c.k.a.g.n.a.f17280h.booleanValue()) {
this.p.setMessage(BuildConfig.FLAVOR);
progressDialog = this.p;
string = getResources().getString(R.string.please_wait_act);
} else {
this.p.setMessage(BuildConfig.FLAVOR);
progressDialog = this.p;
string = getResources().getString(R.string.please_wait);
}
progressDialog.setMessage(string);
this.p.setCanceledOnTouchOutside(false);
this.p.setCancelable(false);
this.p.setProgressStyle(0);
}
this.f25246m = this.f25238e.getText().toString();
this.f25247n = this.f25239f.getText().toString();
this.f25244k = new c.k.a.h.c(this, this.f25245l);
this.q = getSharedPreferences("sharedPreference", 0);
this.t = getSharedPreferences("loginPrefs", 0);
this.u = getSharedPreferences("selected_language", 0);
SharedPreferences sharedPreferences = getSharedPreferences("loginPrefsserverurl", 0);
this.w = sharedPreferences;
this.x = sharedPreferences.edit();
SharedPreferences sharedPreferences2 = getSharedPreferences("upgradeDatePref", 0);
this.K = sharedPreferences2;
this.J = sharedPreferences2.edit();
this.v = this.s.edit();
this.r = this.q.edit();
SharedPreferences sharedPreferences3 = getSharedPreferences("multiDNS", 0);
this.Y = sharedPreferences3;
this.Z = sharedPreferences3.edit();
SharedPreferences sharedPreferences4 = getSharedPreferences("multiDNSValid", 0);
this.f0 = sharedPreferences4;
this.g0 = sharedPreferences4.edit();
this.h0 = getSharedPreferences("serverUrlDNS", 0);
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.f25238e.setText(BuildConfig.FLAVOR);
this.f25239f.setText(BuildConfig.FLAVOR);
}
M0();
} catch (Resources.NotFoundException e2) {
e2.printStackTrace();
}
}
public void M0() {
EditText editText;
try {
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.f25241h.requestFocus();
editText = this.f25241h;
} else {
this.f25238e.requestFocus();
editText = this.f25238e;
}
editText.requestFocusFromTouch();
b();
} catch (Exception unused) {
}
}
@Override
public void O(LoginCallback loginCallback, String str, ArrayList<String> arrayList) {
String str2;
Intent intent;
int i2;
if (loginCallback.b() == null || loginCallback.a() == null) {
if (arrayList != null && arrayList.size() > 0) {
try {
this.x.putString(c.k.a.g.n.a.t, arrayList.get(0).trim());
this.x.apply();
arrayList.remove(0);
this.f25244k.h(this.f25246m, this.f25247n, arrayList);
return;
} catch (IOException e2) {
e2.printStackTrace();
return;
}
}
b();
} else if (loginCallback.b() == null) {
b();
c(getResources().getString(R.string.invalid_server_response));
return;
} else if (loginCallback.b().c().intValue() == 1) {
if (loginCallback.b().i().equals("Active")) {
String j2 = loginCallback.b().j();
String h2 = loginCallback.b().h();
String b2 = loginCallback.a().b();
String f2 = loginCallback.a().f();
String e3 = loginCallback.b().e();
String f3 = loginCallback.b().f();
String a2 = loginCallback.b().a();
String d2 = loginCallback.b().d();
String g2 = loginCallback.b().g();
List<String> b3 = loginCallback.b().b();
String d3 = loginCallback.a().d();
String a3 = loginCallback.a().a();
String c2 = loginCallback.a().c();
String e4 = loginCallback.a().e();
if (b3.size() != 0) {
b3.get(0);
}
this.f25245l.getSharedPreferences("loginPrefsserverurl", 0).getString(c.k.a.g.n.a.t, BuildConfig.FLAVOR).toLowerCase();
SharedPreferences.Editor edit = getSharedPreferences("loginPrefs", 0).edit();
edit.putString("username", j2);
edit.putString("password", h2);
edit.putString("serverPort", b2);
edit.putString("serverUrl", f2);
edit.putString("expDate", e3);
edit.putString("isTrial", f3);
edit.putString("activeCons", a2);
edit.putString("createdAt", d2);
edit.putString("maxConnections", g2);
String str3 = c.k.a.g.n.a.t;
edit.putString(str3, f2 + ":" + b2);
edit.putString("serverProtocol", d3);
edit.putString("serverPortHttps", a3);
edit.putString("serverPortRtmp", c2);
edit.putString("serverTimeZone", e4);
edit.apply();
this.z = this.f25245l.getSharedPreferences("allowedFormat", 0);
this.A = this.f25245l.getSharedPreferences("timeFormat", 0);
this.B = this.f25245l.getSharedPreferences("epgchannelupdate", 0);
this.C = this.f25245l.getSharedPreferences("automation_channels", 0);
this.D = this.f25245l.getSharedPreferences("automation_epg", 0);
this.G = this.z.edit();
this.E = this.A.edit();
this.F = this.B.edit();
this.H = this.C.edit();
this.I = this.D.edit();
SharedPreferences sharedPreferences = this.f25245l.getSharedPreferences("auto_start", 0);
this.L = sharedPreferences;
SharedPreferences.Editor edit2 = sharedPreferences.edit();
this.M = edit2;
if (edit2 != null) {
edit2.putBoolean("full_epg", true);
this.M.apply();
}
if (this.C.getString("automation_channels", BuildConfig.FLAVOR).equals(BuildConfig.FLAVOR)) {
this.H.putString("automation_channels", "checked");
this.H.apply();
}
if (this.D.getString("automation_epg", BuildConfig.FLAVOR).equals(BuildConfig.FLAVOR)) {
this.I.putString("automation_epg", "checked");
this.I.apply();
}
c.k.a.g.n.a.K = Boolean.FALSE;
if (this.z.getString("allowedFormat", BuildConfig.FLAVOR).equals(BuildConfig.FLAVOR)) {
this.G.putString("allowedFormat", "ts");
this.G.apply();
}
if (this.A.getString("timeFormat", c.k.a.g.n.a.m0).equals(BuildConfig.FLAVOR)) {
this.E.putString("timeFormat", c.k.a.g.n.a.m0);
this.E.apply();
}
if (this.B.getString("epgchannelupdate", BuildConfig.FLAVOR).equals(BuildConfig.FLAVOR)) {
this.F.putString("epgchannelupdate", "all");
this.F.apply();
}
this.N = new MultiUserDBHandler(this.f25245l);
if (c.k.a.g.n.a.f17275c.booleanValue()) {
c.k.a.g.n.a.L = Boolean.TRUE;
SharepreferenceDBHandler.O("api", this.f25245l);
if (Boolean.valueOf(this.N.l(this.X, j2, h2, c.k.a.g.n.a.H, "api", f2)).booleanValue()) {
b();
i2 = 0;
Toast.makeText(this, getString(R.string.already_exist_with_name) + this.X + getString(R.string.username_with_cllon) + j2 + getString(R.string.and_portal) + c.k.a.g.n.a.H, 0).show();
} else {
this.N.d(this.X, j2, h2, c.k.a.g.n.a.H, f2, c.k.a.g.n.a.u0);
Toast.makeText(this, getResources().getString(R.string.user_added), 0).show();
i2 = 0;
}
SharedPreferences.Editor edit3 = this.f25245l.getSharedPreferences("loginprefsmultiuser", i2).edit();
edit3.putString("name", this.X);
edit3.putString("username", j2);
edit3.putString("password", h2);
edit3.putString(c.k.a.g.n.a.t, f2);
edit3.apply();
if (this.f25245l != null) {
MultiUserDBHandler multiUserDBHandler = new MultiUserDBHandler(this.f25245l);
this.N = multiUserDBHandler;
SharepreferenceDBHandler.g0(multiUserDBHandler.q(this.X, j2, h2, f2, "api", f2), this.f25245l);
}
b();
intent = new Intent(this, NewDashboardActivity.class);
intent.putExtra("from_login", "true");
} else {
if (!this.N.l(BuildConfig.FLAVOR, j2, h2, f2, "api", f2)) {
this.N.d(BuildConfig.FLAVOR, j2, h2, f2, f2, c.k.a.g.n.a.u0);
}
if (this.f25245l != null) {
MultiUserDBHandler multiUserDBHandler2 = new MultiUserDBHandler(this.f25245l);
this.N = multiUserDBHandler2;
SharepreferenceDBHandler.g0(multiUserDBHandler2.q(this.X, j2, h2, f2, "api", f2), this.f25245l);
}
b();
intent = new Intent(this, NewDashboardActivity.class);
}
startActivity(intent);
finish();
return;
}
b();
startActivity(new Intent(this, MultiUserActivity.class));
finish();
} else if (!str.equals("validateLogin")) {
return;
} else {
b();
str2 = getResources().getString(R.string.invalid_details);
}
Toast.makeText(this, str2, 0).show();
}
@Override
public void Z(String str, int i2, boolean z) {
String trim;
if (!z) {
b();
Toast.makeText(this, this.f25245l.getResources().getString(R.string.could_not_connect), 0).show();
} else if (i2 == 1) {
try {
JSONObject jSONObject = new JSONObject(str);
c.k.a.e.b.f16970a = jSONObject;
if (!jSONObject.getString("status").equalsIgnoreCase("true")) {
b();
Toast.makeText(this, this.f25245l.getResources().getString(R.string.status_suspend), 0).show();
return;
}
this.U = c.k.a.e.b.f16970a.getString("su");
this.V = c.k.a.e.b.f16970a.getString("ndd");
this.W = System.currentTimeMillis();
try {
if (c.k.a.g.n.a.f17280h.booleanValue()) {
this.f25246m = SharepreferenceDBHandler.B(this.f25245l);
trim = SharepreferenceDBHandler.C(this.f25245l);
} else {
this.f25246m = this.f25238e.getText().toString().trim();
trim = this.f25239f.getText().toString().trim();
}
this.f25247n = trim;
c.k.a.e.f.e(this, c.k.a.e.b.f16970a.optString("su"));
this.o0 = N0(c.k.a.e.b.f16970a.optString("su") + "*" + c.k.a.e.f.d(this) + "*" + c.k.a.e.b.f16971b);
if (!c.k.a.e.b.f16970a.getString("sc").equalsIgnoreCase(this.o0)) {
b();
Toast.makeText(this, this.f25245l.getResources().getString(R.string.could_not_connect), 0).show();
return;
}
this.x.putString(c.k.a.g.n.a.t, c.k.a.e.f.a(this));
this.x.apply();
this.r.putString(c.k.a.g.n.a.t, c.k.a.e.f.a(this));
this.r.putString("username", this.f25246m);
this.r.apply();
if (c.k.a.g.n.a.f17276d.booleanValue()) {
R0(this.U.toLowerCase());
} else {
this.f25244k.g(this.f25246m, this.f25247n);
}
} catch (Exception e2) {
e2.printStackTrace();
}
} catch (Exception e3) {
Log.e("Login check", e3.getMessage());
}
}
}
@SuppressLint({"ResourceType"})
public final void P0() {
EditText editText;
this.f25241h = new EditText(this);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
this.f25241h.setPaddingRelative(35, 0, 35, 0);
this.f25241h.setLayoutParams(layoutParams);
this.f25241h.setHint(getResources().getString(R.string.your_name));
this.f25241h.setHintTextColor(getResources().getColor(R.color.white));
this.f25241h.setHintTextColor(-1);
this.f25241h.setTextColor(-1);
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.f25241h.setNextFocusLeftId(R.id.rl_list_users);
} else {
this.f25241h.setNextFocusLeftId(R.id.rl_connect_vpn);
}
this.f25241h.setTextSize(22.0f);
this.f25241h.setId(101);
this.f25241h.setBackground(getResources().getDrawable(R.drawable.selector_login_fields1));
this.f25241h.setFocusable(true);
this.f25241h.setTypeface(Typeface.SANS_SERIF);
this.f25241h.setInputType(161);
this.rl_name.addView(this.f25241h);
this.f25238e = new EditText(this);
LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-1, -1);
this.f25238e.setPaddingRelative(35, 0, 35, 0);
this.f25238e.setLayoutParams(layoutParams2);
if (c.k.a.g.n.a.f17281i.booleanValue()) {
this.linearLayout.setGravity(16);
}
this.f25238e.setHint(getResources().getString(R.string.username));
this.f25238e.setHintTextColor(getResources().getColor(R.color.white));
this.f25238e.setHintTextColor(-1);
this.f25238e.setTextColor(-1);
this.f25238e.setTextSize(22.0f);
this.f25238e.setId(102);
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.f25238e.setNextFocusLeftId(R.id.rl_list_users);
} else {
this.f25238e.setNextFocusLeftId(R.id.rl_connect_vpn);
}
this.f25238e.setFocusable(true);
this.f25238e.setBackground(getResources().getDrawable(R.drawable.selector_login_fields1));
this.f25238e.setTypeface(Typeface.SANS_SERIF);
this.f25238e.setInputType(161);
this.rl_email.addView(this.f25238e);
this.f25239f = new EditText(this);
LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(-1, -1);
this.f25239f.setPaddingRelative(35, 0, 35, 0);
this.f25239f.setLayoutParams(layoutParams3);
this.f25239f.setHint(getResources().getString(R.string.password));
this.f25239f.setHintTextColor(getResources().getColor(R.color.white));
this.f25239f.setHintTextColor(-1);
this.f25239f.setTextColor(-1);
this.f25239f.setTextSize(22.0f);
this.f25239f.setId(103);
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.f25239f.setNextFocusLeftId(R.id.rl_list_users);
} else {
this.f25239f.setNextFocusLeftId(R.id.rl_connect_vpn);
}
this.f25239f.setBackground(getResources().getDrawable(R.drawable.selector_login_fields1));
this.f25239f.setFocusable(true);
this.f25239f.setTypeface(Typeface.SANS_SERIF);
this.f25239f.setInputType(129);
this.rl_password.addView(this.f25239f);
this.eyepass.setId(110);
this.eyepass.setFocusable(true);
this.f25239f.setNextFocusDownId(104);
this.f25239f.setNextFocusUpId(102);
this.eyepass.setNextFocusDownId(104);
this.eyepass.setNextFocusUpId(102);
this.eyepass.setBackground(getResources().getDrawable(R.drawable.selector_login_fields1));
this.eyepass.setOnClickListener(new g());
if (c.k.a.g.n.a.M.booleanValue()) {
this.f25240g = new EditText(this);
LinearLayout.LayoutParams layoutParams4 = new LinearLayout.LayoutParams(-1, -1);
this.f25240g.setPaddingRelative(35, 0, 35, 0);
this.f25240g.setLayoutParams(layoutParams4);
this.f25240g.setHint(getResources().getString(R.string.serverurl));
this.f25240g.setHintTextColor(getResources().getColor(R.color.white));
this.f25240g.setHintTextColor(-1);
this.f25240g.setTextSize(22.0f);
this.f25240g.setId(104);
this.f25240g.setBackground(getResources().getDrawable(R.drawable.selector_login_fields1));
this.f25240g.setFocusable(true);
this.f25240g.setTypeface(Typeface.SANS_SERIF);
this.f25240g.setInputType(161);
this.rl_server_url.addView(this.f25240g);
}
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.f25241h.requestFocus();
editText = this.f25241h;
} else {
this.f25238e.requestFocus();
editText = this.f25238e;
}
editText.requestFocusFromTouch();
}
public final void Q0() {
SharepreferenceDBHandler.O("api", this.f25245l);
startActivity(new Intent(this, MultiUserActivity.class));
overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
finish();
}
@Override
public void R(String str) {
b();
if (!str.equals(BuildConfig.FLAVOR)) {
c.k.a.g.n.e.j0(this.f25245l, str);
} else if (c.k.a.g.n.a.f17274b.booleanValue()) {
Toast.makeText(this, getResources().getString(R.string.invalid_detail), 0).show();
} else {
c.k.a.g.n.e.j0(this.f25245l, "Your Account is invalid or has expired !");
}
}
public final void R0(String str) {
if (str != null && !str.equals(BuildConfig.FLAVOR) && !str.isEmpty()) {
this.j0 = new ArrayList<>(Arrays.asList(str.split(",")));
}
ArrayList<String> arrayList = this.j0;
if (arrayList == null || arrayList.size() < 1) {
ArrayList<String> arrayList2 = this.j0;
if (arrayList2 == null || arrayList2.size() != 0) {
return;
}
b();
Toast.makeText(this, this.f25245l.getResources().getString(R.string.please_check_portal), 0).show();
return;
}
try {
this.x.putString(c.k.a.g.n.a.t, this.j0.get(0).trim());
this.x.commit();
this.j0.remove(0);
this.f25244k.h(this.f25246m, this.f25247n, this.j0);
} catch (IOException e2) {
e2.printStackTrace();
}
}
public final void S0() {
c.k.a.h.c cVar;
String str;
this.f25246m = this.f25238e.getText().toString().trim();
this.f25247n = this.f25239f.getText().toString().trim();
this.X = this.f25241h.getText().toString().trim();
this.x = this.w.edit();
if (c.k.a.g.n.a.f17280h.booleanValue() || !H0()) {
if (c.k.a.g.n.a.f17280h.booleanValue()) {
c.k.a.g.n.a.u0 = c.k.a.g.n.a.v0;
if (H0()) {
SharepreferenceDBHandler.K(this.f25245l, this.f25246m);
a();
this.X = this.f25241h.getText().toString().trim();
new j().execute(new Void[0]);
return;
}
return;
}
return;
}
c.k.a.g.n.a.u0 = c.k.a.g.n.a.w0;
a();
if (c.k.a.g.n.a.f17274b.booleanValue()) {
this.x.putString(c.k.a.g.n.a.t, "http://tivitectv.xyz:8080/");
this.x.apply();
this.r.putString(c.k.a.g.n.a.t, "http://tivitectv.xyz:8080/");
this.r.putString("username", this.f25246m);
this.r.apply();
if (c.k.a.g.n.a.f17276d.booleanValue()) {
R0("http://tivitectv.xyz:8080/");
this.v.putString("username", this.f25246m);
this.v.putString("password", this.f25247n);
this.v.putString("activationCode", BuildConfig.FLAVOR);
this.v.putString("loginWith", "loginWithDetails");
this.v.apply();
this.x.apply();
}
cVar = this.f25244k;
str = this.f25246m;
} else if (!c.k.a.g.n.a.M.booleanValue()) {
new j().execute(new Void[0]);
this.v.putString("username", this.f25246m);
this.v.putString("password", this.f25247n);
this.v.putString("activationCode", BuildConfig.FLAVOR);
this.v.putString("loginWith", "loginWithDetails");
this.v.apply();
this.x.apply();
} else {
String lowerCase = this.f25240g.getText().toString().trim().toLowerCase();
this.f25248o = lowerCase;
this.x.putString(c.k.a.g.n.a.t, lowerCase);
this.x.apply();
this.r.putString(c.k.a.g.n.a.t, this.f25248o);
this.r.apply();
cVar = this.f25244k;
str = this.f25246m;
}
cVar.g(str, this.f25247n);
this.v.putString("username", this.f25246m);
this.v.putString("password", this.f25247n);
this.v.putString("activationCode", BuildConfig.FLAVOR);
this.v.putString("loginWith", "loginWithDetails");
this.v.apply();
this.x.apply();
}
@Override
public void W(LoginCallback loginCallback, String str) {
int i2;
String string;
Context context;
String str2;
int i3;
if (this.f25245l != null) {
if (loginCallback == null || loginCallback.b() == null) {
b();
c(getResources().getString(R.string.invalid_server_response));
return;
}
if (loginCallback.b().c().intValue() == 1) {
String i4 = loginCallback.b().i();
if (i4.equals("Active")) {
String j2 = loginCallback.b().j();
String h2 = loginCallback.b().h();
String b2 = loginCallback.a().b();
String f2 = loginCallback.a().f();
String e2 = loginCallback.b().e();
String f3 = loginCallback.b().f();
String a2 = loginCallback.b().a();
String d2 = loginCallback.b().d();
String g2 = loginCallback.b().g();
List<String> b3 = loginCallback.b().b();
String d3 = loginCallback.a().d();
String a3 = loginCallback.a().a();
String c2 = loginCallback.a().c();
String e3 = loginCallback.a().e();
if (b3.size() != 0) {
b3.get(0);
}
this.f25245l.getSharedPreferences("loginPrefsserverurl", 0).getString(c.k.a.g.n.a.t, BuildConfig.FLAVOR).toLowerCase();
SharedPreferences.Editor edit = getSharedPreferences("loginPrefs", 0).edit();
edit.putString("username", j2);
edit.putString("password", h2);
edit.putString("serverPort", b2);
edit.putString("serverUrl", f2);
edit.putString("expDate", e2);
edit.putString("isTrial", f3);
edit.putString("activeCons", a2);
edit.putString("createdAt", d2);
edit.putString("maxConnections", g2);
edit.putString(c.k.a.g.n.a.t, f2 + ":" + b2);
edit.putString("serverProtocol", d3);
edit.putString("serverPortHttps", a3);
edit.putString("serverPortRtmp", c2);
edit.putString("serverTimeZone", e3);
edit.apply();
this.z = this.f25245l.getSharedPreferences("allowedFormat", 0);
this.A = this.f25245l.getSharedPreferences("timeFormat", 0);
this.B = this.f25245l.getSharedPreferences("epgchannelupdate", 0);
this.C = this.f25245l.getSharedPreferences("automation_channels", 0);
this.D = this.f25245l.getSharedPreferences("automation_epg", 0);
this.G = this.z.edit();
this.E = this.A.edit();
this.F = this.B.edit();
this.H = this.C.edit();
this.I = this.D.edit();
SharedPreferences sharedPreferences = this.f25245l.getSharedPreferences("auto_start", 0);
this.L = sharedPreferences;
SharedPreferences.Editor edit2 = sharedPreferences.edit();
this.M = edit2;
if (edit2 != null) {
edit2.putBoolean("full_epg", true);
this.M.apply();
}
if (this.C.getString("automation_channels", BuildConfig.FLAVOR).equals(BuildConfig.FLAVOR)) {
this.H.putString("automation_channels", "checked");
this.H.apply();
}
if (this.D.getString("automation_epg", BuildConfig.FLAVOR).equals(BuildConfig.FLAVOR)) {
this.I.putString("automation_epg", "checked");
this.I.apply();
}
c.k.a.g.n.a.K = Boolean.FALSE;
if (this.z.getString("allowedFormat", BuildConfig.FLAVOR).equals(BuildConfig.FLAVOR)) {
this.G.putString("allowedFormat", "ts");
this.G.apply();
}
if (this.A.getString("timeFormat", c.k.a.g.n.a.m0).equals(BuildConfig.FLAVOR)) {
this.E.putString("timeFormat", c.k.a.g.n.a.m0);
this.E.apply();
}
if (this.B.getString("epgchannelupdate", BuildConfig.FLAVOR).equals(BuildConfig.FLAVOR)) {
this.F.putString("epgchannelupdate", "all");
this.F.apply();
}
this.N = new MultiUserDBHandler(this.f25245l);
boolean booleanValue = c.k.a.g.n.a.M.booleanValue();
MultiUserDBHandler multiUserDBHandler = this.N;
if (booleanValue) {
try {
if (multiUserDBHandler.l(this.X, j2, h2, f2, "api", f2)) {
b();
context = this.f25245l;
str2 = getString(R.string.already_exist_with_name) + this.X + getString(R.string.username_with_cllon) + j2 + getString(R.string.and_portal) + c.k.a.g.n.a.H;
i3 = 0;
} else {
this.N.d(this.X, j2, h2, c.k.a.g.n.a.H, f2, c.k.a.g.n.a.u0);
context = this.f25245l;
str2 = getResources().getString(R.string.user_added);
i3 = 0;
}
Toast.makeText(context, str2, i3).show();
} catch (WindowManager.BadTokenException unused) {
}
SharedPreferences.Editor edit3 = this.f25245l.getSharedPreferences("loginprefsmultiuser", 0).edit();
edit3.putString("name", this.X);
edit3.putString("username", j2);
edit3.putString("password", h2);
edit3.putString(c.k.a.g.n.a.t, f2);
edit3.apply();
} else if (!multiUserDBHandler.l(BuildConfig.FLAVOR, j2, h2, f2, "api", f2)) {
this.N.d(BuildConfig.FLAVOR, j2, h2, c.k.a.g.n.a.H, f2, c.k.a.g.n.a.u0);
}
try {
if (Build.VERSION.SDK_INT != 25) {
Toast.makeText(this.f25245l, getResources().getString(R.string.logged_in), 0).show();
}
} catch (WindowManager.BadTokenException unused2) {
}
if (this.f25245l != null) {
SharepreferenceDBHandler.g0(this.N.q(this.X, j2, h2, f2, "api", f2), this.f25245l);
}
b();
startActivity(new Intent(this, NewDashboardActivity.class));
finish();
return;
}
b();
string = getResources().getString(R.string.invalid_status) + i4;
i2 = 0;
} else {
i2 = 0;
if (!str.equals("validateLogin")) {
return;
}
b();
string = getResources().getString(R.string.invalid_details);
}
Toast.makeText(this, string, i2).show();
}
}
@Override
public void a() {
ProgressDialog progressDialog = this.p;
if (progressDialog != null) {
progressDialog.show();
}
}
@Override
public void b() {
try {
ProgressDialog progressDialog = this.p;
if (progressDialog != null) {
progressDialog.dismiss();
}
} catch (Exception unused) {
}
}
@Override
public void b0(String str) {
b();
if (str != null) {
c.k.a.g.n.e.j0(this.f25245l, str);
} else {
c.k.a.g.n.e.j0(this.f25245l, "Your Activation code is not invalid");
}
}
@Override
public void c(String str) {
if (this.f25245l == null || str.isEmpty()) {
return;
}
c.k.a.g.n.e.j0(this.f25245l, str);
}
@Override
public void d(ActivationCallBack activationCallBack, String str) {
u0();
}
@Override
public void m(int i2) {
if (this.f25245l != null) {
b();
Toast.makeText(this, this.f25245l.getResources().getString(R.string.could_not_connect), 0).show();
}
}
@Override
public void onBackPressed() {
if (c.k.a.g.n.a.f17277e.booleanValue()) {
super.onBackPressed();
} else if (this.f25243j) {
super.onBackPressed();
} else {
this.f25243j = true;
try {
Toast.makeText(this, getResources().getString(R.string.press_back_to_exit), 0).show();
} catch (Exception unused) {
}
new Handler().postDelayed(new h(), 2000L);
}
}
@Override
@SuppressLint({"RtlHardcoded"})
public void onCreate(Bundle bundle) {
EditText editText;
int i2;
EditText editText2;
this.f25245l = this;
c.k.a.e.g.f16994b = new c.k.a.e.g(this);
super.onCreate(bundle);
c.k.a.i.d.a.a aVar = new c.k.a.i.d.a.a(this.f25245l);
this.v0 = aVar;
setContentView(aVar.z().equals(c.k.a.g.n.a.s0) ? R.layout.login_new_tv : R.layout.login_new);
ButterKnife.a(this);
if (!c.k.a.g.n.a.M.booleanValue()) {
E0();
s0();
K0();
t0();
}
this.s = getSharedPreferences("sharedprefremberme", 0);
this.eyepass.setVisibility(8);
I0();
L0();
G0();
String string = this.f25245l.getSharedPreferences("selected_language", 0).getString("selected_language", "English");
this.i0 = string;
if (string.equalsIgnoreCase("Arabic")) {
editText = this.f25239f;
i2 = 21;
} else {
editText = this.f25239f;
i2 = 19;
}
editText.setGravity(i2);
(c.k.a.g.n.a.f17276d.booleanValue() ? this.f25241h : this.f25238e).requestFocus();
RelativeLayout relativeLayout = this.rl_connect_vpn;
relativeLayout.setOnFocusChangeListener(new k(relativeLayout));
RelativeLayout relativeLayout2 = this.rl_list_users;
relativeLayout2.setOnFocusChangeListener(new k(relativeLayout2));
RelativeLayout relativeLayout3 = this.rl_bt_submit;
relativeLayout3.setOnFocusChangeListener(new k(relativeLayout3));
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.rl_bt_submit.setNextFocusLeftId(R.id.rl_list_users);
if (c.k.a.g.n.a.M.booleanValue() && (editText2 = this.f25240g) != null) {
editText2.setNextFocusLeftId(R.id.rl_list_users);
}
} else {
this.rl_bt_submit.setNextFocusLeftId(R.id.rl_connect_vpn);
}
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.rl_connect_vpn.setNextFocusRightId(R.id.rl_list_users);
} else {
this.rl_connect_vpn.setNextFocusRightId(R.id.rl_bt_submit);
}
this.rl_list_users.setNextFocusRightId(R.id.rl_bt_submit);
c.k.a.i.h.b.a(this.f25239f);
this.f25238e.setFilters(new InputFilter[]{f25237d});
String action = getIntent().getAction();
this.t0 = action;
if (action == null || !action.equalsIgnoreCase("login_perform")) {
return;
}
this.f25238e.setText(SharepreferenceDBHandler.B(this.f25245l));
this.f25239f.setText(SharepreferenceDBHandler.C(this.f25245l));
if (c.k.a.g.n.a.f17276d.booleanValue()) {
this.f25241h.setText("Free Trial");
}
this.rl_bt_submit.performClick();
}
@Override
public boolean onKeyUp(int i2, KeyEvent keyEvent) {
if (i2 != 19) {
return super.onKeyUp(i2, keyEvent);
}
return true;
}
@Override
public void onResume() {
super.onResume();
c.k.a.g.n.e.f(this.f25245l);
overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
}
@Override
public void s(ArrayList<String> arrayList, String str) {
if (arrayList == null || arrayList.size() <= 0) {
b();
if (c.k.a.g.n.a.f17274b.booleanValue()) {
Toast.makeText(this, getResources().getString(R.string.invalid_detail), 0).show();
return;
} else {
c.k.a.g.n.e.j0(this.f25245l, "Your Account is invalid or has expired !");
return;
}
}
try {
this.x.putString(c.k.a.g.n.a.t, arrayList.get(0).trim());
this.x.apply();
arrayList.remove(0);
this.f25244k.h(this.f25246m, this.f25247n, arrayList);
} catch (IOException e2) {
e2.printStackTrace();
}
}
public void s0() {
this.p0 = Build.VERSION.RELEASE + " " + Build.VERSION_CODES.class.getFields()[Build.VERSION.SDK_INT].getName();
}
public void t0() {
int nextInt = new Random().nextInt(8378600) + Constants.MAXIMUM_UPLOAD_PARTS;
this.s0 = nextInt;
c.k.a.e.b.f16971b = String.valueOf(nextInt);
}
public void u0() {
this.n0 = N0(c.k.a.e.f.c(this) + "*" + c.k.a.e.f.d(this) + "-" + this.f25246m + "-" + c.k.a.e.b.f16971b + "-" + this.q0 + "-unknown-" + K0() + "-" + this.p0);
ArrayList arrayList = new ArrayList();
c.k.a.e.g.f16993a = arrayList;
arrayList.add(c.k.a.e.g.a("m", "gu"));
c.k.a.e.g.f16993a.add(c.k.a.e.g.a("k", c.k.a.e.f.c(this)));
c.k.a.e.g.f16993a.add(c.k.a.e.g.a("sc", this.n0));
c.k.a.e.g.f16993a.add(c.k.a.e.g.a("u", this.f25246m));
c.k.a.e.g.f16993a.add(c.k.a.e.g.a("pw", "no_password"));
c.k.a.e.g.f16993a.add(c.k.a.e.g.a("r", c.k.a.e.b.f16971b));
c.k.a.e.g.f16993a.add(c.k.a.e.g.a("av", this.q0));
c.k.a.e.g.f16993a.add(c.k.a.e.g.a("dt", "unknown"));
c.k.a.e.g.f16993a.add(c.k.a.e.g.a("d", K0()));
c.k.a.e.g.f16993a.add(c.k.a.e.g.a("do", this.p0));
c.k.a.e.g.f16994b.b(this);
}
}