Helper to see if native thread loop is waiting to power on.

This commit is contained in:
James Sanford 2012-10-12 18:46:44 -07:00
parent 1f9812a371
commit 8683da9557

View File

@ -129,7 +129,6 @@ class KegsView extends SurfaceView implements SurfaceHolder.Callback {
return mPauseLock.hasQueuedThreads();
}
public void doPowerOff() {
// Tell the native thread loop to wait before powering on again.
mPowerWait.lock();
@ -147,6 +146,10 @@ class KegsView extends SurfaceView implements SurfaceHolder.Callback {
}
}
// Is native thread loop sitting around waiting for us to allow power on?
public boolean nowWaitingForPowerOn() {
return mPowerWait.hasQueuedThreads();
}
}
private KegsThread thread;