Skip to content

Commit

Permalink
run /vendor/etc/(pre|post)_sleep.sh as well
Browse files Browse the repository at this point in the history
because #7 (comment) aka Huy Minh <[email protected]> said so
  • Loading branch information
Kethen committed Feb 8, 2024
1 parent 14b9a23 commit b51a63f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions suspend/1.0/default/SystemSuspend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ bool SystemSuspend::forceSuspend() {
// returns from suspend, the wakelocks and SuspendCounter will not have
// changed.
std::system("/system/bin/sh /system/etc/pre_sleep.sh");
std::system("/system/bin/sh /vendor/etc/pre_sleep.sh");

auto counterLock = std::unique_lock(mCounterLock);
bool success = WriteStringToFd(getSleepState(), mStateFd);
Expand All @@ -370,6 +371,7 @@ bool SystemSuspend::forceSuspend() {
// that way the user would know to try and sleep the device again if they want to
mPwrbtnd->sendKeyWakeup();
std::system("/system/bin/sh /system/etc/post_sleep.sh");
std::system("/system/bin/sh /vendor/etc/post_sleep.sh");

return success;
}
Expand Down

0 comments on commit b51a63f

Please sign in to comment.