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
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp
index 78439db..f0dca77 100644
--- a/services/incremental/IncrementalService.cpp
+++ b/services/incremental/IncrementalService.cpp
@@ -63,6 +63,7 @@
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 @@
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);
}
}