Fix issue where VaultManager was erroneously initialized with creds in intro

Also fixes another issue where previously, if a user made it to the last intro
slide and then navigated back to change the security options, any changes would
be ignored.
This commit is contained in:
Alexander Bakker 2020-05-25 16:19:07 +02:00
parent 6a2992530e
commit 92b6738ff4
2 changed files with 8 additions and 2 deletions

View file

@ -110,7 +110,11 @@ public class IntroActivity extends AppIntro2 {
return;
}
if (cryptType == CustomAuthenticationSlide.CRYPT_TYPE_NONE) {
_app.initVaultManager(vault, null);
} else {
_app.initVaultManager(vault, creds);
}
// skip the intro from now on
_prefs.setIntroDone(true);

View file

@ -60,7 +60,6 @@ public class CustomAuthenticatedSlide extends Fragment implements SlidePolicy, S
}
});
_creds = new VaultFileCredentials();
view.findViewById(R.id.main).setBackgroundColor(_bgColor);
return view;
}
@ -96,6 +95,9 @@ public class CustomAuthenticatedSlide extends Fragment implements SlidePolicy, S
public void onSlideSelected() {
Intent intent = getActivity().getIntent();
_cryptType = intent.getIntExtra("cryptType", CustomAuthenticationSlide.CRYPT_TYPE_INVALID);
if (_cryptType != CustomAuthenticationSlide.CRYPT_TYPE_NONE) {
_creds = new VaultFileCredentials();
}
}
@Override