Fixed notification and made code slightly simpler

This commit is contained in:
2016-04-27 17:30:05 +02:00
parent 0ecfbd3fb8
commit f705e13d0b
5 changed files with 12 additions and 12 deletions

View File

@ -37,19 +37,13 @@ import static ch.dissem.apps.abit.notification.ProofOfWorkNotification.ONGOING_N
*/
public class ProofOfWorkService extends Service {
// Object to use as a thread-safe lock
private static final Object lock = new Object();
private static ProofOfWorkEngine engine;
private static ProofOfWorkEngine engine = new MultiThreadedPOWEngine();
private static boolean calculating;
private static final Queue<PowItem> queue = new LinkedList<>();
private static ProofOfWorkNotification notification;
@Override
public void onCreate() {
synchronized (lock) {
if (engine == null) {
engine = new MultiThreadedPOWEngine();
}
}
notification = new ProofOfWorkNotification(this);
}