/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  android.annotation.SuppressLint
 *  android.app.Activity
 *  android.app.AlertDialog
 *  android.app.AlertDialog$Builder
 *  android.app.Notification
 *  android.app.NotificationManager
 *  android.app.PendingIntent
 *  android.app.ProgressDialog
 *  android.content.BroadcastReceiver
 *  android.content.ComponentName
 *  android.content.Context
 *  android.content.DialogInterface
 *  android.content.DialogInterface$OnClickListener
 *  android.content.Intent
 *  android.content.IntentFilter
 *  android.content.ServiceConnection
 *  android.content.SharedPreferences
 *  android.content.SharedPreferences$Editor
 *  android.graphics.drawable.Drawable
 *  android.net.ConnectivityManager
 *  android.net.NetworkInfo
 *  android.net.NetworkInfo$State
 *  android.os.Build
 *  android.os.Build$VERSION
 *  android.os.Bundle
 *  android.os.Handler
 *  android.os.IBinder
 *  android.os.Message
 *  android.os.Process
 *  android.os.StrictMode
 *  android.os.StrictMode$ThreadPolicy
 *  android.os.StrictMode$ThreadPolicy$Builder
 *  android.text.Editable
 *  android.util.Log
 *  android.view.KeyEvent
 *  android.view.MotionEvent
 *  android.view.View
 *  android.view.View$OnClickListener
 *  android.view.View$OnTouchListener
 *  android.view.inputmethod.InputMethodManager
 *  android.widget.Button
 *  android.widget.EditText
 *  android.widget.ImageView
 *  android.widget.LinearLayout
 *  android.widget.TextView
 *  android.widget.Toast
 *  java.lang.CharSequence
 *  java.lang.Class
 *  java.lang.Exception
 *  java.lang.Float
 *  java.lang.Integer
 *  java.lang.Object
 *  java.lang.String
 *  java.lang.System
 *  java.lang.Thread
 *  java.lang.Throwable
 *  java.net.DatagramPacket
 *  java.text.SimpleDateFormat
 *  java.util.ArrayList
 *  java.util.Date
 *  java.util.Iterator
 *  java.util.Timer
 *  java.util.TimerTask
 */
package com.xinli.portalclient;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Process;
import android.os.StrictMode;
import android.text.Editable;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.google.code.microlog4android.Logger;
import com.xinli.portalclient.BaseActivity;
import com.xinli.portalclient.MainActivity;
import com.xinli.portalclient.model.RequestModel;
import com.xinli.portalclient.service.OnlineHeartService;
import com.xinli.portalclient.util.Config;
import com.xinli.portalclient.util.HttpUtils;
import com.xinli.portalclient.util.MD5Builder;
import com.xinli.portalclient.util.ShareUtil;
import com.xinli.portalclient.util.SocketClientUDP;
import java.net.DatagramPacket;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.Timer;
import java.util.TimerTask;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;

