mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 21:29:54 +01:00
Reference retrieved from reference manager may be null.
Fixes issue #3612379.
This commit is contained in:
@@ -99,8 +99,12 @@ public class HomeScreenActivity extends RoboActivity {
|
|||||||
showSpinner();
|
showSpinner();
|
||||||
startService(new Intent(BriarService.class.getName()));
|
startService(new Intent(BriarService.class.getName()));
|
||||||
bindService();
|
bindService();
|
||||||
storeLocalAuthor(referenceManager.removeReference(handle,
|
LocalAuthor a = referenceManager.removeReference(handle,
|
||||||
LocalAuthor.class));
|
LocalAuthor.class);
|
||||||
|
// The reference may be null if the activity has been recreated,
|
||||||
|
// for example due to screen rotation
|
||||||
|
if(a == null) showButtons();
|
||||||
|
else storeLocalAuthor(a);
|
||||||
} else if(databaseConfig.getEncryptionKey() == null) {
|
} else if(databaseConfig.getEncryptionKey() == null) {
|
||||||
// The activity was launched from the splash screen
|
// The activity was launched from the splash screen
|
||||||
if(System.currentTimeMillis() < EXPIRY_DATE) showPasswordPrompt();
|
if(System.currentTimeMillis() < EXPIRY_DATE) showPasswordPrompt();
|
||||||
|
|||||||
Reference in New Issue
Block a user