Skip to content

Commit d5f180e

Browse files
committed
Hold outgoing calls to numbers from flagged spam texts
Callback scams text a number to call back. The outgoing call check only knew numbers from the blocklist and database, so a call to the number in a fake delivery or bank text went straight through. Every flagged text sighting (repeats included, so a full text after a cut-short notification still counts) now stores the phone numbers in it for 30 days in a new flagged_text_numbers table (DB v20, capped at 500 rows). Numbers written with + and a country code are read anywhere; bare ten-digit numbers only on NANP phones or with a 1/+1 prefix. Dialing one triggers the existing hold, whose notice names the day the text came in. Trusted numbers and contacts still ring through, and a listed number keeps its own reason. Tests: new CallbackNumberExtractionTest and FlaggedTextNumbersTest; new cases in OutgoingCallGuardTest and OutgoingCallHoldRobolectricTest. Existing assertions are unchanged. The two new hold tests look only at the hold channel because logging a flagged text posts its own alert. AppDatabaseMigrationTest adds MIGRATION_19_20 to every migration chain and checks the new table exists and starts empty.
1 parent 65dde85 commit d5f180e

20 files changed

Lines changed: 1190 additions & 13 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to CallShield will be documented in this file.
44

55
## Unreleased
66

7+
- The outgoing call check now also holds a call to a number that appeared
8+
in a text CallShield flagged as spam during the last 30 days. Fake bank
9+
and delivery texts ask you to call a number back, and the hold notice
10+
says which day that text arrived. Numbers written with a + and a country
11+
code are picked up anywhere, and ten-digit North American numbers are
12+
picked up on phones set to that region. Contacts and allowed numbers still
13+
ring straight through.
714
- A one-time code that arrives during a call from someone who isn't in your
815
contacts, or in the 10 minutes after it, brings up a warning not to read
916
it out to the caller. Imposters posing as a bank ask for exactly that code.

‎README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<p align="center">
1313
<a href="https://github.com/SysAdminDoc/CallShield/releases/latest"><img src="https://img.shields.io/github/v/release/SysAdminDoc/CallShield?style=flat-square&color=a6e3a1" alt="Release"></a>
1414
<img src="https://img.shields.io/badge/Spam%20Numbers-51%2C363-f38ba8?style=flat-square" alt="51,363 Numbers">
15-
<img src="https://img.shields.io/badge/JVM%20unit%20tests-1764-94e2d5?style=flat-square" alt="1764 JVM unit tests">
15+
<img src="https://img.shields.io/badge/JVM%20unit%20tests-1777-94e2d5?style=flat-square" alt="1777 JVM unit tests">
1616
<img src="https://img.shields.io/badge/Android-10%2B-89b4fa?style=flat-square" alt="Android 10+">
1717
<img src="https://img.shields.io/badge/License-MIT-cba6f7?style=flat-square" alt="MIT License">
1818
<img src="https://img.shields.io/badge/API%20Keys-None-fab387?style=flat-square" alt="No required API keys">
@@ -159,7 +159,7 @@ SMS-specific layers run after the shared chain, in their own priority order: **S
159159
- **URL Safety**. Local spam-domain checks stay on-device. Optional link checks use PhishTank and a six-hour OpenPhish feed. PhishTank receives only the site's base domain
160160
- **Codes during unknown calls**. When a one-time code arrives during a call from someone who isn't in your contacts, or in the 10 minutes after it, CallShield warns you not to read it out. Bank imposters ask for exactly that code. It warns once per call and never for a contact or a number you've allowed.
161161
- **STIR/SHAKEN**. Blocks calls failing carrier caller ID verification (Android 11+)
162-
- **Outgoing call check**. Opt-in, through Android's call redirection role. A call you start to a number on your blocklist, in the spam database, on a premium-rate line or on a callback-scam country code is held, and a notification tells you why and offers Call anyway. Contacts and trusted numbers ring through, and a slow check never delays the call. If you wouldn't see the notification, in car mode or under Do Not Disturb for example, the call goes through.
162+
- **Outgoing call check**. Opt-in, through Android's call redirection role. A call you start to a number on your blocklist, in the spam database, on a premium-rate line or on a callback-scam country code is held, and a notification tells you why and offers Call anyway. So is a number that showed up in a text CallShield flagged as spam in the last 30 days. The notification names the day that text came in, since "call us back" scams pair a fake text with the number to call. Contacts and trusted numbers ring through, and a slow check never delays the call. If you wouldn't see the notification, in car mode or under Do Not Disturb for example, the call goes through.
163163
- **Answer & hang up**. Opt-in. A call CallShield would reject is answered without video and hung up after a delay you set (1 to 10 seconds), so spam can't leave a voicemail. Silent voicemail mode, auto-mute and a meeting-mode silence still go to voicemail, and the short answered call never counts toward trusting the caller. Contributed by tikkamasalla
164164
- **After-Call Feedback**. "Was this spam?" notification after suspicious calls, plus an optional Android 11+ post-call screen for block/report and save-contact actions
165165

@@ -516,12 +516,12 @@ RELEASE_KEY_PASSWORD=...
516516
## Testing
517517

518518
```bash
519-
./gradlew testDebugUnitTest # 1764 tests
519+
./gradlew testDebugUnitTest # 1777 tests
520520
./gradlew connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.sysadmindoc.callshield.platform.TargetSdkBehaviorSmokeTest
521521
./gradlew verifyPipelineTests # Cloudflare Worker (node) + data-pipeline and translation checks (python)
522522
```
523523

524-
The suite is **1764 total JVM unit tests**, run with Robolectric wherever a screen, a service or the database is involved.
524+
The suite is **1777 total JVM unit tests**, run with Robolectric wherever a screen, a service or the database is involved.
525525

526526
Two GitHub workflows run without building the app. **Validation** runs the Worker and
527527
pipeline suites on every push except report-only ones (`run-pipeline-tests.ps1 -CorrectnessOnly`),
@@ -558,8 +558,8 @@ language in [issue #7](https://github.com/SysAdminDoc/CallShield/issues/7).
558558
| Community API | Cloudflare Workers |
559559
| URL Safety | Local spam-domain data, with optional PhishTank and OpenPhish |
560560
| Verification | Local Gradle, lint, and release-artifact checks |
561-
| Tests | 1764 JVM unit tests (JUnit) |
562-
| Strings | 1737 string resources and 37 plural groups (translation-ready) |
561+
| Tests | 1777 JVM unit tests (JUnit) |
562+
| Strings | 1738 string resources and 37 plural groups (translation-ready) |
563563
| Accessibility | 100+ content descriptions, 48dp touch targets |
564564
| Min SDK | 29 (Android 10) |
565565
| Target SDK | 36 |

0 commit comments

Comments
 (0)