- Fix Combined EPS/IMSI (cs_attach=1) false 4G-only IMS activation in ims_qrtr.h, close idle QRTR sockets, bound child/baseband retries, and deduplicate state.env writes in bananarchy-imsd.c - Skip inactive DHCP/connectivity IMS notifications in 40-bananarchy-ims.sh and add capped exponential registration backoff (5s-300s) plus openCtlSocket() rebind guard in bananarchy-vowifi - Sync CPU scaling_governor and idempotent screenoff/screenon policy across bananarchy-display-power-sync, locker.so, and bananarchy-power-policy.sh (standby.mode + rat_timer.pid), and gate noisy change events when dark in 30-bananarchy-network-status.sh - Fix bananarchy-dsds --sig-hysteresis QMI NAS wire opcodes to 0x0045 (1-byte sub bind) and 0x0050 (RSSI/RSCP/RSRP/LTE report threshold config) - Remove static 200 mA regulator-system-load on PM8909 l11 across all 6 DTS files and recompile all 5 shipping DTBs - Extend test-imsd-volte.py, test-standby-power-policy.py, check-rebuild.sh, BATTERY-OPTIMIZATION-ANALYSIS.md (Section 24), AGENTS.md, and Unreleased CHANGELOG.md notes + rebuilt image SHA-256 checksums (--mkinitfs)
39 lines
1.3 KiB
Bash
Executable File
39 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
# NetworkManager dispatcher: replace sxmo_networkmonitor's long-lived
|
|
# "nmcli device monitor" with event-driven Sxmo network/statusbar hooks.
|
|
# The helper re-executes as the X session user so status files stay owned by
|
|
# user:user. Double-fork so NetworkManager never waits for shell hooks.
|
|
is_screen_dark() {
|
|
_lid="${BANANARCHY_LID_STATE:-/run/bananarchy/lid-state}"
|
|
_blp="${BANANARCHY_BL_POWER_PATH:-/sys/class/backlight/backlight/bl_power}"
|
|
_br="${BANANARCHY_BR_PATH:-/sys/class/backlight/backlight/brightness}"
|
|
if [ -r "$_lid" ]; then
|
|
_ls=""
|
|
read -r _ls < "$_lid" 2>/dev/null || _ls=""
|
|
[ "$_ls" = "closed" ] && return 0
|
|
fi
|
|
if [ -r "$_blp" ]; then
|
|
_bp=""
|
|
read -r _bp < "$_blp" 2>/dev/null || _bp=""
|
|
[ -n "$_bp" ] && [ "$_bp" -ne 0 ] 2>/dev/null && return 0
|
|
fi
|
|
if [ -r "$_br" ]; then
|
|
_bv=""
|
|
read -r _bv < "$_br" 2>/dev/null || _bv=""
|
|
[ -n "$_bv" ] && [ "$_bv" -le 0 ] 2>/dev/null && return 0
|
|
fi
|
|
return 1
|
|
}
|
|
|
|
case "${2:-}" in
|
|
up|down|pre-up|pre-down|vpn-up|vpn-down|vpn-pre-up|vpn-pre-down) ;;
|
|
connectivity-change|dhcp4-change|dhcp6-change|dns-change)
|
|
is_screen_dark && exit 0
|
|
;;
|
|
*) exit 0 ;;
|
|
esac
|
|
( su user -s /bin/sh -c \
|
|
"/usr/bin/bananarchy-network-event.sh '$1' '$2'" \
|
|
>/dev/null 2>&1 & ) 2>/dev/null || true
|
|
exit 0
|