diff options
author | 2020-08-20 08:40:29 -0700 | |
---|---|---|
committer | 2020-08-22 04:17:02 +0000 | |
commit | 374f7654dfb00692f6b3c2f6c68997e3ca54092a (patch) | |
tree | 209eec3efa43e43f1795f95905ae61eec575e3a7 /services/incremental/IncrementalService.h | |
parent | 1581527cbd46ac3411fdf0c7068f40c04a9926fd (diff) |
[IncrementalService] getLoadingProgress (v1)
This is to unblock Launcher's work on progress ring. Currently it uses
incfs getFilledBlocks(). Will switch to the new incfs progress reporting
API once it is ready.
Test: unit test
Test: adb shell dumpsys incremental
BUG: 165799231
Change-Id: Icd68124806454f888826294da36f109bca9771ac
Diffstat (limited to 'services/incremental/IncrementalService.h')
-rw-r--r-- | services/incremental/IncrementalService.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/services/incremental/IncrementalService.h b/services/incremental/IncrementalService.h index a6cc94639c8a..cd6bfedb8a9e 100644 --- a/services/incremental/IncrementalService.h +++ b/services/incremental/IncrementalService.h @@ -132,9 +132,7 @@ public: std::string_view newPath); int unlink(StorageId storage, std::string_view path); - bool isRangeLoaded(StorageId storage, FileId file, std::pair<BlockIndex, BlockIndex> range) { - return false; - } + float getLoadingProgress(StorageId storage) const; RawMetadata getMetadata(StorageId storage, std::string_view path) const; RawMetadata getMetadata(StorageId storage, FileId node) const; @@ -341,6 +339,8 @@ private: int makeDirs(const IncFsMount& ifs, StorageId storageId, std::string_view path, int mode); binder::Status applyStorageParams(IncFsMount& ifs, bool enableReadLogs); + float getLoadingProgressFromPath(const IncFsMount& ifs, std::string_view path) const; + void registerAppOpsCallback(const std::string& packageName); bool unregisterAppOpsCallback(const std::string& packageName); void onAppOpChanged(const std::string& packageName); @@ -363,6 +363,7 @@ private: const std::unique_ptr<JniWrapper> mJni; const std::unique_ptr<LooperWrapper> mLooper; const std::unique_ptr<TimedQueueWrapper> mTimedQueue; + const std::unique_ptr<FsWrapper> mFs; const std::string mIncrementalDir; mutable std::mutex mLock; |