question: public void restartAndInstallIfNecessary ( ) { File patchesDir = new File ( mySdkHandler . getLocation ( ) , PatchInstallerUtil . PATCHES_DIR_NAME ) ; StudioLoggerProgressIndicator progress = new StudioLoggerProgressIndicator ( PatchInstallerFactory . class ) ; if ( patchesDir . exists ( ) ) { File [ ] subDirs = patchesDir . listFiles ( null ) ; for ( File patchDir : subDirs ) { processPatch ( mySdkHandler . getLocation ( ) , progress , patchDir ) ; } } }
target:  Find any pending patches under the given sdk root that require studio to be restarted, and if there are any, restart and install them. If they have already been installed (as indicated by the patch itself being missing, and the revision mentioned in source.properties matching that in the pending XML, do the install complete actions (write package.xml and fire listeners) and clean up.