com.android.repository.impl.installer
Class BasicInstaller

java.lang.Object
  extended by com.android.repository.impl.installer.BasicInstaller
All Implemented Interfaces:
PackageInstaller

public class BasicInstaller
extends java.lang.Object
implements PackageInstaller

A simple PackageInstaller that just unzips the complete version of an Archive into its destination directory.


Constructor Summary
BasicInstaller()
           
 
Method Summary
 boolean install(RemotePackage p, Downloader downloader, SettingsController settings, ProgressIndicator progress, RepoManager manager, FileOp fop)
          Installs the package by unzipping into its path.
 boolean uninstall(LocalPackage p, ProgressIndicator progress, RepoManager manager, FileOp fop)
          Just deletes the package.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicInstaller

public BasicInstaller()
Method Detail

uninstall

public boolean uninstall(@NonNull
                         LocalPackage p,
                         @NonNull
                         ProgressIndicator progress,
                         @NonNull
                         RepoManager manager,
                         @NonNull
                         FileOp fop)
Just deletes the package.

Specified by:
uninstall in interface PackageInstaller
Parameters:
p - The LocalPackage to delete.
progress - A ProgressIndicator. Unused by this installer.
manager - A RepoManager that knows about this package.
fop - The FileOp to use. Should be FileOpUtils.create() if not in a unit test.
Returns:
true if the uninstall was successful, false otherwise.

install

public boolean install(@NonNull
                       RemotePackage p,
                       @NonNull
                       Downloader downloader,
                       @Nullable
                       SettingsController settings,
                       @NonNull
                       ProgressIndicator progress,
                       @NonNull
                       RepoManager manager,
                       @NonNull
                       FileOp fop)
Installs the package by unzipping into its path. Installs the package.

Specified by:
install in interface PackageInstaller
Parameters:
p - The RemotePackage to install.
downloader - The Downloader used to download the archive.
settings - The SettingsController to provide any settings needed.
progress - A ProgressIndicator, to show install progress and facilitate logging.
manager - A RepoManager that knows about this package.
fop - The FileOp to use. Should be FileOpUtils.create() if not in a unit test.
Returns:
true if the install was successful, false otherwise.