pmt: Improve libhelper, etc.
This commit is contained in:
@@ -35,7 +35,7 @@ RUN {
|
|||||||
<< (rebootTarget.empty() ? "none" : rebootTarget)
|
<< (rebootTarget.empty() ? "none" : rebootTarget)
|
||||||
<< std::endl;
|
<< 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");
|
else throw Error("Cannot reboot device");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -481,7 +481,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Provides a capsule structure to store variable references and values.
|
// Provides a capsule structure to store variable references and values.
|
||||||
template <typename _Type> class Capsule {
|
template <typename _Type> class Capsule : public garbageCollector {
|
||||||
public:
|
public:
|
||||||
_Type &value;
|
_Type &value;
|
||||||
|
|
||||||
@@ -828,7 +828,7 @@ std::string getProperty(std::string_view prop);
|
|||||||
/**
|
/**
|
||||||
* Reboot device to input mode (for Android).
|
* Reboot device to input mode (for Android).
|
||||||
*/
|
*/
|
||||||
bool reboot(std::string_view arg);
|
bool androidReboot(std::string_view arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ std::string getProperty(const std::string_view prop) {
|
|||||||
return x > 0 ? val : "ERROR";
|
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;
|
LOGN(HELPER, INFO) << "reboot request sent!!!" << std::endl;
|
||||||
|
|
||||||
unsigned cmd = ANDROID_RB_RESTART2;
|
unsigned cmd = ANDROID_RB_RESTART2;
|
||||||
|
|||||||
Reference in New Issue
Block a user