diff options
author | 2021-01-27 06:58:55 -0800 | |
---|---|---|
committer | 2021-01-29 11:16:02 -0800 | |
commit | 07694ed49b14c0f03aea21c5e42773e542f867ce (patch) | |
tree | c8f27e1f1c4d932b3b6f1e563bb91e077ea092e5 /services/incremental/IncrementalService.h | |
parent | dd56fa93f65b38f47883e88300aacb53902b8857 (diff) |
Inherited installation support for Incremental.
Bug: 162345970
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I360f44bc52e05553eacc448faa26f603d9eaae59
Merged-In: I360f44bc52e05553eacc448faa26f603d9eaae59
Diffstat (limited to 'services/incremental/IncrementalService.h')
-rw-r--r-- | services/incremental/IncrementalService.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/services/incremental/IncrementalService.h b/services/incremental/IncrementalService.h index 306612159412..5d53bac777b5 100644 --- a/services/incremental/IncrementalService.h +++ b/services/incremental/IncrementalService.h @@ -113,6 +113,10 @@ public: bool started() const { return totalBlocks > 0; } bool fullyLoaded() const { return !isError() && (totalBlocks == filledBlocks); } + int blocksRemainingOrError() const { + return totalBlocks <= 0 ? totalBlocks : totalBlocks - filledBlocks; + } + float getProgress() const { return totalBlocks < 0 ? totalBlocks @@ -130,15 +134,18 @@ public: void onSystemReady(); StorageId createStorage(std::string_view mountPoint, - content::pm::DataLoaderParamsParcel&& dataLoaderParams, - CreateOptions options, const DataLoaderStatusListener& statusListener, - StorageHealthCheckParams&& healthCheckParams, - const StorageHealthListener& healthListener, - const std::vector<PerUidReadTimeouts>& perUidReadTimeouts); + const content::pm::DataLoaderParamsParcel& dataLoaderParams, + CreateOptions options); StorageId createLinkedStorage(std::string_view mountPoint, StorageId linkedStorage, CreateOptions options = CreateOptions::Default); StorageId openStorage(std::string_view path); + bool startLoading(StorageId storage, content::pm::DataLoaderParamsParcel&& dataLoaderParams, + const DataLoaderStatusListener& statusListener, + StorageHealthCheckParams&& healthCheckParams, + const StorageHealthListener& healthListener, + const std::vector<PerUidReadTimeouts>& perUidReadTimeouts); + int bind(StorageId storage, std::string_view source, std::string_view target, BindKind kind); int unbind(StorageId storage, std::string_view target); void deleteStorage(StorageId storage); @@ -156,7 +163,9 @@ public: int unlink(StorageId storage, std::string_view path); int isFileFullyLoaded(StorageId storage, std::string_view filePath) const; - LoadingProgress getLoadingProgress(StorageId storage) const; + + LoadingProgress getLoadingProgress(StorageId storage, bool stopOnFirstIncomplete) const; + bool registerLoadingProgressListener(StorageId storage, const StorageLoadingProgressListener& progressListener); bool unregisterLoadingProgressListener(StorageId storage); @@ -167,8 +176,6 @@ public: RawMetadata getMetadata(StorageId storage, std::string_view path) const; RawMetadata getMetadata(StorageId storage, FileId node) const; - bool startLoading(StorageId storage) const; - bool configureNativeBinaries(StorageId storage, std::string_view apkFullPath, std::string_view libDirRelativePath, std::string_view abi, bool extractNativeLibs); @@ -388,7 +395,8 @@ private: binder::Status applyStorageParams(IncFsMount& ifs, bool enableReadLogs); int isFileFullyLoadedFromPath(const IncFsMount& ifs, std::string_view filePath) const; - LoadingProgress getLoadingProgressFromPath(const IncFsMount& ifs, std::string_view path) const; + LoadingProgress getLoadingProgressFromPath(const IncFsMount& ifs, std::string_view path, + bool stopOnFirstIncomplete) const; int setFileContent(const IfsMountPtr& ifs, const incfs::FileId& fileId, std::string_view debugFilePath, std::span<const uint8_t> data) const; |