blob: 903b7ee0497736c843d6c5375033af738d499457 [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
Yifan Hongf5261562020-03-10 10:28:10 -070036bool DynamicPartitionControlStub::OptimizeOperation(
37 const std::string& partition_name,
38 const InstallOperation& operation,
39 InstallOperation* optimized) {
Alessio Balsini14980e22019-11-26 11:46:06 +000040 return false;
41}
42
Yifan Hongdaac7322019-11-07 10:48:26 -080043void DynamicPartitionControlStub::Cleanup() {}
44
45bool DynamicPartitionControlStub::PreparePartitionsForUpdate(
46 uint32_t source_slot,
47 uint32_t target_slot,
48 const DeltaArchiveManifest& manifest,
Yifan Hongf033ecb2020-01-07 18:13:56 -080049 bool update,
50 uint64_t* required_size) {
Yifan Hongdaac7322019-11-07 10:48:26 -080051 return true;
52}
53
Yifan Hong7b3910a2020-03-24 17:47:32 -070054bool DynamicPartitionControlStub::FinishUpdate(bool powerwash_required) {
Yifan Hongdaac7322019-11-07 10:48:26 -080055 return true;
56}
57
Yifan Hong90965502020-02-19 15:22:47 -080058std::unique_ptr<AbstractAction>
59DynamicPartitionControlStub::GetCleanupPreviousUpdateAction(
60 BootControlInterface* boot_control,
61 PrefsInterface* prefs,
62 CleanupPreviousUpdateActionDelegateInterface* delegate) {
63 return std::make_unique<NoOpAction>();
64}
65
Yifan Hong6a6d0f12020-03-11 13:20:52 -070066bool DynamicPartitionControlStub::ResetUpdate(PrefsInterface* prefs) {
67 return false;
68}
69
Yifan Hongdaac7322019-11-07 10:48:26 -080070} // namespace chromeos_update_engine