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);
    }
  }
}

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 ) ; } } }
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 .
