fix(camera,sms,dwm): fix CAMSS AXI frame-boundary stop, SMS draft button label, and post-reboot softkey responsiveness

This commit is contained in:
Luxferre
2026-10-21 16:00:41 +03:00
parent 55b20c5b85
commit 4bb95d42b0
26 changed files with 152 additions and 33 deletions
+20
View File
@@ -450,8 +450,28 @@ static int xdrawer_run_main(int argc, char** argv) {
std::string pidPath = getRuntimeFile("xdrawer.pid");
int existingDaemon = readIntFile(daemonPidPath, -1);
bool daemonAlive = false;
if (existingDaemon > 0 && existingDaemon != static_cast<int>(::getpid()) &&
::kill(existingDaemon, 0) == 0) {
char cmdPath[64];
std::snprintf(cmdPath, sizeof(cmdPath), "/proc/%d/cmdline", existingDaemon);
int cfd = ::open(cmdPath, O_RDONLY | O_CLOEXEC);
if (cfd >= 0) {
char cbuf[256];
ssize_t cn = ::read(cfd, cbuf, sizeof(cbuf) - 1);
::close(cfd);
if (cn > 0) {
for (ssize_t i = 0; i < cn; ++i) {
if (cbuf[i] == '\0') cbuf[i] = ' ';
}
cbuf[cn] = '\0';
if (std::strstr(cbuf, "xdrawer") != nullptr) {
daemonAlive = true;
}
}
}
}
if (daemonAlive) {
if (!isPreload) {
int ffd = ::open(fifoPath.c_str(), O_WRONLY | O_NONBLOCK | O_CLOEXEC);
if (ffd >= 0) {