Add NeoUI passcode configurator, duress mode profile, and Bluetooth OBEX UI

This commit is contained in:
Luxferre committed 2026-10-30 19:28:31 +02:00
1 parent 51a1a91d42
commit 62ac46e498
100 files changed
+2736 -240

No files matched your search

+24 -12
View File
@@ -1268,7 +1268,7 @@ int sip_run_main(int argc, char** argv) {
};
auto openWindow = [&]() {
if (isPhonePasscodeLocked()) return;
if (isDuressMode() || isPhonePasscodeLocked()) return;
writeIntFile(activePidPath, static_cast<int>(::getpid()));
closeOtherPlugins("sip");
visible = true;
@@ -1287,9 +1287,11 @@ int sip_run_main(int argc, char** argv) {
};
// Trigger initial background registration for enabled accounts
for (auto& acct : accounts) {
if (acct.enabled) {
sendSipRegister(acct);
if (!isDuressMode()) {
for (auto& acct : accounts) {
if (acct.enabled) {
sendSipRegister(acct);
}
}
}
@@ -1304,6 +1306,13 @@ int sip_run_main(int argc, char** argv) {
if (cmd == "CLOSE") {
closeWindow();
} else if (cmd == "RELOAD_THEME") {
if (isDuressMode()) {
hangupActiveSipCall(false);
accounts.clear();
history.clear();
closeWindow();
continue;
}
neo.reloadTheme();
if (visible) render();
} else if (cmd.rfind("CALL_ACCEPT", 0) == 0) {
@@ -1339,6 +1348,7 @@ int sip_run_main(int argc, char** argv) {
ssize_t n = ::recvfrom(sipUdpFd, rxBuf, sizeof(rxBuf) - 1, 0,
reinterpret_cast<struct sockaddr*>(&fromSin), &sl);
if (n <= 0) break;
if (isDuressMode()) continue;
rxBuf[n] = '\0';
handleIncomingSipPacket(std::string(rxBuf, static_cast<size_t>(n)), fromSin);
if (visible) render();
@@ -1348,14 +1358,16 @@ int sip_run_main(int argc, char** argv) {
// 3. Periodic REGISTER keepalive for enabled accounts
int64_t now = nowMs();
bool anyEnabled = false;
for (auto& acct : accounts) {
if (!acct.enabled) continue;
anyEnabled = true;
if (acct.lastRegAttemptMs == 0 ||
(acct.regStatus == "ONLINE" && now >= acct.regExpiresAtMs) ||
(acct.regStatus != "ONLINE" && now - acct.lastRegAttemptMs >= 45000)) {
sendSipRegister(acct);
if (visible) render();
if (!isDuressMode()) {
for (auto& acct : accounts) {
if (!acct.enabled) continue;
anyEnabled = true;
if (acct.lastRegAttemptMs == 0 ||
(acct.regStatus == "ONLINE" && now >= acct.regExpiresAtMs) ||
(acct.regStatus != "ONLINE" && now - acct.lastRegAttemptMs >= 45000)) {
sendSipRegister(acct);
if (visible) render();
}
}
}