void initApplicationsUnderTest(SelendroidConfiguration serverConfiguration)
      throws AndroidSdkException {
    if (serverConfiguration == null) {
      throw new SelendroidException("Configuration error - serverConfiguration can't be null.");
    }
    this.serverConfiguration = serverConfiguration;

    // each of the apps specified on the command line need to get resigned
    // and 'stored' to be installed on the device
    for (String appPath : serverConfiguration.getSupportedApps()) {
      File file = new File(appPath);
      if (file.exists()) {
        addToAppsStore(file);
      } else {
        log.severe("Ignoring app because it was not found: " + file.getAbsolutePath());
      }
    }

    if (!serverConfiguration.isNoWebViewApp()) {
      // extract the 'AndroidDriver' app and show it as available
      try {
        // using "android" as the app name, because that is the desired capability default in
        // selenium for
        // DesiredCapabilities.ANDROID
        File androidAPK = androidDriverAPKBuilder.extractAndroidDriverAPK();
        if(serverConfiguration != null && serverConfiguration.isDeleteTmpFiles()) {
          androidAPK.deleteOnExit(); //Deletes temporary files if flag set
        }
        AndroidApp app =
            selendroidApkBuilder.resignApp(androidAPK);
        appsStore.put(BrowserType.ANDROID, app);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
void initApplicationsUnderTest ( SelendroidConfiguration serverConfiguration ) throws AndroidSdkException { if ( serverConfiguration == null ) { throw new SelendroidException ( "Configuration error - serverConfiguration can't be null." ) ; } this . serverConfiguration = serverConfiguration ; for ( String appPath : serverConfiguration . getSupportedApps ( ) ) { File file = new File ( appPath ) ; if ( file . exists ( ) ) { addToAppsStore ( file ) ; } else { log . severe ( "Ignoring app because it was not found: " + file . getAbsolutePath ( ) ) ; } } if ( ! serverConfiguration . isNoWebViewApp ( ) ) { try { File androidAPK = androidDriverAPKBuilder . extractAndroidDriverAPK ( ) ; if ( serverConfiguration != null && serverConfiguration . isDeleteTmpFiles ( ) ) { androidAPK . deleteOnExit ( ) ; } AndroidApp app = selendroidApkBuilder . resignApp ( androidAPK ) ; appsStore . put ( BrowserType . ANDROID , app ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } }
/* package