pmt: Improve libhelper, etc.

This commit is contained in:
2025-09-30 21:07:11 +03:00
parent 066080c999
commit 798cad275c
3 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -481,7 +481,7 @@ public:
};
// Provides a capsule structure to store variable references and values.
template <typename _Type> class Capsule {
template <typename _Type> 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
/**

View File

@@ -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;