com.android.sdklib.internal.repository.updater
Class SdkUpdaterNoWindow

java.lang.Object
  extended by com.android.sdklib.internal.repository.updater.SdkUpdaterNoWindow

public class SdkUpdaterNoWindow
extends java.lang.Object

Performs an update using only a non-interactive console output with no GUI.


Constructor Summary
SdkUpdaterNoWindow(java.lang.String osSdkRoot, SdkManager sdkManager, com.android.utils.ILogger sdkLog, boolean force, boolean useHttp, java.lang.String proxyHost, java.lang.String proxyPort)
          Creates an UpdateNoWindow object that will update using the given SDK root and outputs to the given SDK logger.
 
Method Summary
 void listRemotePackages(boolean includeAll, boolean extendedOutput)
          Lists remote packages available for install using 'android update sdk --no-ui'.
 void updateAll(java.util.ArrayList<java.lang.String> pkgFilter, boolean includeAll, boolean dryMode, java.lang.String acceptLicense)
          Performs the actual update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SdkUpdaterNoWindow

public SdkUpdaterNoWindow(java.lang.String osSdkRoot,
                          SdkManager sdkManager,
                          com.android.utils.ILogger sdkLog,
                          boolean force,
                          boolean useHttp,
                          java.lang.String proxyHost,
                          java.lang.String proxyPort)
Creates an UpdateNoWindow object that will update using the given SDK root and outputs to the given SDK logger.

Parameters:
osSdkRoot - The OS path of the SDK folder to update.
sdkManager - An existing SDK manager to list current platforms and addons.
sdkLog - A logger object, that should ideally output to a write-only console.
force - The reply to any question asked by the update process. Currently this will be yes/no for ability to replace modified samples or restart ADB.
useHttp - True to force using HTTP instead of HTTPS for downloads.
proxyPort - An optional HTTP/HTTPS proxy port. Can be null.
proxyHost - An optional HTTP/HTTPS proxy host. Can be null.
Method Detail

updateAll

public void updateAll(java.util.ArrayList<java.lang.String> pkgFilter,
                      boolean includeAll,
                      boolean dryMode,
                      java.lang.String acceptLicense)
Performs the actual update.

Parameters:
pkgFilter - A list of SdkRepoConstants.NODES to limit the type of packages we can update. A null or empty list means to update everything possible.
includeAll - True to list and install all packages, including obsolete ones.
dryMode - True to check what would be updated/installed but do not actually download or install anything.
acceptLicense - SDK licenses to automatically accept.

listRemotePackages

public void listRemotePackages(boolean includeAll,
                               boolean extendedOutput)
Lists remote packages available for install using 'android update sdk --no-ui'.

Parameters:
includeAll - True to list and install all packages, including obsolete ones.
extendedOutput - True to display more details on each package.