com.android.sdklib.repositoryv2
Class LegacyLocalRepoLoader
java.lang.Object
com.android.sdklib.repositoryv2.LegacyLocalRepoLoader
- All Implemented Interfaces:
- com.android.repository.api.FallbackLocalRepoLoader
public class LegacyLocalRepoLoader
- extends java.lang.Object
- implements com.android.repository.api.FallbackLocalRepoLoader
A FallbackLocalRepoLoader
that uses a LocalSdk
to parse LocalPkgInfo
and
convert them into LocalPackage
s.
Constructor Summary |
LegacyLocalRepoLoader(java.io.File root,
com.android.repository.io.FileOp fop,
com.android.repository.api.RepoManager manager)
Create a new LegacyLocalRepoLoader, based on LocalSdk . |
Method Summary |
com.android.repository.api.LocalPackage |
parseLegacyLocalPackage(java.io.File dir,
com.android.repository.api.ProgressIndicator progress)
Tries to parse a package rooted in the specified directory. |
void |
refresh()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LegacyLocalRepoLoader
public LegacyLocalRepoLoader(@NonNull
java.io.File root,
@NonNull
com.android.repository.io.FileOp fop,
@NonNull
com.android.repository.api.RepoManager manager)
- Create a new LegacyLocalRepoLoader, based on
LocalSdk
.
- Parameters:
root
- The root directory of the SDK.fop
- FileOp
to use. For normal operation should be FileOpUtils.create()
.manager
- The RepoManager
we're parsing for.
parseLegacyLocalPackage
@Nullable
public com.android.repository.api.LocalPackage parseLegacyLocalPackage(@NonNull
java.io.File dir,
@NonNull
com.android.repository.api.ProgressIndicator progress)
- Tries to parse a package rooted in the specified directory.
- Specified by:
parseLegacyLocalPackage
in interface com.android.repository.api.FallbackLocalRepoLoader
- Returns:
- A
LocalPackage
if one was found, otherwise null.
refresh
public void refresh()
- Specified by:
refresh
in interface com.android.repository.api.FallbackLocalRepoLoader