Skip to content

Commit be442a9

Browse files
committed
[LoginActivity] Fixes a bug that causes the app to crash when trying to login
Previously, when opening the application for the first time and pausing it without setting a master password, the app would crash upon reopening. This was because the app expected a master password that was never set before, causing authentication to fail and leading to a crash.
1 parent e555ab9 commit be442a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/de/davis/passwordmanager/ui/login/LoginActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static Intent getIntentForAuthentication(@NonNull Context context){
4545

4646
public static Intent getIntentForAuthentication(@NonNull Context context, Intent destActivity){
4747
Intent intent = new Intent(context, LoginActivity.class);
48-
intent.putExtra(context.getString(R.string.preference_authenticate_only), true);
48+
intent.putExtra(context.getString(R.string.preference_authenticate_only), MasterPassword.getOne().blockingGet() != null);
4949

5050
if(destActivity != null)
5151
intent.putExtra(context.getString(R.string.authentication_destination), destActivity);

0 commit comments

Comments
 (0)