Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86460ca6 authored by David Anderson's avatar David Anderson Committed by Automerger Merge Worker
Browse files

Merge changes I21563564,I2afd6444 am: f3b02fc2

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1926977

Change-Id: Ic9e68ba8b3ae82eb7f17a7367b8152e919bcec78
parents fb259857 f3b02fc2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@
#include <fs_mgr_overlayfs.h>
#include <libfiemap/image_manager.h>

#include "utility.h"

namespace android {
namespace snapshot {

@@ -143,5 +145,9 @@ android::dm::IDeviceMapper& DeviceInfo::GetDeviceMapper() {
    return android::dm::DeviceMapper::Instance();
}

bool DeviceInfo::UseUserspaceSnapshots() const {
    return IsUserspaceSnapshotsEnabled();
}

}  // namespace snapshot
}  // namespace android
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ class DeviceInfo final : public SnapshotManager::IDeviceInfo {
    std::unique_ptr<IImageManager> OpenImageManager() const override;
    bool IsFirstStageInit() const override;
    android::dm::IDeviceMapper& GetDeviceMapper() override;
    bool UseUserspaceSnapshots() const override;

    void set_first_stage_init(bool value) { first_stage_init_ = value; }

+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ class MockDeviceInfo : public SnapshotManager::IDeviceInfo {
    MOCK_METHOD(bool, IsFirstStageInit, (), (const, override));
    MOCK_METHOD(std::unique_ptr<android::fiemap::IImageManager>, OpenImageManager, (),
                (const, override));
    MOCK_METHOD(bool, UseUserspaceSnapshots, (), (const, override));
};

}  // namespace android::snapshot
+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ class ISnapshotManager {
        virtual bool IsFirstStageInit() const = 0;
        virtual std::unique_ptr<IImageManager> OpenImageManager() const = 0;
        virtual android::dm::IDeviceMapper& GetDeviceMapper() = 0;
        virtual bool UseUserspaceSnapshots() const = 0;

        // Helper method for implementing OpenImageManager.
        std::unique_ptr<IImageManager> OpenImageManager(const std::string& gsid_dir) const;
+1 −0
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@ class TestDeviceInfo : public SnapshotManager::IDeviceInfo {
    }

    bool IsSlotUnbootable(uint32_t slot) { return unbootable_slots_.count(slot) != 0; }
    bool UseUserspaceSnapshots() const override;

    void set_slot_suffix(const std::string& suffix) { slot_suffix_ = suffix; }
    void set_fake_super(const std::string& path) {
Loading