Add ringtones/wallpapers plugins, AT console, dialer USSD/*#06#, and SIM icon fix

This commit is contained in:
Luxferre
2026-10-24 19:58:11 +03:00
parent e549aaf413
commit dc59704547
64 changed files with 2743 additions and 130 deletions
+9 -19
View File
@@ -82,19 +82,6 @@ void popUtf8Char(std::string& s) {
if (!s.empty()) s.pop_back();
}
std::string shellQuote(const std::string& s) {
std::string out = "'";
for (char c : s) {
if (c == '\'') {
out += "'\\''";
} else {
out.push_back(c);
}
}
out.push_back('\'');
return out;
}
struct WifiApEntry {
std::string ssid;
int signal = 0;
@@ -254,6 +241,12 @@ CellularNetInfo queryCellularInfo() {
info.usbShareActive = true;
}
}
if (!info.usbShareActive) {
struct stat st {};
if (::stat("/tmp/bananarchy_usb_tether.active", &st) == 0) {
info.usbShareActive = true;
}
}
if (info.gsmConfigured && !info.gsmConName.empty()) {
std::string det = runCaptureCmd(
@@ -433,7 +426,6 @@ int runNetworksApp(int argc, char** argv) {
auto& colGreen = pt.colGreen;
auto& colBlue = pt.colBlue;
auto& colOrange = pt.colOrange;
auto& colRed = pt.colRed;
NetTab activeTab = NetTab::Wifi;
NetModal modal = NetModal::None;
@@ -750,7 +742,7 @@ int runNetworksApp(int argc, char** argv) {
drawPango(layoutSmall, isSel ? &colWhite : &colLight,
10, ry, 30, rows[r], kWinWidth - 20);
}
drawSoftkeyBar("Refresh", "Toggle/Edit", "Close");
drawSoftkeyBar("Refresh", "Select", "Close");
} else if (activeTab == NetTab::Bluetooth) {
// Row 0: BT Power Toggle (height 28)
bool sel0 = (btRowSel == 0);
@@ -1174,15 +1166,13 @@ int runNetworksApp(int argc, char** argv) {
if (cellInfo.usbShareActive) {
setBanner("Stopping USB Tethering...");
render();
runCaptureCmd("nmcli connection delete USBNetworkShare >/dev/null 2>&1");
runCaptureCmd("doas -n /usr/libexec/msm-modem-uim-selection usb-tether off >/dev/null 2>&1");
refreshCurrentTab(false);
setBanner("USB Tethering stopped");
} else {
setBanner("Starting USB Tethering...");
render();
runCaptureCmd("nmcli connection add type ethernet ifname usb0 "
"con-name USBNetworkShare ipv4.method shared >/dev/null 2>&1 && "
"nmcli connection up USBNetworkShare >/dev/null 2>&1");
runCaptureCmd("doas -n /usr/libexec/msm-modem-uim-selection usb-tether on >/dev/null 2>&1");
refreshCurrentTab(false);
setBanner("USB Tethering active");
}