Does the following steps.
1. Call on()
2. Start the timer.
3. At the timeout, calls off()
If you call this again, the timeout is reset to the new one
synchronized (this) {
mOffAt = SystemClock.uptimeMillis() + milliseconds;
boolean alreadyOn;
// By starting the thread first and waiting, we ensure that if the
// thread to stop it can't start, we don't turn the vibrator on
// forever. This still isn't really sufficient, because we don't
// have another processor watching us. We really should have a
// service for this in case our process crashes.
if (mThread == null) {
alreadyOn = false;
mLock.close();
mThread = new T();
mThread.start();
mLock.block();
mOffCalled = false;
} else {
alreadyOn = true;
// poke the thread so it gets the new timeout.
mThread.interrupt();
}
on(alreadyOn);
}