In the simulator, make sure that the preview thread is a Java thread,
since we won't be going through the binder in single process mode.
diff --git a/camera/libcameraservice/CameraHardwareStub.h b/camera/libcameraservice/CameraHardwareStub.h
index efae935..dd3c706 100644
--- a/camera/libcameraservice/CameraHardwareStub.h
+++ b/camera/libcameraservice/CameraHardwareStub.h
@@ -67,8 +67,15 @@
class PreviewThread : public Thread {
CameraHardwareStub* mHardware;
public:
- PreviewThread(CameraHardwareStub* hw)
- : Thread(false), mHardware(hw) { }
+ PreviewThread(CameraHardwareStub* hw) :
+#ifdef SINGLE_PROCESS
+ // In single process mode this thread needs to be a java thread,
+ // since we won't be calling through the binder.
+ Thread(true),
+#else
+ Thread(false),
+#endif
+ mHardware(hw) { }
virtual void onFirstRef() {
run("CameraPreviewThread", PRIORITY_URGENT_DISPLAY);
}