private Activity checkActivity(){
  Activity activity=mActivity.get();
  if (activity == null) {
    throw new IllegalStateException("No activity set. Either subclass PermisoActivity or call Permiso.setActivity() in onCreate() and onResume() of your Activity.");
  }
  return activity;
}

private Activity checkActivity ( ) { Activity activity = mActivity . get ( ) ; if ( activity == null ) { throw new IllegalStateException ( "No activity set. Either subclass PermisoActivity or call Permiso.setActivity() in onCreate() and onResume() of your Activity." ) ; } return activity ; }
ensures that our weakreference to the activity is still valid . if it isn ' t , throw an exception saying that the activity needs to be set .
