Wrapped OsdUtil Toast calls in a RunOnUIThread function to avoid occasional crashes when beeping. Closes #8
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package uk.org.openseizuredetector;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Handler;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -24,7 +25,8 @@ public class OsdUtilTest {
|
||||
@Test
|
||||
public void testStartServer() throws Exception {
|
||||
//Activity a = new Activity();
|
||||
OsdUtil util = new OsdUtil(null);
|
||||
Handler handler = new Handler();
|
||||
OsdUtil util = new OsdUtil(null,handler);
|
||||
assertThat(util.isServerRunning(), is(true));
|
||||
assertThat(true, is (true));
|
||||
//assertThat(true, is(false));
|
||||
|
||||
Reference in New Issue
Block a user