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.
Kotlin airtagalprandroidandroid-autoanti-surveillancebluetooth-low-energybody-cameracounter-surveillancedrone-detectionflock-safetyimsi-catcher-detectorpolice-detectorpolice-scannerprivacyremote-idrtl-sdrsdrsurveillance-detectiontracker-detectionwifi
Swipe left on radio transmissions dismisses them; hidden aircraft and dismissed radio stop alerting
CIS-C0a6b90b3d15e0
diff --git a/app/src/main/java/com/rfsentinel/app/MainActivity.kt b/app/src/main/java/com/rfsentinel/app/MainActivity.ktindex 2c7a8ab..48434b1 100644--- a/app/src/main/java/com/rfsentinel/app/MainActivity.kt+++ b/app/src/main/java/com/rfsentinel/app/MainActivity.kt@@ -715,9 +715,9 @@ class MainActivity : AppCompatActivity() {com.rfsentinel.app.ui.LiveWindow.keep(it, now, bleMs, wifiMs, externalMs) && !(hideTrusted && WhitelistCache.contains(it.mac))}// Rows swiped left ([hideRow]), while their mute lasts: a device stays listed as an ordinary one (no flag, banner- // or radar alert); one that leaves the live list is flagged again when heard again. Waze and aircraft: see current*.+ // or radar alert); one that leaves the live list is flagged again when heard again. Waze, aircraft, radio: see their rows.val liveMacs = live.mapTo(HashSet()) { it.mac }- hiddenRows.retainAll { (it in liveMacs || it.startsWith(WAZE_ROW) || it.startsWith(AIRCRAFT_ROW)) && com.rfsentinel.app.data.AlertMutes.isMuted(this, it) }+ hiddenRows.retainAll { (it in liveMacs || listOf(WAZE_ROW, AIRCRAFT_ROW, RADIO_ROW).any(it::startsWith)) && com.rfsentinel.app.data.AlertMutes.isMuted(this, it) }val all = if (hiddenRows.isEmpty()) live else live.map { if (it.mac in hiddenRows) it.copy(hits = emptyList(), following = false) else it }val threshold = Prefs.alertThreshold(this)binding.wazeSwipe.isEnabled = com.rfsentinel.app.ui.WazeUi.on(this) && panes.listShown@@ -916,7 +916,8 @@ class MainActivity : AppCompatActivity() {.filter { r -> query.isBlank() || listOfNotNull(r.mhz, r.name, r.bandLabel).any { it.contains(query.trim(), ignoreCase = true) } }.map { r ->val live = now - r.lastSeen <= RADIO_LIVE_MS- val urgent = live && r.confidence >= threshold+ // Dismissed (swiped left): listed, but quiet.+ val urgent = live && r.confidence >= threshold && RADIO_ROW + r.freqHz !in hiddenRowsval ago = (now - r.lastSeen) / 1000val trend = when (r.trend) {com.rfsentinel.app.sdr.RadioLog.Trend.CLOSER -> "getting closer ↑"@@ -961,7 +962,7 @@ class MainActivity : AppCompatActivity() {return com.rfsentinel.app.sdr.RadioLog.current(now).filter { now - it.lastSeen <= RADIO_RADAR_MS }.map { r ->- val alert = now - r.lastSeen <= RADIO_LIVE_MS && r.confidence >= threshold+ val alert = now - r.lastSeen <= RADIO_LIVE_MS && r.confidence >= threshold && RADIO_ROW + r.freqHz !in hiddenRows// Signal above the noise as a stand-in RSSI: 40 dB lands in Near, 30 dB in Nearby (as the alert wording).RadarView.Blip(RADIO_ROW + r.freqHz, (-115 + r.snrDb * 3 / 2).coerceIn(-100, -30), color, alert,if (alert) "${r.mhz} MHz" + (r.name?.let { " $it" } ?: "") else null)@@ -1083,8 +1084,8 @@ class MainActivity : AppCompatActivity() {}/**- * Rows swiped left, while their mute lasts (the mute also times the hiding of aircraft, whose alerts don't read it):- * a device is listed as an ordinary one, a Waze report or an aircraft leaves the list.+ * Rows swiped left, while their mute lasts (no alerts from them meanwhile): a device or a radio transmission is listed+ * as an ordinary one, a Waze report or an aircraft leaves the list.*/private val hiddenRows = HashSet<String>()@@ -1115,7 +1116,7 @@ class MainActivity : AppCompatActivity() {override fun getSwipeDirs(rv: androidx.recyclerview.widget.RecyclerView, vh: androidx.recyclerview.widget.RecyclerView.ViewHolder): Int {val r = row(vh) ?: return 0return when {- r.mac.startsWith(AIRCRAFT_ROW) -> swipeLeft // hide only: aircraft alerts have no mute+ r.mac.startsWith(AIRCRAFT_ROW) || r.mac.startsWith(RADIO_ROW) -> swipeLeft // no mute button on these rows: hide or dismiss onlyr.canMute -> swipeLeft or swipeRightelse -> 0}diff --git a/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.kt b/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.ktindex 77b3a22..3ab6d0f 100644--- a/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.kt+++ b/app/src/main/java/com/rfsentinel/app/service/ScanForegroundService.kt@@ -1509,7 +1509,8 @@ class ScanForegroundService : Service() {))}- if (!alert) return+ // Dismissed from the list (swiped left): logged, no alert.+ if (!alert || com.rfsentinel.app.data.AlertMutes.isMuted(this, key, now)) returnval off = alertsOff(hit.category)NotificationHelper.sendMapAlert(this, key, hit, com.rfsentinel.app.ui.DetectionLogActivity::class.java,banner = AlertKind.BANNER !in off)@@ -1571,8 +1572,9 @@ class ScanForegroundService : Service() {))}+ // An aircraft or Waze report hidden from the list (swiped left): logged, no alert.if (alert.level != com.rfsentinel.app.online.WazePolice.Level.LOG &&- hit.confidence >= Prefs.alertThreshold(this)) {+ hit.confidence >= Prefs.alertThreshold(this) && !com.rfsentinel.app.data.AlertMutes.isMuted(this, alert.key, now)) {val off = alertsOff(hit.category)NotificationHelper.sendMapAlert(this, alert.key, hit, lat = alert.lat, lon = alert.lon, online = alert.key,banner = AlertKind.BANNER !in off)