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

Commit bb89da85 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "libsnapshot: forward declare IImageManager"

parents 980cbef0 6917c638
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@

#include <android-base/unique_fd.h>
#include <libdm/dm_target.h>
#include <libfiemap/image_manager.h>

#ifndef FRIEND_TEST
#define FRIEND_TEST(test_set_name, individual_test) \
@@ -32,6 +31,11 @@
#endif

namespace android {

namespace fiemap {
class IImageManager;
}  // namespace fiemap

namespace snapshot {

enum class UpdateState {
@@ -69,6 +73,8 @@ class SnapshotManager final {
        virtual bool IsRunningSnapshot() const = 0;
    };

    ~SnapshotManager();

    // Return a new SnapshotManager instance, or null on error. The device
    // pointer is owned for the lifetime of SnapshotManager. If null, a default
    // instance will be created.
+5 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#include <android-base/unique_fd.h>
#include <ext4_utils/ext4_utils.h>
#include <libdm/dm.h>
#include <libfiemap/image_manager.h>

namespace android {
namespace snapshot {
@@ -57,6 +58,10 @@ bool DeviceInfo::IsRunningSnapshot() const {
    return true;
}

// Note: IIMageManager is an incomplete type in the header, so the default
// destructor doesn't work.
SnapshotManager::~SnapshotManager() {}

std::unique_ptr<SnapshotManager> SnapshotManager::New(IDeviceInfo* info) {
    if (!info) {
        info = new DeviceInfo();
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@

#include <android-base/strings.h>
#include <gtest/gtest.h>
#include <libfiemap/image_manager.h>

namespace android {
namespace snapshot {