Skip to content

RF Sentinel (RFSentinel): free, open-source police detector app for Android. Spots police body cams, Flock ALPR cameras, AirTag trackers, Remote ID drones, smart glasses and fake cell towers from Bluetooth LE and WiFi. No root.

The SDR scan the waterfall interrupted gets its turn back; the status's flagged count matches the Flagged chip

CIS-C09e97ef581909
diff --git a/app/src/main/java/com/rfsentinel/app/MainActivity.kt b/app/src/main/java/com/rfsentinel/app/MainActivity.kt
index ba3653f..a5bac1c 100644
--- a/app/src/main/java/com/rfsentinel/app/MainActivity.kt
+++ b/app/src/main/java/com/rfsentinel/app/MainActivity.kt
@@ -703,7 +703,8 @@ class MainActivity : AppCompatActivity() {
adapter.visual = com.rfsentinel.app.ui.VisualMode.on(this, com.rfsentinel.app.ui.VisualMode.Screen.DEVICE_LIST)
// The banner and radar alert only for flagged devices still in range.
val flagged = all.filter { com.rfsentinel.app.ui.LiveWindow.alerting(it, now) }
- flaggedCount = flagged.size
+ // The status's count is the Flagged chip's (the banner and radar still alert only for those in range).
+ flaggedCount = all.count { com.rfsentinel.app.ui.DeviceFilter.FLAGGED.matches(it) }
updateBanner(flagged, threshold)
updateStatus()
diff --git a/app/src/main/java/com/rfsentinel/app/sdr/SdrRadio.kt b/app/src/main/java/com/rfsentinel/app/sdr/SdrRadio.kt
index 0ae7062..c30ba36 100644
--- a/app/src/main/java/com/rfsentinel/app/sdr/SdrRadio.kt
+++ b/app/src/main/java/com/rfsentinel/app/sdr/SdrRadio.kt
@@ -223,9 +223,12 @@ object SdrRadio {
return false
}
sweepWatch = null; p25Hunt = null; p25Lock = null
+ var tuned = false
while (!halted && !sdr.lost && !gone(d.deviceName)) {
- if (tuneHz != null) { runTuned(sdr, d.deviceName); continue }
- val m = next()
+ if (tuneHz != null) { runTuned(sdr, d.deviceName); tuned = true; continue }
+ // Back from the waterfall: the scan it interrupted gets its turn again, not the next one.
+ val m = mode?.takeIf { tuned && it in modes } ?: next()
+ tuned = false
if (m == null) {
mode = null
status = "$deviceLabel · idle: no scan ticked in Settings › RTL-SDR radio"