|
|
|
@ -41,11 +41,11 @@ public class pwdActivity extends FragmentActivity {
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
String pwd = mEtpwd.getText().toString();
|
|
|
|
|
Intent intent=null;
|
|
|
|
|
if(pwd.equals("123")){
|
|
|
|
|
if(pwd.equals("123456")){
|
|
|
|
|
intent = new Intent(pwdActivity.this,SafeFolderActivity.class);
|
|
|
|
|
startActivity(intent);
|
|
|
|
|
}else{
|
|
|
|
|
ToastUtil.toastShort(pwdActivity.this,String.valueOf(R.string.pwdwrong));
|
|
|
|
|
ToastUtil.toastShort(pwdActivity.this,String.valueOf(getResources().getString(R.string.pwdwrong)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -63,13 +63,13 @@ public class pwdActivity extends FragmentActivity {
|
|
|
|
|
@Override
|
|
|
|
|
public void onAuthenticationError(int errorCode, @NonNull CharSequence errString) {
|
|
|
|
|
super.onAuthenticationError(errorCode, errString);
|
|
|
|
|
Toast.makeText(getApplicationContext(), String.valueOf(R.string.AuthenticationFailed) + errString, Toast.LENGTH_SHORT).show();
|
|
|
|
|
Toast.makeText(getApplicationContext(), String.valueOf(getResources().getString(R.string.AuthenticationFailed)) + errString, Toast.LENGTH_SHORT).show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult result) {
|
|
|
|
|
super.onAuthenticationSucceeded(result);
|
|
|
|
|
Toast.makeText(getApplicationContext(), String.valueOf(R.string.AuthenticationSuccess), Toast.LENGTH_SHORT).show();
|
|
|
|
|
Toast.makeText(getApplicationContext(), String.valueOf(getResources().getString(R.string.AuthenticationSuccess)), Toast.LENGTH_SHORT).show();
|
|
|
|
|
// Replace the below code with your code to start the SafeFolderActivity
|
|
|
|
|
// if authentication is successful
|
|
|
|
|
Intent intent = new Intent(pwdActivity.this, SafeFolderActivity.class);
|
|
|
|
@ -79,14 +79,14 @@ public class pwdActivity extends FragmentActivity {
|
|
|
|
|
@Override
|
|
|
|
|
public void onAuthenticationFailed() {
|
|
|
|
|
super.onAuthenticationFailed();
|
|
|
|
|
Toast.makeText(getApplicationContext(), String.valueOf(R.string.AuthenticationFailed), Toast.LENGTH_SHORT).show();
|
|
|
|
|
Toast.makeText(getApplicationContext(), String.valueOf(getResources().getString(R.string.AuthenticationFailed)), Toast.LENGTH_SHORT).show();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
promptInfo = new BiometricPrompt.PromptInfo.Builder()
|
|
|
|
|
.setTitle(String.valueOf(R.string.BioAuth))
|
|
|
|
|
.setSubtitle(String.valueOf(R.string.LogUseBio))
|
|
|
|
|
.setNegativeButtonText(String.valueOf(R.string.datetime_dialog_cancel))
|
|
|
|
|
.setTitle(String.valueOf(getResources().getString(R.string.BioAuth)))
|
|
|
|
|
.setSubtitle(String.valueOf(getResources().getString(R.string.LogUseBio)))
|
|
|
|
|
.setNegativeButtonText(String.valueOf(getResources().getString(R.string.datetime_dialog_cancel)))
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|