CCIPTV PRO v3.0.9.1版本的 MD5 值为:e78d4d980447be4a9f823314f45bbf03

以下内容为反编译后的 LoginActivity.java 源代码,内容仅作参考


package boxbr.apksrebrand.smarters.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.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 boxbr.apksrebrand.smarters.WHMCSClientapp.activities.FreeTrailActivity;
import boxbr.apksrebrand.smarters.model.callback.ActivationCallBack;
import boxbr.apksrebrand.smarters.model.callback.LoginCallback;
import boxbr.apksrebrand.smarters.vpn.activities.ProfileActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.facebook.internal.m;
import com.iptvsmarters.cciptv.R;
import f.j.a.i.p.l;
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 org.json.JSONObject;
import tv.danmaku.ijk.media.player.IjkMediaMeta;
public class LoginActivity extends d.a.k.c implements f.j.a.k.f.f, f.j.a.f.c<String>, f.j.a.k.f.a {
    public static InputFilter l0 = new a();
    public String A;
    public String B;
    public ProgressDialog C;
    public SharedPreferences D;
    public SharedPreferences.Editor E;
    public SharedPreferences F;
    public SharedPreferences.Editor G;
    public SharedPreferences H;
    public SharedPreferences.Editor I;
    public SharedPreferences J;
    public SharedPreferences K;
    public SharedPreferences L;
    public SharedPreferences M;
    public SharedPreferences N;
    public SharedPreferences.Editor O;
    public SharedPreferences.Editor P;
    public SharedPreferences.Editor Q;
    public SharedPreferences.Editor R;
    public SharedPreferences.Editor S;
    public SharedPreferences T;
    public SharedPreferences U;
    public SharedPreferences.Editor V;
    public f.j.a.i.p.f W;
    public String Y;
    public SharedPreferences Z;
    public SharedPreferences a0;
    @BindView
    public LinearLayout activityLogin;
    @BindView
    public Button btn_free_trail;
    public String d0;
    public String e0;
    @BindView
    public ImageView eyepass;
    public String f0;
    public String g0;
    public int h0;
    public String i0;
    @BindView
    public ImageView iv_connect_vpn;
    @BindView
    public ImageView iv_list_users;
    public f.j.a.j.a j0;
    public f.j.a.k.d.a.a k0;
    @BindView
    public LinearLayout linearLayout;
    @BindView
    public TextView link_transform;
    @BindView
    public TextView loginTV;
    @BindView
    public LinearLayout password_full;
    public EditText 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 EditText s;
    public EditText t;
    @BindView
    public TextView tv_add_user;
    @BindView
    public TextView tv_list_users;
    @BindView
    public TextView tv_vpn_con;
    public EditText u;
    public f.j.a.j.c x;
    @BindView
    public ImageView yourLogioTV;
    public String z;
    public int v = -1;
    public boolean w = false;
    public Context y = this;
    public String X = "";
    public String b0 = "";
    public ArrayList<String> c0 = new ArrayList<>();

