Skip to content

Add tracker:<company> app-list search (#447)#647

Closed
kasnder wants to merge 3 commits into
masterfrom
claude/tracker-search-447
Closed

Add tracker:<company> app-list search (#447)#647
kasnder wants to merge 3 commits into
masterfrom
claude/tracker-search-447

Conversation

@kasnder

@kasnder kasnder commented Jul 12, 2026

Copy link
Copy Markdown
Member

Implements #447: let users search which installed apps have contacted a particular tracker company or SDK.

What

The existing app-list search box now understands a tracker: prefix. A query like

tracker:gravy analytics

filters the app list to apps whose observed/contacted tracker companies contain the query substring (case-insensitive). Plain queries keep the existing name/package/uid search behaviour unchanged.

How

  • TrackerList.getTrackerNamesByUid() — a single scan over the recorded hosts, mapping each app UID to the set of contacted tracker company names (same traversal pattern as the existing getTrackerCountsAndTotal()).
  • AdapterRule.getFilter() — on a tracker:-prefixed query, builds that lookup once per filter invocation on the Filter's background thread (no per-row DB queries, no UI-thread work), then keeps apps whose company set has a substring match.
  • Discoverability: the SearchView now shows the query hint "Search app, or tracker:company" (new base-English string menu_search_hint only; translations left to Crowdin).

No new screens, settings, or dependencies.

Usage example

  1. Open TrackerControl, tap the search icon on the Apps tab.
  2. Type tracker:facebook — the list shrinks to apps that have contacted Facebook-owned tracker domains.
  3. Tap an app to open its details and see/block the trackers.

Manual verification needed

  • On a device with recorded traffic: tracker:facebook (or another company seen in app details) returns the expected apps; a nonsense company returns an empty list.
  • Plain searches (app name, package, numeric uid) behave exactly as before.
  • The new query hint shows in the expanded SearchView and does not truncate awkwardly on narrow screens.
  • Search performance with a large host log (lookup is one DB scan per keystroke after the 300 ms debounce — please sanity-check on a long-running install).

Note: like the "contacted N companies" counts, this searches observed tracker contacts recorded by TC, not static SDK analysis, and interacts with the hidden-app search stubs from 58a9e0a only in that tracker-search matches are restricted to the visible list (stubs carry no tracker data).

Closes #447

🤖 Generated with Claude Code

kasnder and others added 2 commits July 12, 2026 10:34
Let users find which installed apps have contacted a particular
tracker company (e.g. "tracker:gravy analytics" or
"tracker:facebook") directly from the existing app-list search box.

- TrackerList.getTrackerNamesByUid(): one DB scan building a
  UID -> contacted-company-names lookup, mirroring the existing
  getTrackerCountsAndTotal() traversal.
- AdapterRule filter: a query starting with "tracker:" matches apps
  whose observed tracker companies contain the query substring
  (case-insensitive). The lookup is built once per filter invocation
  on the Filter's background thread, not per row. Plain queries keep
  the existing name/package/uid behaviour.
- Discoverability: SearchView query hint now reads
  "Search app, or tracker:company" (new base-English string only).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kasnder

kasnder commented Jul 12, 2026

Copy link
Copy Markdown
Member Author

Review finding — locale-independent matching (AdapterRule.java): The case-insensitive comparison depends on the device locale. In Turkish, for example, "Branch Metrics".toLowerCase() contains a dotless ı, so tracker:metrics will not match despite the feature promising case-insensitive search. Both the query and tracker name should be normalized with Locale.ROOT. I have prepared that fix on the PR branch.

@kasnder kasnder closed this Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search mode for tracking SDKs

1 participant