public Activity currentActivity(){
  if (mActivityStack == null)   return null;
  return mActivityStack.lastElement();
}

public Activity currentActivity ( ) { if ( mActivityStack == null ) return null ; return mActivityStack . lastElement ( ) ; }
returns the current activity at the top of stack .
