diff options
author | Joseph Jang <josephjang@google.com> | 2020-10-05 03:23:26 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-10-05 03:23:26 +0000 |
commit | d4f5010d14d80c82b19f54a43aa35483ffd019e8 (patch) | |
tree | 9679aeea0711ac0c4b270f1e31b18ed1e474520e /fastboot/1.1/default/Fastboot.cpp | |
parent | 5b436e33efcfc48df0aa093de1e61d5439c87f09 (diff) | |
parent | 41eca45f7dbea72b838fe393224f9458950c7a66 (diff) |
Merge "fastboot: add a new oem command for post wipe userdata" am: 4433d35af9 am: a174737057 am: 41eca45f7d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1435112
Change-Id: Iadd41e55e98bff0b8fd058429f8ec9123c0e3627
Diffstat (limited to 'fastboot/1.1/default/Fastboot.cpp')
-rw-r--r-- | fastboot/1.1/default/Fastboot.cpp | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/fastboot/1.1/default/Fastboot.cpp b/fastboot/1.1/default/Fastboot.cpp new file mode 100644 index 0000000000..0b502e0c3c --- /dev/null +++ b/fastboot/1.1/default/Fastboot.cpp @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Fastboot.h" + +namespace android { +namespace hardware { +namespace fastboot { +namespace V1_1 { +namespace implementation { + +// Methods from ::android::hardware::fastboot::V1_1::IFastboot follow. +Return<void> Fastboot::getPartitionType(const hidl_string& /* partitionName */, + getPartitionType_cb _hidl_cb) { + _hidl_cb(FileSystemType::RAW, {Status::SUCCESS, ""}); + return Void(); +} + +Return<void> Fastboot::doOemCommand(const hidl_string& /* oemCmd */, doOemCommand_cb _hidl_cb) { + _hidl_cb({Status::FAILURE_UNKNOWN, "Command not supported in default implementation"}); + return Void(); +} + +Return<void> Fastboot::getVariant(getVariant_cb _hidl_cb) { + _hidl_cb("NA", {Status::SUCCESS, ""}); + return Void(); +} + +Return<void> Fastboot::getOffModeChargeState(getOffModeChargeState_cb _hidl_cb) { + _hidl_cb(false, {Status::SUCCESS, ""}); + return Void(); +} + +Return<void> Fastboot::getBatteryVoltageFlashingThreshold( + getBatteryVoltageFlashingThreshold_cb _hidl_cb) { + _hidl_cb(0, {Status::SUCCESS, ""}); + return Void(); +} + +Return<void> Fastboot::doOemSpecificErase(doOemSpecificErase_cb _hidl_cb) { + _hidl_cb({Status::NOT_SUPPORTED, "Command not supported in default implementation"}); + return Void(); +} + +extern "C" IFastboot* HIDL_FETCH_IFastboot(const char* /* name */) { + return new Fastboot(); +} + +} // namespace implementation +} // namespace V1_1 +} // namespace fastboot +} // namespace hardware +} // namespace android |