Skip to content

Commit 5d42b65

Browse files
committed
Fix Vo-Wifi state detection
1 parent ebaa43d commit 5d42b65

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

module/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ run_as_su() {
3535
get_wifi_calling_state() {
3636
rm -f "$DUMPSYS_TMP_FILE"
3737
dumpsys activity service SystemUIService > "$DUMPSYS_TMP_FILE" 2>/dev/null
38-
grep -qEm 1 "slot='vowifi'.*visibleState=ICON.*" "$DUMPSYS_TMP_FILE"
38+
grep -qEm 1 "slot='vowifi'.*visible user=.*" "$DUMPSYS_TMP_FILE"
3939
local status=$?
4040
rm -f "$DUMPSYS_TMP_FILE"
4141
# echo's result: 0 = true (VoWiFi active), 1 = false

module/webroot/js/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export async function get_wifi_calling_state() {
9494

9595
// Check for VoWiFi pattern
9696
const { stdout: returnCode } = await exec(`
97-
grep -qE "slot=\'vowifi\'.*visibleState=ICON" "${DUMPSYS_TMP_FILE}" && echo $?`
97+
grep -qE "slot=\'vowifi\'.*visible user=.*" "${DUMPSYS_TMP_FILE}" && echo $?`
9898
);
9999

100100
// Clean up temp file

0 commit comments

Comments
 (0)