mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Simplified the expiry date logic to catch bug #35.
Leaving the expiry date at 22 January until the fix is confirmed.
This commit is contained in:
@@ -70,7 +70,7 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
public class HomeScreenActivity extends RoboActivity {
|
public class HomeScreenActivity extends RoboActivity {
|
||||||
|
|
||||||
// This build expires on 15 January 2014
|
// This build expires on 22 January 2014
|
||||||
private static final long EXPIRY_DATE = 1390348800 * 1000L;
|
private static final long EXPIRY_DATE = 1390348800 * 1000L;
|
||||||
|
|
||||||
private static final Logger LOG =
|
private static final Logger LOG =
|
||||||
@@ -106,25 +106,25 @@ public class HomeScreenActivity extends RoboActivity {
|
|||||||
finish();
|
finish();
|
||||||
if(LOG.isLoggable(INFO)) LOG.info("Exiting");
|
if(LOG.isLoggable(INFO)) LOG.info("Exiting");
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
|
} else if(System.currentTimeMillis() >= EXPIRY_DATE) {
|
||||||
|
showExpiryWarning();
|
||||||
} else if(handle != -1) {
|
} else if(handle != -1) {
|
||||||
// The activity was launched from the setup wizard
|
// The activity was launched from the setup wizard
|
||||||
if(System.currentTimeMillis() < EXPIRY_DATE) {
|
LocalAuthor a = referenceManager.removeReference(handle,
|
||||||
showSpinner();
|
LocalAuthor.class);
|
||||||
startService(new Intent(BriarService.class.getName()));
|
// The reference may be null if the activity has been recreated,
|
||||||
bindService();
|
// for example due to screen rotation
|
||||||
LocalAuthor a = referenceManager.removeReference(handle,
|
if(a == null) {
|
||||||
LocalAuthor.class);
|
showButtons();
|
||||||
// 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 {
|
} else {
|
||||||
showExpiryWarning();
|
showSpinner();
|
||||||
|
storeLocalAuthor(a);
|
||||||
}
|
}
|
||||||
|
startService(new Intent(BriarService.class.getName()));
|
||||||
|
bindService();
|
||||||
} 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();
|
showPasswordPrompt();
|
||||||
else showExpiryWarning();
|
|
||||||
} else {
|
} else {
|
||||||
// The activity has been launched before
|
// The activity has been launched before
|
||||||
showButtons();
|
showButtons();
|
||||||
|
|||||||
Reference in New Issue
Block a user