Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
briar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian Dehm
briar
Commits
79233a47
Commit
79233a47
authored
12 years ago
by
akwizgran
Browse files
Options
Downloads
Patches
Plain Diff
Throw an exception if BriarService is (re)created without a password.
parent
371cdf0f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
briar-android/src/net/sf/briar/android/BriarService.java
+7
-3
7 additions, 3 deletions
briar-android/src/net/sf/briar/android/BriarService.java
with
7 additions
and
3 deletions
briar-android/src/net/sf/briar/android/BriarService.java
+
7
−
3
View file @
79233a47
...
@@ -12,6 +12,7 @@ import java.util.logging.Logger;
...
@@ -12,6 +12,7 @@ import java.util.logging.Logger;
import
net.sf.briar.R
;
import
net.sf.briar.R
;
import
net.sf.briar.api.crypto.KeyManager
;
import
net.sf.briar.api.crypto.KeyManager
;
import
net.sf.briar.api.db.DatabaseComponent
;
import
net.sf.briar.api.db.DatabaseComponent
;
import
net.sf.briar.api.db.DatabaseConfig
;
import
net.sf.briar.api.db.DbException
;
import
net.sf.briar.api.db.DbException
;
import
net.sf.briar.api.plugins.PluginManager
;
import
net.sf.briar.api.plugins.PluginManager
;
import
roboguice.service.RoboService
;
import
roboguice.service.RoboService
;
...
@@ -34,9 +35,10 @@ public class BriarService extends RoboService {
...
@@ -34,9 +35,10 @@ public class BriarService extends RoboService {
private
final
CountDownLatch
shutdownLatch
=
new
CountDownLatch
(
1
);
private
final
CountDownLatch
shutdownLatch
=
new
CountDownLatch
(
1
);
private
final
Binder
binder
=
new
BriarBinder
();
private
final
Binder
binder
=
new
BriarBinder
();
@Inject
private
DatabaseComponent
db
;
@Inject
private
DatabaseConfig
databaseConfig
=
null
;
@Inject
private
KeyManager
keyManager
;
@Inject
private
DatabaseComponent
db
=
null
;
@Inject
private
PluginManager
pluginManager
;
@Inject
private
KeyManager
keyManager
=
null
;
@Inject
private
PluginManager
pluginManager
=
null
;
@Override
@Override
public
void
onCreate
()
{
public
void
onCreate
()
{
...
@@ -90,6 +92,8 @@ public class BriarService extends RoboService {
...
@@ -90,6 +92,8 @@ public class BriarService extends RoboService {
}
}
private
void
startServices
()
{
private
void
startServices
()
{
if
(
databaseConfig
.
getEncryptionKey
()
==
null
)
throw
new
IllegalStateException
();
try
{
try
{
if
(
LOG
.
isLoggable
(
INFO
))
LOG
.
info
(
"Starting"
);
if
(
LOG
.
isLoggable
(
INFO
))
LOG
.
info
(
"Starting"
);
boolean
reopened
=
db
.
open
();
boolean
reopened
=
db
.
open
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment