private boolean _removeActivity(Activity a){
  boolean r;
synchronized (this) {
    r=m_activities.remove(a);
    if (r) {
      if (m_activities.size() == 0) {
        m_nextTime=Long.MAX_VALUE;
      }
    }
  }
  if (r) {
    a.setScheduled(false);
  }
  return r;
}

private boolean _removeActivity ( Activity a ) { boolean r ; synchronized ( this ) { r = m_activities . remove ( a ) ; if ( r ) { if ( m_activities . size ( ) == 0 ) { m_nextTime = Long . MAX_VALUE ; } } } if ( r ) { a . setScheduled ( false ) ; } return r ; }
removes an activity from this manager , called by an activity when it finishes or is cancelled . application code should not call this method ! instead , use activity . cancel ( ) to stop a sheduled or running activity .
