summaryrefslogtreecommitdiff
path: root/services/incremental/IncrementalService.cpp
diff options
context:
space:
mode:
authorAlex Buynytskyy <alexbuy@google.com>2020-05-18 10:06:01 -0700
committerAlex Buynytskyy <alexbuy@google.com>2020-05-18 11:40:43 -0700
commitea96c1f624db8befc583ef7b349b98528ee1041d (patch)
tree6e23ec8b10e2128e96d97cbd847c33c94c8c96a4 /services/incremental/IncrementalService.cpp
parent235f1db1c1a7811add242a81867c543133855edc (diff)
Don't restart non-system DataLoaders on reboot.
This saves system's resources. Healthcheck will automatically start data loader on pending reads. Bug: 153874006 Test: test PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest Change-Id: I160153f1d3e7e653db5de06b59d6fbbc3667fdf2
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
-rw-r--r--services/incremental/IncrementalService.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp
index 78439dba2724..f0dca772adaa 100644
--- a/services/incremental/IncrementalService.cpp
+++ b/services/incremental/IncrementalService.cpp
@@ -63,6 +63,7 @@ struct Constants {
static constexpr auto libDir = "lib"sv;
static constexpr auto libSuffix = ".so"sv;
static constexpr auto blockSize = 4096;
+ static constexpr auto systemPackage = "android"sv;
};
static const Constants& constants() {
@@ -377,7 +378,8 @@ void IncrementalService::onSystemReady() {
std::lock_guard l(mLock);
mounts.reserve(mMounts.size());
for (auto&& [id, ifs] : mMounts) {
- if (ifs->mountId == id) {
+ if (ifs->mountId == id &&
+ ifs->dataLoaderStub->params().packageName == Constants::systemPackage) {
mounts.push_back(ifs);
}
}