This commit is contained in:
benfry
2011-11-12 20:14:14 +00:00
parent e8d3a6689e
commit 278e56e230
3 changed files with 23 additions and 15 deletions
+4 -3
View File
@@ -1,6 +1,9 @@
0204 android
X fix problem with android emulator launching on Windows
X Android emulator not launching on Windows with 2.0 alpha releases
X http://code.google.com/p/processing/issues/detail?id=899
X /opt/android using version #s again? fix build script (earlier)
_ don't let the ... ?
_ if a sketch asks for android mode but it's not available
_ (after a double-click)
@@ -13,8 +16,6 @@ _ http://code.google.com/p/processing/issues/detail?id=767
_ don't let the examples get overwritten with other mode stuff
_ the whole sketch.properties thing is yech
_ /opt/android using version #s again? fix build script
_ add INTERNET permissions to the android net examples
_ go through all basics/topics examples
+1 -1
View File
@@ -94,7 +94,7 @@ class Devices {
}
// System.out.println("no emu found");
final EmulatorController emuController = EmulatorController.getInstance();
EmulatorController emuController = EmulatorController.getInstance();
// System.out.println("checking emulator state");
if (emuController.getState() == State.NOT_RUNNING) {
try {
@@ -5,30 +5,24 @@ import java.util.concurrent.CountDownLatch;
import processing.app.Base;
import processing.app.Preferences;
import processing.app.exec.LineProcessor;
import processing.app.exec.ProcessHelper;
import processing.app.exec.ProcessRegistry;
import processing.app.exec.ProcessResult;
import processing.app.exec.StreamPump;
import processing.app.exec.*;
import processing.core.PApplet;
class EmulatorController {
public static enum State {
NOT_RUNNING, WAITING_FOR_BOOT, RUNNING
}
public static EmulatorController getInstance() {
return INSTANCE;
}
private static final EmulatorController INSTANCE = new EmulatorController();
private volatile State state = State.NOT_RUNNING;
public State getState() {
return state;
}
private void setState(final State state) {
if (processing.app.Base.DEBUG) {
//System.out.println("Emulator state: " + state);
@@ -36,6 +30,7 @@ class EmulatorController {
}
this.state = state;
}
/**
* Blocks until emulator is running, or some catastrophe happens.
@@ -163,4 +158,16 @@ class EmulatorController {
System.err.println("Interrupted while waiting for emulator to launch.");
}
}
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// whoever called them "design patterns" certainly wasn't a f*king designer.
public static EmulatorController getInstance() {
return INSTANCE;
}
private static final EmulatorController INSTANCE = new EmulatorController();
}