Merge pull request #438 from alexbakker/fix-intro-creds

Fix issue where VaultManager was erroneously initialized with creds in intro
This commit is contained in:
Michael Schättgen 2020-05-25 16:41:35 +02:00 committed by GitHub
commit 58db3fdaa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -110,7 +110,11 @@ public class IntroActivity extends AppIntro2 {
return;
}
_app.initVaultManager(vault, creds);
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