Merge "health.filesystem HAL renamed to health.storage"

This commit is contained in:
Yifan Hong 2018-09-20 17:26:53 +00:00 committed by Gerrit Code Review
commit 15b9656ae9
2 changed files with 8 additions and 8 deletions

View file

@ -140,7 +140,7 @@ cc_library_static {
},
},
shared_libs: [
"android.hardware.health.filesystem@1.0",
"android.hardware.health.storage@1.0",
],
}
@ -173,7 +173,7 @@ cc_binary {
],
shared_libs: [
"android.hardware.health.filesystem@1.0",
"android.hardware.health.storage@1.0",
"libhidltransport",
],
}

View file

@ -27,7 +27,7 @@
#include <android-base/logging.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <android/hardware/health/filesystem/1.0/IFileSystem.h>
#include <android/hardware/health/storage/1.0/IStorage.h>
#include <fs_mgr.h>
#include <hardware_legacy/power.h>
#include <private/android_filesystem_config.h>
@ -47,9 +47,9 @@ using android::base::Timer;
using android::base::WriteStringToFile;
using android::hardware::Return;
using android::hardware::Void;
using android::hardware::health::filesystem::V1_0::IFileSystem;
using android::hardware::health::filesystem::V1_0::IGarbageCollectCallback;
using android::hardware::health::filesystem::V1_0::Result;
using android::hardware::health::storage::V1_0::IGarbageCollectCallback;
using android::hardware::health::storage::V1_0::IStorage;
using android::hardware::health::storage::V1_0::Result;
namespace android {
namespace vold {
@ -344,7 +344,7 @@ class GcCallback : public IGarbageCollectCallback {
Result mResult{Result::UNKNOWN_ERROR};
};
static void runDevGcOnHal(sp<IFileSystem> service) {
static void runDevGcOnHal(sp<IStorage> service) {
LOG(DEBUG) << "Start Dev GC on HAL";
sp<GcCallback> cb = new GcCallback();
auto ret = service->garbageCollect(DEVGC_TIMEOUT_SEC, cb);
@ -356,7 +356,7 @@ static void runDevGcOnHal(sp<IFileSystem> service) {
}
static void runDevGc(void) {
auto service = IFileSystem::getService();
auto service = IStorage::getService();
if (service != nullptr) {
runDevGcOnHal(service);
} else {