mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 06:39:54 +01:00
Check the expiry date on first run. Fixes bug #35.
This commit is contained in:
@@ -89,15 +89,19 @@ public class HomeScreenActivity extends RoboActivity {
|
|||||||
long handle = i.getLongExtra("net.sf.briar.LOCAL_AUTHOR_HANDLE", -1);
|
long handle = i.getLongExtra("net.sf.briar.LOCAL_AUTHOR_HANDLE", -1);
|
||||||
if(handle != -1) {
|
if(handle != -1) {
|
||||||
// The activity was launched from the setup wizard
|
// The activity was launched from the setup wizard
|
||||||
showSpinner();
|
if(System.currentTimeMillis() < EXPIRY_DATE) {
|
||||||
startService(new Intent(BriarService.class.getName()));
|
showSpinner();
|
||||||
bindService();
|
startService(new Intent(BriarService.class.getName()));
|
||||||
LocalAuthor a = referenceManager.removeReference(handle,
|
bindService();
|
||||||
LocalAuthor.class);
|
LocalAuthor a = referenceManager.removeReference(handle,
|
||||||
// The reference may be null if the activity has been recreated,
|
LocalAuthor.class);
|
||||||
// for example due to screen rotation
|
// The reference may be null if the activity has been recreated,
|
||||||
if(a == null) showButtons();
|
// for example due to screen rotation
|
||||||
else storeLocalAuthor(a);
|
if(a == null) showButtons();
|
||||||
|
else storeLocalAuthor(a);
|
||||||
|
} else {
|
||||||
|
showExpiryWarning();
|
||||||
|
}
|
||||||
} 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