Methods Summary |
---|
void | forcePoke()Poke this dozer to wake it up for a little bit.
mHandler.removeCallbacks(mDozeRunnable);
mHandler.postDelayed(mDozeRunnable, mDozeDurationSeconds * 1000);
mIsDozing = true;
|
public boolean | hasTriggered()Returns whether the trigger has fired at least once.
return mHasTriggered;
|
public boolean | isDozing()Returns whether we are dozing or not.
return mIsDozing;
|
public void | poke()Poke this dozer to wake it up for a little bit, if it is dozing.
if (mIsDozing) {
forcePoke();
}
|
public void | resetTrigger()Resets the doze trigger state.
mHasTriggered = false;
|
public void | startDozing()Starts dozing. This also resets the trigger flag.
forcePoke();
mHasTriggered = false;
|
public void | stopDozing()Stops dozing.
mHandler.removeCallbacks(mDozeRunnable);
mIsDozing = false;
|