Use sysfs control for storage device GC am: d96b2ac076
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/18972074 Change-Id: I0e6b3725ebeb937a7046c492e4b699cfb2d24b37 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
1403a82079
1 changed files with 0 additions and 22 deletions
|
@ -391,28 +391,6 @@ static void runDevGcOnHal(Service service, GcCallbackImpl cb, GetDescription get
|
|||
}
|
||||
|
||||
static void runDevGc(void) {
|
||||
auto aidl_service_name = AStorage::descriptor + "/default"s;
|
||||
if (AServiceManager_isDeclared(aidl_service_name.c_str())) {
|
||||
ndk::SpAIBinder binder(AServiceManager_waitForService(aidl_service_name.c_str()));
|
||||
if (binder.get() != nullptr) {
|
||||
std::shared_ptr<AStorage> aidl_service = AStorage::fromBinder(binder);
|
||||
if (aidl_service != nullptr) {
|
||||
runDevGcOnHal<IDL::AIDL>(aidl_service, ndk::SharedRefBase::make<AGcCallbackImpl>(),
|
||||
&ndk::ScopedAStatus::getDescription);
|
||||
return;
|
||||
}
|
||||
}
|
||||
LOG(WARNING) << "Device declares " << aidl_service_name
|
||||
<< " but it is not running, skip dev GC on AIDL HAL";
|
||||
return;
|
||||
}
|
||||
auto hidl_service = HStorage::getService();
|
||||
if (hidl_service != nullptr) {
|
||||
runDevGcOnHal<IDL::HIDL>(hidl_service, sp<HGcCallbackImpl>(new HGcCallbackImpl()),
|
||||
&Return<void>::description);
|
||||
return;
|
||||
}
|
||||
// fallback to legacy code path
|
||||
runDevGcFstab();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue