From b30fbc24b43fb557a04b9de4194724b96da4f247 Mon Sep 17 00:00:00 2001 From: Lisheng Guan Date: Tue, 27 Feb 2024 14:10:02 +0800 Subject: [PATCH] restore passcode --- .../money/manager/ex/home/MainActivity.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/money/manager/ex/home/MainActivity.java b/app/src/main/java/com/money/manager/ex/home/MainActivity.java index 3f807ed206..bca08ee486 100644 --- a/app/src/main/java/com/money/manager/ex/home/MainActivity.java +++ b/app/src/main/java/com/money/manager/ex/home/MainActivity.java @@ -257,19 +257,19 @@ protected void onStart() { super.onStart(); // check if has pass-code and authenticate -// if (!isAuthenticated) { -// Passcode passcode = new Passcode(getApplicationContext()); -// if (passcode.hasPasscode() && !isInAuthentication) { -// Intent intent = new Intent(this, PasscodeActivity.class); -// // set action and data -// intent.setAction(PasscodeActivity.INTENT_REQUEST_PASSWORD); -// intent.putExtra(PasscodeActivity.INTENT_MESSAGE_TEXT, getString(R.string.enter_your_passcode)); -// // start activity -// startActivityForResult(intent, RequestCodes.PASSCODE); -// // set in authentication -// isInAuthentication = true; -// } -// } + if (!isAuthenticated) { + Passcode passcode = new Passcode(getApplicationContext()); + if (passcode.hasPasscode() && !isInAuthentication) { + Intent intent = new Intent(this, PasscodeActivity.class); + // set action and data + intent.setAction(PasscodeActivity.INTENT_REQUEST_PASSWORD); + intent.putExtra(PasscodeActivity.INTENT_MESSAGE_TEXT, getString(R.string.enter_your_passcode)); + // start activity + startActivityForResult(intent, RequestCodes.PASSCODE); + // set in authentication + isInAuthentication = true; + } + } // todo: mark the active database file in the navigation panel. // mDrawer