// Path: app/src/main/java/com/yan/mobilesafe/activity/Setup/SetupActivity1.java
// public class SetupActivity1 extends AppCompatActivity {
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_setup1);
//         Button next = (Button) findViewById(R.id.next);
// 
//         next.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View v) {
// 
//                 startActivity(new Intent(getApplicationContext(), SetupActivity2.class));
//                 finish();
//                 overridePendingTransition(R.anim.tran_in, R.anim.tran_out);//进入动画和退出动画
// 
//             }
//         });
//     }
// }
// 
// Path: app/src/main/java/com/yan/mobilesafe/utils/MD5utils.java
// public class MD5utils {
//     /**
//      * Md5加密
//      */
//     public static String encode(String password)  {
//         MessageDigest messageDigest = null;
//         try {
//             messageDigest = MessageDigest.getInstance("MD5");
//         } catch (NoSuchAlgorithmException e) {
//             e.printStackTrace();
//         }
//         byte[] digest = messageDigest.digest(password.getBytes());
// 
//         StringBuffer stringBuffer = new StringBuffer();
//         for (byte b : digest) {
//             int i = b & 0xff; //获取字节的低八位
//             String hexString = Integer.toHexString(i);  //转换成16进制
// 
//             if (hexString.length() < 2) {
//                 hexString = "0" + hexString;
//             }
//             stringBuffer.append(hexString);
//         }
//         return stringBuffer.toString();
//     }
// }


import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.yan.mobilesafe.R;
import com.yan.mobilesafe.activity.Setup.SetupActivity1;
import com.yan.mobilesafe.utils.MD5utils;
    @Override
    public void afterTextChanged(Editable s) {
        if (TextUtils.isEmpty(etPassword.getText().toString())
                && TextUtils.isEmpty(etPasswordConfirm.getText().toString())) {
            btnOk.setEnabled(false);
        } else {
            btnOk.setEnabled(true);
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        finish();
    }

    /**
     * 判断是否进入引导页进入引导页
     */
    private void isFirstIn() {
        if (configed) {
            setContentView(R.layout.sim_guard_layout);

            intosetting = (TextView) findViewById(R.id.into_setting);
            safeNumber = (TextView) findViewById(R.id.safe_number);
            lockioc = (ImageView) findViewById(R.id.lock);

            intosetting.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
// Path: app/src/main/java/com/yan/mobilesafe/activity/Setup/SetupActivity1.java
// public class SetupActivity1 extends AppCompatActivity {
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         setContentView(R.layout.activity_setup1);
//         Button next = (Button) findViewById(R.id.next);
// 
//         next.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View v) {
// 
//                 startActivity(new Intent(getApplicationContext(), SetupActivity2.class));
//                 finish();
//                 overridePendingTransition(R.anim.tran_in, R.anim.tran_out);//进入动画和退出动画
// 
//             }
//         });
//     }
// }
// 
// Path: app/src/main/java/com/yan/mobilesafe/utils/MD5utils.java
// public class MD5utils {
//     /**
//      * Md5加密
//      */
//     public static String encode(String password)  {
//         MessageDigest messageDigest = null;
//         try {
//             messageDigest = MessageDigest.getInstance("MD5");
//         } catch (NoSuchAlgorithmException e) {
//             e.printStackTrace();
//         }
//         byte[] digest = messageDigest.digest(password.getBytes());
// 
//         StringBuffer stringBuffer = new StringBuffer();
//         for (byte b : digest) {
//             int i = b & 0xff; //获取字节的低八位
//             String hexString = Integer.toHexString(i);  //转换成16进制
// 
//             if (hexString.length() < 2) {
//                 hexString = "0" + hexString;
//             }
//             stringBuffer.append(hexString);
//         }
//         return stringBuffer.toString();
//     }
// }


// Path: app/src/main/java/com/yan/mobilesafe/activity/Simguard.java
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.yan.mobilesafe.R;
import com.yan.mobilesafe.activity.Setup.SetupActivity1;
import com.yan.mobilesafe.utils.MD5utils;

    @Override
    public void afterTextChanged(Editable s) {
        if (TextUtils.isEmpty(etPassword.getText().toString())
                && TextUtils.isEmpty(etPasswordConfirm.getText().toString())) {
            btnOk.setEnabled(false);
        } else {
            btnOk.setEnabled(true);
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        finish();
    }

    /**
     * 判断是否进入引导页进入引导页
     */
    private void isFirstIn() {
        if (configed) {
            setContentView(R.layout.sim_guard_layout);

            intosetting = (TextView) findViewById(R.id.into_setting);
            safeNumber = (TextView) findViewById(R.id.safe_number);
            lockioc = (ImageView) findViewById(R.id.lock);

            intosetting.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    startActivity(new Intent(SimGuard.this, SetupActivity1.class));