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.

Add Other filter chip

CIS-C01e60d680d998
diff --git a/app/src/main/java/com/rfsentinel/app/car/DeviceListScreen.kt b/app/src/main/java/com/rfsentinel/app/car/DeviceListScreen.kt
index 9dc1671..282b803 100644
--- a/app/src/main/java/com/rfsentinel/app/car/DeviceListScreen.kt
+++ b/app/src/main/java/com/rfsentinel/app/car/DeviceListScreen.kt
@@ -64,7 +64,7 @@ class DeviceListScreen(carContext: CarContext, private val filter: DeviceFilter)
companion object {
/** The filters offered in the car (cell towers have their own screen). */
val CAR_FILTERS = DeviceFilter.entries.filter { it != DeviceFilter.CELLS && it != DeviceFilter.WAZE && it != DeviceFilter.RADIO && it != DeviceFilter.AIRCRAFT &&
- it !in DeviceFilter.KINDS }
+ it !in DeviceFilter.KINDS && it != DeviceFilter.OTHER }
fun titleOf(f: DeviceFilter) = when (f) {
DeviceFilter.ALL -> "All nearby"
diff --git a/app/src/main/java/com/rfsentinel/app/ui/DeviceFilter.kt b/app/src/main/java/com/rfsentinel/app/ui/DeviceFilter.kt
index 8b0bf0a..594b610 100644
--- a/app/src/main/java/com/rfsentinel/app/ui/DeviceFilter.kt
+++ b/app/src/main/java/com/rfsentinel/app/ui/DeviceFilter.kt
@@ -45,7 +45,9 @@ enum class DeviceFilter(val label: String, val liveOnly: Boolean = false) {
SMART_HOME("Smart home"),
COMPUTERS("Computers"),
/** Made by Apple, whatever kind (iPhone, Mac, AirPods, AirTag...). */
- APPLE("Apple");
+ APPLE("Apple"),
+ /** In none of the kinds above (nor a tracker or drone): what Group by Category puts under "Other". */
+ OTHER("Other");
/**
* What a filter looks at, the same for a device heard now and one saved in a snapshot or a trace,
@@ -104,6 +106,7 @@ enum class DeviceFilter(val label: String, val liveOnly: Boolean = false) {
COMPUTERS -> s.anyType(COMPUTER_TYPE) || s.name?.let { COMPUTER_NAME.containsMatchIn(it) } == true
APPLE -> s.anyType(APPLE_TYPE) || s.vendor?.startsWith("Apple", ignoreCase = true) == true ||
s.hits.any { com.rfsentinel.app.detect.SignatureEngine.isAppleFindMy(it) }
+ OTHER -> (listOf(TRACKERS, DRONES, CAMERAS) + KINDS).none { it.matches(s) }
}
companion object {
@@ -158,7 +161,7 @@ enum class DeviceFilter(val label: String, val liveOnly: Boolean = false) {
* The main screen's chip order: the counts worth a glance first (flagged, then what's heard on each
* radio), so they fit without scrolling; the narrower filters after them.
*/
- val MAIN_ORDER = listOf(ALL, FLAGGED, BLE, WIFI, CELLS, TRACKERS, DRONES, AIRCRAFT, RADIO, WAZE, EXTERNAL, SENTINELS, FAVORITES, NEW) + KINDS
+ val MAIN_ORDER = listOf(ALL, FLAGGED, BLE, WIFI, CELLS, TRACKERS, DRONES, AIRCRAFT, RADIO, WAZE, EXTERNAL, SENTINELS, FAVORITES, NEW) + KINDS + OTHER
/** The chips of a saved snapshot or trace: the main screen's, less those that only mean something live. */
val SAVED_ORDER = MAIN_ORDER.filterNot { it.liveOnly }
diff --git a/app/src/test/java/com/rfsentinel/app/detect/IdentifyMoreTest.kt b/app/src/test/java/com/rfsentinel/app/detect/IdentifyMoreTest.kt
index b887afe..4957e9e 100644
--- a/app/src/test/java/com/rfsentinel/app/detect/IdentifyMoreTest.kt
+++ b/app/src/test/java/com/rfsentinel/app/detect/IdentifyMoreTest.kt
@@ -347,6 +347,9 @@ class IdentifyMoreTest {
// Not computers: a guess that may be a phone, a plain WiFi client, a machine-like word.
assertTrue(DeviceFilter.COMPUTERS !in kinds("Apple device (iPhone, iPad, Mac or Watch)"))
assertEquals(emptyList<DeviceFilter>(), kinds("WiFi device (laptop, phone or camera on a network)"))
+ val client = DeviceFilter.Seen("02:00:00:00:00:73", "WiFi device (laptop, phone or camera on a network)", null, emptyList(), emptySet(), false)
+ assertTrue(DeviceFilter.OTHER.matches(client))
+ assertTrue(!DeviceFilter.OTHER.matches(DeviceFilter.Seen("02:00:00:00:00:74", "Computer", null, emptyList(), emptySet(), false)))
assertTrue(DeviceFilter.COMPUTERS !in kinds("Machine sensor"))
}