diff options
author | 2021-03-09 19:24:23 -0800 | |
---|---|---|
committer | 2021-03-11 16:35:35 -0800 | |
commit | 7e06d712d25a6a6bd2d8f1c4a0f0ac8055ba0c21 (patch) | |
tree | e5363a00b5a68e16c19f87782b062039fb21970b /services/incremental/IncrementalService.h | |
parent | 6bf27625329565dea821489b52f3ac2bfd45db4c (diff) |
DL lifecycle: handle slow DL binding.
Bug: 182214420
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I5959e01177ab702de1f754f4ba433004925ce98b
Diffstat (limited to 'services/incremental/IncrementalService.h')
-rw-r--r-- | services/incremental/IncrementalService.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/incremental/IncrementalService.h b/services/incremental/IncrementalService.h index 14e5a7734172..4eb513808342 100644 --- a/services/incremental/IncrementalService.h +++ b/services/incremental/IncrementalService.h @@ -267,7 +267,10 @@ private: BootClockTsUs getOldestTsFromLastPendingReads(); Milliseconds elapsedMsSinceKernelTs(TimePoint now, BootClockTsUs kernelTsUs); - Milliseconds updateBindDelay(); + // If the stub has to bind to the DL. + // Returns {} if bind operation is already in progress. + // Or bind delay in ms. + std::optional<Milliseconds> needToBind(); void registerForPendingReads(); void unregisterFromPendingReads(); @@ -283,6 +286,7 @@ private: std::condition_variable mStatusCondition; int mCurrentStatus = content::pm::IDataLoaderStatusListener::DATA_LOADER_DESTROYED; + TimePoint mCurrentStatusTs = {}; int mTargetStatus = content::pm::IDataLoaderStatusListener::DATA_LOADER_DESTROYED; TimePoint mTargetStatusTs = {}; @@ -443,6 +447,7 @@ private: const std::unique_ptr<TimedQueueWrapper> mTimedQueue; const std::unique_ptr<TimedQueueWrapper> mProgressUpdateJobQueue; const std::unique_ptr<FsWrapper> mFs; + const std::unique_ptr<ClockWrapper> mClock; const std::string mIncrementalDir; mutable std::mutex mLock; |