blob: 70d6768a024cf087c34bb07fe55fbd07f4f364d7 [file] [log] [blame]
Yifan Hongdaac7322019-11-07 10:48:26 -08001//
2// Copyright (C) 2019 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17#include <stdint.h>
18
Yifan Hong90965502020-02-19 15:22:47 -080019#include <memory>
Yifan Hongdaac7322019-11-07 10:48:26 -080020#include <string>
21
22#include <base/logging.h>
23
24#include "update_engine/common/dynamic_partition_control_stub.h"
25
26namespace chromeos_update_engine {
27
28FeatureFlag DynamicPartitionControlStub::GetDynamicPartitionsFeatureFlag() {
29 return FeatureFlag(FeatureFlag::Value::NONE);
30}
31
32FeatureFlag DynamicPartitionControlStub::GetVirtualAbFeatureFlag() {
33 return FeatureFlag(FeatureFlag::Value::NONE);
34}
35
Alessio Balsini14980e22019-11-26 11:46:06 +000036bool DynamicPartitionControlStub::ShouldSkipOperation(
Yifan Hong6eec9952019-12-04 13:12:01 -080037 const std::string& partition_name, const InstallOperation& operation) {
Alessio Balsini14980e22019-11-26 11:46:06 +000038 return false;
39}
40
Yifan Hongdaac7322019-11-07 10:48:26 -080041void DynamicPartitionControlStub::Cleanup() {}
42
43bool DynamicPartitionControlStub::PreparePartitionsForUpdate(
44 uint32_t source_slot,
45 uint32_t target_slot,
46 const DeltaArchiveManifest& manifest,
Yifan Hongf033ecb2020-01-07 18:13:56 -080047 bool update,
48 uint64_t* required_size) {
Yifan Hongdaac7322019-11-07 10:48:26 -080049 return true;
50}
51
52bool DynamicPartitionControlStub::FinishUpdate() {
53 return true;
54}
55
Yifan Hong2257ee12020-01-13 18:33:00 -080056ErrorCode DynamicPartitionControlStub::CleanupSuccessfulUpdate() {
57 return ErrorCode::kError;
58}
59
Yifan Hong90965502020-02-19 15:22:47 -080060std::unique_ptr<AbstractAction>
61DynamicPartitionControlStub::GetCleanupPreviousUpdateAction(
62 BootControlInterface* boot_control,
63 PrefsInterface* prefs,
64 CleanupPreviousUpdateActionDelegateInterface* delegate) {
65 return std::make_unique<NoOpAction>();
66}
67
Yifan Hongdaac7322019-11-07 10:48:26 -080068} // namespace chromeos_update_engine