blob: c63a8ff6d2eca663051a252ba0ce1561bb690794 [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
Kelvin Zhangda1b3142020-09-24 17:09:02 -040036FeatureFlag DynamicPartitionControlStub::GetVirtualAbCompressionFeatureFlag() {
37 return FeatureFlag(FeatureFlag::Value::NONE);
38}
39
Yifan Hongf5261562020-03-10 10:28:10 -070040bool DynamicPartitionControlStub::OptimizeOperation(
41 const std::string& partition_name,
42 const InstallOperation& operation,
43 InstallOperation* optimized) {
Alessio Balsini14980e22019-11-26 11:46:06 +000044 return false;
45}
46
Yifan Hongdaac7322019-11-07 10:48:26 -080047void DynamicPartitionControlStub::Cleanup() {}
48
49bool DynamicPartitionControlStub::PreparePartitionsForUpdate(
50 uint32_t source_slot,
51 uint32_t target_slot,
52 const DeltaArchiveManifest& manifest,
Yifan Hongf033ecb2020-01-07 18:13:56 -080053 bool update,
54 uint64_t* required_size) {
Yifan Hongdaac7322019-11-07 10:48:26 -080055 return true;
56}
57
Yifan Hong7b3910a2020-03-24 17:47:32 -070058bool DynamicPartitionControlStub::FinishUpdate(bool powerwash_required) {
Yifan Hongdaac7322019-11-07 10:48:26 -080059 return true;
60}
61
Yifan Hong90965502020-02-19 15:22:47 -080062std::unique_ptr<AbstractAction>
63DynamicPartitionControlStub::GetCleanupPreviousUpdateAction(
64 BootControlInterface* boot_control,
65 PrefsInterface* prefs,
66 CleanupPreviousUpdateActionDelegateInterface* delegate) {
67 return std::make_unique<NoOpAction>();
68}
69
Yifan Hong6a6d0f12020-03-11 13:20:52 -070070bool DynamicPartitionControlStub::ResetUpdate(PrefsInterface* prefs) {
71 return false;
72}
73
Tianjie99d570d2020-06-04 14:57:19 -070074bool DynamicPartitionControlStub::ListDynamicPartitionsForSlot(
75 uint32_t current_slot, std::vector<std::string>* partitions) {
76 return true;
77}
78
79bool DynamicPartitionControlStub::GetDeviceDir(std::string* path) {
80 return true;
81}
82
Tianjie24f96092020-06-30 12:26:25 -070083bool DynamicPartitionControlStub::VerifyExtentsForUntouchedPartitions(
84 uint32_t source_slot,
85 uint32_t target_slot,
86 const std::vector<std::string>& partitions) {
87 return true;
88}
89
Yifan Hongdaac7322019-11-07 10:48:26 -080090} // namespace chromeos_update_engine