@SuppressLint(value={"NewApi"})
public class SucessActivity
extends BaseActivity {
    public static final int COUNT_DOWN_ERROR = 2;
    private static int COUNT_DOWN_LIMIT = 0;
    public static final int COUNT_DOWN_LOGOUT = 5;
    public static final int COUNT_DOWN_RECORD = 1;
    public static final int COUNT_DOWN_SUCESS = 4;
    public static final int COUNT_DOWN_TIMEOUT = 3;
    public static final int GET_VERIFYCODE_SUCCESS = 6;
    protected static final int UPDATE_TEXT;
    private static long loginTime;
    private static Handler mHandler;
    private static TextView textView;
    public static RequestModel userInfo;
    private final int NOTIFICATION_ID = 1;
    private boolean authFlag;
    private Button btnCanel;
    private Button btnEnter;
    private SocketClientUDP client;
    private ServiceConnection conn;
    public int countDownCount;
    public Handler handler;
    private long id;
    Intent intent;
    boolean isBind;
    public boolean isCountDownFlag;
    private String key;
    private LinearLayout layVerify;
    DialogInterface.OnClickListener listener;
    private SharedPreferences loginFile;
    private Intent loginIntent;
    private ProgressDialog mDialog;
    private Timer mTimer = new Timer();
    private Timer mTimerCountDown;
    private TimerTask mTimerCountDownTask;
    MyReceiver receiver;
    private String resultXML;
    private SimpleDateFormat sdf;
    OnlineHeartService service;
    private ShareUtil shareUtil;
    private SharedPreferences sharedCheckState;
    private String[] strResultInfo;
    private boolean timeoutFlag;
    private TimerTask timerTask;
    private TextView tvHelp;
    private EditText tvVerifyCode;
    private TextView tvVerifyCountdown;
    private TextView tvVerifyS1;
    private TextView tvVerifyS2;
    private String verifyURL;

    static {
        loginTime = 0;
        COUNT_DOWN_LIMIT = 45;
        mHandler = new Handler(){

            public void handleMessage(Message message) {
                switch (message.what) {
                    default: {
                        return;
                    }
                    case 0: 
                }
                if (loginTime == -1 || loginTime == 0) {
                    SucessActivity.access$1(System.currentTimeMillis());
                }
                long l = System.currentTimeMillis() - loginTime;
                long l2 = l / 3600000;
                long l3 = l % 3600000 / 60000;
                long l4 = l % 3600000 % 60000 / 1000;
                String string2 = String.valueOf((long)l2) + "\u5c0f\u65f6" + l3 + "\u5206\u949f" + l4 + "\u79d2";
                textView.setText((CharSequence)string2);
            }
        };
    }

    public SucessActivity() {
        this.conn = new ServiceConnection(){

            public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
                OnlineHeartService.LocalBinder localBinder = (OnlineHeartService.LocalBinder)iBinder;
                SucessActivity.this.service = localBinder.getService();
                SucessActivity.this.isBind = true;
            }

            public void onServiceDisconnected(ComponentName componentName) {
                SucessActivity.this.isBind = false;
            }
        };
        this.listener = new DialogInterface.OnClickListener(){

            public void onClick(DialogInterface dialogInterface, int n) {
                switch (n) {
                    default: {
                        return;
                    }
                    case -1: 
                }
                SucessActivity.this.finish();
            }
        };
        this.mTimerCountDown = null;
        this.mTimerCountDownTask = null;
        this.handler = new Handler(){

            /*
             * Unable to fully structure code
             * Enabled aggressive block sorting
             * Lifted jumps to return sites
             */
            public void handleMessage(Message var1) {
                switch (var1.what) {
                    case 1: {
                        SucessActivity.access$3(SucessActivity.this).setText((CharSequence)("" + (1 + (SucessActivity.access$4() - SucessActivity.this.countDownCount))));
                        ** break;
                    }
                    case 3: {
                        SucessActivity.access$5(SucessActivity.this, true);
                        SucessActivity.this.logger.debug("exit====COUNT_DOWN_TIMEOUT=");
                        if (SucessActivity.access$6(SucessActivity.this) != null) {
                            SucessActivity.access$6(SucessActivity.this).dismiss();
                        }
                        SucessActivity.access$7(SucessActivity.this);
                        ** break;
                    }
                    case 2: {
                        SucessActivity.this.logger.debug("exit====COUNT_DOWN_ERROR=");
                        SucessActivity.access$6(SucessActivity.this).dismiss();
                        SucessActivity.access$8(SucessActivity.this).setClickable(false);
                        SucessActivity.access$9(SucessActivity.this).setClickable(false);
                        SucessActivity.access$10(SucessActivity.this).setText((CharSequence)"");
                        SucessActivity.access$11(SucessActivity.this).setText((CharSequence)"");
                        SucessActivity.access$3(SucessActivity.this).setText((CharSequence)(String.valueOf((Object)SucessActivity.access$12(SucessActivity.this)[1]) + "\uff0c3\u79d2\u540e\u9000\u51fa\uff01"));
                        SucessActivity.this.handler.sendEmptyMessageDelayed(5, 3000);
                        ** break;
                    }
                    case 4: {
                        SucessActivity.access$6(SucessActivity.this).dismiss();
                        SucessActivity.access$13(SucessActivity.this).setVisibility(8);
                        SucessActivity.this.setCheckState(true);
                        ** break;
                    }
                    case 5: {
                        SucessActivity.access$6(SucessActivity.this).dismiss();
                        SucessActivity.access$13(SucessActivity.this).setVisibility(8);
                        SucessActivity.access$7(SucessActivity.this);
                    }
lbl31: // 6 sources:
                    default: {
                        ** GOTO lbl41
                    }
                    case 6: 
                }
                SucessActivity.access$13(SucessActivity.this).setVisibility(0);
                SucessActivity.access$13(SucessActivity.this).getBackground().setAlpha(150);
                SucessActivity.access$10(SucessActivity.this).setText(2131099668);
                SucessActivity.access$11(SucessActivity.this).setText(2131099669);
                if (!SucessActivity.this.isCountDownFlag) {
                    SucessActivity.access$14(SucessActivity.this);
                }
                SucessActivity.access$15(SucessActivity.this);
lbl41: // 2 sources:
                super.handleMessage(var1);
            }
        };
    }

    static /* synthetic */ void access$1(long l) {
        loginTime = l;
    }

    static /* synthetic */ TextView access$10(SucessActivity sucessActivity) {
        return sucessActivity.tvVerifyS1;
    }

    static /* synthetic */ TextView access$11(SucessActivity sucessActivity) {
        return sucessActivity.tvVerifyS2;
    }

    static /* synthetic */ LinearLayout access$13(SucessActivity sucessActivity) {
        return sucessActivity.layVerify;
    }

    static /* synthetic */ void access$14(SucessActivity sucessActivity) {
        sucessActivity.startCountDownTimer();
    }

    static /* synthetic */ void access$18(SucessActivity sucessActivity, SocketClientUDP socketClientUDP) {
        sucessActivity.client = socketClientUDP;
    }

    static /* synthetic */ void access$19(SucessActivity sucessActivity, ShareUtil shareUtil) {
        sucessActivity.shareUtil = shareUtil;
    }

    static /* synthetic */ void access$21(SucessActivity sucessActivity, String string2) {
        sucessActivity.verifyURL = string2;
    }

    static /* synthetic */ void access$23(SucessActivity sucessActivity, long l) {
        sucessActivity.id = l;
    }

    static /* synthetic */ void access$24(SucessActivity sucessActivity, SimpleDateFormat simpleDateFormat) {
        sucessActivity.sdf = simpleDateFormat;
    }

    static /* synthetic */ void access$25(SucessActivity sucessActivity, String string2) {
        sucessActivity.key = string2;
    }

    static /* synthetic */ TextView access$3(SucessActivity sucessActivity) {
        return sucessActivity.tvVerifyCountdown;
    }

    static /* synthetic */ void access$31(SucessActivity sucessActivity, ProgressDialog progressDialog) {
        sucessActivity.mDialog = progressDialog;
    }

    static /* synthetic */ void access$5(SucessActivity sucessActivity, boolean bl) {
        sucessActivity.timeoutFlag = bl;
    }

    static /* synthetic */ void access$7(SucessActivity sucessActivity) {
        sucessActivity.logoutDo();
    }

    static /* synthetic */ Button access$9(SucessActivity sucessActivity) {
        return sucessActivity.btnCanel;
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    private void backMain() {
        String string2 = "";
        try {
            this.logger.debug("exitApp========step22===");
            string2 = this.getUsername();
            this.logger.debug("exitApp========step22==username=" + string2);
            this.logger.debug(String.valueOf((Object)string2) + "exitApp\u9000\u51fa\u767b\u5f55\u5e76\u8fd4\u56de\u767b\u5f55\u754c\u9762\u65f6\uff0c\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\u60c5\u51b5");
            NetworkInfo.State state = ((ConnectivityManager)this.getSystemService("connectivity")).getNetworkInfo(1).getState();
            if (state == NetworkInfo.State.CONNECTED || state == NetworkInfo.State.CONNECTING) {
                this.logger.debug("\u7f51\u7edc\u8fde\u63a5\u6b63\u5e38\uff0c\u5411\u670d\u52a1\u5668\u53d1\u51fa\u9000\u51fa\u767b\u5f55\u8bf7\u6c42\uff0c\u5e76\u8fd4\u56de\u5230\u754c\u9762\u8bf7\u6c42");
                this.logger.debug(String.valueOf((Object)this.getRealUrl()) + "/wf.do?code=6&username=" + string2 + "&clientip=" + this.intToIp(this.getLocalIpAddress()) + ",sessionId=" + this.getSessionId());
                String string3 = HttpUtils.requestHttpGet(String.valueOf((Object)this.getRealUrl()) + "/wf.do?", this.getSessionId(), "code=6&username=" + string2 + "&clientip=" + this.intToIp(this.getLocalIpAddress()));
                this.logger.debug(String.valueOf((Object)string2) + "exitApp\u9000\u51fa\u7a0b\u5e8f\u8fd4\u56de\u767b\u5f55\u9875\u9762\u8c03\u7528\u670d\u52a1\u5668\u7ed3\u679c\uff1a" + string3);
                this.setCheckState(false);
            }
        }
        catch (Exception var2_4) {
            this.logger.error(String.valueOf((Object)string2) + "exitApp\u9000\u51fa\u7a0b\u5e8f\u8fd4\u56de\u767b\u5f55\u9875\u9762\u53d1\u751f\u5f02\u5e38" + (Object)var2_4);
        }
        this.clearData();
        this.startActivity(new Intent((Context)this, (Class)MainActivity.class));
        this.logger.debug(String.valueOf((Object)string2) + "exitApp\u7a0b\u5e8f\u76f4\u63a5\u9000\u51fa\u767b\u5f55\uff0c\u5e76\u8fd4\u56de\u5230\u754c\u9762");
        this.finish();
    }

    /*
     * Unable to fully structure code
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     * Lifted jumps to return sites
     */
    private void clearData() {
        try {
            var2_1 = SucessActivity.activityList;
            SucessActivity.activityList = new ArrayList();
            if (var2_1.size() <= 0) ** GOTO lbl-1000
            var4_2 = var2_1.iterator();
            do {
                if (!var4_2.hasNext()) lbl-1000: // 2 sources:
                {
                    SucessActivity.loginTime = 0;
                    if (this.mTimer != null) {
                        this.mTimer.cancel();
                        this.mTimer = null;
                    }
                    if (this.timerTask != null) {
                        this.timerTask.cancel();
                        this.timerTask = null;
                    }
                    SucessActivity.userInfo = null;
                    this.removeIcoOnStatusBar();
                    if (this.isBind == false) return;
                    this.unbindService(this.conn);
                    this.isBind = false;
                    return;
                }
                ((Activity)var4_2.next()).finish();
            } while (true);
        }
        catch (Exception var1_3) {
            this.logger.debug("==clearData==" + var1_3.getMessage());
        }
    }

    private void exitListener(ImageView imageView) {
        this.logger.debug("exitListener========step11===");
        imageView.setOnClickListener(new View.OnClickListener(){

            public void onClick(View view) {
                SucessActivity.this.logger.debug("exitListener========onClick===");
                SucessActivity.this.exitApp();
            }
        });
        imageView.setOnTouchListener(new View.OnTouchListener(){

            /*
             * Enabled aggressive block sorting
             */
            public boolean onTouch(View view, MotionEvent motionEvent) {
                SucessActivity.this.logger.debug("exitListener========setOnTouchListener===");
                if (motionEvent.getAction() == 0) {
                    view.setBackgroundResource(2130837518);
                    return false;
                }
                if (motionEvent.getAction() != 1) return false;
                view.setBackgroundResource(2130837517);
                return false;
            }
        });
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    private String[] getResultInfo(String string2) {
        try {
            Element element = DocumentHelper.parseText(string2).getRootElement().element("returnInfo");
            this.strResultInfo[0] = element.attributeValue("resCode");
            this.strResultInfo[1] = element.attributeValue("resMsg");
            this.strResultInfo[2] = element.attributeValue("isBind");
            this.strResultInfo[3] = element.attributeValue("sendSuccess");
            do {
                return this.strResultInfo;
                break;
            } while (true);
        }
        catch (Exception var3_3) {
            var3_3.printStackTrace();
            this.strResultInfo[0] = "0";
            this.strResultInfo[1] = "\u89e3\u6790\u7ed3\u679c\u4fe1\u606f\u5931\u8d25";
            return this.strResultInfo[1];
        }
        finally {
            return this.strResultInfo;
        }
    }

    private void initVerifyCode() {
        try {
            this.tvVerifyCode.setText((CharSequence)"");
            this.tvVerifyCode.setFocusable(true);
            this.tvVerifyCode.setFocusableInTouchMode(true);
            this.tvVerifyCode.requestFocus();
            return;
        }
        catch (Exception var1_1) {
            var1_1.printStackTrace();
            return;
        }
    }

    private void logouLisenert(ImageView imageView) {
        this.logger.debug("logouLisenert========step11===");
        imageView.setOnClickListener(new View.OnClickListener(){

            public void onClick(View view) {
                SucessActivity.this.logger.debug("logouLisenert==onClick==\u7528\u6237\u70b9\u51fb\u9000\u51fa\u767b\u5f55\u6309\u94ae");
                SucessActivity.this.logoutApp();
            }
        });
        imageView.setOnTouchListener(new View.OnTouchListener(){

            /*
             * Enabled aggressive block sorting
             */
            public boolean onTouch(View view, MotionEvent motionEvent) {
                SucessActivity.this.logger.debug("logout.setOnTouchListener");
                if (motionEvent.getAction() == 0) {
                    view.setBackgroundResource(2130837531);
                    return false;
                }
                if (motionEvent.getAction() != 1) return false;
                view.setBackgroundResource(2130837530);
                return false;
            }
        });
    }

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     */
    private void logoutDo() {
        this.logger.debug("exit====btn===step11111=");
        String string2 = this.getUsername();
        try {
            this.logger.debug(String.valueOf((Object)string2) + "\u9000\u51fa\u767b\u5f55\u5e76\u8fd4\u56de\u767b\u5f55\u754c\u9762\u65f6\uff0c\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\u60c5\u51b5");
            NetworkInfo.State state = ((ConnectivityManager)this.getSystemService("connectivity")).getNetworkInfo(1).getState();
            if (state == NetworkInfo.State.CONNECTED || state == NetworkInfo.State.CONNECTING) {
                this.logger.debug("\u7f51\u7edc\u8fde\u63a5\u6b63\u5e38\uff0c\u5411\u670d\u52a1\u5668\u53d1\u51fa\u9000\u51fa\u767b\u5f55\u8bf7\u6c42\uff0c\u5e76\u8fd4\u56de\u5230\u754c\u9762\u8bf7\u6c42");
                this.logger.debug(String.valueOf((Object)this.getRealUrl()) + "/wf.do?code=6&username=" + string2 + "&clientip=" + this.intToIp(this.getLocalIpAddress()) + ",sessionId=" + this.getSessionId());
                String string3 = HttpUtils.requestHttpGet(String.valueOf((Object)this.getRealUrl()) + "/wf.do?", this.getSessionId(), "code=6&username=" + string2 + "&clientip=" + this.intToIp(this.getLocalIpAddress()));
                this.logger.info(String.valueOf((Object)string2) + "\u9000\u51fa\u7a0b\u5e8f\u8fd4\u56de\u767b\u5f55\u9875\u9762\u8c03\u7528\u670d\u52a1\u5668\u7ed3\u679c\uff1a" + string3);
                this.setCheckState(false);
            }
        }
        catch (Exception var2_6) {
            this.logger.error(String.valueOf((Object)string2) + "\u9000\u51fa\u7a0b\u5e8f\u8fd4\u56de\u767b\u5f55\u9875\u9762\u53d1\u751f\u5f02\u5e38" + (Object)var2_6);
        }
        this.clearData();
        try {
            ComponentName componentName = new ComponentName("com.xinli.portalclient", "com.xinli.portalclient.MainActivity");
            Intent intent = new Intent();
            intent.setComponent(componentName);
            intent.setFlags(268435456);
            intent.setAction("android.intent.action.VIEW");
            this.startActivity(intent);
        }
        catch (Exception var5_7) {
            var5_7.printStackTrace();
        }
        this.finish();
    }

    private void removeIcoOnStatusBar() {
        try {
            this.logger.debug("\u6e05\u9664\u72b6\u6001\u680f\u56fe\u6807");
            ((NotificationManager)this.getSystemService("notification")).cancel(1);
            return;
        }
        catch (Exception var1_1) {
            this.logger.debug("==e==" + var1_1.getMessage());
            return;
        }
    }

    private void showIcoOnStatusBar() {
        NotificationManager notificationManager = (NotificationManager)this.getSystemService("notification");
        long l = System.currentTimeMillis();
        Notification notification = new Notification();
        notification.icon = 2130837529;
        notification.tickerText = "\u7545\u901a\u65e0\u7ebf";
        notification.when = l;
        notification.flags = 32;
        notification.setLatestEventInfo(this.getApplicationContext(), (CharSequence)"\u7545\u901a\u65e0\u7ebf", (CharSequence)"\u7545\u901a\u65e0\u7ebf\u6b63\u5728\u8fd0\u884c\u2026\u2026", PendingIntent.getActivity((Context)this, (int)1, (Intent)new Intent((Context)this, (Class)MainActivity.class), (int)134217728));
        notificationManager.notify(1, notification);
    }

    private void startCountDownTimer() {
        if (this.mTimerCountDown == null) {
            this.mTimerCountDown = new Timer();
            this.isCountDownFlag = true;
        }
        if (this.mTimerCountDownTask == null) {
            this.mTimerCountDownTask = new TimerTask(){

                public void run() {
                    Log.i((String)"BaseActivity", (String)("CountDownCount===" + SucessActivity.this.countDownCount));
                    if (SucessActivity.this.countDownCount >= COUNT_DOWN_LIMIT) {
                        Log.i((String)"BaseActivity", (String)("startCountDownTimer==CountDownCount:" + SucessActivity.this.countDownCount));
                        SucessActivity.this.handler.sendEmptyMessage(3);
                    }
                    SucessActivity.this.handler.sendEmptyMessage(1);
                    SucessActivity sucessActivity = SucessActivity.this;
                    sucessActivity.countDownCount = 1 + sucessActivity.countDownCount;
                }
            };
        }
        if (this.mTimerCountDown != null && this.mTimerCountDown != null) {
            this.mTimerCountDown.schedule(this.mTimerCountDownTask, 0, 1000);
        }
    }

    public void exitApp() {
        this.logger.debug("exitApp========step11===");
        AlertDialog.Builder builder = new AlertDialog.Builder((Context)this);
        builder.setTitle((CharSequence)"\u63d0\u793a");
        builder.setMessage((CharSequence)"\u60a8\u786e\u5b9a\u9000\u51fa\u7a0b\u5e8f\u5e76\u8fd4\u56de\u767b\u5f55\u9875\u9762\u5417?");
        builder.setPositiveButton(2131099659, new DialogInterface.OnClickListener(){

            public void onClick(DialogInterface dialogInterface, int n) {
                SucessActivity.this.backMain();
            }
        });
        builder.setNegativeButton((CharSequence)"\u53d6\u6d88", null);
        builder.show();
    }

    public boolean getCheckState() {
        try {
            Log.i((String)"BaseActivity", (String)"getCheckState===\u67e5\u627e\u72b6\u6001====");
            this.sharedCheckState = this.getSharedPreferences("CHECK_STATE", 1);
            boolean bl = this.sharedCheckState.getBoolean("checked", false);
            return bl;
        }
        catch (Exception var1_2) {
            var1_2.printStackTrace();
            return true;
        }
    }

    public String getRealUrl() {
        if (Config.realUrl == null || Config.realUrl.isEmpty()) {
            if (this.loginFile == null) {
                this.loginFile = this.getSharedPreferences("loginInfo", 0);
            }
            return this.loginFile.getString(Config.REDIRECTINFO, "");
        }
        return Config.realUrl;
    }

    public String getSessionId() {
        if (userInfo == null || userInfo.getSessionId() == null || userInfo.getSessionId().isEmpty()) {
            if (this.loginFile == null) {
                this.loginFile = this.getSharedPreferences("loginInfo", 0);
            }
            return this.loginFile.getString("sessionId", "");
        }
        return userInfo.getSessionId();
    }

    public String getUsername() {
        if (userInfo == null || userInfo.getUsername() == null || userInfo.getUsername().isEmpty()) {
            if (this.loginFile == null) {
                this.loginFile = this.getSharedPreferences("loginInfo", 0);
            }
            return this.loginFile.getString("username", "");
        }
        return userInfo.getUsername();
    }

    public void logoutApp() {
        this.logger.debug("logoutApp==step111");
        AlertDialog.Builder builder = new AlertDialog.Builder((Context)this);
        builder.setTitle((CharSequence)"\u63d0\u793a");
        builder.setMessage((CharSequence)"\u60a8\u786e\u5b9a\u8981\u9000\u51fa\u7a0b\u5e8f\u5417?");
        builder.setPositiveButton(2131099659, new DialogInterface.OnClickListener(){

            /*
             * Enabled aggressive block sorting
             * Enabled unnecessary exception pruning
             * Enabled aggressive exception aggregation
             */
            public void onClick(DialogInterface dialogInterface, int n) {
                String string2 = "";
                try {
                    SucessActivity.this.logger.debug("logoutApp==step222");
                    string2 = SucessActivity.this.getUsername();
                    SucessActivity.this.logger.debug("logoutApp==step333" + string2);
                    SucessActivity.this.logger.debug(String.valueOf((Object)string2) + "logoutApp\u9000\u51fa\u65f6\uff0c\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\u60c5\u51b5");
                    NetworkInfo.State state = ((ConnectivityManager)SucessActivity.this.getSystemService("connectivity")).getNetworkInfo(1).getState();
                    if (state == NetworkInfo.State.CONNECTED || state == NetworkInfo.State.CONNECTING) {
                        SucessActivity.this.logger.debug("logoutApp\u7f51\u7edc\u8fde\u63a5\u6b63\u5e38\uff0c\u5411\u670d\u52a1\u5668\u53d1\u51fa\u9000\u51fa\u767b\u5f55\u8bf7\u6c42");
                        String string3 = HttpUtils.requestHttpGet(String.valueOf((Object)SucessActivity.this.getRealUrl()) + "/wf.do?", SucessActivity.this.getSessionId(), "code=6&username=" + string2 + "&clientip=" + SucessActivity.this.intToIp(SucessActivity.this.getLocalIpAddress()));
                        SucessActivity.this.logger.debug("logoutApp\u5411\u670d\u52a1\u5668\u53d1\u51fa\u9000\u51fa\u767b\u5f55\u8bf7\u6c42\u7ed3\u679c\uff1a" + string3);
                        SucessActivity.this.setCheckState(false);
                    }
                }
                catch (Exception var4_6) {
                    SucessActivity.this.logger.error(String.valueOf((Object)string2) + "logoutApp\u9000\u51fa\u767b\u5f55\u53d1\u751f\u5f02\u5e38" + var4_6.getMessage());
                }
                SucessActivity.this.clearData();
                SucessActivity.this.logger.debug(String.valueOf((Object)string2) + "logoutApp\u76f4\u63a5\u9000\u51fa\u7a0b\u5e8f");
                Process.killProcess((int)Process.myPid());
            }
        });
        builder.setNegativeButton((CharSequence)"\u53d6\u6d88", null);
        builder.show();
    }

    @Override
    public void onCreate(Bundle bundle) {
        this.logger.debug("onCreate ====step1========");
        if ((double)Float.valueOf((String)Build.VERSION.RELEASE.substring(0, 3).trim()).floatValue() > 2.3) {
            StrictMode.setThreadPolicy((StrictMode.ThreadPolicy)new StrictMode.ThreadPolicy.Builder().detectDiskReads().detectDiskWrites().detectNetwork().permitNetwork().penaltyLog().build());
        }
        super.onCreate(bundle);
        this.logger.debug("onCreate ====step2========");
        Intent intent = this.getIntent();
        loginTime = intent.getLongExtra("loginTime", loginTime);
        this.authFlag = intent.getBooleanExtra("authFlag", false);
        this.requestWindowFeature(1);
        this.logger.debug("onCreate ====step3======getUsername==" + this.getUsername() + "==authFlag==" + this.authFlag);
        this.receiver = (SucessActivity)this.new MyReceiver();
        IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction("android.intent.onlineheart.exception");
        this.registerReceiver((BroadcastReceiver)this.receiver, intentFilter);
        this.logger.debug("onCreate ====step4========");
        this.intent = new Intent((Context)this, (Class)OnlineHeartService.class);
        this.intent.putExtra("url", this.getRealUrl());
        this.intent.putExtra("sessionId", this.getSessionId());
        this.intent.putExtra("phoneIp", this.intToIp(this.getLocalIpAddress()));
        this.intent.putExtra("clientVersion", this.getVersionName());
        this.intent.putExtra("username", this.getUsername());
        this.bindService(this.intent, this.conn, 1);
        this.isBind = true;
        this.logger.debug("onCreate ====step5========");
        this.setContentView(2130903045);
        this.strResultInfo = new String[4];
        this.isCountDownFlag = false;
        this.countDownCount = 0;
        this.layVerify = (LinearLayout)this.findViewById(2131296282);
        this.tvHelp = (TextView)this.findViewById(2131296283);
        this.tvVerifyCountdown = (TextView)this.findViewById(2131296286);
        this.tvVerifyS1 = (TextView)this.findViewById(2131296285);
        this.tvVerifyS2 = (TextView)this.findViewById(2131296287);
        this.tvVerifyS1.setText(2131099668);
        this.tvVerifyS2.setText(2131099669);
        this.tvVerifyCode = (EditText)this.findViewById(2131296284);
        this.btnEnter = (Button)this.findViewById(2131296289);
        this.btnCanel = (Button)this.findViewById(2131296288);
        this.btnEnter.setOnClickListener(new View.OnClickListener(){

            public void onClick(View view) {
                SucessActivity.this.logger.debug("GetVerifyCode==btnEnter==onClick===");
                SucessActivity.this.btnEnter.setClickable(false);
                SucessActivity.access$31(SucessActivity.this, new ProgressDialog((Context)SucessActivity.this));
                SucessActivity.this.mDialog.setTitle((CharSequence)"\u9a8c\u8bc1\u7801\u6821\u9a8c");
                SucessActivity.this.mDialog.setMessage((CharSequence)"\u6b63\u5728\u6821\u9a8c\u9a8c\u8bc1\u7801\uff0c\u8bf7\u7a0d\u540e...");
                SucessActivity.this.mDialog.show();
                ((InputMethodManager)SucessActivity.this.getSystemService("input_method")).toggleSoftInput(0, 2);
                new VerifyThread().start();
            }
        });
        this.btnCanel.setOnClickListener(new View.OnClickListener(){

            public void onClick(View view) {
                SucessActivity.this.btnEnter.setClickable(true);
                SucessActivity.this.initVerifyCode();
            }
        });
        this.logger.debug("onCreate=====step1111===isBind==" + this.isBind + "==authFlag==" + this.authFlag);
        if (!this.getCheckState() && ("ON".equals((Object)Config.VERIFYCODE_SWITCH) || Config.VERIFYCODE_SWITCH == "ON")) {
            (SucessActivity)this.new GetVerifyCodeThread().start();
        }
        textView = (TextView)this.findViewById(2131296279);
        ImageView imageView = (ImageView)this.findViewById(2131296281);
        imageView.setBackgroundResource(2130837530);
        ImageView imageView2 = (ImageView)this.findViewById(2131296280);
        imageView2.setBackgroundResource(2130837517);
        this.logger.debug("onCreate ====step6========");
        this.loginFile = this.getSharedPreferences("loginInfo", 0);
        this.logger.debug("loginTime========" + loginTime);
        this.logger.debug("onCreate ====step7========");
        this.timerTask();
        this.logger.debug("onCreate ====step8========");
        super.showIcoOnStatusBar();
        super.logouLisenert(imageView);
        super.exitListener(imageView2);
        this.logger.debug("onCreate ====step9========");
    }

    @Override
    protected void onDestroy() {
        this.unregisterReceiver((BroadcastReceiver)this.receiver);
        if (this.isBind) {
            this.unbindService(this.conn);
        }
        super.onDestroy();
    }

    public boolean onKeyDown(int n, KeyEvent keyEvent) {
        if (n == 4) {
            Intent intent = new Intent("android.intent.action.MAIN");
            intent.addCategory("android.intent.category.HOME");
            this.startActivity(intent);
        }
        return false;
    }

    /*
     * Unable to fully structure code
     * Enabled aggressive exception aggregation
     */
    protected void onPause() {
        super.onPause();
        this.logger.info("onPause=====");
        try {
            this.handler.removeMessages(1);
        }
        catch (Exception var1_8) {
            ** continue;
        }
lbl7: // 2 sources:
        do {
            try {
                this.handler.removeMessages(2);
            }
            catch (Exception var2_7) {
                ** continue;
            }
lbl12: // 2 sources:
            do {
                try {
                    this.handler.removeMessages(3);
                }
                catch (Exception var3_6) {
                    ** continue;
                }
lbl17: // 2 sources:
                do {
                    try {
                        this.handler.removeMessages(4);
                    }
                    catch (Exception var4_5) {
                        ** continue;
                    }
lbl22: // 2 sources:
                    do {
                        try {
                            this.handler.removeMessages(5);
                        }
                        catch (Exception var5_4) {
                            ** continue;
                        }
lbl27: // 2 sources:
                        do {
                            try {
                                this.handler.removeMessages(6);
                            }
                            catch (Exception var6_3) {
                                ** continue;
                            }
lbl32: // 2 sources:
                            do {
                                try {
                                    this.stopCountDownTimer();
                                }
                                catch (Exception var7_1) {
                                    var7_1.printStackTrace();
                                    ** continue;
                                }
lbl38: // 2 sources:
                                do {
                                    this.authFlag = false;
                                    this.layVerify.setVisibility(8);
                                    if (this.client != null) {
                                        this.client.close();
                                    }
                                    return;
                                    break;
                                } while (true);
                                catch (Exception var8_2) {
                                    var8_2.printStackTrace();
                                    return;
                                }
                                break;
                            } while (true);
                            break;
                        } while (true);
                        break;
                    } while (true);
                    break;
                } while (true);
                break;
            } while (true);
            break;
        } while (true);
    }

    protected void onStart() {
        super.onStart();
    }

    public void setCheckState(boolean bl) {
        try {
            this.sharedCheckState = this.getSharedPreferences("CHECK_STATE", 1);
            SharedPreferences.Editor editor = this.sharedCheckState.edit();
            editor.putBoolean("checked", bl);
            editor.commit();
            Log.i((String)"BaseActivity", (String)("setCheckState===\u8bbe\u7f6e\u72b6\u6001==state==" + bl));
            return;
        }
        catch (Exception var2_3) {
            var2_3.printStackTrace();
            return;
        }
    }

    public void stopCountDownTimer() {
        this.logger.debug("stopCountDownTimer====timer\u505c\u6b62==");
        if (this.mTimerCountDown != null) {
            this.mTimerCountDown.cancel();
            this.mTimerCountDown = null;
        }
        if (this.mTimerCountDownTask != null) {
            this.mTimerCountDownTask.cancel();
            this.mTimerCountDownTask = null;
        }
        this.isCountDownFlag = false;
        this.countDownCount = 0;
    }

    public void timerTask() {
        this.timerTask = new TimerTask(){

            public void run() {
                mHandler.sendEmptyMessage(0);
            }
        };
        this.mTimer.schedule(this.timerTask, 1000, 1000);
    }

    private class GetVerifyCodeThread
    extends Thread {
        /*
         * Enabled aggressive block sorting
         * Enabled unnecessary exception pruning
         * Enabled aggressive exception aggregation
         */
        public GetVerifyCodeThread() {
            try {
                if (SucessActivity.this.client == null) {
                    SucessActivity.access$18(SucessActivity.this, new SocketClientUDP());
                }
            }
            catch (Exception var2_2) {
                SucessActivity.this.logger.debug("client=init exception==");
            }
            SucessActivity.access$5(SucessActivity.this, false);
        }

        /*
         * Enabled aggressive block sorting
         * Enabled unnecessary exception pruning
         * Enabled aggressive exception aggregation
         */
        public void run() {
            SucessActivity.this.logger.debug("call GetVerifyThread===");
            try {
                String string2;
                SucessActivity.access$19(SucessActivity.this, new ShareUtil((Context)SucessActivity.this));
                SucessActivity.access$21(SucessActivity.this, SucessActivity.this.shareUtil.getVerifyURL());
                SucessActivity.this.logger.debug("call GetVerifyThread==step1=verifyURL==" + SucessActivity.this.verifyURL);
                SucessActivity.access$23(SucessActivity.this, new Date().getTime());
                SucessActivity.this.logger.debug("call GetVerifyThread==step2=");
                SucessActivity.access$24(SucessActivity.this, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SS"));
                SucessActivity.this.logger.debug("call GetVerifyThread==step3=");
                SucessActivity.access$25(SucessActivity.this, MD5Builder.getMD5(String.valueOf((Object)SucessActivity.this.getUsername()) + "x%i^n&l*i)yixunsms"));
                SucessActivity.this.logger.debug("call GetVerifyThread==step4=getUsername==" + SucessActivity.this.getUsername());
                String string3 = "<op><accountInfo login='" + SucessActivity.this.getUsername() + "' id='" + SucessActivity.this.id + "' checkCode='" + SucessActivity.this.key + "' /></op>";
                SucessActivity.this.logger.debug("\u8bf7\u6c42[" + string3);
                if (SucessActivity.this.client == null) {
                    SucessActivity.this.logger.debug("client == null");
                } else {
                    SucessActivity.this.logger.debug("client != null");
                }
                SucessActivity.this.logger.debug("==verifyURL==" + SucessActivity.this.verifyURL);
                if ("".equals((Object)SucessActivity.this.verifyURL) || SucessActivity.this.verifyURL == "") {
                    SucessActivity.this.logger.debug("==verifyURLAAA==");
                    SucessActivity.this.client.send(Config.VERIFYCODE_AUTH_URL, Config.VERIFYCODE_AUTH_SORT, string3.getBytes());
                    SucessActivity.this.logger.debug("\u5ba2\u6237\u7aef\u53d1\u9001\u6570\u636e\uff1a" + string3);
                    string2 = SucessActivity.this.client.receive(Config.VERIFYCODE_AUTH_URL, Config.VERIFYCODE_AUTH_SORT);
                } else {
                    SucessActivity.this.logger.debug("==verifyURL=BBB=" + SucessActivity.this.verifyURL.split(":")[0] + "==verifySORT==" + SucessActivity.this.verifyURL.split(":")[1]);
                    SucessActivity.this.client.send(SucessActivity.this.verifyURL.split(":")[0], Integer.parseInt((String)SucessActivity.this.verifyURL.split(":")[1]), string3.getBytes());
                    SucessActivity.this.logger.debug("\u5ba2\u6237\u7aef\u53d1\u9001\u6570\u636e\uff1a" + string3);
                    string2 = SucessActivity.this.client.receive(SucessActivity.this.verifyURL.split(":")[0], Integer.parseInt((String)SucessActivity.this.verifyURL.split(":")[1]));
                }
                SucessActivity.this.logger.debug("\u63a5\u6536" + string2);
                SucessActivity.this.getResultInfo(string2);
                SucessActivity.this.logger.debug("\u63a5\u6536strResultInfo[0]==" + SucessActivity.this.strResultInfo[0] + "==strResultInfo[2]==" + SucessActivity.this.strResultInfo[2]);
                if (("OK".equals((Object)SucessActivity.this.strResultInfo[0]) || SucessActivity.this.strResultInfo[0] == "OK") && ("Y".equals((Object)SucessActivity.this.strResultInfo[2]) || SucessActivity.this.strResultInfo[2] == "Y")) {
                    SucessActivity.this.logger.debug("GetVerifyCode==Client====use check======");
                    SucessActivity.this.handler.sendEmptyMessage(6);
                    return;
                }
            }
            catch (Exception var1_3) {
                SucessActivity.this.logger.debug("e====" + (Object)var1_3.fillInStackTrace() + "==eee==" + var1_3.toString());
                var1_3.printStackTrace();
                return;
            }
            SucessActivity.this.logger.debug("GetVerifyCode==Client====none use check======");
        }
    }

    public class MyReceiver
    extends BroadcastReceiver {
        public void onReceive(Context context, Intent intent) {
            if ("Exception".equals((Object)intent.getExtras().getString("onlineHeart"))) {
                SucessActivity.this.logger.debug("\u5e7f\u64ad\u63a5\u6536ok");
                SucessActivity.this.clearData();
                Intent intent2 = new Intent((Context)SucessActivity.this, (Class)MainActivity.class);
                SucessActivity.this.startActivity(intent2);
                SucessActivity.this.logger.debug("\u53d1\u9001\u5728\u7ebf\u5fc3\u8df3\u62a5\u6587\u53d1\u751f\u5f02\u5e38\uff0c\u8fd4\u56de\u767b\u5f55\u754c\u9762");
                Toast.makeText((Context)SucessActivity.this.getApplicationContext(), (CharSequence)"\u7f51\u7edc\u53d1\u751f\u5f02\u5e38\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55", (int)0).show();
                SucessActivity.this.finish();
            }
        }
    }

    private class VerifyThread
    extends Thread {
        /*
         * Enabled aggressive block sorting
         * Enabled unnecessary exception pruning
         * Enabled aggressive exception aggregation
         */
        public VerifyThread() {
            try {
                if (SucessActivity.this.client == null) {
                    SucessActivity.access$18(SucessActivity.this, new SocketClientUDP());
                }
            }
            catch (Exception var2_2) {
                SucessActivity.this.logger.debug("client=init exception==");
            }
            SucessActivity.access$5(SucessActivity.this, false);
        }

        /*
         * Enabled aggressive block sorting
         * Enabled unnecessary exception pruning
         * Enabled aggressive exception aggregation
         */
        public void run() {
            Log.d((String)"BaseActivity", (String)"call VerifyThread");
            try {
                String string2;
                SucessActivity.access$23(SucessActivity.this, new Date().getTime());
                SucessActivity.access$24(SucessActivity.this, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SS"));
                SucessActivity.access$25(SucessActivity.this, MD5Builder.getMD5(String.valueOf((Object)SucessActivity.this.getUsername()) + "x%i^n&l*i)yixunsms"));
                String string3 = "<op><validateAccount  login='" + SucessActivity.this.getUsername() + "' id='" + SucessActivity.this.id + "'  checkCode='" + SucessActivity.this.key + "' validateCode='" + SucessActivity.this.tvVerifyCode.getText().toString() + "' /></op>";
                if ("".equals((Object)SucessActivity.this.verifyURL)) {
                    SucessActivity.this.client.send(Config.VERIFYCODE_AUTH_URL, Config.VERIFYCODE_AUTH_SORT, string3.getBytes());
                    SucessActivity.this.logger.debug("\u5ba2\u6237\u7aef\u53d1\u9001\u6570\u636e\uff1a" + string3);
                    string2 = SucessActivity.this.client.receive(Config.VERIFYCODE_AUTH_URL, Config.VERIFYCODE_AUTH_SORT);
                } else {
                    SucessActivity.this.client.send(SucessActivity.this.verifyURL.split(":")[0], Integer.parseInt((String)SucessActivity.this.verifyURL.split(":")[1]), string3.getBytes());
                    SucessActivity.this.logger.debug("\u5ba2\u6237\u7aef\u53d1\u9001\u6570\u636e\uff1a" + string3);
                    string2 = SucessActivity.this.client.receive(SucessActivity.this.verifyURL.split(":")[0], Integer.parseInt((String)SucessActivity.this.verifyURL.split(":")[1]));
                }
                SucessActivity.this.logger.debug("\u670d\u52a1\u7aef\u56de\u5e94\u6570\u636e\uff1a" + new String(string2.getBytes(), "GBK"));
                SucessActivity.this.logger.debug("\u670d\u52a1\u7aef\u56de\u5e94\u6570\u636e=================\uff1a" + string2);
                SucessActivity.this.getResultInfo(string2);
                SucessActivity.this.logger.debug("Verify===Client====strResultInfo[0]======" + SucessActivity.this.strResultInfo[0]);
                if ("OK".equals((Object)SucessActivity.this.strResultInfo[0]) || SucessActivity.this.strResultInfo[0] == "OK") {
                    SucessActivity.this.logger.debug("Verify===Client====COUNT_DOWN_SUCESS=====");
                    SucessActivity.this.handler.sendEmptyMessage(4);
                } else {
                    SucessActivity.this.logger.debug("Verify===Client====COUNT_DOWN_ERROR=====");
                    SucessActivity.this.handler.sendEmptyMessage(2);
                }
                SucessActivity.this.stopCountDownTimer();
                return;
            }
            catch (Exception var2_3) {
                SucessActivity.this.logger.debug("Verify===Client====exp=====" + var2_3.toString());
                if (!SucessActivity.this.timeoutFlag) {
                    SucessActivity.access$12((SucessActivity)SucessActivity.this)[0] = "0";
                    SucessActivity.access$12((SucessActivity)SucessActivity.this)[1] = "\u6821\u9a8c\u9a8c\u8bc1\u7801\u53d1\u751f\u5f02\u5e38";
                    SucessActivity.this.handler.sendEmptyMessage(2);
                }
                return;
            }
        }
    }

}

