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 BlissRoms-x86#7 (comment) aka Huy Minh <[email protected]> said so
  • Loading branch information
Kethen committed Feb 8, 2024
1 parent 078f377 commit 8466bea
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 @@ -294,6 +294,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 @@ -306,6 +307,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 8466bea

Please sign in to comment.