android的宏#ifdef SINGLE_PROCESS是嘛意思?
方紫涵 2011-04-20 02:37:54 如
class PreviewThread : public Thread {
CameraHardwareStub* mHardware;
public:
PreviewThread(CameraHardwareStub* hw) :
#ifdef SINGLE_PROCESS //宏#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);
}
virtual bool threadLoop() {
mHardware->previewThread();
// loop until we need to quit
return true;
}
};