From 798cad275c057bbe0b221ac79caeb6e27501e505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1z=20Zengin?= Date: Tue, 30 Sep 2025 21:07:11 +0300 Subject: [PATCH] pmt: Improve libhelper, etc. --- src/functions/RebootFunction.cpp | 2 +- srclib/libhelper/include/libhelper/lib.hpp | 4 ++-- srclib/libhelper/src/Utilities.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/functions/RebootFunction.cpp b/src/functions/RebootFunction.cpp index ece5dcc..06dd349 100644 --- a/src/functions/RebootFunction.cpp +++ b/src/functions/RebootFunction.cpp @@ -35,7 +35,7 @@ RUN { << (rebootTarget.empty() ? "none" : rebootTarget) << std::endl; - if (Helper::reboot(rebootTarget)) println("Reboot command was sent"); + if (Helper::androidReboot(rebootTarget)) println("Reboot command was sent"); else throw Error("Cannot reboot device"); return true; diff --git a/srclib/libhelper/include/libhelper/lib.hpp b/srclib/libhelper/include/libhelper/lib.hpp index b6e0ba4..a19bfcb 100644 --- a/srclib/libhelper/include/libhelper/lib.hpp +++ b/srclib/libhelper/include/libhelper/lib.hpp @@ -481,7 +481,7 @@ public: }; // Provides a capsule structure to store variable references and values. -template class Capsule { +template class Capsule : public garbageCollector { public: _Type &value; @@ -828,7 +828,7 @@ std::string getProperty(std::string_view prop); /** * Reboot device to input mode (for Android). */ -bool reboot(std::string_view arg); +bool androidReboot(std::string_view arg); #endif /** diff --git a/srclib/libhelper/src/Utilities.cpp b/srclib/libhelper/src/Utilities.cpp index f962059..ee84d5f 100644 --- a/srclib/libhelper/src/Utilities.cpp +++ b/srclib/libhelper/src/Utilities.cpp @@ -213,7 +213,7 @@ std::string getProperty(const std::string_view prop) { return x > 0 ? val : "ERROR"; } -bool reboot(const std::string_view arg) { +bool androidReboot(const std::string_view arg) { LOGN(HELPER, INFO) << "reboot request sent!!!" << std::endl; unsigned cmd = ANDROID_RB_RESTART2;