K-Studios Hub v1.0版本的 MD5 值为:27abedca3b2878e1cf06ac747d354792

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


package com.KS.KStudiosHub;

import android.app.Notification;
import android.content.Intent;
import android.os.Bundle;
import android.util.SparseBooleanArray;
import android.util.TypedValue;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.KS.KStudiosHub.RequestNetwork;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.BuildConfig;
import com.google.firebase.FirebaseApp;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Random;
public class VerifyActivity extends AppCompatActivity {
    private RequestNetwork Checkero;
    private Notification NotificationSender;
    private RequestNetwork.RequestListener _Checkero_request_listener;
    private OnCompleteListener<AuthResult> _fAuth_create_user_listener;
    private OnCompleteListener<Void> _fAuth_reset_password_listener;
    private OnCompleteListener<AuthResult> _fAuth_sign_in_listener;
    private Button button1;
    private Button button2;
    private Button button3;
    private Button button4;
    private Button button5;
    private Button button6;
    private Button button7;
    private LinearLayout change;
    private EditText edittext1;
    private EditText email;
    private FirebaseAuth fAuth;
    private OnCompleteListener<Void> fAuth_deleteUserListener;
    private OnCompleteListener<Void> fAuth_emailVerificationSentListener;
    private OnCompleteListener<AuthResult> fAuth_googleSignInListener;
    private OnCompleteListener<AuthResult> fAuth_phoneAuthListener;
    private OnCompleteListener<Void> fAuth_updateEmailListener;
    private OnCompleteListener<Void> fAuth_updatePasswordListener;
    private OnCompleteListener<Void> fAuth_updateProfileListener;
    private LinearLayout linear4;
    private LinearLayout login;
    private LinearLayout notice;
    private EditText password;
    private LinearLayout req;
    private TextView textview1;
    private TextView textview2;
    private TextView textview3;
    private TextView textview4;
    private TextView textview5;
    private TextView textview6;
    private TextView textview7;
    private TextView textview8;
    private TextView textview9;
    private HashMap<String, Object> map = new HashMap<>();
    private Intent TP = new Intent();

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.verify);
        initialize(bundle);
        FirebaseApp.initializeApp(this);
        initializeLogic();
    }

    private void initialize(Bundle bundle) {
        this.notice = (LinearLayout) findViewById(R.id.notice);
        this.login = (LinearLayout) findViewById(R.id.login);
        this.req = (LinearLayout) findViewById(R.id.req);
        this.change = (LinearLayout) findViewById(R.id.change);
        this.textview1 = (TextView) findViewById(R.id.textview1);
        this.textview2 = (TextView) findViewById(R.id.textview2);
        this.button1 = (Button) findViewById(R.id.button1);
        this.button2 = (Button) findViewById(R.id.button2);
        this.linear4 = (LinearLayout) findViewById(R.id.linear4);
        this.button3 = (Button) findViewById(R.id.button3);
        this.button6 = (Button) findViewById(R.id.button6);
        this.textview5 = (TextView) findViewById(R.id.textview5);
        this.textview3 = (TextView) findViewById(R.id.textview3);
        this.email = (EditText) findViewById(R.id.email);
        this.textview4 = (TextView) findViewById(R.id.textview4);
        this.password = (EditText) findViewById(R.id.password);
        this.textview6 = (TextView) findViewById(R.id.textview6);
        this.textview7 = (TextView) findViewById(R.id.textview7);
        this.button4 = (Button) findViewById(R.id.button4);
        this.button5 = (Button) findViewById(R.id.button5);
        this.textview8 = (TextView) findViewById(R.id.textview8);
        this.textview9 = (TextView) findViewById(R.id.textview9);
        this.edittext1 = (EditText) findViewById(R.id.edittext1);
        this.button7 = (Button) findViewById(R.id.button7);
        this.fAuth = FirebaseAuth.getInstance();
        this.Checkero = new RequestNetwork(this);
        this.button1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                VerifyActivity.this.notice.setVisibility(8);
                VerifyActivity.this.login.setVisibility(0);
                VerifyActivity.this.req.setVisibility(8);
                VerifyActivity.this.change.setVisibility(8);
            }
        });
        this.button2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                VerifyActivity.this.finish();
            }
        });
        this.button3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                VerifyActivity.this.fAuth.signInWithEmailAndPassword(VerifyActivity.this.email.getText().toString(), VerifyActivity.this.password.getText().toString()).addOnCompleteListener(VerifyActivity.this, VerifyActivity.this._fAuth_sign_in_listener);
            }
        });
        this.button6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                VerifyActivity.this.notice.setVisibility(0);
                VerifyActivity.this.login.setVisibility(8);
                VerifyActivity.this.req.setVisibility(8);
                VerifyActivity.this.change.setVisibility(8);
            }
        });
        this.textview5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                VerifyActivity.this.notice.setVisibility(8);
                VerifyActivity.this.login.setVisibility(8);
                VerifyActivity.this.req.setVisibility(0);
                VerifyActivity.this.change.setVisibility(8);
            }
        });
        this.button4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                VerifyActivity.this.map = new HashMap();
                VerifyActivity.this.map.put("username", FirebaseAuth.getInstance().getCurrentUser().getEmail());
                VerifyActivity.this.map.put("content", "***Password Reset Request***");
                VerifyActivity.this.Checkero.setParams(VerifyActivity.this.map, 0);
                VerifyActivity.this.Checkero.startRequestNetwork("POST", "https://discord.com/api/webhooks/1109596865982382110/IsBvMwLyhIot46YyR2__DUwOHaVvPIBHydgjMqC_ZgQ76bCTHzaUNxCfEaZs5cqJL-CN", "#".concat(String.valueOf(SketchwareUtil.getRandom(1000, 9999))), VerifyActivity.this._Checkero_request_listener);
                NotificationHandler.showNotification(VerifyActivity.this.button4.getContext(), "Password Reset Request", "KEEP IN MIND: It can take up to 48 hours to receive the email with a link!");
                VerifyActivity.this.TP.setClass(VerifyActivity.this.getApplicationContext(), RegLogActivity.class);
                VerifyActivity.this.startActivity(VerifyActivity.this.TP);
                VerifyActivity.this.finish();
            }
        });
        this.button5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                VerifyActivity.this.notice.setVisibility(8);
                VerifyActivity.this.login.setVisibility(0);
                VerifyActivity.this.req.setVisibility(8);
                VerifyActivity.this.change.setVisibility(8);
            }
        });
        this.button7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (VerifyActivity.this.edittext1.getText().toString().equals(BuildConfig.FLAVOR)) {
                    VerifyActivity.this.edittext1.setError("You can't set your new password to nothing!");
                    return;
                }
                FirebaseAuth.getInstance().getCurrentUser().updatePassword(VerifyActivity.this.edittext1.getText().toString()).addOnCompleteListener(VerifyActivity.this.fAuth_updatePasswordListener);
                VerifyActivity.this.TP.setClass(VerifyActivity.this.getApplicationContext(), RegLogActivity.class);
                VerifyActivity.this.startActivity(VerifyActivity.this.TP);
                VerifyActivity.this.finish();
            }
        });
        this._Checkero_request_listener = new RequestNetwork.RequestListener() {
            @Override
            public void onResponse(String str, String str2, HashMap<String, Object> hashMap) {
            }

            @Override
            public void onErrorResponse(String str, String str2) {
            }
        };
        this.fAuth_updateEmailListener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.fAuth_updatePasswordListener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.fAuth_emailVerificationSentListener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.fAuth_deleteUserListener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.fAuth_phoneAuthListener = new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(Task<AuthResult> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.fAuth_updateProfileListener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this.fAuth_googleSignInListener = new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(Task<AuthResult> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this._fAuth_create_user_listener = new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(Task<AuthResult> task) {
                task.isSuccessful();
                if (task.getException() != null) {
                    task.getException().getMessage();
                }
            }
        };
        this._fAuth_sign_in_listener = new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(Task<AuthResult> task) {
                boolean isSuccessful = task.isSuccessful();
                String message = task.getException() != null ? task.getException().getMessage() : BuildConfig.FLAVOR;
                if (isSuccessful) {
                    VerifyActivity.this.notice.setVisibility(8);
                    VerifyActivity.this.login.setVisibility(8);
                    VerifyActivity.this.req.setVisibility(8);
                    VerifyActivity.this.change.setVisibility(0);
                    return;
                }
                SketchwareUtil.showMessage(VerifyActivity.this.getApplicationContext(), message);
            }
        };
        this._fAuth_reset_password_listener = new OnCompleteListener<Void>() {
            @Override
            public void onComplete(Task<Void> task) {
                task.isSuccessful();
            }
        };
    }

    private void initializeLogic() {
        this.notice.setVisibility(0);
        this.login.setVisibility(8);
        this.req.setVisibility(8);
        this.change.setVisibility(8);
    }

    @Override
    public void onBackPressed() {
    }

    @Deprecated
    public void showMessage(String str) {
        Toast.makeText(getApplicationContext(), str, 0).show();
    }

    @Deprecated
    public int getLocationX(View view) {
        int[] iArr = new int[2];
        view.getLocationInWindow(iArr);
        return iArr[0];
    }

    @Deprecated
    public int getLocationY(View view) {
        int[] iArr = new int[2];
        view.getLocationInWindow(iArr);
        return iArr[1];
    }

    @Deprecated
    public int getRandom(int i, int i2) {
        return new Random().nextInt((i2 - i) + 1) + i;
    }

    @Deprecated
    public ArrayList<Double> getCheckedItemPositionsToArray(ListView listView) {
        ArrayList<Double> arrayList = new ArrayList<>();
        SparseBooleanArray checkedItemPositions = listView.getCheckedItemPositions();
        for (int i = 0; i < checkedItemPositions.size(); i++) {
            if (checkedItemPositions.valueAt(i)) {
                arrayList.add(Double.valueOf(checkedItemPositions.keyAt(i)));
            }
        }
        return arrayList;
    }

    @Deprecated
    public float getDip(int i) {
        return TypedValue.applyDimension(1, i, getResources().getDisplayMetrics());
    }

    @Deprecated
    public int getDisplayWidthPixels() {
        return getResources().getDisplayMetrics().widthPixels;
    }

    @Deprecated
    public int getDisplayHeightPixels() {
        return getResources().getDisplayMetrics().heightPixels;
    }
}