question: 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 ; }
target:  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.