public void userForeground(int userId){
synchronized (mPackagesLock) {
    VUserInfo user=mUsers.get(userId);
    long now=System.currentTimeMillis();
    if (user == null || user.partial) {
      VLog.w(LOG_TAG,"userForeground: unknown user #" + userId);
      return;
    }
    if (now > EPOCH_PLUS_30_YEARS) {
      user.lastLoggedInTime=now;
      writeUserLocked(user);
    }
  }
}

public void userForeground ( int userId ) { synchronized ( mPackagesLock ) { VUserInfo user = mUsers . get ( userId ) ; long now = System . currentTimeMillis ( ) ; if ( user == null || user . partial ) { VLog . w ( LOG_TAG , "userForeground: unknown user #" + userId ) ; return ; } if ( now > EPOCH_PLUS_30_YEARS ) { user . lastLoggedInTime = now ; writeUserLocked ( user ) ; } } }
make a note of the last started time of a user .
