summaryrefslogtreecommitdiff
path: root/cmds/idmap2/idmap2d/Idmap2Service.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/idmap2/idmap2d/Idmap2Service.h')
-rw-r--r--cmds/idmap2/idmap2d/Idmap2Service.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/cmds/idmap2/idmap2d/Idmap2Service.h b/cmds/idmap2/idmap2d/Idmap2Service.h
index c61e4bc98a54..cc8cc5f218d2 100644
--- a/cmds/idmap2/idmap2d/Idmap2Service.h
+++ b/cmds/idmap2/idmap2d/Idmap2Service.h
@@ -26,7 +26,10 @@
#include <filesystem>
#include <memory>
+#include <mutex>
+#include <optional>
#include <string>
+#include <variant>
#include <vector>
namespace android::os {
@@ -60,11 +63,11 @@ class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 {
binder::Status deleteFabricatedOverlay(const std::string& overlay_path,
bool* _aidl_return) override;
- binder::Status acquireFabricatedOverlayIterator() override;
+ binder::Status acquireFabricatedOverlayIterator(int32_t* _aidl_return) override;
- binder::Status releaseFabricatedOverlayIterator() override;
+ binder::Status releaseFabricatedOverlayIterator(int32_t iteratorId) override;
- binder::Status nextFabricatedOverlayInfos(
+ binder::Status nextFabricatedOverlayInfos(int32_t iteratorId,
std::vector<os::FabricatedOverlayInfo>* _aidl_return) override;
binder::Status dumpIdmap(const std::string& overlay_path, std::string* _aidl_return) override;
@@ -74,7 +77,9 @@ class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 {
// be able to be recalculated if idmap2 dies and restarts.
std::unique_ptr<idmap2::TargetResourceContainer> framework_apk_cache_;
+ int32_t frro_iter_id_ = 0;
std::optional<std::filesystem::directory_iterator> frro_iter_;
+ std::mutex frro_iter_mutex_;
template <typename T>
using MaybeUniquePtr = std::variant<std::unique_ptr<T>, T*>;