public synchronized void sleepUntil(long timeToWakeFromPhoneBoot){
  writeDebug("sleep until " + new Date(System.currentTimeMillis() + timeToWakeFromPhoneBoot - SystemClock.elapsedRealtime()));
  if (wakeLock.isHeld()) {
    writeDebug("releasing wake lock for sleep");
    wakeLock.release();
  }
  alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,timeToWakeFromPhoneBoot,sender);
}

public synchronized void sleepUntil ( long timeToWakeFromPhoneBoot ) { writeDebug ( "sleep until " + new Date ( System . currentTimeMillis ( ) + timeToWakeFromPhoneBoot - SystemClock . elapsedRealtime ( ) ) ) ; if ( wakeLock . isHeld ( ) ) { writeDebug ( "releasing wake lock for sleep" ) ; wakeLock . release ( ) ; } alarmManager . set ( AlarmManager . ELAPSED_REALTIME_WAKEUP , timeToWakeFromPhoneBoot , sender ) ; }
this will turn off the wake lock and allow the phone to sleep ( if it wants ) it will send an alert to the component class and it is then up to the component class to decide what to do . the wakelock will still be released when we wake up .
