Check the expiry date on first run. Fixes bug #35.

This commit is contained in:
akwizgran
2014-01-05 21:53:32 +00:00
parent 09e16e3b34
commit c403df0e20

View File

@@ -89,6 +89,7 @@ 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
if(System.currentTimeMillis() < EXPIRY_DATE) {
showSpinner(); showSpinner();
startService(new Intent(BriarService.class.getName())); startService(new Intent(BriarService.class.getName()));
bindService(); bindService();
@@ -98,6 +99,9 @@ public class HomeScreenActivity extends RoboActivity {
// for example due to screen rotation // for example due to screen rotation
if(a == null) showButtons(); if(a == null) showButtons();
else storeLocalAuthor(a); 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();