    public 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 "";
                }
                i2++;
            }
            return null;
        }
    }

    public class b implements View.OnClickListener {
        public b() {
        }

        @Override
        public void onClick(View view) {
            f.j.a.h.i.a.c = true;
            l.e0("login", LoginActivity.this.y);
            Intent intent = new Intent(LoginActivity.this.y, 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.o1();
        }
    }

    public class d implements View.OnClickListener {
        public d() {
        }

        @Override
        public void onClick(View view) {
            LoginActivity.this.l1();
        }
    }

    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) {
            f.j.a.h.i.a.f10100j = f.j.a.h.i.a.f10100j.booleanValue() ? Boolean.FALSE : Boolean.TRUE;
            LoginActivity.this.g1();
        }
    }

    public class g implements View.OnClickListener {
        public g() {
        }

        @Override
        public void onClick(View view) {
            LoginActivity loginActivity = LoginActivity.this;
            int i2 = loginActivity.v;
            if (i2 != -1) {
                loginActivity.v = i2 - 1;
                loginActivity.s.setInputType(129);
                LoginActivity.this.eyepass.setImageResource(R.drawable.hidepassword);
                return;
            }
            loginActivity.s.setInputType(145);
            LoginActivity.this.eyepass.setImageResource(R.drawable.showpassword);
            LoginActivity.this.v++;
        }
    }

    public class h implements Runnable {
        public h() {
        }

        @Override
        public void run() {
            LoginActivity.this.w = false;
        }
    }

    public class i extends Dialog implements View.OnClickListener {
        public TextView b;
        public TextView c;
        public LinearLayout f834d;
        public LinearLayout f835e;

        public class a implements View.OnFocusChangeListener {
            public View b;

            public a(View view) {
                this.b = view;
            }

            @Override
            @SuppressLint({"ResourceType"})
            public void onFocusChange(View view, boolean z) {
                int i2;
                LinearLayout linearLayout;
                if (z) {
                    View view2 = this.b;
                    i2 = R.drawable.blue_btn_effect;
                    if (view2 == null || view2.getTag() == null || !this.b.getTag().equals("1")) {
                        View view3 = this.b;
                        if (view3 == null || view3.getTag() == null || !this.b.getTag().equals("2")) {
                            return;
                        }
                        linearLayout = i.this.f835e;
                    }
                    linearLayout = i.this.f834d;
                } else {
                    View view4 = this.b;
                    i2 = R.drawable.black_button_dark;
                    if (view4 == null || view4.getTag() == null || !this.b.getTag().equals("1")) {
                        View view5 = this.b;
                        if (view5 == null || view5.getTag() == null || !this.b.getTag().equals("2")) {
                            return;
                        }
                        linearLayout = i.this.f835e;
                    }
                    linearLayout = i.this.f834d;
                }
                linearLayout.setBackgroundResource(i2);
            }
        }

        public i(Activity activity) {
            super(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.o1();
                    }
                }
                dismiss();
            } catch (Exception unused) {
            }
        }

        @Override
        public void onCreate(Bundle bundle) {
            super.onCreate(bundle);
            setContentView(LoginActivity.this.k0.w().equals(f.j.a.h.i.a.i0) ? R.layout.custom_internet_not_working_layout_tv : R.layout.custom_internet_not_working_layout);
            this.b = (TextView) findViewById(R.id.btn_try_again);
            this.c = (TextView) findViewById(R.id.btn_close);
            this.f834d = (LinearLayout) findViewById(R.id.ll_yes_button_main_layout);
            this.f835e = (LinearLayout) findViewById(R.id.ll_no_button_main_layout);
            this.b.setOnClickListener(this);
            this.c.setOnClickListener(this);
            TextView textView = this.b;
            textView.setOnFocusChangeListener(new a(textView));
            TextView textView2 = this.c;
            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.y);
                iVar.setCancelable(false);
                iVar.show();
            } else if (!f.j.a.h.i.a.f10100j.booleanValue()) {
                LoginActivity.this.P0();
            } else {
                LoginActivity loginActivity2 = LoginActivity.this;
                loginActivity2.j0 = new f.j.a.j.a(loginActivity2, loginActivity2.y);
                LoginActivity.this.j0.a(LoginActivity.this.z);
            }
        }
    }

    public class k implements View.OnFocusChangeListener {
        public final View b;

        public k(View view) {
            this.b = view;
        }

        public final void a(boolean z) {
            if (z) {
                ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.b, "alpha", z ? 0.6f : 0.5f);
                ofFloat.setDuration(150L);
                ofFloat.start();
            }
        }

        public final void b(float f2) {
            ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.b, "scaleX", f2);
            ofFloat.setDuration(150L);
            ofFloat.start();
        }

        public final void c(float f2) {
            ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.b, "scaleY", f2);
            ofFloat.setDuration(150L);
            ofFloat.start();
        }

        @Override
        @SuppressLint({"ResourceType"})
        public void onFocusChange(View view, boolean z) {
            float f2;
            LoginActivity loginActivity;
            TextView textView;
            EditText editText;
            int length;
            if (!z) {
                if (z) {
                    return;
                }
                f2 = z ? 1.09f : 1.0f;
                b(f2);
                c(f2);
                a(z);
                View view2 = this.b;
                if (view2 == null || view2.getTag() == null || !this.b.getTag().equals("rl_list_users")) {
                    View view3 = this.b;
                    if (view3 == null || view3.getTag() == null || !this.b.getTag().equals("rl_connect_vpn")) {
                        View view4 = this.b;
                        if (view4 == null || view4.getTag() == null || !this.b.getTag().equals("rl_bt_submit")) {
                            return;
                        }
                        LoginActivity.this.rl_bt_submit.setBackgroundResource(R.drawable.shape_button1);
                        loginActivity = LoginActivity.this;
                        textView = loginActivity.tv_add_user;
                    } else {
                        LoginActivity.this.rl_connect_vpn.setBackgroundResource(R.drawable.shape_button1);
                        LoginActivity.this.iv_connect_vpn.setImageResource(R.drawable.login_icon1_focused);
                        loginActivity = LoginActivity.this;
                        textView = loginActivity.tv_vpn_con;
                    }
                } else {
                    LoginActivity.this.rl_list_users.setBackgroundResource(R.drawable.shape_button1);
                    LoginActivity.this.iv_list_users.setImageResource(R.drawable.login_icon2_focused);
                    loginActivity = LoginActivity.this;
                    textView = loginActivity.tv_list_users;
                }
                textView.setTextColor(loginActivity.y.getResources().getColor(R.color.white));
                return;
            }
            f2 = z ? 1.11f : 1.0f;
            try {
                Log.e("id is", "" + this.b.getTag());
                if (this.b.getTag().equals("1")) {
                    editText = LoginActivity.this.r;
                    length = LoginActivity.this.r.length();
                } else if (this.b.getTag().equals("2")) {
                    editText = LoginActivity.this.s;
                    length = LoginActivity.this.s.length();
                } else if (!this.b.getTag().equals("3")) {
                    if (this.b.getTag().equals("rl_list_users")) {
                        LoginActivity.this.rl_list_users.setBackgroundResource(R.drawable.shape_button_focused1);
                        LoginActivity.this.iv_list_users.setImageResource(R.drawable.login_icon2_focused);
                        LoginActivity.this.tv_list_users.setTextColor(LoginActivity.this.y.getResources().getColor(R.color.white));
                        b(f2);
                    } else if (!this.b.getTag().equals("rl_connect_vpn")) {
                        if (this.b.getTag().equals("rl_bt_submit")) {
                            LoginActivity.this.rl_bt_submit.setBackgroundResource(R.drawable.shape_button_focused1);
                            LoginActivity.this.tv_add_user.setTextColor(LoginActivity.this.y.getResources().getColor(R.color.white));
                            return;
                        }
                        return;
                    } else {
                        LoginActivity.this.rl_connect_vpn.setBackgroundResource(R.drawable.shape_button_focused1);
                        LoginActivity.this.iv_connect_vpn.setImageResource(R.drawable.login_icon1_focused);
                        LoginActivity.this.tv_vpn_con.setTextColor(LoginActivity.this.y.getResources().getColor(R.color.white));
                        b(f2);
                    }
                    c(f2);
                    return;
                } else {
                    editText = LoginActivity.this.t;
                    length = LoginActivity.this.t.length();
                }
                editText.setSelection(length);
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }

    public LoginActivity() {
        e1();
        new SimpleDateFormat("dd/MM/yyyy");
        String str = Build.MODEL;
    }

    public static String a1(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 f1() {
        String str = Build.MANUFACTURER;
        String str2 = Build.MODEL;
        if (str2.startsWith(str)) {
            return a1(str2);
        }
        return a1(str) + " " + str2;
    }

    public static String i1(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 "";
        }
    }

    @Override
    public void H(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.I.putString(f.j.a.h.i.a.f10105o, arrayList.get(0).trim());
                    this.I.apply();
                    arrayList.remove(0);
                    this.x.h(this.z, this.A, arrayList);
                    return;
                } catch (IOException e2) {
                    e2.printStackTrace();
                    return;
                }
            }
            b();
        } else if (loginCallback == null || loginCallback.b() == null) {
            b();
            e(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.y.getSharedPreferences("loginPrefsserverurl", 0).getString(f.j.a.h.i.a.f10105o, "").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 = f.j.a.h.i.a.f10105o;
                edit.putString(str3, f2 + ":" + b2);
                edit.putString("serverProtocol", d3);
                edit.putString("serverPortHttps", a3);
                edit.putString("serverPortRtmp", c2);
                edit.putString("serverTimeZone", e4);
                edit.apply();
                this.J = this.y.getSharedPreferences("allowedFormat", 0);
                this.K = this.y.getSharedPreferences("timeFormat", 0);
                this.L = this.y.getSharedPreferences("epgchannelupdate", 0);
                this.M = this.y.getSharedPreferences("automation_channels", 0);
                this.N = this.y.getSharedPreferences("automation_epg", 0);
                this.Q = this.J.edit();
                this.O = this.K.edit();
                this.P = this.L.edit();
                this.R = this.M.edit();
                this.S = this.N.edit();
                SharedPreferences sharedPreferences = this.y.getSharedPreferences("auto_start", 0);
                this.U = sharedPreferences;
                SharedPreferences.Editor edit2 = sharedPreferences.edit();
                this.V = edit2;
                if (edit2 != null) {
                    edit2.putBoolean("full_epg", true);
                    this.V.apply();
                }
                if (this.M.getString("automation_channels", "").equals("")) {
                    this.R.putString("automation_channels", "checked");
                    this.R.apply();
                }
                if (this.N.getString("automation_epg", "").equals("")) {
                    this.S.putString("automation_epg", "checked");
                    this.S.apply();
                }
                f.j.a.h.i.a.B = Boolean.FALSE;
                if (this.J.getString("allowedFormat", "").equals("")) {
                    this.Q.putString("allowedFormat", "ts");
                    this.Q.apply();
                }
                if (this.K.getString("timeFormat", f.j.a.h.i.a.d0).equals("")) {
                    this.O.putString("timeFormat", f.j.a.h.i.a.d0);
                    this.O.apply();
                }
                if (this.L.getString("epgchannelupdate", "").equals("")) {
                    this.P.putString("epgchannelupdate", "all");
                    this.P.apply();
                }
                this.W = new f.j.a.i.p.f(this.y);
                if (f.j.a.h.i.a.f10095e.booleanValue()) {
                    f.j.a.h.i.a.C = Boolean.TRUE;
                    l.N("api", this.y);
                    if (Boolean.valueOf(this.W.p(this.Y, j2, h2, f.j.a.h.i.a.z, "api", f2)).booleanValue()) {
                        b();
                        i2 = 0;
                        Toast.makeText(this, getString(R.string.already_exist_with_name) + this.Y + getString(R.string.username_with_cllon) + j2 + getString(R.string.and_portal) + f.j.a.h.i.a.z, 0).show();
                    } else {
                        this.W.a(this.Y, j2, h2, f.j.a.h.i.a.z, f2);
                        Toast.makeText(this, getResources().getString(R.string.user_added), 0).show();
                        i2 = 0;
                    }
                    SharedPreferences.Editor edit3 = this.y.getSharedPreferences("loginprefsmultiuser", i2).edit();
                    edit3.putString("name", this.Y);
                    edit3.putString("username", j2);
                    edit3.putString("password", h2);
                    edit3.putString(f.j.a.h.i.a.f10105o, f2);
                    edit3.apply();
                    if (this.y != null) {
                        f.j.a.i.p.f fVar = new f.j.a.i.p.f(this.y);
                        this.W = fVar;
                        l.f0(fVar.D(this.Y, j2, h2, f2, "api", f2), this.y);
                    }
                    b();
                    intent = new Intent(this, NewDashboardActivity.class);
                    intent.putExtra("from_login", "true");
                } else {
                    if (!this.W.p("", j2, h2, f2, "api", f2)) {
                        this.W.a("", j2, h2, f2, f2);
                    }
                    if (this.y != null) {
                        f.j.a.i.p.f fVar2 = new f.j.a.i.p.f(this.y);
                        this.W = fVar2;
                        l.f0(fVar2.D(this.Y, j2, h2, f2, "api", f2), this.y);
                    }
                    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 M(String str) {
        ProgressDialog progressDialog = this.C;
        if (progressDialog != null) {
            progressDialog.dismiss();
            Toast.makeText(this, this.y.getResources().getString(R.string.invalid_server_url), 0).show();
        }
    }

    public void N0() {
        this.f0 = Build.VERSION.RELEASE + " " + Build.VERSION_CODES.class.getFields()[Build.VERSION.SDK_INT].getName();
    }

    public void O0() {
        int nextInt = new Random().nextInt(8378600) + 10000;
        this.h0 = nextInt;
        f.j.a.f.b.b = String.valueOf(nextInt);
    }

    @Override
    public void P(ArrayList<String> arrayList, String str) {
        if (arrayList == null || arrayList.size() <= 0) {
            b();
            if (f.j.a.h.i.a.f10094d.booleanValue()) {
                Toast.makeText(this, getResources().getString(R.string.invalid_detail), 0).show();
                return;
            } else {
                f.j.a.h.i.e.j0(this.y, "Your Account is invalid or has expired !");
                return;
            }
        }
        try {
            this.I.putString(f.j.a.h.i.a.f10105o, arrayList.get(0).trim());
            this.I.apply();
            arrayList.remove(0);
            this.x.h(this.z, this.A, arrayList);
        } catch (IOException e2) {
            e2.printStackTrace();
        }
    }

    public void P0() {
        this.d0 = i1(f.j.a.f.f.c(this) + "*" + f.j.a.f.f.d(this) + "-" + this.z + "-" + f.j.a.f.b.b + "-" + this.g0 + "-unknown-" + f1() + "-" + this.f0);
        ArrayList arrayList = new ArrayList();
        f.j.a.f.g.b = arrayList;
        arrayList.add(f.j.a.f.g.a(m.a, "gu"));
        f.j.a.f.g.b.add(f.j.a.f.g.a("k", f.j.a.f.f.c(this)));
        f.j.a.f.g.b.add(f.j.a.f.g.a("sc", this.d0));
        f.j.a.f.g.b.add(f.j.a.f.g.a("u", this.z));
        f.j.a.f.g.b.add(f.j.a.f.g.a("pw", "no_password"));
        f.j.a.f.g.b.add(f.j.a.f.g.a("r", f.j.a.f.b.b));
        f.j.a.f.g.b.add(f.j.a.f.g.a("av", this.g0));
        f.j.a.f.g.b.add(f.j.a.f.g.a("dt", IjkMediaMeta.IJKM_VAL_TYPE__UNKNOWN));
        f.j.a.f.g.b.add(f.j.a.f.g.a("d", f1()));
        f.j.a.f.g.b.add(f.j.a.f.g.a("do", this.f0));
        f.j.a.f.g.c.b(this);
    }

    @Override
    public void U(LoginCallback loginCallback, String str) {
        int i2;
        String string;
        int i3;
        if (this.y != null) {
            if (loginCallback == null || loginCallback.b() == null) {
                b();
                e(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.y.getSharedPreferences("loginPrefsserverurl", 0).getString(f.j.a.h.i.a.f10105o, "").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(f.j.a.h.i.a.f10105o, f2 + ":" + b2);
                    edit.putString("serverProtocol", d3);
                    edit.putString("serverPortHttps", a3);
                    edit.putString("serverPortRtmp", c2);
                    edit.putString("serverTimeZone", e3);
                    edit.apply();
                    this.J = this.y.getSharedPreferences("allowedFormat", 0);
                    this.K = this.y.getSharedPreferences("timeFormat", 0);
                    this.L = this.y.getSharedPreferences("epgchannelupdate", 0);
                    this.M = this.y.getSharedPreferences("automation_channels", 0);
                    this.N = this.y.getSharedPreferences("automation_epg", 0);
                    this.Q = this.J.edit();
                    this.O = this.K.edit();
                    this.P = this.L.edit();
                    this.R = this.M.edit();
                    this.S = this.N.edit();
                    SharedPreferences sharedPreferences = this.y.getSharedPreferences("auto_start", 0);
                    this.U = sharedPreferences;
                    SharedPreferences.Editor edit2 = sharedPreferences.edit();
                    this.V = edit2;
                    if (edit2 != null) {
                        edit2.putBoolean("full_epg", true);
                        this.V.apply();
                    }
                    if (this.M.getString("automation_channels", "").equals("")) {
                        this.R.putString("automation_channels", "checked");
                        this.R.apply();
                    }
                    if (this.N.getString("automation_epg", "").equals("")) {
                        this.S.putString("automation_epg", "checked");
                        this.S.apply();
                    }
                    f.j.a.h.i.a.B = Boolean.FALSE;
                    if (this.J.getString("allowedFormat", "").equals("")) {
                        this.Q.putString("allowedFormat", "ts");
                        this.Q.apply();
                    }
                    if (this.K.getString("timeFormat", f.j.a.h.i.a.d0).equals("")) {
                        this.O.putString("timeFormat", f.j.a.h.i.a.d0);
                        this.O.apply();
                    }
                    if (this.L.getString("epgchannelupdate", "").equals("")) {
                        this.P.putString("epgchannelupdate", "all");
                        this.P.apply();
                    }
                    this.W = new f.j.a.i.p.f(this.y);
                    boolean booleanValue = f.j.a.h.i.a.D.booleanValue();
                    f.j.a.i.p.f fVar = this.W;
                    if (booleanValue) {
                        if (fVar.p(this.Y, j2, h2, f2, "api", f2)) {
                            b();
                            i3 = 0;
                            Toast.makeText(this, getString(R.string.already_exist_with_name) + this.Y + getString(R.string.username_with_cllon) + j2 + getString(R.string.and_portal) + f.j.a.h.i.a.z, 0).show();
                        } else {
                            this.W.a(this.Y, j2, h2, f.j.a.h.i.a.z, f2);
                            Toast.makeText(this, getResources().getString(R.string.user_added), 0).show();
                            i3 = 0;
                        }
                        SharedPreferences.Editor edit3 = this.y.getSharedPreferences("loginprefsmultiuser", i3).edit();
                        edit3.putString("name", this.Y);
                        edit3.putString("username", j2);
                        edit3.putString("password", h2);
                        edit3.putString(f.j.a.h.i.a.f10105o, f2);
                        edit3.apply();
                    } else if (!fVar.p("", j2, h2, f2, "api", f2)) {
                        this.W.a("", j2, h2, f.j.a.h.i.a.z, f2);
                    }
                    if (this.y != null) {
                        l.f0(this.W.D(this.Y, j2, h2, f2, "api", f2), this.y);
                    }
                    Toast.makeText(this, getResources().getString(R.string.logged_in), 0).show();
                    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 Z(ActivationCallBack activationCallBack, String str) {
        P0();
    }

    public void Z0() {
        try {
            this.g0 = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
        } catch (PackageManager.NameNotFoundException e2) {
            e2.printStackTrace();
        }
    }

    @Override
    public void a() {
        ProgressDialog progressDialog = this.C;
        if (progressDialog != null) {
            progressDialog.show();
        }
    }

    @Override
    public void b() {
        try {
            if (this.C != null) {
                this.C.dismiss();
            }
        } catch (Exception unused) {
        }
    }

    public final void b1() {
        Window window = getWindow();
        if (Build.VERSION.SDK_INT >= 19) {
            window.clearFlags(67108864);
        }
        if (Build.VERSION.SDK_INT >= 21) {
            window.addFlags(Integer.MIN_VALUE);
        }
        if (Build.VERSION.SDK_INT >= 21) {
            window.setStatusBarColor(d.h.i.b.d(this, R.color.colorPrimaryDark));
        }
    }

    @Override
    public void c0(String str) {
        b();
        if (!str.equals("")) {
            f.j.a.h.i.e.j0(this.y, str);
        } else if (f.j.a.h.i.a.f10094d.booleanValue()) {
            Toast.makeText(this, getResources().getString(R.string.invalid_detail), 0).show();
        } else {
            f.j.a.h.i.e.j0(this.y, "Your Account is invalid or has expired !");
        }
    }

    public boolean c1() {
        EditText editText;
        Resources resources;
        int i2;
        EditText editText2;
        Resources resources2;
        int i3;
        if (f.j.a.h.i.a.f10096f.booleanValue() && this.u.getText().toString().trim().length() == 0) {
            this.u.requestFocus();
            editText = this.u;
            resources = getResources();
            i2 = R.string.enter_any_name;
        } else if (this.r.getText().toString().trim().length() == 0) {
            this.r.requestFocus();
            if (f.j.a.h.i.a.f10100j.booleanValue()) {
                editText2 = this.r;
                resources2 = getResources();
                i3 = R.string.enter_act_code;
            } else {
                editText2 = this.r;
                resources2 = getResources();
                i3 = R.string.enter_username_error;
            }
            editText2.setError(resources2.getString(i3));
            return false;
        } else if (!f.j.a.h.i.a.f10100j.booleanValue() && this.s.getText().toString().trim().length() == 0) {
            this.s.requestFocus();
            editText = this.s;
            resources = getResources();
            i2 = R.string.enter_password_error;
        } else if (!f.j.a.h.i.a.D.booleanValue() || this.t.getText().toString().trim().length() != 0) {
            return true;
        } else {
            this.t.requestFocus();
            editText = this.t;
            resources = getResources();
            i2 = R.string.enter_server_url_error;
        }
        editText.setError(resources.getString(i2));
        return false;
    }

    @SuppressLint({"ResourceType"})
    public void d1() {
        Button button;
        int i2;
        k1();
        this.rl_connect_vpn.setOnClickListener(new b());
        this.rl_bt_submit.setOnClickListener(new c());
        this.rl_list_users.setOnClickListener(new d());
        if (f.j.a.h.i.a.f10099i.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());
    }

    @Override
    public void e(String str) {
        if (this.y == null || str.isEmpty()) {
            return;
        }
        f.j.a.h.i.e.j0(this.y, str);
    }

    public final String e1() {
        return f.j.a.h.i.e.P(Calendar.getInstance().getTime().toString());
    }

    public final void g1() {
        RelativeLayout relativeLayout;
        RelativeLayout relativeLayout2;
        ProgressDialog progressDialog;
        String string;
        try {
            this.y = this;
            this.W = new f.j.a.i.p.f(this.y);
            new f.j.a.i.p.e(this.y);
            if (f.j.a.h.i.a.f10101k.booleanValue()) {
                this.link_transform.setVisibility(0);
            }
            if (f.j.a.h.i.a.f10096f.booleanValue()) {
                this.link_transform.setNextFocusLeftId(R.id.rl_list_users);
            } else {
                this.link_transform.setNextFocusLeftId(R.id.rl_connect_vpn);
            }
            if (f.j.a.h.i.a.f10100j.booleanValue()) {
                this.r.setHint((CharSequence) null);
                this.r.setHint("");
                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.r.setVisibility(8);
                this.r.setVisibility(0);
                this.r.setHint(getResources().getString(R.string.act_code));
                this.tv_add_user.setText(getResources().getString(R.string.code_act));
                if (f.j.a.h.i.a.f10096f.booleanValue()) {
                    this.rl_name.setVisibility(0);
                } else {
                    this.rl_name.setVisibility(8);
                }
                if (f.j.a.h.i.a.f10095e.booleanValue() && f.j.a.h.i.a.f10096f.booleanValue()) {
                    relativeLayout2 = this.rl_list_users;
                } else if (f.j.a.h.i.a.f10097g.booleanValue()) {
                    relativeLayout2 = this.rl_list_users;
                } else {
                    relativeLayout = this.rl_list_users;
                    relativeLayout.setVisibility(8);
                }
                relativeLayout2.setVisibility(0);
            } else {
                if (f.j.a.h.i.a.f10096f.booleanValue()) {
                    this.r.setHint((CharSequence) null);
                    this.r.setHint("");
                    this.link_transform.setText(getResources().getString(R.string.with_user_pass));
                    this.tv_add_user.setText(getResources().getString(R.string.add_user));
                    this.r.setVisibility(8);
                    this.r.setVisibility(0);
                    this.r.setHint(getResources().getString(R.string.username));
                    this.password_full.setVisibility(0);
                    this.rl_name.setVisibility(8);
                    if (f.j.a.h.i.a.D.booleanValue()) {
                        this.rl_server_url.setVisibility(0);
                    } else {
                        this.rl_server_url.setVisibility(8);
                    }
                    if (f.j.a.h.i.a.f10095e.booleanValue() && f.j.a.h.i.a.f10096f.booleanValue()) {
                        relativeLayout2 = this.rl_list_users;
                    } else if (f.j.a.h.i.a.f10097g.booleanValue()) {
                        relativeLayout2 = this.rl_list_users;
                    } else {
                        relativeLayout = this.rl_list_users;
                    }
                    relativeLayout2.setVisibility(0);
                } else {
                    this.r.setHint((CharSequence) null);
                    this.r.setHint("");
                    this.link_transform.setText(getResources().getString(R.string.with_user_pass));
                    this.loginTV.setText(getResources().getString(R.string.credential_detail));
                    this.r.setVisibility(8);
                    this.r.setVisibility(0);
                    this.password_full.setVisibility(0);
                    this.r.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.u.setError(null);
            this.r.setError(null);
            this.s.setError(null);
            new f.j.a.i.p.a(this.y);
            if (this.y != null) {
                this.C = new ProgressDialog(this.y);
                if (this.i0 != null && this.i0.equalsIgnoreCase("login_perform")) {
                    progressDialog = this.C;
                    string = "Auto Login";
                } else if (f.j.a.h.i.a.f10100j.booleanValue()) {
                    this.C.setMessage("");
                    progressDialog = this.C;
                    string = getResources().getString(R.string.please_wait_act);
                } else {
                    this.C.setMessage("");
                    progressDialog = this.C;
                    string = getResources().getString(R.string.please_wait);
                }
                progressDialog.setMessage(string);
                this.C.setCanceledOnTouchOutside(false);
                this.C.setCancelable(false);
                this.C.setProgressStyle(0);
            }
            this.z = this.r.getText().toString();
            this.A = this.s.getText().toString();
            this.x = new f.j.a.j.c(this, this.y);
            this.D = getSharedPreferences("sharedPreference", 0);
            getSharedPreferences("loginPrefs", 0);
            getSharedPreferences("selected_language", 0);
            SharedPreferences sharedPreferences = getSharedPreferences("loginPrefsserverurl", 0);
            this.H = sharedPreferences;
            this.I = sharedPreferences.edit();
            SharedPreferences sharedPreferences2 = getSharedPreferences("upgradeDatePref", 0);
            this.T = sharedPreferences2;
            sharedPreferences2.edit();
            this.G = this.F.edit();
            this.E = this.D.edit();
            SharedPreferences sharedPreferences3 = getSharedPreferences("multiDNS", 0);
            this.Z = sharedPreferences3;
            sharedPreferences3.edit();
            SharedPreferences sharedPreferences4 = getSharedPreferences("multiDNSValid", 0);
            this.a0 = sharedPreferences4;
            sharedPreferences4.edit();
            getSharedPreferences("serverUrlDNS", 0);
            if (f.j.a.h.i.a.f10096f.booleanValue()) {
                this.r.setText("");
                this.s.setText("");
            }
            h1();
        } catch (Resources.NotFoundException e2) {
            e2.printStackTrace();
        }
    }

    public void h1() {
        EditText editText;
        try {
            if (f.j.a.h.i.a.f10096f.booleanValue()) {
                this.u.requestFocus();
                editText = this.u;
            } else {
                this.r.requestFocus();
                editText = this.r;
            }
            editText.requestFocusFromTouch();
            b();
        } catch (Exception unused) {
        }
    }

    @Override
    public void j0(String str) {
        b();
        if (str != null) {
            f.j.a.h.i.e.j0(this.y, str);
        } else {
            f.j.a.h.i.e.j0(this.y, "Your Activation code is not invalid");
        }
    }

    @Override
    public void h0(String str, int i2, boolean z) {
        String trim;
        if (!z) {
            b();
            Toast.makeText(this, this.y.getResources().getString(R.string.could_not_connect), 0).show();
        } else if (i2 == 1) {
            try {
                JSONObject jSONObject = new JSONObject(str);
                f.j.a.f.b.a = jSONObject;
                if (!jSONObject.getString("status").equalsIgnoreCase("true")) {
                    b();
                    Toast.makeText(this, this.y.getResources().getString(R.string.status_suspend), 0).show();
                    return;
                }
                this.X = f.j.a.f.b.a.getString("su");
                f.j.a.f.b.a.getString("ndd");
                System.currentTimeMillis();
                try {
                    if (f.j.a.h.i.a.f10100j.booleanValue()) {
                        this.z = l.A(this.y);
                        trim = l.B(this.y);
                    } else {
                        this.z = this.r.getText().toString().trim();
                        trim = this.s.getText().toString().trim();
                    }
                    this.A = trim;
                    f.j.a.f.f.e(this, f.j.a.f.b.a.optString("su"));
                    this.e0 = i1(f.j.a.f.b.a.optString("su") + "*" + f.j.a.f.f.d(this) + "*" + f.j.a.f.b.b);
                    f.j.a.f.b.a.getString("sc").equalsIgnoreCase(this.e0);
                    this.I.putString(f.j.a.h.i.a.f10105o, f.j.a.f.f.a(this));
                    this.I.apply();
                    this.E.putString(f.j.a.h.i.a.f10105o, f.j.a.f.f.a(this));
                    this.E.putString("username", this.z);
                    this.E.apply();
                    m1(f.j.a.h.i.a.f10096f.booleanValue() ? this.X.toLowerCase() : this.X.toLowerCase());
                } catch (Exception e2) {
                    e2.printStackTrace();
                }
            } catch (Exception e3) {
                Log.e("Login check", e3.getMessage());
            }
        }
    }

    @SuppressLint({"ResourceType"})
    public final void k1() {
        EditText editText;
        this.u = new EditText(this);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
        this.u.setPaddingRelative(35, 0, 35, 0);
        this.u.setLayoutParams(layoutParams);
        this.u.setText(getResources().getString(R.string.app_name));
        this.u.setHintTextColor(getResources().getColor(R.color.white));
        this.u.setTextColor(-1);
        if (f.j.a.h.i.a.f10096f.booleanValue()) {
            this.u.setNextFocusLeftId(R.id.rl_list_users);
        } else {
            this.u.setNextFocusLeftId(R.id.rl_connect_vpn);
        }
        this.u.setTextSize(22.0f);
        this.u.setId(101);
        this.u.setBackground(getResources().getDrawable(R.drawable.selector_line_login_fieldss));
        this.u.setFocusable(true);
        this.u.setTypeface(Typeface.SANS_SERIF);
        this.u.setInputType(161);
        this.rl_name.addView(this.u);
        this.r = new EditText(this);
        LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-1, -1);
        this.r.setPaddingRelative(35, 0, 35, 0);
        this.r.setLayoutParams(layoutParams2);
        if (f.j.a.h.i.a.f10101k.booleanValue()) {
            this.linearLayout.setGravity(16);
        }
        this.r.setHint(getResources().getString(R.string.username));
        this.r.setHintTextColor(getResources().getColor(R.color.white));
        this.r.setTextColor(-1);
        this.r.setTextSize(22.0f);
        this.r.setId(102);
        if (f.j.a.h.i.a.f10096f.booleanValue()) {
            this.r.setNextFocusLeftId(R.id.rl_list_users);
        } else {
            this.r.setNextFocusLeftId(R.id.rl_connect_vpn);
        }
        this.r.setFocusable(true);
        this.r.setBackground(getResources().getDrawable(R.drawable.selector_line_login_fieldss));
        this.r.setTypeface(Typeface.SANS_SERIF);
        this.r.setInputType(161);
        this.rl_email.addView(this.r);
        this.s = new EditText(this);
        LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(-1, -1);
        this.s.setPaddingRelative(35, 0, 35, 0);
        this.s.setLayoutParams(layoutParams3);
        this.s.setHint(getResources().getString(R.string.password));
        this.s.setHintTextColor(getResources().getColor(R.color.white));
        this.s.setTextColor(-1);
        this.s.setTextSize(22.0f);
        this.s.setId(103);
        if (f.j.a.h.i.a.f10096f.booleanValue()) {
            this.s.setNextFocusLeftId(R.id.rl_list_users);
        } else {
            this.s.setNextFocusLeftId(R.id.rl_connect_vpn);
        }
        this.s.setBackground(getResources().getDrawable(R.drawable.selector_line_login_fieldss));
        this.s.setFocusable(true);
        this.s.setTypeface(Typeface.SANS_SERIF);
        this.s.setInputType(129);
        this.rl_password.addView(this.s);
        this.eyepass.setId(110);
        this.eyepass.setFocusable(true);
        this.s.setNextFocusDownId(104);
        this.s.setNextFocusUpId(102);
        this.eyepass.setNextFocusDownId(104);
        this.eyepass.setNextFocusUpId(102);
        this.eyepass.setBackground(getResources().getDrawable(R.drawable.selector_line_login_fieldss));
        this.eyepass.setOnClickListener(new g());
        if (f.j.a.h.i.a.D.booleanValue()) {
            this.t = new EditText(this);
            LinearLayout.LayoutParams layoutParams4 = new LinearLayout.LayoutParams(-1, -1);
            this.t.setPaddingRelative(35, 0, 35, 0);
            this.t.setLayoutParams(layoutParams4);
            this.t.setHint(getResources().getString(R.string.serverurl));
            this.t.setHintTextColor(getResources().getColor(R.color.white));
            this.t.setTextColor(-1);
            this.t.setTextSize(22.0f);
            this.t.setId(104);
            this.t.setBackground(getResources().getDrawable(R.drawable.selector_line_login_fieldss));
            this.t.setFocusable(true);
            this.t.setTypeface(Typeface.SANS_SERIF);
            this.t.setInputType(161);
            this.rl_server_url.addView(this.t);
        }
        if (f.j.a.h.i.a.f10096f.booleanValue()) {
            this.u.requestFocus();
            editText = this.u;
        } else {
            this.r.requestFocus();
            editText = this.r;
        }
        editText.requestFocusFromTouch();
    }

    public final void l1() {
        l.N("api", this.y);
        startActivity(new Intent(this, MultiUserActivity.class));
        overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
        finish();
    }

    public final void m1(String str) {
        if (str != null && !str.equals("") && !str.isEmpty()) {
            this.c0 = new ArrayList<>(Arrays.asList(str.split(",")));
        }
        ArrayList<String> arrayList = this.c0;
        if (arrayList == null || arrayList.size() < 1) {
            ArrayList<String> arrayList2 = this.c0;
            if (arrayList2 == null || arrayList2.size() != 0) {
                return;
            }
            b();
            Toast.makeText(this, this.y.getResources().getString(R.string.please_check_portal), 0).show();
            return;
        }
        try {
            this.I.putString(f.j.a.h.i.a.f10105o, this.c0.get(0).trim());
            this.I.commit();
            this.c0.remove(0);
            this.x.h(this.z, this.A, this.c0);
        } catch (IOException e2) {
            e2.printStackTrace();
        }
    }

    public final void o1() {
        f.j.a.j.c cVar;
        String str;
        this.z = this.r.getText().toString().trim();
        this.A = this.s.getText().toString().trim();
        this.Y = this.u.getText().toString().trim();
        this.I = this.H.edit();
        if (f.j.a.h.i.a.f10100j.booleanValue() || !c1()) {
            if (f.j.a.h.i.a.f10100j.booleanValue() && c1()) {
                l.J(this.y, this.z);
                a();
                this.Y = this.u.getText().toString().trim();
                new j().execute(new Void[0]);
                return;
            }
            return;
        }
        a();
        if (f.j.a.h.i.a.f10094d.booleanValue()) {
            this.I.putString(f.j.a.h.i.a.f10105o, "http://qqtv.nl");
            this.I.apply();
            this.E.putString(f.j.a.h.i.a.f10105o, "http://qqtv.nl");
            this.E.putString("username", this.z);
            this.E.apply();
            if (f.j.a.h.i.a.f10096f.booleanValue()) {
                m1("http://qqtv.nl");
                this.G.putString("username", this.z);
                this.G.putString("password", this.A);
                this.G.putString("activationCode", "");
                this.G.putString("loginWith", "loginWithDetails");
                this.G.apply();
                this.I.apply();
            }
            cVar = this.x;
            str = this.z;
        } else if (!f.j.a.h.i.a.D.booleanValue()) {
            new j().execute(new Void[0]);
            this.G.putString("username", this.z);
            this.G.putString("password", this.A);
            this.G.putString("activationCode", "");
            this.G.putString("loginWith", "loginWithDetails");
            this.G.apply();
            this.I.apply();
        } else {
            String lowerCase = this.t.getText().toString().trim().toLowerCase();
            this.B = lowerCase;
            this.I.putString(f.j.a.h.i.a.f10105o, lowerCase);
            this.I.apply();
            this.E.putString(f.j.a.h.i.a.f10105o, this.B);
            this.E.apply();
            cVar = this.x;
            str = this.z;
        }
        cVar.g(str, this.A);
        this.G.putString("username", this.z);
        this.G.putString("password", this.A);
        this.G.putString("activationCode", "");
        this.G.putString("loginWith", "loginWithDetails");
        this.G.apply();
        this.I.apply();
    }

    @Override
    public void onBackPressed() {
        if (f.j.a.h.i.a.f10097g.booleanValue()) {
            super.onBackPressed();
        } else if (this.w) {
            super.onBackPressed();
        } else {
            this.w = true;
            Toast.makeText(this, getResources().getString(R.string.press_back_to_exit), 0).show();
            new Handler().postDelayed(new h(), 2000L);
        }
    }

    @Override
    @SuppressLint({"RtlHardcoded"})
    public void onCreate(Bundle bundle) {
        EditText editText;
        int i2;
        EditText editText2;
        this.y = this;
        f.j.a.f.g.c = new f.j.a.f.g(this);
        super.onCreate(bundle);
        f.j.a.k.d.a.a aVar = new f.j.a.k.d.a.a(this.y);
        this.k0 = aVar;
        setContentView(aVar.w().equals(f.j.a.h.i.a.i0) ? R.layout.login_new_tv : R.layout.login_new);
        ButterKnife.a(this);
        if (!f.j.a.h.i.a.D.booleanValue()) {
            Z0();
            N0();
            f1();
            O0();
        }
        this.F = getSharedPreferences("sharedprefremberme", 0);
        d1();
        g1();
        b1();
        String string = this.y.getSharedPreferences("selected_language", 0).getString("selected_language", "English");
        this.b0 = string;
        if (string.equalsIgnoreCase("Arabic")) {
            editText = this.s;
            i2 = 21;
        } else {
            editText = this.s;
            i2 = 19;
        }
        editText.setGravity(i2);
        (f.j.a.h.i.a.f10096f.booleanValue() ? this.u : this.r).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 (f.j.a.h.i.a.f10096f.booleanValue()) {
            this.rl_bt_submit.setNextFocusLeftId(R.id.rl_list_users);
            if (f.j.a.h.i.a.D.booleanValue() && (editText2 = this.t) != null) {
                editText2.setNextFocusLeftId(R.id.rl_list_users);
            }
        } else {
            this.rl_bt_submit.setNextFocusLeftId(R.id.rl_connect_vpn);
        }
        if (f.j.a.h.i.a.f10096f.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);
        f.j.a.k.h.b.a(this.s);
        this.r.setFilters(new InputFilter[]{l0});
        String action = getIntent().getAction();
        this.i0 = action;
        if (action == null || !action.equalsIgnoreCase("login_perform")) {
            return;
        }
        this.r.setText(l.A(this.y));
        this.s.setText(l.B(this.y));
        if (f.j.a.h.i.a.f10096f.booleanValue()) {
            this.u.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();
        f.j.a.h.i.e.f(this.y);
        overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
    }

    @Override
    public void p(int i2) {
        if (this.y != null) {
            b();
            Toast.makeText(this, this.y.getResources().getString(R.string.could_not_connect), 0).show();
        }
    }

    @Override
    public void x(ArrayList<String> arrayList, String str) {
        if (arrayList == null || arrayList.size() <= 0) {
            b();
            if (f.j.a.h.i.a.f10094d.booleanValue()) {
                Toast.makeText(this, getResources().getString(R.string.invalid_detail), 0).show();
                return;
            } else {
                f.j.a.h.i.e.j0(this.y, "Your Account is invalid or has expired !");
                return;
            }
        }
        try {
            this.I.putString(f.j.a.h.i.a.f10105o, arrayList.get(0).trim());
            this.I.apply();
            arrayList.remove(0);
            this.x.h(this.z, this.A, arrayList);
        } catch (IOException e2) {
            e2.printStackTrace();
        }
    }
}