blob: 3d31e20c8d1d576d30113ea17675876999ae827c [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 Hong90965502020-02-19 15:22:47 -080056std::unique_ptr<AbstractAction>
57DynamicPartitionControlStub::GetCleanupPreviousUpdateAction(
58 BootControlInterface* boot_control,
59 PrefsInterface* prefs,
60 CleanupPreviousUpdateActionDelegateInterface* delegate) {
61 return std::make_unique<NoOpAction>();
62}
63
Yifan Hongdaac7322019-11-07 10:48:26 -080064} // namespace chromeos_update_engine