Methods Summary |
---|
synchronized void | acquire(long timeout)
if (mTimerWakeLock == null) {
mTimerWakeLock = mPowerManager.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK, "SipWakeLock.timer");
mTimerWakeLock.setReferenceCounted(true);
}
mTimerWakeLock.acquire(timeout);
|
synchronized void | acquire(java.lang.Object holder)
mHolders.add(holder);
if (mWakeLock == null) {
mWakeLock = mPowerManager.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK, "SipWakeLock");
}
if (!mWakeLock.isHeld()) mWakeLock.acquire();
if (DBG) log("acquire count=" + mHolders.size());
|
private void | log(java.lang.String s)
Rlog.d(TAG, s);
|
synchronized void | release(java.lang.Object holder)
mHolders.remove(holder);
if ((mWakeLock != null) && mHolders.isEmpty()
&& mWakeLock.isHeld()) {
mWakeLock.release();
}
if (DBG) log("release count=" + mHolders.size());
|
synchronized void | reset()
if (DBG) log("reset count=" + mHolders.size());
mHolders.clear();
release(null);
|