mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Store schema version in database. Dev task #50.
If the schema of the database is incompatible with the schema expected by the code, the database throws a DbSchemaException. LifecycleManager indicates the error to BriarService, which uses HomeScreenActivity to show a notification and quit the app.
This commit is contained in:
10
briar-api/src/org/briarproject/api/db/DbSchemaException.java
Normal file
10
briar-api/src/org/briarproject/api/db/DbSchemaException.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package org.briarproject.api.db;
|
||||
|
||||
/**
|
||||
* Thrown when the schema of the database differs from the schema expected by
|
||||
* the code.
|
||||
*/
|
||||
public class DbSchemaException extends DbException {
|
||||
|
||||
private static final long serialVersionUID = -4444069279533651710L;
|
||||
}
|
||||
@@ -13,8 +13,11 @@ public interface LifecycleManager {
|
||||
*/
|
||||
public void registerForShutdown(ExecutorService e);
|
||||
|
||||
/** Starts any registered {@link Service}s. */
|
||||
public void startServices();
|
||||
/**
|
||||
* Starts any registered {@link Service}s and returns true if all services
|
||||
* started successfully.
|
||||
*/
|
||||
public boolean startServices();
|
||||
|
||||
/**
|
||||
* Stops any registered {@link Service}s and shuts down any registered
|
||||
|
||||
Reference in New Issue
Block a user